00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef PROCESSSETTINGS_H
00010 #define PROCESSSETTINGS_H
00011
00012
00013
00014 #include <QtGui>
00015 #include "ui_Settings.h"
00016 #include "ui_ProcessInformation.h"
00017
00018
00019
00020 class IrisGui;
00021 class Tool;
00022 class ToolFlag;
00023 class Slice;
00024 class VolumeIndex;
00025
00026 class OutputInformation : public QDialog, protected Ui::ProcessInformation
00027 {
00028 Q_OBJECT
00029
00030 private:
00031 OutputInformation( QWidget *parent = 0 );
00032 ~OutputInformation();
00033
00034 public:
00035
00036 void Initialize();
00037 void NewWindow( bool multipleRuns );
00038
00039 QLabel *GetOutputWindow() { return this->outputWindow; }
00040
00041 void SetOutputFile(const QString &file);
00042 void AppendMessage(const QString &message);
00043
00044 bool Valid() { return valid; }
00045
00046 static OutputInformation &instance();
00047 static void DeleteInstance() { if ( instance_ != NULL ) delete instance_; instance_ = NULL; }
00048
00049 protected:
00050 void closeEvent(QCloseEvent *event);
00051
00052 public slots:
00053 void ProcessComplete();
00054 void Toggle();
00055 void ToggleVerbose( bool enabled );
00056
00057 private:
00058 QFile debugFile;
00059 bool valid;
00060 int currentTool;
00061 int outOfTool;
00062 bool poppedOut;
00063
00064 static OutputInformation *instance_;
00065 };
00066
00067 class ProcessSettings : public QDialog, public Ui::Settings
00068 {
00069 Q_OBJECT
00070
00071 public:
00072 ProcessSettings( QWidget *parent );
00073 ~ProcessSettings();
00074
00075 void Initialize( QObject *saveObject = NULL, bool noCancel = false );
00076 void InitializeFlags( QHash<QString, ToolFlag *> &flagList,
00077 const QHash<QString, QStringList> &possibleFiles = *(new QHash<QString, QStringList>()) );
00078 void SetOkEnabled( bool enabled ) { foreach ( QAbstractButton *button, buttonBox->buttons() ) { if ( button->text() == "OK" ) button->setEnabled( enabled ); } }
00079
00080 public slots:
00081 virtual void FlagsChanged( int state );
00082 virtual void FlagsChanged( const QString& text );
00083 virtual void SaveComplete();
00084
00085 protected:
00086 QString *inputName;
00087 QStringList *args;
00088 bool validArgs;
00089 int Num_Flags;
00090
00091 QList<ToolFlag *> flags;
00092
00093 QPushButton saveButton;
00094
00095 private:
00096 static bool infoChanged;
00097 };
00098
00099 #endif