Commit 47813241 authored by Matthias Möller's avatar Matthias Möller

add init button for keeping initialization

refs #358

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15491 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 456a26b3
This diff is collapsed.
......@@ -55,6 +55,7 @@
#include <OpenFlipper/BasePlugin/LoggingInterface.hh>
#include <OpenFlipper/BasePlugin/ScriptInterface.hh>
#include <OpenFlipper/BasePlugin/RPCInterface.hh>
#include <OpenFlipper/BasePlugin/LoadSaveInterface.hh>
#include <OpenFlipper/common/Types.hh>
......@@ -78,12 +79,15 @@
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
#include <ACG/Utils/SmartPointer.hh>
#include <vector>
//== CLASS DEFINITION =========================================================
/** Plugin for Decimater Support
*/
class DecimaterPlugin : public QObject, BaseInterface, ToolboxInterface, LoggingInterface, ScriptInterface, BackupInterface, RPCInterface
class DecimaterPlugin : public QObject, BaseInterface, ToolboxInterface, LoggingInterface, ScriptInterface, BackupInterface, RPCInterface, LoadSaveInterface
{
Q_OBJECT
Q_INTERFACES(BaseInterface)
......@@ -92,6 +96,7 @@ class DecimaterPlugin : public QObject, BaseInterface, ToolboxInterface, Logging
Q_INTERFACES(LoggingInterface)
Q_INTERFACES(ScriptInterface)
Q_INTERFACES(RPCInterface)
Q_INTERFACES(LoadSaveInterface)
signals:
......@@ -126,6 +131,8 @@ private slots:
void slotObjectUpdated( int _identifier , const UpdateType& _type ); // BaseInterface
void slotObjectSelectionChanged( int _identifier ); // BaseInterface
void objectDeleted(int _id); //LoadSaveInterface
public :
/// Default constructor
......@@ -142,10 +149,6 @@ public :
private :
/// Widget for Toolbox
DecimaterToolbarWidget* tool_;
QIcon* toolIcon_;
typedef OpenMesh::Decimater::BaseDecimaterT< TriMesh > BaseDecimaterType;
typedef OpenMesh::Decimater::DecimaterT< TriMesh > DecimaterType;
typedef OpenMesh::Decimater::McDecimaterT< TriMesh > McDecimaterType;
......@@ -159,12 +162,22 @@ private :
typedef OpenMesh::Decimater::ModNormalFlippingT< TriMesh >::Handle ModNormalFlippingH;
typedef OpenMesh::Decimater::ModQuadricT< TriMesh >::Handle ModQuadricH;
typedef OpenMesh::Decimater::ModRoundnessT< TriMesh >::Handle ModRoundnessH;
/// Widget for Toolbox
DecimaterToolbarWidget* tool_;
//saves the decimater and the object id
std::vector< std::pair<ptr::shared_ptr<BaseDecimaterType>, int > > decimater_objects_;
QIcon* toolIcon_;
private slots:
/// decimating called from button in toolbox
void slot_decimate();
/// init called from button in toolbox
void slot_initialize();
/// roundness slider - spinbox sync
void updateRoundness(int _value);
void updateRoundness(double _value);
......
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>378</width>
<height>738</height>
<height>740</height>
</rect>
</property>
<property name="windowTitle">
......@@ -552,14 +552,31 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
<widget class="QPushButton" name="pbDecimate">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Decimate</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="pbInitialize">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Initialize or reinitialize the decimater.&lt;/p&gt;&lt;p&gt;You need to initialize again, if you changed the Constraints and/or Decimation Order and/or the Decimater and/or the meshes.&lt;/p&gt;&lt;p&gt;Otherwise you will use the old one&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Initialize</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbDecimate">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Decimates all target meshes. If you change Constraints, Decimation Order, the Decimater or the mesh, initialize again.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Decimate</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
......
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