Integration of CLAMS depth calibration #114

This commit is contained in:
matlabbe
2016-09-19 14:01:06 -04:00
parent 861cc437f4
commit 3434b95d68
30 changed files with 2867 additions and 79 deletions

View File

@@ -53,12 +53,16 @@ ProgressDialog::ProgressDialog(QWidget *parent, Qt::WindowFlags flags) :
_detailedText->setLineWrapMode(QTextEdit::NoWrap);
_closeButton = new QPushButton(this);
_closeButton->setText("Close");
_cancelButton = new QPushButton(this);
_cancelButton->setText("Cancel");
_cancelButton-> setVisible(false);
_closeWhenDoneCheckBox = new QCheckBox(this);
_closeWhenDoneCheckBox->setChecked(true);
_closeWhenDoneCheckBox->setText("Close when done.");
_endMessage = "Finished!";
this->clear();
connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
connect(_cancelButton, SIGNAL(clicked()), this, SIGNAL(canceled()));
QVBoxLayout * layout = new QVBoxLayout(this);
layout->addWidget(_text);
@@ -67,6 +71,8 @@ ProgressDialog::ProgressDialog(QWidget *parent, Qt::WindowFlags flags) :
QHBoxLayout * hLayout = new QHBoxLayout();
layout->addLayout(hLayout);
hLayout->addWidget(_closeWhenDoneCheckBox);
hLayout->addStretch();
hLayout->addWidget(_cancelButton);
hLayout->addWidget(_closeButton);
this->setLayout(layout);
@@ -87,6 +93,11 @@ void ProgressDialog::setAutoClose(bool on, int delayedClosingTimeSec)
_closeWhenDoneCheckBox->setChecked(on);
}
void ProgressDialog::setCancelButtonVisible(bool visible)
{
_cancelButton->setVisible(visible);
}
void ProgressDialog::appendText(const QString & text, const QColor & color)
{
_text->setText(text);