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

kdelirc

iraction.h

Go to the documentation of this file.
00001 //
00002 //
00003 // C++ Interface: $MODULE$
00004 //
00005 // Description:
00006 //
00007 //
00008 // Author: Gav Wood <gav@kde.org>, (C) 2003
00009 //
00010 // Copyright: See COPYING file that comes with this distribution
00011 //
00012 //
00013 #ifndef IRACTION_H
00014 #define IRACTION_H
00015 
00016 
00017 
00018 #include "prototype.h"
00019 #include "arguments.h"
00020 #include "profileserver.h"
00021 
00026 class KConfig;
00027 
00028 class IRAction
00029 {
00030     QString theProgram, theObject, theRemote, theButton, theMode;
00031     Prototype theMethod;
00032     Arguments theArguments;
00033     bool theRepeat, theAutoStart, theDoBefore, theDoAfter;
00034     IfMulti theIfMulti;
00035     bool theUnique;
00036 
00037 public:
00038     // load/save convenience functions
00039     const IRAction &loadFromConfig(KConfig &theConfig, int index);
00040     void saveToConfig(KConfig &theConfig, int index) const;
00041 
00042     // may be changed to a profile-based representation in the future.
00043     const QString function() const;
00044     const QString application() const;
00045     const QString buttonName() const;
00046     const QString remoteName() const;
00047     const QString notes() const;
00048 
00049     // bog standard raw DCOP stuff
00050     const QString &program() const { return theProgram; }
00051     const QString &object() const { return theObject; }
00052     const Prototype &method() const { return theMethod; }
00053     const QString &remote() const { return theRemote; }
00054     const QString &mode() const { return theMode; }
00055     const QString &button() const { return theButton; }
00056     const Arguments arguments() const { if(theProgram != "" && theObject != "") return theArguments; return Arguments(); }
00057     const bool repeat() const { return theRepeat; }
00058     const bool autoStart() const { return theAutoStart; }
00059     const IfMulti ifMulti() const { return theIfMulti; }
00060     const bool unique() const { return theUnique; }
00061 
00062     const QString &modeChange() const { return theObject; }
00063     const bool doBefore() const { return theDoBefore; }
00064     const bool doAfter() const { return theDoAfter; }
00065 
00066     bool isModeChange() const { return theProgram == ""; }
00067     bool isJustStart() const { return theProgram != "" && theObject == ""; }
00068 
00069     void setProgram(const QString &newProgram) { theProgram = newProgram; }
00070     void setObject(const QString &newObject) { theObject = newObject; }
00071     void setMethod(const Prototype &newMethod) { theMethod = newMethod; }
00072     void setRemote(const QString &newRemote) { theRemote = newRemote; }
00073     void setMode(const QString &newMode) { theMode = newMode; }
00074     void setButton(const QString &newButton) { theButton = newButton; }
00075     void setArguments(const Arguments &newArguments) { theArguments = newArguments; }
00076     void setRepeat(bool newRepeat) { theRepeat = newRepeat; }
00077     void setDoBefore(bool a) { theDoBefore = a; }
00078     void setDoAfter(bool a) { theDoAfter = a; }
00079     void setAutoStart(bool newAutoStart) { theAutoStart = newAutoStart; }
00080     void setModeChange(const QString &a) { theObject = a; }
00081     void setIfMulti(const IfMulti a) { theIfMulti = a; }
00082     void setUnique(const bool a) { theUnique = a; }
00083 
00084     IRAction(const QString &newProgram, const QString &newObject, const QString &newMethod, const Arguments &newArguments, const QString &newRemote, const QString &newMode, const QString &newButton, const bool newRepeat, const bool newAutoStart, const bool newDoBefore, const bool newDoAfter, const bool newUnique, const IfMulti newIfMulti);
00085     IRAction() { theProgram = QString(); };
00086 };
00087 
00088 #endif

kdelirc

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

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal