Commit 2f2b638d authored by Matthias Möller's avatar Matthias Möller

add: manipulator mode can be selected in property widget

refs #485 

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14172 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 69aa9e6e
...@@ -134,6 +134,9 @@ void MovePlugin::showProps(){ ...@@ -134,6 +134,9 @@ void MovePlugin::showProps(){
connect(pW->projectTangentButton, SIGNAL(clicked() ), this, SLOT(slotProjectToTangentPlane())); connect(pW->projectTangentButton, SIGNAL(clicked() ), this, SLOT(slotProjectToTangentPlane()));
connect(pW->moveManipToCOG, SIGNAL(clicked() ), this, SLOT(slotMoveManipToCOG())); connect(pW->moveManipToCOG, SIGNAL(clicked() ), this, SLOT(slotMoveManipToCOG()));
connect(pW->selectionRadioButton, SIGNAL(clicked()), this, SLOT(slotEnableSelectionMode()));
connect(pW->objectRadioButton, SIGNAL(clicked()), this, SLOT(slotEnableObjectMode()));
// Values // Values
BaseObjectData* object; BaseObjectData* object;
if (PluginFunctions::getObject(lastActiveManipulator_, object)) { if (PluginFunctions::getObject(lastActiveManipulator_, object)) {
...@@ -173,6 +176,11 @@ void MovePlugin::showProps(){ ...@@ -173,6 +176,11 @@ void MovePlugin::showProps(){
num = QString::number(direction[2]); num = QString::number(direction[2]);
pW->dirzz->setText(num); pW->dirzz->setText(num);
if (PluginFunctions::pickMode() == "Move")
pW->objectRadioButton->setChecked(true);
else
pW->selectionRadioButton->setChecked(true);
} }
} }
......
...@@ -409,6 +409,18 @@ void MovePlugin::slotKeyEvent (QKeyEvent* _event) ...@@ -409,6 +409,18 @@ void MovePlugin::slotKeyEvent (QKeyEvent* _event)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void MovePlugin::slotEnableSelectionMode()
{
PluginFunctions::pickMode("MoveSelecion");
}
//------------------------------------------------------------------------------
void MovePlugin::slotEnableObjectMode()
{
PluginFunctions::pickMode("Move");
}
//------------------------------------------------------------------------------
void MovePlugin::slotKeyReleaseEvent (QKeyEvent* _event) void MovePlugin::slotKeyReleaseEvent (QKeyEvent* _event)
{ {
if ((_event->key() == Qt::Key_Control && manMode_ == QtTranslationManipulatorNode::Resize) || if ((_event->key() == Qt::Key_Control && manMode_ == QtTranslationManipulatorNode::Resize) ||
......
...@@ -221,6 +221,10 @@ public: ...@@ -221,6 +221,10 @@ public:
/// Scale Boundingbox Diagonal to unit size /// Scale Boundingbox Diagonal to unit size
void slotUnifyBoundingBoxDiagonal(); void slotUnifyBoundingBoxDiagonal();
void slotEnableSelectionMode();
void slotEnableObjectMode();
private: private:
/// Update the Dialog with the last clicked manipulator /// Update the Dialog with the last clicked manipulator
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>686</y> <y>680</y>
<width>308</width> <width>308</width>
<height>111</height> <height>111</height>
</rect> </rect>
...@@ -970,6 +970,51 @@ ...@@ -970,6 +970,51 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QGroupBox" name="groupBox_2">
<property name="geometry">
<rect>
<x>10</x>
<y>800</y>
<width>308</width>
<height>111</height>
</rect>
</property>
<property name="title">
<string>Manipulator Mode</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QRadioButton" name="selectionRadioButton">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Selection properties&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Set properties for a selection on an object.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Selection</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="objectRadioButton">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Object properties&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Set properties for an object.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Object</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
</layout> </layout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment