HarmonicExamplePlugin.hh 4.34 KB
Newer Older
Henrik Zimmer's avatar
Henrik Zimmer committed
1
2
/*===========================================================================*\
 *                                                                           *
Henrik Zimmer's avatar
Henrik Zimmer committed
3
 *                          Plugin-HarmonicExample                           *
Henrik Zimmer's avatar
Henrik Zimmer committed
4
5
6
7
 *      Copyright (C) 2008-2009 by Computer Graphics Group, RWTH Aachen      *
 *                           www.rwth-graphics.de                            *
 *                                                                           *
 *---------------------------------------------------------------------------* 
Henrik Zimmer's avatar
Henrik Zimmer committed
8
 *  This file is part of Plugin-HarmonicExample                              *
Henrik Zimmer's avatar
Henrik Zimmer committed
9
 *                                                                           *
Henrik Zimmer's avatar
Henrik Zimmer committed
10
11
12
13
 *  Plugin-HarmonicExample is free software: you can redistribute it and/or  *
 *  modify it under the terms of the GNU General Public License as published *
 *  by the Free Software Foundation, either version 3 of the License, or     *
 *  (at your option) any later version.                                      *
Henrik Zimmer's avatar
Henrik Zimmer committed
14
 *                                                                           *
Henrik Zimmer's avatar
Henrik Zimmer committed
15
 *  Plugin-HarmonicExample is distributed in the hope that it will be useful,*
Henrik Zimmer's avatar
Henrik Zimmer committed
16
17
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
Henrik Zimmer's avatar
Henrik Zimmer committed
18
 *  GNU General Public License for more details.                             *
Henrik Zimmer's avatar
Henrik Zimmer committed
19
 *                                                                           *
Henrik Zimmer's avatar
Henrik Zimmer committed
20
21
22
 *  You should have received a copy of the GNU General Public License        *
 *  along with Plugin-HarmonicExample.                                       *
 *  If not, see <http://www.gnu.org/licenses/>.                              *
Henrik Zimmer's avatar
Henrik Zimmer committed
23
24
25
 *                                                                           *
\*===========================================================================*/ 

Henrik Zimmer's avatar
Henrik Zimmer committed
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//=============================================================================
//
//  CLASS HarmonicExamplePlugin
//
//=============================================================================


#ifndef HARMONICEXAMPLEPLUGIN_HH
#define HARMONICEXAMPLEPLUGIN_HH


//== INCLUDES =================================================================

#include <QObject>
#include <QMenuBar>
#include <QSpinBox>

#include <OpenFlipper/common/Types.hh>
#include <OpenFlipper/BasePlugin/BaseInterface.hh>
#include <OpenFlipper/BasePlugin/ToolboxInterface.hh>
#include <OpenFlipper/BasePlugin/KeyInterface.hh>
#include <OpenFlipper/BasePlugin/MouseInterface.hh>
#include <OpenFlipper/BasePlugin/PickingInterface.hh>
#include <OpenFlipper/BasePlugin/ScriptInterface.hh>

#include <ACG/QtWidgets/QtExaminerViewer.hh>

#include <ObjectTypes/TriangleMesh/TriangleMesh.hh>

#include "HarmonicExampleToolbar.hh"
#include "HarmonicExamplePerObjectDataT.hh"
#include "HarmonicExampleT.hh"


//== CLASS DEFINITION =========================================================


class HarmonicExamplePlugin : public QObject, BaseInterface, ToolboxInterface, KeyInterface, ScriptInterface, MouseInterface, PickingInterface
{
  Q_OBJECT
  Q_INTERFACES(BaseInterface)
  Q_INTERFACES(ToolboxInterface)
  Q_INTERFACES(KeyInterface)
  Q_INTERFACES(ScriptInterface)
  Q_INTERFACES(MouseInterface)
  Q_INTERFACES(PickingInterface)


  // typedef for easy access
  typedef ACG::HarmonicExampleT<TriMesh> HarmonicExample;
  typedef HarmonicExamplePerObjectDataT<TriMesh>   POD;

signals:
  void updateView();
  void updatedObject(int);
82
  void addToolbox( QString _name  , QWidget* _widget );  
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123


private slots:

  // initialization functions
  void initializePlugin();
  void pluginsInitialized();


  // compute
  void slotCompute();


public :

  ~HarmonicExamplePlugin() {};


  QString name() { return (QString("HarmonicExample")); };
  QString description( ) { return (QString("Computes the HarmonicExample of the the active Mesh")); }; 

private :

  // return name of per object data
  const char * pod_name() { return "HARMONICEXAMPLE_PER_OBJECT_DATA";}

  // get HarmonicExample object for a given object
  HarmonicExample* get_harmonicexample_object( BaseObjectData* _object );
  


private :
  /// Widget for Toolbox
  HarmonicExampleToolbar* tool_;
};


//=============================================================================
#endif // HARMONICEXAMPLEPLUGIN_HH defined
//=============================================================================