OpenStructure
Loading...
Searching...
No Matches
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>
28
29#include <QObject>
30#include <QMenu>
31#include <QPoint>
32namespace ost { namespace gui {
33
34class DLLEXPORT_OST_GUI SceneSelection : public QObject {
35 Q_OBJECT
36public:
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
44public slots:
46 void Delete();
50 void Deselect();
51 void Show();
52 void Hide();
56 void MakeHidden();
60
61
62private slots:
63 void SetActiveNodes(gfx::NodePtrList nodes, gfx::EntityP entity, mol::QueryViewWrapperList views);
64
65private:
67 gfx::NodePtrList nodes_;
68 gfx::EntityP view_entity_;
70 static SceneSelection* scene_selection_;
71 QMenu* menu_;
72};
73
74}}
75
76#endif
static SceneSelection * Instance()
int GetActiveViewCount() const
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
#define DLLEXPORT_OST_GUI
std::vector< GfxNodeP > NodePtrList
boost::shared_ptr< GfxNode > GfxNodeP
boost::shared_ptr< Entity > EntityP
Definition entity_fw.hh:28
std::vector< QueryViewWrapper > QueryViewWrapperList
Definition base.dox:1