Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TypeHexahedralMesh.hh
1 /*===========================================================================*\
2  * *
3  * OpenFlipper *
4  * Copyright (c) 2001-2015, RWTH-Aachen University *
5  * Department of Computer Graphics and Multimedia *
6  * All rights reserved. *
7  * www.openflipper.org *
8  * *
9  *---------------------------------------------------------------------------*
10  * This file is part of OpenFlipper. *
11  *---------------------------------------------------------------------------*
12  * *
13  * Redistribution and use in source and binary forms, with or without *
14  * modification, are permitted provided that the following conditions *
15  * are met: *
16  * *
17  * 1. Redistributions of source code must retain the above copyright notice, *
18  * this list of conditions and the following disclaimer. *
19  * *
20  * 2. Redistributions in binary form must reproduce the above copyright *
21  * notice, this list of conditions and the following disclaimer in the *
22  * documentation and/or other materials provided with the distribution. *
23  * *
24  * 3. Neither the name of the copyright holder nor the names of its *
25  * contributors may be used to endorse or promote products derived from *
26  * this software without specific prior written permission. *
27  * *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39  * *
40  \*===========================================================================*/
41 
42 /*===========================================================================*\
43 * *
44 * $Revision: 11279 $ *
45 * $LastChangedBy: kremer $ *
46 * $Date: 2011-04-11 17:35:27 +0200 (Mon, 11 Apr 2011) $ *
47 * *
48 \*===========================================================================*/
49 
50 #ifndef TYPEHEXAHEDRALMESH_HH
51 #define TYPEHEXAHEDRALMESH_HH
52 
53 #include <QObject>
54 
63 
65 Q_OBJECT
66 Q_INTERFACES(BaseInterface)
67 Q_INTERFACES(LoadSaveInterface)
68 Q_INTERFACES(TypeInterface)
69 Q_INTERFACES(KeyInterface)
70 Q_INTERFACES(LoggingInterface)
71 Q_INTERFACES(ContextMenuInterface)
72 
73 #if QT_VERSION >= 0x050000
74  Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-TypeHexahedralMesh")
75 #endif
76 
77 signals:
78  // Logging interface
79  void log(Logtype _type, QString _message);
80  void log(QString _message);
81 
82  // LoadSave Interface
83  void emptyObjectAdded(int _id);
84 
85  // ContextMenuInterface
86  void addContextMenuItem(QAction* /*_action*/, DataType /*_objectType*/, ContextMenuType /*_type*/);
87 
88  // BaseInterface
89  void updatedObject(int _objId, const UpdateType& _type);
90 
91 private slots:
92 
93  // BaseInterface
94  void slotObjectUpdated(int _identifier, const UpdateType& _type);
95  void objectDeleted(int _identifier);
96  void noguiSupported() {}
97  void pluginsInitialized();
98 
99  // KeyInterface
100  void slotKeyEvent(QKeyEvent* _event);
101 
102  // ContextMenuInterface
103  void slotUpdateContextMenu(int _objectId);
104 
105  // Switches
106 
107  void slot_change_shrinkage();
108 
109  void slot_update_planes_in_scenegraph_node(int _deletedObject = -1);
110 
111  void switchRendering();
112 
113  void setTranslucencyFactor();
114 
115 public:
116 
118  }
119 
121 
122  QString name() {
123  return (QString("TypeHexahedralMesh"));
124  }
125 
126  QString description() {
127  return (QString(tr("Register HexahedralMesh type ")));
128  }
129 
130  bool registerType();
131 
132 public slots:
133 
134  QString version() {
135  return QString("1.0");
136  }
137 
138  // Type Interface
139  int addEmpty();
140 
141  DataType supportedType() {
142  return DATA_HEXAHEDRAL_MESH;
143  }
144 
145 
146 private:
147 
148  QAction* render_switch_;
149 
150  QAction* translucency_factor_action_;
151 
152 };
153 
154 #endif //TYPEHEXAHEDRALMESH_HH
Interface class from which all plugins have to be created.
Keyboard Event Interface.
Definition: KeyInterface.hh:76
Logtype
Log types for Message Window.
Update type class.
Definition: UpdateType.hh:70
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.
#define DATA_HEXAHEDRAL_MESH
Interface class for creating custom context menus.
QString description()
Return a description of what the plugin is doing.
Predefined datatypes.
Definition: DataTypes.hh:96
Interface class for type definitions.