Back to index

kdeartwork  4.3.2
kxsconfig.h
Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 //
00003 // KDE xscreensaver configuration dialog
00004 //
00005 // Copyright (c)  Martin R. Jones <mjones@kde.org> 1999
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public
00009 // License as published by the Free Software Foundation;
00010 // version 2 of the License.
00011 //
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with this program; see the file COPYING.  If not, write to
00019 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020 // Boston, MA 02110-1301, USA.
00021 
00022 #ifndef __KXSCONFIG_H__
00023 #define __KXSCONFIG_H__
00024 
00025 #include "kxsitem.h"
00026 
00027 #include <KDialog>
00028 #include <KProcess>
00029 #include <QLabel>
00030 #include <QList>
00031 
00032 class QLabel;
00033 
00034 class KXSConfigDialog : public KDialog
00035 {
00036   Q_OBJECT
00037 public:
00038   KXSConfigDialog(const QString &file, const QString &name);
00039   ~KXSConfigDialog();
00040 
00041   bool create();
00042   QString command();
00043 
00044 protected slots:
00045   void slotPreviewProcFinished(int exitCode, QProcess::ExitStatus exitStatus);
00046   void slotNewPreview();
00047   void slotChanged();
00048   virtual void slotOk();
00049   virtual void slotCancel();
00050 
00051 protected:
00052   void startProcess();
00053 
00054   QString   mFilename;
00055   QString   mExeName;
00056   QString   mConfigFile;
00057   KProcess *mPreviewProc;
00058   QWidget   *mPreview;
00059   QTimer    *mPreviewTimer;
00060   QList<KXSConfigItem*> mConfigItemList;
00061   bool      mKilled;
00062 };
00063 
00064 #endif