-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmodifysyncdialog.cpp
More file actions
35 lines (31 loc) · 1.26 KB
/
modifysyncdialog.cpp
File metadata and controls
35 lines (31 loc) · 1.26 KB
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
#include "modifysyncdialog.h"
#include "ui_modifysyncdialog.h"
#include "common.h"
const char* typeNames[3]={"Download only", "Upload only", "Download and Upload"};
ModifySyncDialog::ModifySyncDialog(QString local, QString remote,int type, QWidget *parent) :
QDialog(parent),
ui(new Ui::ModifySyncDialog)
{
ui->setupUi(this);
ui->label_localVal->setText(local);
ui->label_localVal->setToolTip(local);
ui->label_remoteVal->setText(remote);
ui->label_remoteVal->setToolTip(remote);
ui->label_DirectionVal->setText(typeNames[type -1]);
ui->combo_Directions->setCurrentIndex(type-1);
connect(ui->bntSave, SIGNAL(clicked()), this, SLOT(accept()));
connect(ui->btnCancel, SIGNAL(clicked()), this, SLOT(hide()));
this->setWindowTitle("pCloud Drive");
this->setWindowIcon(QIcon(WINDOW_ICON));
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); // to have min size for diff OSs
this->layout()->setSizeConstraint(QLayout::SetFixedSize); //not resized
this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); //remove help option
}
ModifySyncDialog::~ModifySyncDialog()
{
delete ui;
}
int ModifySyncDialog::returnNewType()
{
return ui->combo_Directions->currentIndex();
}