• 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
  • kded
kremotecontroldaemon.h
Go to the documentation of this file.
1 /*
2  Copyright (C) <2010> <Frank Scheffold (fscheffold@googlemail.com)>
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 KREMOTECONTROLDAEMON_H
21 #define KREMOTECONTROLDAEMON_H
22 
23 
24 #include "mode.h"
25 #include "remote.h"
26 #include "remotelist.h"
27 
28 #include "remotecontrolmanager.h"
29 #include "remotecontrol.h"
30 
31 #include <KDEDModule>
32 #include <KComponentData>
33 #include <KNotification>
34 
35 #include <QtCore/QVariant>
36 #include <QtCore/QPointer>
37 #include <QtCore/QTimer>
38 
39 class KRemoteControlDaemonPrivate;
40 
41 class KRemoteControlDaemon : public KDEDModule
42 {
43  Q_OBJECT
44  Q_CLASSINFO("D-Bus Interface", "org.kde.krcd")
45 
46  private:
47  void notifyModeChanged(Remote* remote);
48  void notifyEvent(const QString& message, const QString& icon = QLatin1String( "infrared-remote" ), const QString& event = QLatin1String ( "global_event" ));
49 
50  RemoteList m_remoteList;
51  QStringList m_ignoreNextButtonList;
52  KComponentData m_applicationData;
53  QPointer<KNotification> m_notification;
54  QTimer m_modeSwitchTimer;
55 
56  public:
57  KRemoteControlDaemon(QObject * parent, const QVariantList&);
58  virtual ~KRemoteControlDaemon();
59 
60  bool isConnected() {
61  return RemoteControlManager::connected();
62  }
63  void reloadConfiguration();
64 
65  void ignoreButtonEvents(const QString &remoteName);
66  void considerButtonEvents(const QString& remoteName);
67  void changeMode(const QString& remoteName, Mode* mode);
68  bool changeMode(const QString& remoteName, const QString &modeName);
69  QStringList configuredRemotes();
70  QStringList modesForRemote(const QString &remoteName);
71  QString currentMode(const QString& remoteName);
72  QString modeIcon(const QString &remoteName, const QString &modeName);
73  bool eventsIgnored(const QString& remoteName);
74 
75  Q_SIGNALS:
76  void connectionChanged(bool connected);
77  void remoteControlAdded(const QString &remote);
78  void remoteControlRemoved(const QString &remote);
79  void modeChanged(const QString &remoteName, const QString &modeName);
80  void buttonPressed();
81  void unloadTray();
82 
83  private Q_SLOTS:
84  void lauchKcmShell();
85  void slotStatusChanged(bool connected);
86  void slotRemoteControlAdded(const QString &name);
87  void slotRemoteControlRemoved(const QString &name);
88  void gotMessage(const RemoteControlButton &button);
89 
90 };
91 #endif // KREMOTECONTROLDAEMON_H
KRemoteControlDaemon::configuredRemotes
QStringList configuredRemotes()
Definition: kremotecontroldaemon.cpp:246
KRemoteControlDaemon::modeChanged
void modeChanged(const QString &remoteName, const QString &modeName)
KRemoteControlDaemon::modesForRemote
QStringList modesForRemote(const QString &remoteName)
Definition: kremotecontroldaemon.cpp:235
KRemoteControlDaemon::remoteControlRemoved
void remoteControlRemoved(const QString &remote)
KRemoteControlDaemon::~KRemoteControlDaemon
virtual ~KRemoteControlDaemon()
Definition: kremotecontroldaemon.cpp:84
KRemoteControlDaemon::buttonPressed
void buttonPressed()
KRemoteControlDaemon::ignoreButtonEvents
void ignoreButtonEvents(const QString &remoteName)
Definition: kremotecontroldaemon.cpp:172
KDEDModule
KRemoteControlDaemon::reloadConfiguration
void reloadConfiguration()
Definition: kremotecontroldaemon.cpp:143
Mode
Definition: mode.h:31
KRemoteControlDaemon::isConnected
bool isConnected()
Definition: kremotecontroldaemon.h:60
QObject
remotelist.h
KRemoteControlDaemon::currentMode
QString currentMode(const QString &remoteName)
Definition: kremotecontroldaemon.cpp:270
KRemoteControlDaemon::eventsIgnored
bool eventsIgnored(const QString &remoteName)
Definition: kremotecontroldaemon.cpp:293
KRemoteControlDaemon::modeIcon
QString modeIcon(const QString &remoteName, const QString &modeName)
Definition: kremotecontroldaemon.cpp:278
KRemoteControlDaemon::unloadTray
void unloadTray()
remotecontrol.h
remotecontrolmanager.h
KRemoteControlDaemon::KRemoteControlDaemon
KRemoteControlDaemon(QObject *parent, const QVariantList &)
Definition: kremotecontroldaemon.cpp:46
remote.h
KRemoteControlDaemon::connectionChanged
void connectionChanged(bool connected)
KRemoteControlDaemon::considerButtonEvents
void considerButtonEvents(const QString &remoteName)
Definition: kremotecontroldaemon.cpp:186
KRemoteControlDaemon::remoteControlAdded
void remoteControlAdded(const QString &remote)
KRemoteControlDaemon
Definition: kremotecontroldaemon.h:41
KRemoteControlDaemon::changeMode
void changeMode(const QString &remoteName, Mode *mode)
Definition: kremotecontroldaemon.cpp:165
RemoteControlManager::connected
KREMOTECONTROL_EXPORT bool connected()
Get the manager connection state.
Definition: remotecontrolmanager.cpp:32
mode.h
RemoteList
Definition: remotelist.h:28
RemoteControlButton
Definition: remotecontrolbutton.h:30
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