-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdealwithspacesdialog.cpp
43 lines (35 loc) · 980 Bytes
/
dealwithspacesdialog.cpp
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
#include "dealwithspacesdialog.h"
#include "ui_dealwithspacesdialog.h"
DealWithSpacesDialog::DealWithSpacesDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::DealWithSpacesDialog)
{
ui->setupUi(this);
mResult = DealWithSpacesDialog::CancelEdit;
connect(ui->splitWord, SIGNAL(clicked()), this, SLOT(splitWord()) );
connect(ui->convertSpaces, SIGNAL(clicked()), this, SLOT(convertSpaces()) );
connect(ui->cancelEdit, SIGNAL(clicked()), this, SLOT(cancelEdit()) );
}
DealWithSpacesDialog::~DealWithSpacesDialog()
{
delete ui;
}
DealWithSpacesDialog::Result DealWithSpacesDialog::choice() const
{
return mResult;
}
void DealWithSpacesDialog::splitWord()
{
mResult = DealWithSpacesDialog::SplitWord;
accept();
}
void DealWithSpacesDialog::convertSpaces()
{
mResult = DealWithSpacesDialog::ConvertSpaces;
accept();
}
void DealWithSpacesDialog::cancelEdit()
{
mResult = DealWithSpacesDialog::CancelEdit;
accept();
}