00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 
00075    
00076 #ifndef SSAMPLEDIALOG_H
00077 #define SSAMPLEDIALOG_H
00078 
00079 
00080 
00081 
00082 #include "../model/SSampleGen.h"
00083 #include "SJobPropDialog.h"
00084 
00085 
00086 #include <qdialog.h>
00087 #include <qpushbutton.h>
00088 #include <qradiobutton.h>
00089 #include <qcombobox.h>
00090 #include <qradiobutton.h>
00091 #include <qlabel.h> 
00092 #include <qhbox.h>
00093 #include <qlineedit.h>
00094 #include <qbuttongroup.h>
00095 #include <qvgroupbox.h>
00096 
00102 class SSampleDialog : public QDialog
00103 {
00104   Q_OBJECT
00105     
00106 public:
00109   SSampleDialog( QWidget *parent, const char *name );
00110   ~SSampleDialog();
00111 
00116   QString getDestinationFile() {
00117     return _currFile;
00118   };
00119   
00121   char* getTypeString(bool type);
00122   char* getDistString(SProbabilityDist::Type type);
00123  
00124 private: 
00125   SSampleGen *pGenerator;
00126   
00127   QPushButton *_pCancelBtn, *_pOKBtn;
00128   
00129   QLineEdit *_pNumMachEdit, *_pNumJobsEdit;
00130   QLineEdit *_pDestFileEdit;
00131   QButtonGroup *_pEnvClassGroup, *_pMachTopoGroup, *_pJobTopoGroup;
00132   int _envClassP, _envClassQ, _envClassR, _envClassO, _envClassF, _envClassJ, _envClassZ;
00133   int _machTopoSingle, _machTopoLine, _machTopoSet, _machTopoMesh;
00134   int _jobTopoSingle, _jobTopoLine, _jobTopoSet, _jobTopoMesh;
00135   int random, known;
00137   QString _currFile;
00138   QButtonGroup *_pJobPropGroup;
00139   QHBox *pJobPropHBox;
00140   QLabel *_pProcTimeLabel;
00141   QLabel *_pRelTimeLabel;
00142   
00143   bool _randomProcTime;
00144   bool _randomRelTime;
00145   double _pval1;
00146   double _pval2;
00147   double _rval1;
00148   
00149   
00150   double _dummy_rval;
00151   SProbabilityDist::Type _procTimeDistType;
00152   SProbabilityDist::Type _relTimeDistType;
00153   SProbabilityDist* _pRelTimeDist;
00154   
00155   char* _procTimeDistString;
00156   char* _relTimeDistString;
00157   char* _procTimeType;
00158   char* _relTimeType;
00159   SJobPropDialog *pJobPropDlg;
00160 
00161 private slots:
00166     void generate();
00168     void getJobProps();
00169 public: 
00170   
00171 };
00172 
00173 #endif //SSAMPLEDIALOG_H