GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Menu.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2011-2017 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 the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 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 <http://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 0; }
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:155
Container * innerContainer(void)
Definition: Menu.h:46
void actionHovered(void)
Definition: Menu.cc:288
QAction * m_separator
Definition: Menu.h:62
void update(int pId)
Definition: Menu.cc:159
QWidget * m_parent
Definition: Menu.h:61
static Menu * create(const graphics_object &go)
Definition: Menu.cc:61
QWidget * menu(void)
Definition: Menu.cc:260
Menu(const graphics_object &go, QAction *action, Object *parent)
Definition: Menu.cc:76
void updateSiblingPositions(void)
Definition: Menu.cc:294
void actionTriggered(void)
Definition: Menu.cc:278