-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrenamedialog.cpp
More file actions
40 lines (32 loc) · 941 Bytes
/
renamedialog.cpp
File metadata and controls
40 lines (32 loc) · 941 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
#include "renamedialog.h"
#include "ui_renamedialog.h"
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
# pragma execution_character_set("utf-8")
#endif
RenameDialog::RenameDialog(QString curName,QWidget *parent) :
QDialog(parent),
ui(new Ui::RenameDialog)
{
ui->setupUi(this);
ui->lineEdit->setText(curName);
ui->lineEdit->selectAll();
connect(ui->pushButtonOk,SIGNAL(clicked()),this,SLOT(sltButtonOkClicked()));
connect(ui->pushButtonCancel,SIGNAL(clicked()),this,SLOT(reject()));
}
RenameDialog::RenameDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::RenameDialog)
{
ui->setupUi(this);
connect(ui->pushButtonOk,SIGNAL(clicked()),this,SLOT(sltButtonOkClicked()));
connect(ui->pushButtonCancel,SIGNAL(clicked()),this,SLOT(reject()));
}
RenameDialog::~RenameDialog()
{
delete ui;
}
void RenameDialog::sltButtonOkClicked()
{
m_newName = ui->lineEdit->text();
accept();
}