• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

kautostart.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 2006 Aaron Seigo <aseigo@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
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 = 0x0,
00086             CheckCommand = 0x1,
00091             CheckCondition = 0x2,
00096             CheckAll = 0xff
00097         };
00098         Q_DECLARE_FLAGS(Conditions, Condition)
00099 
00100         
00103         enum StartPhase
00104         {
00108             BaseDesktop = 0,
00115             DesktopServices = 1,
00121             Applications = 2
00122         };
00123 
00130         void setAutostarts(bool autostart);
00131 
00140         bool autostarts(const QString& environment = QString(),
00141                         Conditions check = NoConditions) const;
00142 
00147         QString command() const;
00152         void setCommand(const QString& command);
00153 
00158         QString visibleName() const;
00163         void setVisibleName(const QString& entryName);
00164 
00171         static bool isServiceRegistered(const QString& entryName);
00172 
00179         QString commandToCheck() const;
00185         void setCommandToCheck(const QString& exec);
00186 
00195         StartPhase startPhase() const;
00204         void setStartPhase(StartPhase phase);
00205 
00218         QStringList allowedEnvironments() const;
00223         void setAllowedEnvironments(const QStringList& environments);
00229         void addToAllowedEnvironments(const QString& environment);
00235         void removeFromAllowedEnvironments(const QString& environment);
00236 
00247         QStringList excludedEnvironments() const;
00252         void setExcludedEnvironments(const QStringList& environments);
00258         void addToExcludedEnvironments(const QString& environment);
00264         void removeFromExcludedEnvironments(const QString& environment);
00265 
00272         QString startAfter() const;
00273 
00279         bool checkAllowedEnvironment( const QString& environment ) const;
00280 
00281     private:
00282         bool checkStartCondition() const;
00283         class Private;
00284         Private* const d;
00285 };
00286 
00287 Q_DECLARE_OPERATORS_FOR_FLAGS(KAutostart::Conditions)
00288 #endif

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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