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-2020 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  void ViewDensitySlices();
48  void ShowDownsampledMap();
49  void ShowOriginalMap();
50  void Deselect();
51  void Show();
52  void Hide();
53  void SelectAllViews();
54  void DeselectAllViews();
55  void MakeVisible();
56  void MakeHidden();
57  void ShowExclusive();
58  void HideExclusive();
59  mol::EntityView GetViewUnion();
60 
61 
62 private slots:
63  void SetActiveNodes(gfx::NodePtrList nodes, gfx::EntityP entity, mol::QueryViewWrapperList views);
64 
65 private:
67  gfx::NodePtrList nodes_;
68  gfx::EntityP view_entity_;
70  static SceneSelection* scene_selection_;
71  QMenu* menu_;
72 };
73 
74 }}
75 
76 #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