forked from KengoSawa2/RapidCopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfirmdialog.cpp
56 lines (48 loc) · 1.37 KB
/
confirmdialog.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
56
/* ========================================================================
Project Name : Fast/Force copy file and directory
Create : 2016-02-28
Copyright : Kengo Sawatsu
Summary : 「実行前確認」 のダイアログ
Reference :
======================================================================== */
#include "confirmdialog.h"
#include "ui_confirmdialog.h"
confirmDialog::confirmDialog(QWidget *parent,
FastCopy::Info *_info,
Cfg *_cfg,
const void *_title,
const void *_src,
const void *_dst,
bool _isShellext) :
QDialog(parent),
ui(new Ui::confirmDialog)
{
ui->setupUi(this);
exec_button = new QPushButton(tr("&Execute"));
ui->buttonBox->addButton(exec_button,QDialogButtonBox::AcceptRole);
info = _info;
cfg = _cfg;
title = _title;
src = _src;
dst = _dst;
isShellExt = _isShellext;
if(title != NULL){
this->setWindowTitle((char*)title);
}
ui->textEdit_Src->setText((char*)src);
if(dst != NULL){
ui->textEdit_Dst->setText((char*)dst);
}
else{
//deleteモード
ui->label_Dst->hide();
this->resize(this->width(),this->height() - ui->label_Dst->height());
ui->textEdit_Dst->hide();
this->resize(this->width(),this->height() - ui->textEdit_Dst->height());
}
}
confirmDialog::~confirmDialog()
{
delete ui;
delete exec_button;
}