OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
scene_selection.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2011 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_GUI_SCENE_SELECTION_HH
20 #define OST_GUI_SCENE_SELECTION_HH
21 
22 
24 
25 #include <ost/gfx/entity_fw.hh>
26 #include <ost/gfx/gfx_node_fw.hh>
27 #include <ost/gui/module_config.hh>
28 
29 #include <QObject>
30 #include <QMenu>
31 #include <QPoint>
32 namespace ost { namespace gui {
33 
34 class DLLEXPORT_OST_GUI SceneSelection : public QObject {
35  Q_OBJECT
36 public:
37  static SceneSelection* Instance();
38  int GetActiveNodeCount() const;
39  gfx::GfxNodeP GetActiveNode(unsigned int pos) const;
40  int GetActiveViewCount() const;
41  mol::EntityView GetActiveView(unsigned int pos) const;
42  gfx::EntityP GetViewEntity() const;
43 
44 public slots:
45  void CenterOnObjects();
46  void Delete();
47 #if OST_IMG_ENABLED
48  void ViewDensitySlices();
49  void ShowDownsampledMap();
50  void ShowOriginalMap();
51 #endif // OST_IMG_ENABLED
52  void Deselect();
53  void Show();
54  void Hide();
55  void SelectAllViews();
56  void DeselectAllViews();
57  void MakeVisible();
58  void MakeHidden();
59  void ShowExclusive();
60  void HideExclusive();
61  mol::EntityView GetViewUnion();
62 
63 
64 private slots:
65  void SetActiveNodes(gfx::NodePtrList nodes, gfx::EntityP entity, mol::QueryViewWrapperList views);
66 
67 private:
69  gfx::NodePtrList nodes_;
70  gfx::EntityP view_entity_;
72  static SceneSelection* scene_selection_;
73  QMenu* menu_;
74 };
75 
76 }}
77 
78 #endif
boost::shared_ptr< Entity > EntityP
Definition: entity_fw.hh:27
#define DLLEXPORT_OST_GUI
definition of EntityView
Definition: entity_view.hh:86
std::vector< GfxNodeP > NodePtrList
Definition: gfx_node_fw.hh:34
boost::shared_ptr< GfxNode > GfxNodeP
Definition: gfx_node_fw.hh:31
std::vector< QueryViewWrapper > QueryViewWrapperList
Definition: view_type_fw.hh:51