Little optimization: change 'cansel' to 'cancel'
--HG-- branch : feature
This commit is contained in:
parent
c4fe05df11
commit
31aee635e4
|
@ -43,7 +43,7 @@ TapeConfigDialog::TapeConfigDialog(QWidget *parent)
|
||||||
configurationPage(nullptr),
|
configurationPage(nullptr),
|
||||||
pathPage(nullptr),
|
pathPage(nullptr),
|
||||||
applyButton(nullptr),
|
applyButton(nullptr),
|
||||||
canselButton(nullptr),
|
cancelButton(nullptr),
|
||||||
okButton(nullptr),
|
okButton(nullptr),
|
||||||
isInitialized(false)
|
isInitialized(false)
|
||||||
{
|
{
|
||||||
|
@ -66,14 +66,14 @@ TapeConfigDialog::TapeConfigDialog(QWidget *parent)
|
||||||
pagesWidget->addWidget(pathPage);
|
pagesWidget->addWidget(pathPage);
|
||||||
|
|
||||||
applyButton = new QPushButton(tr("Apply"));
|
applyButton = new QPushButton(tr("Apply"));
|
||||||
canselButton = new QPushButton(tr("&Cancel"));
|
cancelButton = new QPushButton(tr("&Cancel"));
|
||||||
okButton = new QPushButton(tr("&Ok"));
|
okButton = new QPushButton(tr("&Ok"));
|
||||||
|
|
||||||
createIcons();
|
createIcons();
|
||||||
connect(contentsWidget, &QListWidget::currentItemChanged, this, &TapeConfigDialog::changePage);
|
connect(contentsWidget, &QListWidget::currentItemChanged, this, &TapeConfigDialog::changePage);
|
||||||
contentsWidget->setCurrentRow(0);
|
contentsWidget->setCurrentRow(0);
|
||||||
|
|
||||||
connect(canselButton, &QPushButton::clicked, this, &TapeConfigDialog::close);
|
connect(cancelButton, &QPushButton::clicked, this, &TapeConfigDialog::close);
|
||||||
connect(applyButton, &QPushButton::clicked, this, &TapeConfigDialog::Apply);
|
connect(applyButton, &QPushButton::clicked, this, &TapeConfigDialog::Apply);
|
||||||
connect(okButton, &QPushButton::clicked, this, &TapeConfigDialog::Ok);
|
connect(okButton, &QPushButton::clicked, this, &TapeConfigDialog::Ok);
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ TapeConfigDialog::TapeConfigDialog(QWidget *parent)
|
||||||
QHBoxLayout *buttonsLayout = new QHBoxLayout;
|
QHBoxLayout *buttonsLayout = new QHBoxLayout;
|
||||||
buttonsLayout->addStretch(1);
|
buttonsLayout->addStretch(1);
|
||||||
buttonsLayout->addWidget(applyButton);
|
buttonsLayout->addWidget(applyButton);
|
||||||
buttonsLayout->addWidget(canselButton);
|
buttonsLayout->addWidget(cancelButton);
|
||||||
buttonsLayout->addWidget(okButton);
|
buttonsLayout->addWidget(okButton);
|
||||||
|
|
||||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||||
|
@ -200,7 +200,7 @@ void TapeConfigDialog::Ok()
|
||||||
void TapeConfigDialog::RetranslateUi()
|
void TapeConfigDialog::RetranslateUi()
|
||||||
{
|
{
|
||||||
applyButton->setText(tr("Apply"));
|
applyButton->setText(tr("Apply"));
|
||||||
canselButton->setText(tr("&Cancel"));
|
cancelButton->setText(tr("&Cancel"));
|
||||||
okButton->setText(tr("&Ok"));
|
okButton->setText(tr("&Ok"));
|
||||||
setWindowTitle(tr("Config Dialog"));
|
setWindowTitle(tr("Config Dialog"));
|
||||||
contentsWidget->item(0)->setText(tr("Configuration"));
|
contentsWidget->item(0)->setText(tr("Configuration"));
|
||||||
|
|
|
@ -57,7 +57,7 @@ private:
|
||||||
TapeConfigurationPage *configurationPage;
|
TapeConfigurationPage *configurationPage;
|
||||||
TapePathPage *pathPage;
|
TapePathPage *pathPage;
|
||||||
QPushButton *applyButton;
|
QPushButton *applyButton;
|
||||||
QPushButton *canselButton;
|
QPushButton *cancelButton;
|
||||||
QPushButton *okButton;
|
QPushButton *okButton;
|
||||||
bool isInitialized;
|
bool isInitialized;
|
||||||
|
|
||||||
|
|
|
@ -66,9 +66,9 @@ DialogPatternProperties::DialogPatternProperties(VPattern *doc, VContainer *pat
|
||||||
connect(ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, this,
|
connect(ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, this,
|
||||||
&DialogPatternProperties::Apply);
|
&DialogPatternProperties::Apply);
|
||||||
|
|
||||||
QPushButton *bCansel = ui->buttonBox->button(QDialogButtonBox::Cancel);
|
QPushButton *bCancel = ui->buttonBox->button(QDialogButtonBox::Cancel);
|
||||||
SCASSERT(bCansel != nullptr);
|
SCASSERT(bCancel != nullptr);
|
||||||
connect(bCansel, &QPushButton::clicked, this, &DialogPatternProperties::close);
|
connect(bCancel, &QPushButton::clicked, this, &DialogPatternProperties::close);
|
||||||
|
|
||||||
ui->tabWidget->setCurrentIndex(0);
|
ui->tabWidget->setCurrentIndex(0);
|
||||||
if (qApp->patternType() != MeasurementsType::Standard)
|
if (qApp->patternType() != MeasurementsType::Standard)
|
||||||
|
|
|
@ -67,9 +67,9 @@ DialogDetail::DialogDetail(const VContainer *data, const quint32 &toolId, QWidge
|
||||||
bOk = ui.buttonBox->button(QDialogButtonBox::Ok);
|
bOk = ui.buttonBox->button(QDialogButtonBox::Ok);
|
||||||
SCASSERT(bOk != nullptr);
|
SCASSERT(bOk != nullptr);
|
||||||
connect(bOk, &QPushButton::clicked, this, &DialogTool::DialogAccepted);
|
connect(bOk, &QPushButton::clicked, this, &DialogTool::DialogAccepted);
|
||||||
QPushButton *bCansel = ui.buttonBox->button(QDialogButtonBox::Cancel);
|
QPushButton *bCancel = ui.buttonBox->button(QDialogButtonBox::Cancel);
|
||||||
SCASSERT(bCansel != nullptr);
|
SCASSERT(bCancel != nullptr);
|
||||||
connect(bCansel, &QPushButton::clicked, this, &DialogTool::DialogRejected);
|
connect(bCancel, &QPushButton::clicked, this, &DialogTool::DialogRejected);
|
||||||
|
|
||||||
flagName = true;//We have default name of detail.
|
flagName = true;//We have default name of detail.
|
||||||
ChangeColor(labelEditNamePoint, okColor);
|
ChangeColor(labelEditNamePoint, okColor);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user