-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPageFinal.cpp
More file actions
45 lines (38 loc) · 1.14 KB
/
Copy pathPageFinal.cpp
File metadata and controls
45 lines (38 loc) · 1.14 KB
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
42
43
44
45
#include "Wizard.h"
#include "PageFinal.h"
#include "Storage.h"
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QFileDialog>
#include <QMessageBox>
PageFinal::PageFinal(QWidget *parent): QWizardPage(parent)
{
setTitle(tr("Conclusion"));
setPixmap(QWizard::WatermarkPixmap, QPixmap(":/pics/logo.png"));
topLabel = new QLabel(tr("After the balancing you're able to save your "
"specification data and/or the balancing logs."));
topLabel->setWordWrap(true);
saveLogsButton = new QPushButton(QPixmap(":/pics/table-save.png"),
tr("Save &Logs"));
QVBoxLayout *vlayout = new QVBoxLayout;
vlayout->addWidget(topLabel);
vlayout->addWidget(saveLogsButton);
setLayout(vlayout);
connect(saveLogsButton, SIGNAL(clicked()), this, SLOT(SaveLogs()));
}
int PageFinal::nextId() const
{
return -1;
}
void PageFinal::SaveLogs()
{
QString ftemp = QFileDialog::getSaveFileName(this,
tr("Save Balancing Logs File"), QString(),
tr("Text Files (*.txt);;All Files (*.*)"));
if (ftemp == "") return;
if (!Storage::SaveLogs(ftemp))
{
QMessageBox::warning(this, tr("Saving Balacing Logs"),
tr("Unable to save balancing logs text data file"));
}
}