-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogcontroller.cpp
More file actions
41 lines (33 loc) · 921 Bytes
/
Copy pathlogcontroller.cpp
File metadata and controls
41 lines (33 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <QDateTime>
#include <QDesktopServices>
#include <QDir>
#include <QUrl>
#include "logcontroller.h"
#include "logsfpmodel.h"
/**
* @brief LogController::registerLogFile
*
*/
void LogController::registerLogFile(const QString logFile, bool isChecked)
{
// qDebug() << logFile << " - " << isChecked;
if (isChecked)
m_filesToCombine << logFile;
else
m_filesToCombine.removeOne(logFile);
}
/**
* @brief LogController::combineFiles
*
* React to user clicking the Combine button
*
*/
void LogController::combineFiles()
{
LogModel logModel;
LogSFPModel sfpModel;
logModel.populate(m_filesToCombine);
sfpModel.setSourceModel(&logModel);
sfpModel.writeCompoundedLog(m_filesToCombine, m_compoundedLogPath);
/*qDebug() << */QDesktopServices::openUrl(QUrl::fromLocalFile(QDir::currentPath()+"/"+"compounded.log"));
}