KDECore
kautostart.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KDELIBS_KAUTOSTART_H
00021 #define KDELIBS_KAUTOSTART_H
00022
00023 #include <kdecore_export.h>
00024
00025 #include <QtCore/QObject>
00026
00027 class QStringList;
00028
00049 class KDECORE_EXPORT KAutostart : public QObject
00050 {
00051 Q_OBJECT
00052
00053 public:
00072 explicit KAutostart(const QString& entryName = QString(),
00073 QObject* parent = 0);
00074 ~KAutostart();
00075
00080 enum Condition
00081 {
00082 NoConditions = 0,
00086 CheckCommand = 1
00087 };
00088 Q_DECLARE_FLAGS(Conditions, Condition)
00089
00090
00093 enum StartPhase
00094 {
00098 BaseDesktop = 0,
00105 DesktopServices = 1,
00111 Applications = 2
00112 };
00113
00120 void setAutostarts(bool autostart);
00121
00130 bool autostarts(const QString& environment = QString(),
00131 Conditions check = NoConditions) const;
00132
00137 QString command() const;
00142 void setCommand(const QString& command);
00143
00148 QString visibleName() const;
00153 void setVisibleName(const QString& entryName);
00154
00161 static bool isServiceRegistered(const QString& entryName);
00162
00169 QString commandToCheck() const;
00175 void setCommandToCheck(const QString& exec);
00176
00185 StartPhase startPhase() const;
00194 void setStartPhase(StartPhase phase);
00195
00207 QStringList allowedEnvironments() const;
00212 void setAllowedEnvironments(const QStringList& environments);
00218 void addToAllowedEnvironments(const QString& environment);
00224 void removeFromAllowedEnvironments(const QString& environment);
00225
00235 QStringList excludedEnvironments() const;
00240 void setExcludedEnvironments(const QStringList& environments);
00246 void addToExcludedEnvironments(const QString& environment);
00252 void removeFromExcludedEnvironments(const QString& environment);
00253
00254 private:
00255 class Private;
00256 Private* const d;
00257 };
00258
00259 Q_DECLARE_OPERATORS_FOR_FLAGS(KAutostart::Conditions)
00260 #endif