SlicePlugin.hh 1.41 KB
Newer Older
Jan Möbius's avatar
 
Jan Möbius committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef SLICEPLUGIN_HH
#define SLICEPLUGIN_HH

#include <QObject>
#include <QtGui>

#include <OpenFlipper/BasePlugin/BaseInterface.hh>
#include <OpenFlipper/BasePlugin/ToolboxInterface.hh>
#include <OpenFlipper/BasePlugin/LoggingInterface.hh>
#include <OpenFlipper/BasePlugin/KeyInterface.hh>
#include <ACG/Scenegraph/ClippingNode.hh>
// #include <OpenFlipper/common/Types.hh>

#include "SliceToolbox.hh"

class SlicePlugin : public QObject, BaseInterface, ToolboxInterface, LoggingInterface
{
Q_OBJECT
Q_INTERFACES(BaseInterface)
Q_INTERFACES(ToolboxInterface)
Q_INTERFACES(LoggingInterface)

//BaseInterface
signals:
  void updateView();
  void updatedObject(int);

//LoggingInterface:
  void log( Logtype _type, QString _message );
  void log( QString _message );
  
  // ToolboxInterface
  void addToolbox( QString _name  , QWidget* _widget );   

private slots:

  void initializePlugin(); // BaseInterface
  
public :

  ~SlicePlugin() {};

  QString name() { return (QString("Slice")); };
  QString description( ) { return (QString("Slice objects")); };

private :
  SliceToolBox* tool_;
  QButtonGroup* bbGroup;
  QButtonGroup* axisGroup;

  void getBoundingBox(ACG::Vec3d& bbmin, ACG::Vec3d& bbmax);

private slots:
  void resetParameters();
  void updateSlice();
  void updateSlice(int bla);

private:
  ACG::SceneGraph::ClippingNode* node_;

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

#endif //SLICEPLUGIN_HH