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

View File

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

View File

@ -28,34 +28,6 @@
</item> </item>
</layout> </layout>
</item> </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> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
@ -97,6 +69,9 @@
<property name="maximum"> <property name="maximum">
<double>999999.000000000000000</double> <double>999999.000000000000000</double>
</property> </property>
<property name="singleStep">
<double>5.000000000000000</double>
</property>
<property name="value"> <property name="value">
<double>100.000000000000000</double> <double>100.000000000000000</double>
</property> </property>