• 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
remote.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 REMOTE_H
21 #define REMOTE_H
22 
23 #include "mode.h"
24 
25 #include "remotecontrol.h"
26 
27 #include <QtCore/QSet>
28 #include <QtCore/QVector>
29 
30 class ModeChangeHandler;
31 
32 class KREMOTECONTROL_EXPORT Remote
33 {
34 
35  friend class GroupModeChangeHandler;
36  friend class CycleModeChangeHandler;
37 
38  public:
39  enum ModeChangeMode { Group, Cycle };
40 
41  Remote();
42  explicit Remote(const QString& remote, Remote::ModeChangeMode changeMode = Remote::Group);
43 
47  ~Remote();
48 
49  bool isAvailable() const;
50 
54  void addMode(Mode* mode);
55 
61  void removeMode(Mode *mode);
62  QVector<Mode*> allModes() const;
63 
64  Mode *masterMode() const;
65 
66  Mode *defaultMode() const;
67  void setDefaultMode(Mode *mode);
68  void setDefaultMode(const QString &name);
69  Mode *modeByName(const QString &name) const;
70 
71  Mode *currentMode() const;
72  void setCurrentMode(Mode *mode);
73 
74  QString name() const;
75 
76  void moveModeUp(Mode *mode);
77  void moveModeDown(Mode *mode);
78 
79  bool nextMode(const QString &button);
80 
81  ModeChangeMode modeChangeMode() const;
82  void setModeChangeMode(ModeChangeMode modeChangeMode);
83 
87  QStringList availableModeSwitchButtons(const Mode *mode = 0) const;
91  QStringList availableModeCycleButtons() const;
92 
93  QString nextModeButton() const;
94  void setNextModeButton(const QString &button);
95  QString previousModeButton() const;
96  void setPreviousModeButton(const QString &button);
97 
98  private:
99  QVector<Mode*> m_modeList;
100  Mode *m_defaultMode;
101  QString m_remoteName;
102  Mode *m_currentMode;
103  ModeChangeHandler *m_modechangeHandler;
104  QString m_nextModeButton;
105  QString m_previousModeButton;
106 };
107 
108 Q_DECLARE_METATYPE(Remote*)
109 
110 #endif // REMOTE_H
Remote::ModeChangeMode
ModeChangeMode
Definition: remote.h:39
Mode
Definition: mode.h:31
KREMOTECONTROL_EXPORT
#define KREMOTECONTROL_EXPORT
Definition: kremotecontrol_export.h:37
QVector
remotecontrol.h
mode.h
Remote::Group
Definition: remote.h:39
Remote
Definition: remote.h:32
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