00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2005-2006 Trolltech AS. All rights reserved. 00004 ** 00005 ** This file is part of the example classes of the Qt Toolkit. 00006 ** 00007 ** This file may be used under the terms of the GNU General Public 00008 ** License version 2.0 as published by the Free Software Foundation 00009 ** and appearing in the file LICENSE.GPL included in the packaging of 00010 ** this file. Please review the following information to ensure GNU 00011 ** General Public Licensing requirements will be met: 00012 ** http://www.trolltech.com/products/qt/opensource.html 00013 ** 00014 ** If you are unsure which license is appropriate for your use, please 00015 ** review the following information: 00016 ** http://www.trolltech.com/products/qt/licensing.html or contact the 00017 ** sales department at sales@trolltech.com. 00018 ** 00019 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00020 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00021 ** 00022 ****************************************************************************/ 00031 #ifndef CONFIGDIALOG_H 00032 #define CONFIGDIALOG_H 00033 00034 #include <QDialog> 00035 #include <QList> 00036 #include <QDebug> 00037 #include <QRegExp> 00038 #include "ui_configDialog.h" 00039 00040 #include "pages.h" 00041 #include "condorstatusview.h" 00042 00043 class QListWidget; 00044 class QListWidgetItem; 00045 class QStackedWidget; 00046 00047 class ConfigDialog : public QDialog 00048 { 00049 Q_OBJECT 00050 00051 public: 00052 ConfigDialog(QWidget *parent = 0); 00053 ConfigDialog(QList<CondorAbstractView *> listViews, QList <QTime>); 00054 ~ConfigDialog(); 00055 00056 public slots: 00057 void browseConfig(); 00058 void loadConfig(); 00059 void editConfig(); 00060 void browseLocalConfig(); 00061 void loadLocalConfig(); 00062 void editLocalConfig(); 00063 void browseJobDescriptions(); 00064 void browseJobDescDialog(); 00065 void accept(); 00066 void apply(); 00067 00068 private slots: 00069 void browseJobHeader(); 00070 void browseMachineHeader(); 00071 void browseEditor(); 00072 void errorControl(int,QProcess::ExitStatus); 00073 private: 00075 Ui::configDialog ui; 00077 QString m_dirBrowse; 00079 bool m_reconfig; 00080 // Paths 00082 QStringList m_paths; 00084 QList <QTime> m_timers; 00085 // pages 00087 CondorStatusView *m_statusView; 00089 CondorStatusPage *m_statusPage; 00091 CondorQView *m_qView; 00093 CondorQPage *m_qPage; 00095 QProcess *m_proc; 00096 00097 void readPath(QString); 00098 void readSettings(); 00099 void writeSettings(); 00100 signals: 00107 void reconfig(QStringList paths, QList <QTime> timers, QStringList opaths); 00108 }; 00109 00110 #endif