add more spacing
[personal-kdebase.git] / workspace / kcontrol / autostart / autostart.h
blob89f3bf1ba221286fd8ab6ec02e0d808386fcbb94
1 /***************************************************************************
2 * Copyright (C) 2006-2007 by Stephen Leaf *
3 * smileaf@gmail.com *
4 * Copyright (C) 2008 by Montel Laurent <montel@kde.org> *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the *
18 * Free Software Foundation, Inc., *
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
20 ***************************************************************************/
23 #ifndef _AUTOSTART_H_
24 #define _AUTOSTART_H_
26 #include <KCModule>
27 #include <KAboutData>
28 #include <KFileItem>
30 #include <QComboBox>
31 #include <QPushButton>
32 #include <QTreeWidget>
34 #include "ui_autostartconfig.h"
35 #include "autostartitem.h"
37 class Autostart: public KCModule
39 Q_OBJECT
41 public:
42 Autostart( QWidget* parent, const QVariantList& );
43 ~Autostart();
44 enum COL_TYPE { COL_NAME = 0, COL_COMMAND=1, COL_STATUS=2,COL_RUN=3 };
45 void load();
46 void save();
47 void defaults();
49 QStringList listPathName() const { return m_pathName;}
51 public slots:
52 void slotChangeStartup( int index );
54 protected:
55 void addItem(DesktopStartItem *item, const QString& name, const QString& run, const QString& command, bool disable );
56 void addItem(ScriptStartItem *item, const QString& name, const QString& command, ScriptStartItem::ENV type );
58 public slots:
59 void slotAddProgram();
60 void slotAddCMD();
61 void slotRemoveCMD();
62 void slotEditCMD(QTreeWidgetItem*);
63 bool slotEditCMD(const KFileItem&);
64 void slotEditCMD();
65 void slotSelectionChanged();
66 void slotItemClicked( QTreeWidgetItem *, int);
67 void slotAdvanced();
69 private:
70 QTreeWidgetItem *m_programItem, *m_scriptItem;
71 QStringList m_paths;
72 QStringList m_pathName;
74 Ui_AutostartConfig *widget;
77 #endif