OpenStructure
Loading...
Searching...
No Matches
scene_menu.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_MENU_HH
20#define OST_GUI_SCENE_MENU_HH
21
22
25
26#include <QObject>
27#include <QPoint>
28#include <QMenu>
29#include <QString>
30namespace ost { namespace gui {
31
32class SceneMenu : public QObject{
33 Q_OBJECT
34public:
36 virtual ~SceneMenu();
37 void SetPickPoint(const QPoint& pos);
38
39public slots:
40 void ShowMenu(const QPoint& pos);
46 void SelectAtom();
48 void Select(const String& str);
49 void UnSelect();
55
56private:
57 void PrepareContextMenu(const QPoint& pos);
58 std::pair<gfx::GfxObjP, mol::AtomHandle> picked_;
59 QMenu* context_menu_;
60 QMenu* select_menu_;
61 QMenu* center_menu_;
62};
63
64}} // ns
65#endif //OST_GUI_SCENE_MENU_HH
void ShowMenu(const QPoint &pos)
void Select(const String &str)
void SetPickPoint(const QPoint &pos)
std::string String
Definition base.hh:54
Definition base.dox:1