• 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
profileactiontemplate.cpp
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 #include "profileactiontemplate.h"
21 
22 #include <KDebug>
23 
24 
25 ProfileActionTemplate::ProfileActionTemplate() {
26  d = new ProfileActionTemplatePrivate;
27 }
28 
29 
30 ProfileActionTemplate::ProfileActionTemplate( const QString &profileId,
31  const QString &actionTemplateId,
32  const QString &actionName,
33  const QString &serviceName,
34  const QString &node,
35  const QString &interface,
36  const Prototype &function,
37  const ProfileAction::ActionDestination destination,
38  bool autostart,
39  bool repeat,
40  const QString &description,
41  const QString &buttonName)
42 {
43  d = new ProfileActionTemplatePrivate;
44  d->m_profileId = profileId;
45  d->m_actionTemplateId = actionTemplateId;
46  d->m_actionName = actionName;
47  d->m_node = node;
48  d->m_serviceName = serviceName;
49  d->m_interface = interface;
50  d->m_function = function;
51  d->m_description = description;
52  d->m_destination= destination;
53  d->m_autostart = autostart;
54  d->m_repeat = repeat;
55  d->m_buttonName = buttonName;
56 }
57 
58 QString ProfileActionTemplate::profileId() const {
59  return d->m_profileId;
60 }
61 
62 QString ProfileActionTemplate::actionTemplateId() const {
63  return d->m_actionTemplateId;
64 }
65 
66 QString ProfileActionTemplate::actionName() const {
67  return d->m_actionName;
68 }
69 
70 QString ProfileActionTemplate::service() const {
71  return d->m_serviceName;
72 }
73 
74 QString ProfileActionTemplate::node() const {
75  return d->m_node;
76 }
77 
78 QString ProfileActionTemplate::description() const {
79  return d->m_description;
80 }
81 
82 QString ProfileActionTemplate::interface() const
83 {
84  return d->m_interface;
85 }
86 
87 Prototype ProfileActionTemplate::function() const {
88  return d->m_function;
89 }
90 
91 DBusAction::ActionDestination ProfileActionTemplate::destination() const {
92  return d->m_destination;
93 }
94 
95 bool ProfileActionTemplate::autostart() const {
96  return d->m_autostart;
97 }
98 
99 bool ProfileActionTemplate::repeat() const {
100  return d->m_repeat;
101 }
102 
103 QString ProfileActionTemplate::buttonName() const {
104  return d->m_buttonName;
105 }
106 
107 ProfileAction *ProfileActionTemplate::createAction(const RemoteControlButton& button) const {
108  ProfileAction *action = new ProfileAction(button.name(), d->m_profileId, d->m_actionTemplateId);
109  action->setApplication(d->m_serviceName);
110  action->setNode(d->m_node);
111  action->setInterface(d->m_interface);
112  action->setFunction(d->m_function);
113  action->setDestination(d->m_destination);
114  action->setAutostart(d->m_autostart);
115  action->setRepeat(d->m_repeat);
116  kDebug() << "creating action from template:" << d->m_serviceName << d->m_node << d->m_interface << d->m_function.name();
117  return action;
118 }
ProfileActionTemplate::destination
ProfileAction::ActionDestination destination() const
Definition: profileactiontemplate.cpp:91
profileactiontemplate.h
ProfileActionTemplate::service
QString service() const
Definition: profileactiontemplate.cpp:70
DBusAction::setInterface
void setInterface(const QString &interface)
Definition: dbusaction.cpp:50
Action::ActionDestination
ActionDestination
Definition: action.h:34
ProfileActionTemplate::actionTemplateId
QString actionTemplateId() const
Definition: profileactiontemplate.cpp:62
DBusAction::setApplication
void setApplication(const QString &application)
Definition: dbusaction.cpp:33
DBusAction::setFunction
void setFunction(const Prototype &function)
Definition: dbusaction.cpp:59
Action::setRepeat
void setRepeat(bool repeat)
Definition: action.cpp:49
ProfileActionTemplate::profileId
QString profileId() const
Definition: profileactiontemplate.cpp:58
Prototype
Definition: prototype.h:28
ProfileActionTemplate::node
QString node() const
Definition: profileactiontemplate.cpp:74
ProfileActionTemplate::function
Prototype function() const
Definition: profileactiontemplate.cpp:87
RemoteControlButton::name
QString name() const
Retrieves the name of the Button.
Definition: remotecontrolbutton.cpp:315
Action::setDestination
void setDestination(ActionDestination destination)
Definition: action.cpp:65
ProfileActionTemplate::buttonName
QString buttonName() const
Definition: profileactiontemplate.cpp:103
ProfileActionTemplatePrivate
Definition: profileactiontemplate.h:69
Action::setAutostart
void setAutostart(bool autostart)
Definition: action.cpp:57
ProfileActionTemplate::repeat
bool repeat() const
Definition: profileactiontemplate.cpp:99
ProfileActionTemplate::ProfileActionTemplate
ProfileActionTemplate()
Definition: profileactiontemplate.cpp:25
DBusAction::setNode
void setNode(const QString &node)
Definition: dbusaction.cpp:41
ProfileActionTemplate::createAction
ProfileAction * createAction(const RemoteControlButton &button) const
Definition: profileactiontemplate.cpp:107
ProfileActionTemplate::actionName
QString actionName() const
Definition: profileactiontemplate.cpp:66
ProfileAction
Definition: profileaction.h:26
RemoteControlButton
Definition: remotecontrolbutton.h:30
ProfileActionTemplate::autostart
bool autostart() const
Definition: profileactiontemplate.cpp:95
ProfileActionTemplate::interface
QString interface() const
Definition: profileactiontemplate.cpp:82
ProfileActionTemplate::description
QString description() const
Definition: profileactiontemplate.cpp:78
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