Developer Documentation
TypeTetrahedralMesh.hh
1 /*===========================================================================*\
2  * *
3  * OpenFlipper *
4  * Copyright (C) 2001-2014 by Computer Graphics Group, RWTH Aachen *
5  * www.openflipper.org *
6  * *
7  *---------------------------------------------------------------------------*
8  * This file is part of OpenFlipper. *
9  * *
10  * OpenFlipper is free software: you can redistribute it and/or modify *
11  * it under the terms of the GNU Lesser General Public License as *
12  * published by the Free Software Foundation, either version 3 of *
13  * the License, or (at your option) any later version with the *
14  * following exceptions: *
15  * *
16  * If other files instantiate templates or use macros *
17  * or inline functions from this file, or you compile this file and *
18  * link it with other files to produce an executable, this file does *
19  * not by itself cause the resulting executable to be covered by the *
20  * GNU Lesser General Public License. This exception does not however *
21  * invalidate any other reasons why the executable file might be *
22  * covered by the GNU Lesser General Public License. *
23  * *
24  * OpenFlipper is distributed in the hope that it will be useful, *
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
27  * GNU Lesser General Public License for more details. *
28  * *
29  * You should have received a copy of the GNU LesserGeneral Public *
30  * License along with OpenFlipper. If not, *
31  * see <http://www.gnu.org/licenses/>. *
32  * *
33  \*===========================================================================*/
34 
35 /*===========================================================================*\
36 * *
37 * $Revision$ *
38 * $LastChangedBy$ *
39 * $Date$ *
40 * *
41 \*===========================================================================*/
42 
43 #ifndef TYPETETRAHEDRALMESH_HH
44 #define TYPETETRAHEDRALMESH_HH
45 
46 #include <QObject>
47 
56 
58 Q_OBJECT
59 Q_INTERFACES(BaseInterface)
60 Q_INTERFACES(LoadSaveInterface)
61 Q_INTERFACES(TypeInterface)
62 Q_INTERFACES(KeyInterface)
63 Q_INTERFACES(LoggingInterface)
64 Q_INTERFACES(ContextMenuInterface)
65 
66 #if QT_VERSION >= 0x050000
67  Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-TypeTetrahedralMesh")
68 #endif
69 
70 signals:
71  // Logging interface
72  void log(Logtype _type, QString _message);
73  void log(QString _message);
74 
75  // LoadSave Interface
76  void emptyObjectAdded(int _id);
77 
78  // ContextMenuInterface
79  void addContextMenuItem(QAction* /*_action*/, DataType /*_objectType*/, ContextMenuType /*_type*/);
80 
81  // BaseInterface
82  void updatedObject(int _objId, const UpdateType& _type);
83 
84 private slots:
85 
86  // BaseInterface
87  void slotObjectUpdated(int _identifier, const UpdateType& _type);
88  void objectDeleted(int _identifier);
89  void noguiSupported() {}
90  void pluginsInitialized();
91 
92  // KeyInterface
93  void slotKeyEvent(QKeyEvent* _event);
94 
95  // ContextMenuInterface
96  void slotUpdateContextMenu(int _objectId);
97 
98  // Switches
99 
100  void slot_change_shrinkage();
101 
102  void slot_update_planes_in_scenegraph_node(int _deletedObject = -1);
103 
104  void switchRendering();
105 
106  void setTranslucencyFactor();
107 
108 public:
109 
111  }
112 
114 
115  QString name() {
116  return (QString("TypeTetrahedralMesh"));
117  }
118 
119  QString description() {
120  return (QString(tr("Register TetrahedralMesh type ")));
121  }
122 
123  bool registerType();
124 
125 public slots:
126 
127  QString version() {
128  return QString("1.0");
129  }
130 
131  // Type Interface
132  int addEmpty();
133 
134  DataType supportedType() {
135  return DATA_TETRAHEDRAL_MESH;
136  }
137 
138 
139 private:
140 
141  QAction* render_switch_;
142 
143  QAction* translucency_factor_action_;
144 
145 };
146 
147 #endif //TYPETETRAHEDRALMESH_HH
Interface class for creating custom context menus.
Predefined datatypes.
Definition: DataTypes.hh:96
Logtype
Log types for Message Window.
Keyboard Event Interface.
Definition: KeyInterface.hh:76
Interface class for type definitions.
Interface class from which all plugins have to be created.
Update type class.
Definition: UpdateType.hh:70
QString description()
Return a description of what the plugin is doing.
Interface for all Plugins which do logging to the logging window of the framework.
Interface for all plugins which want to Load or Save files and create Objects.
QString name()
Return a name for the plugin.