kde-workspace/kcontrol/autostart/autostart.h
Ivailo Monev 347f9d7177 kcontrol: merge DesktopStartItem class into AutoStartItem
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-04 12:47:53 +02:00

66 lines
2.4 KiB
C++

/***************************************************************************
* Copyright (C) 2006-2007 by Stephen Leaf *
* smileaf@gmail.com *
* Copyright (C) 2008 by Montel Laurent <montel@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
***************************************************************************/
#ifndef AUTOSTART_H
#define AUTOSTART_H
#include <QPushButton>
#include <QTreeWidget>
#include <KCModule>
#include <KFileItem>
#include "ui_autostartconfig.h"
#include "autostartitem.h"
class Autostart : public KCModule
{
Q_OBJECT
public:
Autostart(QWidget* parent, const QVariantList&);
~Autostart();
enum COL_TYPE { COL_NAME = 0, COL_COMMAND=1, COL_STATUS=2 };
void load();
void save();
void defaults();
protected:
void addItem(AutoStartItem *item, const QString& name, const QString& command, bool disabled);
private slots:
void slotAddProgram();
void slotRemoveCMD();
void slotEditCMD(QTreeWidgetItem*);
bool slotEditCMD(const KFileItem&);
void slotEditCMD();
void slotSelectionChanged();
void slotItemClicked( QTreeWidgetItem *, int);
void slotAdvanced();
private:
QTreeWidgetItem *m_programItem;
QStringList m_paths;
Ui_AutostartConfig *widget;
};
#endif