forked from KengoSawa2/RapidCopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjoblistrenamedialog.cpp
55 lines (49 loc) · 1.6 KB
/
joblistrenamedialog.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
44
45
46
47
48
49
50
51
52
53
54
55
/* ========================================================================
Project Name : Fast/Force copy file and directory
Create : 2016-02-28
Copyright : Kengo Sawatsu
Summary : 「ジョブリストのリネーム」専用ダイアログ
Reference :
======================================================================== */
#include "joblistrenamedialog.h"
#include "ui_joblistrenamedialog.h"
#include "mainwindow.h"
JobListRenameDialog::JobListRenameDialog(QWidget *parent,Cfg *cfg_pt,QString before_name,QString* after_name) :
QDialog(parent),
ui(new Ui::JobListRenameDialog)
{
ui->setupUi(this);
cfg = cfg_pt;
joblistname_before = before_name;
ui->lineEdit_newJobListName->setText(joblistname_before);
this->setWindowTitle((char*)GetLoadStrV(IDS_JOBLISTRENAME_TITLE));
joblistname_after = after_name;
}
JobListRenameDialog::~JobListRenameDialog()
{
delete ui;
}
void JobListRenameDialog::on_lineEdit_newJobListName_textChanged(const QString &arg1)
{
if(cfg->SearchJobList(arg1.toLocal8Bit().data()) == -1){
ui->pushButton_Ok->setEnabled(true);
}
else{
ui->pushButton_Ok->setEnabled(false);
}
return;
}
void JobListRenameDialog::on_pushButton_Ok_clicked()
{
//MainWindowへのリターン文字列(リネーム後文字列)セット
joblistname_after->clear();
joblistname_after->append(ui->lineEdit_newJobListName->text());
//リターン
this->accept();
}
void JobListRenameDialog::on_pushButton_Cancel_clicked()
{
//内容をemptyにしてリターン
joblistname_after->clear();
this->reject();
}