Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TypeHexahedralMesh.hh
1 /*===========================================================================*\
2  * *
3  * OpenFlipper *
4  * Copyright (C) 2001-2009 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: 11279 $ *
38 * $LastChangedBy: kremer $ *
39 * $Date: 2011-04-11 17:35:27 +0200 (Mon, 11 Apr 2011) $ *
40 * *
41 \*===========================================================================*/
42 
43 #ifndef TYPEHEXAHEDRALMESH_HH
44 #define TYPEHEXAHEDRALMESH_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 signals:
67  // Logging interface
68  void log(Logtype _type, QString _message);
69  void log(QString _message);
70 
71  // LoadSave Interface
72  void emptyObjectAdded(int _id);
73 
74  // ContextMenuInterface
75  void addContextMenuItem(QAction* /*_action*/, DataType /*_objectType*/, ContextMenuType /*_type*/);
76 
77  // BaseInterface
78  void updatedObject(int _objId, const UpdateType& _type);
79 
80 private slots:
81 
82  // BaseInterface
83  void slotObjectUpdated(int _identifier);
84  void objectDeleted(int _identifier);
85  void noguiSupported() {}
86  void pluginsInitialized();
87 
88  // KeyInterface
89  void slotKeyEvent(QKeyEvent* _event);
90 
91  // ContextMenuInterface
92  void slotUpdateContextMenu(int _objectId);
93 
94  // Switches
95 
96  void slot_change_shrinkage();
97 
98  void slot_update_planes_in_scenegraph_node(int _deletedObject = -1);
99 
100  void switchRendering();
101 
102  void switchTranslucency();
103 
104  void setTranslucencyFactor();
105 
106  void switchShowIrregs();
107 
108  void switchShowOuterValTwo();
109 
110 public:
111 
113  }
114 
116 
117  QString name() {
118  return (QString("TypeHexahedralMesh"));
119  }
120 
121  QString description() {
122  return (QString(tr("Register HexahedralMesh type ")));
123  }
124 
125  bool registerType();
126 
127 public slots:
128 
129  QString version() {
130  return QString("1.0");
131  }
132 
133  // Type Interface
134  int addEmpty();
135 
136  DataType supportedType() {
137  return DATA_HEXAHEDRAL_MESH;
138  }
139 
140 
141 private:
142 
143  QString get_unique_name(HexahedralMeshObject* _object);
144 
145  QAction* render_switch_;
146 
147  QAction* translucency_action_;
148 
149  QAction* translucency_factor_action_;
150 
151  QAction* show_irregs_action_;
152 
153  QAction* show_outer_val_two_action_;
154 };
155 
156 #endif //TYPEHEXAHEDRALMESH_HH