update dict
[QFreeRecite.git] / src / gui / ScanModeDialog.cpp
blobb8a98aa491ddded3fd9de2125065ff941c16e2bb
1 #include <QFileDialog>
2 #include <Debug.h>
3 #include "ScanModeDialog.h"
5 using namespace Type;
7 ModeType ScanModeDialog::type(None);
9 ScanModeDialog::ScanModeDialog(QWidget *parent)
10 : QDialog(parent)
12 setupUi(this);
13 type = None;
14 D_OUTPUT("ScanModeDialog()")
17 ScanModeDialog::~ScanModeDialog()
19 D_OUTPUT("~ScanModeDialog()")
22 Type::ModeType
23 ScanModeDialog::getMode(QWidget *parent) {
24 type = None;
25 ScanModeDialog *dialog = new ScanModeDialog(parent);
26 dialog->setModal(true);
27 connect(dialog->okButton,SIGNAL(clicked()),
28 dialog,SLOT(ok()));
29 connect(dialog->cancelButton,SIGNAL(clicked()),
30 dialog,SLOT(deleteLater()));
31 dialog->exec();
32 return type;
35 void ScanModeDialog::ok() {
36 if(normalButton->isChecked())
37 type = Normal;
38 else
39 type = Reverse;
40 deleteLater();