• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

kremotecontrol

  • sources
  • kde-4.12
  • kdeutils
  • kremotecontrol
  • libkremotecontrol
action.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 Michael Zanetti <michael_zanetti@gmx.net>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 
18 */
19 
20 #ifndef ACTION_H
21 #define ACTION_H
22 
23 #include "mode.h"
24 #include "kremotecontrol_export.h"
25 
26 #include "remotecontrolbutton.h"
27 #include "remotecontrol.h"
28 #include <kconfiggroup.h>
29 
30 class KREMOTECONTROL_EXPORT Action
31 {
32  public:
33  enum ActionType {DBusAction, ProfileAction, KeypressAction};
34  enum ActionDestination {Unique, Top, Bottom, None, All};
35 
36  Action(ActionType type, const QString &button);
37  Action(ActionType type);
38  Action(const Action &action);
39  virtual ~Action(){};
40 
41  ActionType type() const;
42 
43  QString button() const;
44  void setButton(const QString &button);
45 
46  bool repeat() const;
47  void setRepeat(bool repeat);
48 
49  bool autostart() const;
50  void setAutostart(bool autostart);
51 
52  ActionDestination destination() const;
53  void setDestination(ActionDestination destination);
54 
55  virtual QString name() const = 0;
56  virtual QString description() const = 0;
57 
58  virtual void saveToConfig(KConfigGroup &config);
59  virtual void loadFromConfig(const KConfigGroup &config);
60 
61  virtual Action *clone() const = 0;
62 
63  protected:
64  ActionType m_type;
65  QString m_button;
66  bool m_repeat, m_autostart;
67  ActionDestination m_destination;
68 };
69 
70 Q_DECLARE_METATYPE(Action*)
71 Q_DECLARE_METATYPE(Action::ActionType)
72 
73 #endif // ACTION_H
kremotecontrol_export.h
Action::ActionType
ActionType
Definition: action.h:33
Action::m_type
ActionType m_type
Definition: action.h:64
KeypressAction
Definition: keypressaction.h:27
KREMOTECONTROL_EXPORT
#define KREMOTECONTROL_EXPORT
Definition: kremotecontrol_export.h:37
remotecontrolbutton.h
Action::ActionDestination
ActionDestination
Definition: action.h:34
Action
Definition: action.h:30
DBusAction
Definition: dbusaction.h:32
Action::Unique
Definition: action.h:34
Action::m_repeat
bool m_repeat
Definition: action.h:66
Action::ProfileAction
Definition: action.h:33
Action::m_button
QString m_button
Definition: action.h:65
remotecontrol.h
Action::m_destination
ActionDestination m_destination
Definition: action.h:67
Action::~Action
virtual ~Action()
Definition: action.h:39
mode.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kremotecontrol

Skip menu "kremotecontrol"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal