X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Faction.h;h=62bc8a37178ee14106b69b69b00dc0af26c6c463;hb=3e63cb8a6e83765069a45101b86ae9e21dcc57ad;hp=325beda937e2b0bb047e1f7992e054e55375e1c6;hpb=4775cbfc0dde54bad2a483a51409f392187a20f3;p=quassel.git diff --git a/src/uisupport/action.h b/src/uisupport/action.h index 325beda9..62bc8a37 100644 --- a/src/uisupport/action.h +++ b/src/uisupport/action.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,13 +15,12 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * *************************************************************************** * Parts of this API have been shamelessly stolen from KDE's kaction.h * ***************************************************************************/ -#ifndef ACTION_H_ -#define ACTION_H_ +#pragma once #include #include @@ -30,17 +29,18 @@ /** This declares/implements a subset of KAction's API (notably we've left out global shortcuts * for now), which should make it easy to plug in KDE support later on. */ -class Action : public QWidgetAction { - Q_OBJECT +class Action : public QWidgetAction +{ + Q_OBJECT - Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut) - Q_PROPERTY(bool shortcutConfigurable READ isShortcutConfigurable WRITE setShortcutConfigurable) - Q_FLAGS(ShortcutType) + Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut) + Q_PROPERTY(bool shortcutConfigurable READ isShortcutConfigurable WRITE setShortcutConfigurable) + Q_FLAGS(ShortcutType) - public: - enum ShortcutType { - ActiveShortcut = 0x01, - DefaultShortcut = 0x02 +public : + enum ShortcutType { + ActiveShortcut = 0x01, + DefaultShortcut = 0x02 }; Q_DECLARE_FLAGS(ShortcutTypes, ShortcutType) @@ -55,16 +55,15 @@ class Action : public QWidgetAction { bool isShortcutConfigurable() const; void setShortcutConfigurable(bool configurable); - signals: +signals: void triggered(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); - private: +private: void init(); - private slots: +private slots: void slotTriggered(); }; -Q_DECLARE_OPERATORS_FOR_FLAGS(Action::ShortcutTypes) -#endif +Q_DECLARE_OPERATORS_FOR_FLAGS(Action::ShortcutTypes)