-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselection.cpp
More file actions
48 lines (41 loc) · 781 Bytes
/
selection.cpp
File metadata and controls
48 lines (41 loc) · 781 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
42
43
44
45
46
47
48
#include "selection.h"
#include "ui_selection.h"
selection::selection( int *option,QWidget *parent) :
QDialog(parent),
ui(new Ui::selection)
{
ptr=option;
ui->setupUi(this);
this->setWindowTitle("phpDirect");
}
selection::~selection()
{
delete ui;
}
void selection::on_pushButton_clicked()
{
*ptr=1;
this->close();
}
void selection::on_pushButton_2_clicked()
{
*ptr=2;
this->close();
}
void selection::on_lineEdit_textChanged(const QString &arg1)
{
if(arg1.at(0)=='1'||arg1.at(0)=='b'||arg1.at(0)=='B')
{
*ptr=1;
this->close();
}
else if(arg1.at(0)=='2'||arg1.at(0)=='e'||arg1.at(0)=='E')
{
*ptr=2;
this->close();
}
else
{
ui->lineEdit->setText(NULL);
}
}