1 #include "MosaicControlNetToolMovementConfigDialog.h"
8 #include <QDoubleValidator>
12 #include <QMessageBox>
13 #include <QPushButton>
15 #include <QElapsedTimer>
21 #include "MosaicControlNetTool.h"
22 #include "MosaicSceneWidget.h"
38 setWindowTitle(
"Movement Options");
40 QGridLayout *mainLayout =
new QGridLayout;
41 setLayout(mainLayout);
45 QString showMovementWhatsThis =
46 tr(
"Check or uncheck to draw or clear the movement arrows");
47 QLabel *showMovementLabel =
new QLabel(
"&Show Movement");
48 showMovementLabel->setWhatsThis(showMovementWhatsThis);
49 mainLayout->addWidget(showMovementLabel, row, 0);
59 QString colorSourceWhatsThis =
60 tr(
"Select criteria for arrow color");
61 QLabel *colorSourceLabel =
new QLabel(
"&Color Criteria");
62 colorSourceLabel->setWhatsThis(colorSourceWhatsThis);
63 mainLayout->addWidget(colorSourceLabel, row, 0, 1, 1);
80 QString brightestMeasureCountValueWhatsThis =
81 tr(
"Measure count of brightest color. Points with this measure count or greater will be "
82 "colored the brightest.");
97 QString brightestResidualMagnitudeValueWhatsThis =
98 tr(
"Residual magnitude of brightest color. Points with this maximum residual magnitude or "
99 "greater will be colored the brightest.");
114 mainLayout->setRowMinimumHeight(row, 10);
117 QHBoxLayout *buttonsAreaLayout =
new QHBoxLayout;
118 mainLayout->addLayout(buttonsAreaLayout, row, 0, 1, 2, Qt::AlignRight);
120 buttonsAreaLayout->addStretch();
127 this, SLOT(accept()));
136 QPushButton *cancelButton =
new QPushButton(
"&Cancel");
137 cancelButton->setIcon(QIcon::fromTheme(
"dialog-cancel"));
138 connect(cancelButton, SIGNAL(clicked()),
139 this, SLOT(reject()));
140 buttonsAreaLayout->addWidget(cancelButton);
189 if (
m_tool->maxMovementColorMeasureCount() != -1) {
194 if (
m_tool->maxMovementColorResidualMagnitude() !=
Null) {
212 bool comboSelectedMeasureCount =
215 bool movementIsMeasureCnt = movementEnabled && comboSelectedMeasureCount;
219 bool comboSelectedResidualMagnitude =
222 bool movementIsResidualMagnitude = movementEnabled && comboSelectedResidualMagnitude;
226 bool comboSelectedNoColor =
230 bool validState = !movementEnabled ||
231 comboSelectedNoColor ||
232 (comboSelectedMeasureCount &&
234 (comboSelectedResidualMagnitude &&