• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • util
kautostart.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 2006 Aaron Seigo <aseigo@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library 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 GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KDELIBS_KAUTOSTART_H
21#define KDELIBS_KAUTOSTART_H
22
23#include <kdecore_export.h>
24
25#include <QtCore/QObject>
26
27class QStringList;
28
49class KDECORE_EXPORT KAutostart : public QObject
50{
51 Q_OBJECT
52
53 public:
72 explicit KAutostart(const QString& entryName = QString(),
73 QObject* parent = 0);
74 ~KAutostart();
75
80 enum Condition
81 {
82 NoConditions = 0x0,
86 CheckCommand = 0x1,
91 CheckCondition = 0x2,
96 CheckAll = 0xff
97 };
98 Q_DECLARE_FLAGS(Conditions, Condition)
99
100
103 enum StartPhase
104 {
108 BaseDesktop = 0,
115 DesktopServices = 1,
121 Applications = 2
122 };
123
130 void setAutostarts(bool autostart);
131
140 bool autostarts(const QString& environment = QString(),
141 Conditions check = NoConditions) const;
142
147 QString command() const;
152 void setCommand(const QString& command);
153
158 QString visibleName() const;
163 void setVisibleName(const QString& entryName);
164
171 static bool isServiceRegistered(const QString& entryName);
172
179 QString commandToCheck() const;
185 void setCommandToCheck(const QString& exec);
186
195 StartPhase startPhase() const;
204 void setStartPhase(StartPhase phase);
205
218 QStringList allowedEnvironments() const;
223 void setAllowedEnvironments(const QStringList& environments);
229 void addToAllowedEnvironments(const QString& environment);
235 void removeFromAllowedEnvironments(const QString& environment);
236
247 QStringList excludedEnvironments() const;
252 void setExcludedEnvironments(const QStringList& environments);
258 void addToExcludedEnvironments(const QString& environment);
264 void removeFromExcludedEnvironments(const QString& environment);
265
272 QString startAfter() const;
273
279 bool checkAllowedEnvironment( const QString& environment ) const;
280
281 private:
282 bool checkStartCondition() const;
283 class Private;
284 Private* const d;
285};
286
287Q_DECLARE_OPERATORS_FOR_FLAGS(KAutostart::Conditions)
288#endif
KAutostart
KAutostart provides a programmatic means to control the state of autostart services on a per-user bas...
Definition: kautostart.h:50
KAutostart::StartPhase
StartPhase
Enumerates the various autostart phases that occur during start-up.
Definition: kautostart.h:104
KAutostart::Condition
Condition
Flags for each of the conditions that may affect whether or not a service actually autostarted on log...
Definition: kautostart.h:81
QObject
QStringList
QString
kdecore_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs-4.14.38 API Reference

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