blob: 1da8d26e9d70e0fecee5d5760de2c4419be2dba9 (
plain)
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
46
47
48
49
50
51
52
53
54
55
|
#include "dialogsave.h"
#include "ui_dialogsave.h"
DialogSave::DialogSave(QWidget *parent) :
QDialog(parent),
ui(new Ui::DialogSave)
{
ui->setupUi(this);
setWindowTitle("Save to File");
}
DialogSave::~DialogSave()
{
delete ui;
}
bool DialogSave::getEncrypted()
{
return ui->radioButtonEncrypted->isChecked();
}
bool DialogSave::getBinary()
{
return ui->checkBoxBinaryData->isChecked();
}
QString DialogSave::getFileName()
{
return ui->lineEditFileName->text();
}
//private slots:
void DialogSave::on_pushButtonSelectFile_clicked()
{
QString fileName;
fileName = QFileDialog::getSaveFileName(this, "Choose Filename to save as", QDir::currentPath());
if(fileName.length() == 0) return;
ui->lineEditFileName->setText( fileName );
}
void DialogSave::on_pushButtonSave_clicked()
{
//TODO check data
QDialog::accept();
}
void DialogSave::on_pushButtonCancel_clicked()
{
QDialog::reject();
}
|