[#874] remove x,y,z from linear patter, cause makes no sense

This commit is contained in:
jriegel 2012-11-15 19:55:23 +01:00
parent 08a39943af
commit 8a40df6c22
3 changed files with 38 additions and 69 deletions

View File

@ -93,12 +93,6 @@ TaskLinearPatternParameters::TaskLinearPatternParameters(TaskMultiTransformParam
void TaskLinearPatternParameters::setupUI()
{
connect(ui->buttonX, SIGNAL(pressed()),
this, SLOT(onButtonX()));
connect(ui->buttonY, SIGNAL(pressed()),
this, SLOT(onButtonY()));
connect(ui->buttonZ, SIGNAL(pressed()),
this, SLOT(onButtonZ()));
connect(ui->checkReverse, SIGNAL(toggled(bool)),
this, SLOT(onCheckReverse(bool)));
connect(ui->spinLength, SIGNAL(valueChanged(double)),
@ -125,9 +119,9 @@ void TaskLinearPatternParameters::setupUI()
}
// ---------------------
ui->buttonX->setEnabled(true);
ui->buttonY->setEnabled(true);
ui->buttonZ->setEnabled(true);
//ui->buttonX->setEnabled(true);
//ui->buttonY->setEnabled(true);
//ui->buttonZ->setEnabled(true);
ui->checkReverse->setEnabled(true);
ui->spinLength->setEnabled(true);
ui->spinOccurrences->setEnabled(true);
@ -154,20 +148,20 @@ void TaskLinearPatternParameters::updateUI()
ui->buttonReference->setChecked(referenceSelectionMode);
if (!stdDirection.empty())
{
ui->buttonX->setAutoExclusive(true);
ui->buttonY->setAutoExclusive(true);
ui->buttonZ->setAutoExclusive(true);
ui->buttonX->setChecked(stdDirection == "X");
ui->buttonY->setChecked(stdDirection == "Y");
ui->buttonZ->setChecked(stdDirection == "Z");
//ui->buttonX->setAutoExclusive(true);
//ui->buttonY->setAutoExclusive(true);
//ui->buttonZ->setAutoExclusive(true);
//ui->buttonX->setChecked(stdDirection == "X");
//ui->buttonY->setChecked(stdDirection == "Y");
//ui->buttonZ->setChecked(stdDirection == "Z");
ui->lineReference->setText(tr(""));
} else if (directionFeature != NULL && !directions.empty()) {
ui->buttonX->setAutoExclusive(false);
ui->buttonY->setAutoExclusive(false);
ui->buttonZ->setAutoExclusive(false);
ui->buttonX->setChecked(false);
ui->buttonY->setChecked(false);
ui->buttonZ->setChecked(false);
//ui->buttonX->setAutoExclusive(false);
//ui->buttonY->setAutoExclusive(false);
//ui->buttonZ->setAutoExclusive(false);
//ui->buttonX->setChecked(false);
//ui->buttonY->setChecked(false);
//ui->buttonZ->setChecked(false);
ui->lineReference->setText(QString::fromAscii(directions.front().c_str()));
} else {
// Error message?
@ -220,17 +214,17 @@ void TaskLinearPatternParameters::onSelectionChanged(const Gui::SelectionChanges
}
}
void TaskLinearPatternParameters::onButtonX() {
onStdDirection("X");
}
void TaskLinearPatternParameters::onButtonY() {
onStdDirection("Y");
}
void TaskLinearPatternParameters::onButtonZ() {
onStdDirection("Z");
}
//void TaskLinearPatternParameters::onButtonX() {
// onStdDirection("X");
//}
//
//void TaskLinearPatternParameters::onButtonY() {
// onStdDirection("Y");
//}
//
//void TaskLinearPatternParameters::onButtonZ() {
// onStdDirection("Z");
//}
void TaskLinearPatternParameters::onCheckReverse(const bool on) {
if (blockUpdate)
@ -321,12 +315,12 @@ void TaskLinearPatternParameters::onUpdateView(bool on)
const std::string TaskLinearPatternParameters::getStdDirection(void) const
{
if (ui->buttonX->isChecked())
return std::string("X");
else if (ui->buttonY->isChecked())
return std::string("Y");
else if (ui->buttonZ->isChecked())
return std::string("Z");
//if (ui->buttonX->isChecked())
// return std::string("X");
//else if (ui->buttonY->isChecked())
// return std::string("Y");
//else if (ui->buttonZ->isChecked())
// return std::string("Z");
return std::string("");
}

View File

@ -64,9 +64,9 @@ public:
private Q_SLOTS:
void onStdDirection(const std::string& dir);
void onButtonX();
void onButtonY();
void onButtonZ();
//void onButtonX();
//void onButtonY();
//void onButtonZ();
void onCheckReverse(const bool on);
void onLength(const double l);
void onOccurrences(const int n);

View File

@ -28,34 +28,6 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QRadioButton" name="buttonX">
<property name="text">
<string>X</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="buttonY">
<property name="text">
<string>Y</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="buttonZ">
<property name="text">
<string>Z</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
@ -97,6 +69,9 @@
<property name="maximum">
<double>999999.000000000000000</double>
</property>
<property name="singleStep">
<double>5.000000000000000</double>
</property>
<property name="value">
<double>100.000000000000000</double>
</property>