Skip to content

Commit

Permalink
Added a reversed checkbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcc242 authored and yorikvanhavre committed Feb 5, 2014
1 parent 75f7ebc commit 165a4e5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Mod/PartDesign/Gui/TaskPocketParameters.cpp
Expand Up @@ -65,6 +65,8 @@ TaskPocketParameters::TaskPocketParameters(ViewProviderPocket *PocketView,QWidge
this, SLOT(onLengthChanged(double)));
connect(ui->checkBoxMidplane, SIGNAL(toggled(bool)),
this, SLOT(onMidplaneChanged(bool)));
connect(ui->checkBoxReversed, SIGNAL(toggled(bool)),
this, SLOT(onReversedChanged(bool)));
connect(ui->changeMode, SIGNAL(currentIndexChanged(int)),
this, SLOT(onModeChanged(int)));
connect(ui->buttonFace, SIGNAL(pressed()),
Expand Down Expand Up @@ -228,6 +230,14 @@ void TaskPocketParameters::onMidplaneChanged(bool on)
pcPocket->getDocument()->recomputeFeature(pcPocket);
}

void TaskPocketParameters::onReversedChanged(bool on)
{
PartDesign::Pocket* pcPocket = static_cast<PartDesign::Pocket*>(PocketView->getObject());
pcPocket->Reversed.setValue(on);
if (updateView())
pcPocket->getDocument()->recomputeFeature(pcPocket);
}

void TaskPocketParameters::onModeChanged(int index)
{
PartDesign::Pocket* pcPocket = static_cast<PartDesign::Pocket*>(PocketView->getObject());
Expand Down
1 change: 1 addition & 0 deletions src/Mod/PartDesign/Gui/TaskPocketParameters.h
Expand Up @@ -61,6 +61,7 @@ class TaskPocketParameters : public Gui::TaskView::TaskBox, public Gui::Selectio
private Q_SLOTS:
void onLengthChanged(double);
void onMidplaneChanged(bool);
void onReversedChanged(bool);
void onModeChanged(int);
void onButtonFace(const bool pressed = true);
void onFaceName(const QString& text);
Expand Down
10 changes: 10 additions & 0 deletions src/Mod/PartDesign/Gui/TaskPocketParameters.ui
Expand Up @@ -74,6 +74,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxReversed">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Reversed</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
Expand Down

0 comments on commit 165a4e5

Please sign in to comment.