GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Menu.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2011-2018 Michael Goffioul
4 
5 This file is part of Octave.
6 
7 Octave is free software: you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if ! defined (octave_Menu_h)
24 #define octave_Menu_h 1
25 
26 #include "MenuContainer.h"
27 #include "Object.h"
28 
29 class QAction;
30 class QMenu;
31 class QWidget;
32 
33 namespace QtHandles
34 {
35 
36  class Menu : public Object, public MenuContainer
37  {
38  Q_OBJECT
39 
40  public:
41  Menu (const graphics_object& go, QAction *action, Object *parent);
42  ~Menu (void);
43 
44  static Menu * create (const graphics_object& go);
45 
46  Container * innerContainer (void) { return nullptr; }
47 
48  QWidget * menu (void);
49 
50  protected:
51  void update (int pId);
52 
53  private slots:
54  void actionTriggered (void);
55  void actionHovered (void);
56 
57  private:
58  void updateSiblingPositions (void);
59 
60  private:
62  QAction *m_separator;
63  };
64 
65 }
66 
67 #endif
~Menu(void)
Definition: Menu.cc:158
Container * innerContainer(void)
Definition: Menu.h:46
void actionHovered(void)
Definition: Menu.cc:293
QAction * m_separator
Definition: Menu.h:62
void update(int pId)
Definition: Menu.cc:162
QWidget * m_parent
Definition: Menu.h:61
static Menu * create(const graphics_object &go)
Definition: Menu.cc:61
QWidget * menu(void)
Definition: Menu.cc:265
Menu(const graphics_object &go, QAction *action, Object *parent)
Definition: Menu.cc:76
void updateSiblingPositions(void)
Definition: Menu.cc:299
void actionTriggered(void)
Definition: Menu.cc:283