OverrideAction.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package MemoryX::gui-plugins::SceneEditor
19  * @date 2015
20  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21  * GNU General Public License
22  */
23 
24 #pragma once
25 
26 #include <QAction>
27 #include <QEvent>
28 
29 namespace gui
30 {
31  class OverrideAction : public QAction
32  {
33  Q_OBJECT
34  public:
35  /**
36  * Constructor.
37  *
38  * @param icon Icon
39  * @param text Text
40  * @param parent Parent
41  * @see UI::QWidget
42  */
43  OverrideAction(const QIcon& icon, const QString& text, QObject* parent);
44  /**
45  * Constructor.
46  *
47  * @param text Text
48  * @param parent Parent
49  * @see UI::QWidget
50  */
51  OverrideAction(const QString& text, QObject* parent);
52  /**
53  *
54  * Passes the Event to protected method event.
55  *
56  * @param event Event to be passed
57  */
58  bool publicEvent(QEvent* e);
59 
60  protected:
61  /**
62  * Event triggered.
63  *
64  * @param e QEvent that has been triggered
65  * @return Status of event
66  */
67  bool event(QEvent* e) override;
68 
69  private:
70 
71  };
72 }
73 
gui::OverrideAction
Definition: OverrideAction.h:31
gui::OverrideAction::publicEvent
bool publicEvent(QEvent *e)
Passes the Event to protected method event.
Definition: OverrideAction.cpp:49
gui::OverrideAction::event
bool event(QEvent *e) override
Event triggered.
Definition: OverrideAction.cpp:28
gui::OverrideAction::OverrideAction
OverrideAction(const QIcon &icon, const QString &text, QObject *parent)
Constructor.
Definition: OverrideAction.cpp:39