Commit c2b90f89 authored by Jan Möbius's avatar Jan Möbius

Added toolboxes for adaptive subdivision

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10246 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 8baf5193
......@@ -23,23 +23,19 @@ void SubdividerPlugin::initializePlugin()
QSize size(300, 300);
tool_->resize(size);
connect(tool_->subdivide_toolButton, SIGNAL( clicked() ), this, SLOT( slot_subdivide() ) );
connect(tool_->subdivide_uniform_toolButton, SIGNAL( clicked() ), this, SLOT( slotSubdivideUniform() ) );
emit addToolbox( tr("Subdivider") , tool_ );
}
}
void SubdividerPlugin::slotPickModeChanged( const std::string& /*_mode*/)
{
}
void SubdividerPlugin::pluginsInitialized()
{
}
//-----------------------------------------------------------------------------
void SubdividerPlugin::slot_subdivide()
void SubdividerPlugin::slotSubdivideUniform()
{
std::vector< int > ids;
if ( PluginFunctions::getTargetIdentifiers( ids ) )
......@@ -117,22 +113,4 @@ bool SubdividerPlugin::test_trimesh_object(int _identifier, BaseObjectData*& _ob
return true;
}
//-----------------------------------------------------------------------------
void SubdividerPlugin::slotMouseEvent( QMouseEvent* /*_event*/ )
{
}
//-----------------------------------------------------------------------------
void SubdividerPlugin::slotKeyEvent( QKeyEvent* _event )
{
switch (_event->key())
{
default:
break;
}
} // END slotKeyEvent
Q_EXPORT_PLUGIN2( subdividerplugin , SubdividerPlugin );
......@@ -9,11 +9,8 @@
#include <OpenFlipper/BasePlugin/BaseInterface.hh>
#include <OpenFlipper/BasePlugin/LoggingInterface.hh>
#include <OpenFlipper/BasePlugin/ToolboxInterface.hh>
#include <OpenFlipper/BasePlugin/KeyInterface.hh>
#include <OpenFlipper/BasePlugin/BackupInterface.hh>
#include <OpenFlipper/BasePlugin/MouseInterface.hh>
#include <OpenFlipper/BasePlugin/ScriptInterface.hh>
#include <OpenFlipper/BasePlugin/PickingInterface.hh>
#include <OpenFlipper/BasePlugin/LoadSaveInterface.hh>
#include <OpenFlipper/BasePlugin/BackupInterface.hh>
#include <OpenFlipper/common/Types.hh>
......@@ -25,16 +22,13 @@
//typename OpenMesh::Subdivider::Uniform:LoopT<TriMesh> LoopT;
//typename OpenMesh::Subdivider::Uniform:Sqrt3T<TriMesh> Sqrt3T;
class SubdividerPlugin : public QObject, BaseInterface , ToolboxInterface, LoggingInterface, PickingInterface, MouseInterface, LoadSaveInterface, KeyInterface, ScriptInterface, BackupInterface
class SubdividerPlugin : public QObject, BaseInterface , ToolboxInterface, LoggingInterface, LoadSaveInterface, ScriptInterface, BackupInterface
{
Q_OBJECT
Q_INTERFACES(BaseInterface)
Q_INTERFACES(ToolboxInterface)
Q_INTERFACES(LoggingInterface)
Q_INTERFACES(MouseInterface)
Q_INTERFACES(PickingInterface)
Q_INTERFACES(LoadSaveInterface)
Q_INTERFACES(KeyInterface)
Q_INTERFACES(ScriptInterface)
Q_INTERFACES(BackupInterface)
......@@ -53,8 +47,6 @@ signals:
void scriptInfo( QString _functionName );
void registerKey(int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse = false);
// ToolboxInterface
void addToolbox( QString _name , QWidget* _widget );
......@@ -63,14 +55,6 @@ signals:
private slots:
void slotMouseEvent( QMouseEvent* _event );
void slotMouseWheelEvent(QWheelEvent * /*_event*/, const std::string & /*_mode*/){};
void slotPickModeChanged( const std::string& _mode);
void slotKeyEvent( QKeyEvent* _event );
void initializePlugin();
void pluginsInitialized();
......@@ -80,7 +64,7 @@ private slots:
public slots:
void slot_subdivide();
void slotSubdivideUniform();
public :
~SubdividerPlugin() {};
......
......@@ -32,6 +32,12 @@
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Uniform Subdivision</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
......@@ -98,12 +104,91 @@ of SIGGRAPH 1996, ACM SIGGRAPH, 1996, pp. 189-192.</string>
</layout>
</item>
<item>
<widget class="QToolButton" name="subdivide_toolButton">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="subdivide_uniform_toolButton">
<property name="text">
<string>Subdivide</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Adaptive Subdivision</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="subdivide__adaptive_toolButton">
<property name="text">
<string>Subdivide</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
......
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