IsotropicRemesherPlugin.hh 2.67 KB
Newer Older
Jan Möbius's avatar
 
Jan Möbius committed
1
2
3
4
5
6
7
8
9
10

#ifndef ISOTROPICREMESHERPLUGIN_HH
#define ISOTROPICREMESHERPLUGIN_HH

#include <QtGui>

#include <OpenFlipper/BasePlugin/BaseInterface.hh>
#include <OpenFlipper/BasePlugin/ToolboxInterface.hh>
#include <OpenFlipper/BasePlugin/LoggingInterface.hh>
#include <OpenFlipper/BasePlugin/RPCInterface.hh>
11
#include <OpenFlipper/BasePlugin/ProcessInterface.hh>
Jan Möbius's avatar
Jan Möbius committed
12
#include <OpenFlipper/BasePlugin/BackupInterface.hh>
Jan Möbius's avatar
 
Jan Möbius committed
13
14
#include <OpenFlipper/common/Types.hh>
#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
Jan Möbius's avatar
Jan Möbius committed
15
#include <ObjectTypes/PolyMesh/PolyMesh.hh>
Jan Möbius's avatar
 
Jan Möbius committed
16
17

#include "IsotropicRemesherToolbox.hh"
18
#include "ProgressEmitter.hh"
Jan Möbius's avatar
 
Jan Möbius committed
19
20


Jan Möbius's avatar
Jan Möbius committed
21
class IsotropicRemesherPlugin : public QObject, BaseInterface, BackupInterface , ToolboxInterface, LoggingInterface, RPCInterface, ProcessInterface
Jan Möbius's avatar
 
Jan Möbius committed
22
23
24
25
26
27
{
Q_OBJECT
Q_INTERFACES(BaseInterface)
Q_INTERFACES(ToolboxInterface)
Q_INTERFACES(LoggingInterface)
Q_INTERFACES(RPCInterface)
28
Q_INTERFACES(ProcessInterface)
Jan Möbius's avatar
Jan Möbius committed
29
Q_INTERFACES(BackupInterface)
Jan Möbius's avatar
 
Jan Möbius committed
30

Jan Möbius's avatar
Jan Möbius committed
31

Jan Möbius's avatar
 
Jan Möbius committed
32
signals:
Jan Möbius's avatar
Jan Möbius committed
33
34
  
  //BaseInterface
Jan Möbius's avatar
 
Jan Möbius committed
35
  void updateView();
36
  void updatedObject(int _id, const UpdateType _type);
Jan Möbius's avatar
 
Jan Möbius committed
37
38
39
40

  void setSlotDescription(QString     _slotName,   QString     _slotDescription,
                          QStringList _parameters, QStringList _descriptions);

Jan Möbius's avatar
Jan Möbius committed
41
  //LoggingInterface:
Jan Möbius's avatar
 
Jan Möbius committed
42
43
44
  void log( Logtype _type, QString _message );
  void log( QString _message );

Jan Möbius's avatar
Jan Möbius committed
45
  // RPC Interface
Jan Möbius's avatar
 
Jan Möbius committed
46
47
  void pluginExists( QString _pluginName , bool& _exists  ) ;
  void functionExists( QString _pluginName , QString _functionName , bool& _exists  );
Jan Möbius's avatar
Jan Möbius committed
48
49
50
  
  // ToolboxInterface
  void addToolbox( QString _name  , QWidget* _widget );   
51
52
53
54
55
56
57
    
  // ProcessInterface 
  void startJob( QString _jobId, QString _description, int _min, int _max, bool _blocking = false);
  void setJobState(QString _jobId, int _value);
  void setJobName(QString _jobId, QString _name);
  void finishJob(QString _jobId);
  void setJobDescription(QString _jobId, QString _description);
Jan Möbius's avatar
Jan Möbius committed
58
59
60
  
  // BackupInterface
  void createBackup( int _id , QString _name );
Jan Möbius's avatar
 
Jan Möbius committed
61
62
63

private slots:

Jan Möbius's avatar
Jan Möbius committed
64
65
  // BaseInterface
  void initializePlugin();  
Jan Möbius's avatar
 
Jan Möbius committed
66
67
68
69
70
71
72
73
74
75
76
77
  void pluginsInitialized(); // BaseInterface

public :

  ~IsotropicRemesherPlugin() {};

  QString name() { return (QString("IsotropicRemesher")); };
  QString description( ) { return (QString("an isotropic remesher")); };

//GUI
private :
  IsotropicRemesherToolBox* tool_;
78
  double edgeLength_;
Jan Möbius's avatar
 
Jan Möbius committed
79
80
81
82

private slots:
  void slotRemesh();

83
  void slotRemeshButtonClicked();
Jan Möbius's avatar
 
Jan Möbius committed
84
85
86
  void slotSetMinLength();
  void slotSetMaxLength();
  void slotSetMeanLength();
87
88
  
  void threadFinished(QString _jobId);
Jan Möbius's avatar
 
Jan Möbius committed
89
90
91
92
93
94
95
96
97
98
99

//scripting functions
public slots:
  void isotropicRemesh(int _objectID, double _targetEdgeLength );


public slots:
  QString version() { return QString("1.0"); };
};

#endif //ISOTROPICREMESHERPLUGIN_HH