|
@@ -10,6 +10,7 @@
|
|
|
#include <QCheckBox>
|
|
|
#include <QPushButton>
|
|
|
#include <QLabel>
|
|
|
+#include <QLineEdit>
|
|
|
#include <QBoxLayout>
|
|
|
#include <QMessageBox>
|
|
|
#include <QApplication>
|
|
@@ -32,7 +33,7 @@ OptionsForm::OptionsForm(QWidget *aParent)
|
|
|
auto_color_generation_->setText(tr("Automatic label color generation"));
|
|
|
button_set_PASCAL_root_ = new QPushButton(this);
|
|
|
button_set_PASCAL_root_->setText(tr("set PASCAL root path"));
|
|
|
- label_PASCAL_root_ = new QLabel("", this);
|
|
|
+ edit_PASCAL_root_ = new QLineEdit("", this);
|
|
|
button_ok_ = new QPushButton(this);
|
|
|
button_ok_->setText(tr("OK"));
|
|
|
button_cancel_ = new QPushButton(this);
|
|
@@ -43,7 +44,7 @@ OptionsForm::OptionsForm(QWidget *aParent)
|
|
|
layout_v_->addLayout(layout_h_);
|
|
|
|
|
|
layout_PASCAL_root_->addWidget(button_set_PASCAL_root_);
|
|
|
- layout_PASCAL_root_->addWidget(label_PASCAL_root_);
|
|
|
+ layout_PASCAL_root_->addWidget(edit_PASCAL_root_);
|
|
|
|
|
|
layout_h_->addWidget(button_ok_);
|
|
|
layout_h_->addWidget(button_cancel_);
|
|
@@ -75,7 +76,7 @@ OptionsForm::~OptionsForm()
|
|
|
{
|
|
|
delete auto_color_generation_;
|
|
|
delete button_set_PASCAL_root_;
|
|
|
- delete label_PASCAL_root_;
|
|
|
+ delete edit_PASCAL_root_;
|
|
|
delete button_ok_;
|
|
|
delete button_cancel_;
|
|
|
|
|
@@ -119,7 +120,7 @@ OptionsForm::newPascalPath()
|
|
|
}
|
|
|
|
|
|
*PASCALpath_ = newPath;
|
|
|
- label_PASCAL_root_->setText(newPath);
|
|
|
+ edit_PASCAL_root_->setText(newPath);
|
|
|
}
|
|
|
|
|
|
bool
|
|
@@ -128,6 +129,12 @@ OptionsForm::autoColorGeneration()
|
|
|
return auto_color_generation_->isChecked();
|
|
|
}
|
|
|
|
|
|
+void
|
|
|
+OptionsForm::setAutoColorGeneration(bool flag)
|
|
|
+{
|
|
|
+ auto_color_generation_->setChecked(flag);
|
|
|
+}
|
|
|
+
|
|
|
void
|
|
|
OptionsForm::showOptions()
|
|
|
{
|
|
@@ -137,10 +144,11 @@ OptionsForm::showOptions()
|
|
|
}
|
|
|
|
|
|
if (PASCALpath_->isEmpty())
|
|
|
- label_PASCAL_root_->setText(tr("root path is not set yet"));
|
|
|
+ edit_PASCAL_root_->setText(tr("root path is not set yet"));
|
|
|
else
|
|
|
- label_PASCAL_root_->setText(*PASCALpath_);
|
|
|
+ edit_PASCAL_root_->setText(*PASCALpath_);
|
|
|
|
|
|
+ adjustSize();
|
|
|
show();
|
|
|
}
|
|
|
|