OpenStructure
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:
38  int GetActiveNodeCount() const;
39  gfx::GfxNodeP GetActiveNode(unsigned int pos) const;
40  int GetActiveViewCount() const;
41  mol::EntityView GetActiveView(unsigned int pos) const;
43 
44 public slots:
46  void Delete();
49  void ShowOriginalMap();
50  void Deselect();
51  void Show();
52  void Hide();
55  void MakeVisible();
56  void MakeHidden();
57  void ShowExclusive();
58  void HideExclusive();
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
int GetActiveViewCount() const
static SceneSelection * Instance()
mol::EntityView GetViewUnion()
gfx::GfxNodeP GetActiveNode(unsigned int pos) const
int GetActiveNodeCount() const
mol::EntityView GetActiveView(unsigned int pos) const
gfx::EntityP GetViewEntity() const
definition of EntityView
Definition: entity_view.hh:86
#define DLLEXPORT_OST_GUI
std::vector< GfxNodeP > NodePtrList
Definition: gfx_node_fw.hh:34
boost::shared_ptr< GfxNode > GfxNodeP
Definition: gfx_node_fw.hh:31
boost::shared_ptr< Entity > EntityP
Definition: entity_fw.hh:27
std::vector< QueryViewWrapper > QueryViewWrapperList
Definition: view_type_fw.hh:51
Definition: base.dox:1