Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

visualization/SPrefDialog.h

Go to the documentation of this file.
00001 /* #start# ***********************************************************
00002 
00003                              Scheduling Simulator
00004                     Lehrstuhl f"ur Effiziente Algorithmen
00005                        Technische Universit"at M"unchen
00006 
00007  File    : $Id: SPrefDialog.h,v 1.4 2003/01/08 18:57:15 meierb Exp $
00008 
00009  Purpose : With this modeless dialog you can set up all preferences for 
00010            the scheduling application (like colors, logger, algorithms etc.). 
00011      This dialog uses the SPref::instance() to get/set the preferences.
00012 
00013  RCS-Log:
00014  $Log: SPrefDialog.h,v $
00015  Revision 1.4  2003/01/08 18:57:15  meierb
00016  added randomized release times
00017 
00018  Revision 1.1.1.1  2002/12/02 22:26:19  meierb
00019  my_schedule
00020 
00021  Revision 1.2  2002/11/11 16:19:36  taeubig
00022  changes in header inclusion
00023 
00024  Revision 1.1  2002/08/29 12:59:59  taeubig
00025  Added the sources
00026 
00027  Revision 1.24  2001/07/16 14:28:46  taeubig
00028  Replaced LeaBib by Bib
00029 
00030  Revision 1.23  2001/05/16 13:20:04  taeubig
00031  QT headers are included last because of "slots" conflict
00032 
00033  Revision 1.22  2000/10/09 09:21:11  mayerh
00034  added slot showDescription()
00035 
00036  Revision 1.21  2000/07/05 21:41:34  mayerh
00037  added button to view LeaBibEntries
00038 
00039  Revision 1.20  2000/06/15 13:42:45  taeubig
00040  Added rejected state support
00041 
00042  Revision 1.19  2000/05/24 13:02:53  taeubig
00043  New compiler (gcc-2.95) and new Qt (2.1)
00044  Replaced "list" by "leda_list" etc.
00045 
00046  Revision 1.18  2000/05/15 09:36:49  mayerh
00047  added functions to update the algorithm combos corresponding to a choosen criteria
00048 
00049  Revision 1.17  2000/04/19 20:01:23  mayerh
00050  added combobox to select incompatible algorithms
00051 
00052  Revision 1.16  2000/04/12 20:51:12  mayerh
00053  added some attributes and methods to update the combobox with all suitable algorithms
00054 
00055  Revision 1.15  2000/01/24 10:55:46  kern
00056  added SObserver
00057 
00058  Revision 1.14  2000/01/16 18:43:03  kern
00059  java docs
00060 
00061  Revision 1.13  2000/01/14 09:05:54  kern
00062  changed use pixmaps strategie
00063 
00064  Revision 1.12  2000/01/12 09:27:45  kern
00065  added javadocs
00066 
00067  Revision 1.11  2000/01/09 09:41:36  kern
00068  changed logger and player strategie (creating/loading)
00069 
00070  Revision 1.10  2000/01/05 14:35:22  kern
00071  added schedFilter and editFilter for text logger
00072 
00073  Revision 1.9  2000/01/04 14:47:37  kern
00074  added johnson
00075 
00076  Revision 1.8  2000/01/03 11:26:00  kern
00077  added coffmangraham
00078 
00079  Revision 1.7  1999/12/27 10:11:21  kern
00080  change in logger prefs
00081 
00082  Revision 1.6  1999/12/21 10:24:49  kern
00083  moved machine settings from preferences to machineview
00084 
00085  Revision 1.5  1999/12/20 10:45:27  kern
00086  changed logger settings
00087 
00088  Revision 1.4  1999/12/14 09:15:46  kern
00089  added new logger features
00090 
00091  Revision 1.3  1999/12/10 10:33:06  kern
00092  added preferences for machine view
00093 
00094  Revision 1.2  1999/12/06 14:11:58  kern
00095  added some more preferences
00096 
00097  Revision 1.1  1999/12/01 09:47:21  kern
00098  added preferences
00099 
00100 
00101  * #end# ************************************************************* */
00102 
00103 #ifndef SPREFDIALOG_H
00104 #define SPREFDIALOG_H
00105 
00106 // system header files
00107 
00108 // project header files
00109 #include "../general/SObserver.h"
00110 #include "SBibView.h"
00111 
00112 // QT header files
00113 #include <qdialog.h>
00114 #include <qframe.h>
00115 #include <qtabwidget.h>
00116 #include <qpushbutton.h>
00117 #include <qlineedit.h>
00118 #include <qcheckbox.h>
00119 #include <qcombobox.h>
00120 #include <qlistbox.h>
00121 #include <qbuttongroup.h>
00122 #include <qradiobutton.h>
00123 #include <qfiledialog.h>
00124 
00129 class SPrefDialog : public QDialog, SObserver
00130 {
00131   Q_OBJECT
00132     
00133 public:
00138   SPrefDialog( QWidget *parent, const char *name );
00139   
00140 protected:
00143   void setupTab1();
00146   void setupTab2();
00149   void setupTab3();  
00152   void update( const class SEvent & );
00153 
00154 private:
00155   //pointer to ScheduleWin
00156   QWidget *_parent;
00157   // the main tabwidget of this dialog.
00158   QTabWidget *_pTab;
00159   // the buttons on the bottom of the dialog.
00160   QPushButton *_pApplyBtn, *_pCancelBtn, *_pOKBtn;
00161   
00162   // widgets for the first tab
00163   QComboBox *_pAlgComboBox;
00164   QComboBox *_pIAlgComboBox;
00165   QButtonGroup *_pPlayerTSGroup;
00166   QButtonGroup *_pAlgGroupBox;
00167   int _playerTSFileID, _playerTSCurID;
00168   int _pAlgID, _pIAlgID;
00169   QLineEdit *_pPlayerTSFileEdit, *_pPlayerLogEdit;
00170   QRadioButton *_pCompatibleAlgBtn;
00171   QRadioButton *_pIncompatibleAlgBtn;
00172   QPushButton *_pLeaBibBtn;
00173   QPushButton *_pDescriptionBtn;
00174   SBibView *_pBibView;
00175 
00176   // widgets for the second tab
00177   QTabWidget *_pLogTabWidget;
00178   QFrame *_pLogTab1, *_pLogTab2, *_pLogTab3;
00179   QButtonGroup *_pLogTextDestGroup;
00180   int _logTextFileID, _logTextStdID;
00181   QCheckBox *_pLogTextSchedResetCB,  *_pLogTextSchedStateCB;
00182   QCheckBox *_pLogTextSchedOverCB,   *_pLogTextSchedPhaseCB;
00183   QCheckBox *_pLogTextSchedAlloCB,   *_pLogTextSchedDealloCB;
00184   QCheckBox *_pLogTextSchedBrokenCB, *_pLogTextSchedRepairedCB;
00185   QCheckBox *_pLogTextSchedAllCB;
00186   QCheckBox *_pLogTextEditAddingJobCB, *_pLogTextEditDeletingJobCB;
00187   QCheckBox *_pLogTextEditJobsAddedCB, *_pLogTextEditJobsDeletedCB;
00188   QCheckBox *_pLogTextEditChangedCB,   *_pLogTextEditDepAddedCB;
00189   QCheckBox *_pLogTextEditDepDeletedCB; 
00190   QCheckBox *_pLogTextEditAllCB;
00191   QLineEdit *_pLogTextDestFileEdit, *_pLogPlayerDestFileEdit;
00192   QCheckBox *_pLogTextActCB, *_pLogPlayerActCB, *_pLogOptCritActCB;
00193   QButtonGroup *_pLogOptCritTypeGroup, *_pLogOptCritCriterionGroup;
00194   int _logOptCritMaxID, _logOptCritSumID, _logOptCritMeanID;
00195   int _logOptCritCompID, _logOptCritFlowID;
00196   int _logOptCritLateID, _logOptCritTardID;
00197   int _logOptCritEarlID, _logOptCritNumTardyID;
00198   QCheckBox *_pLogOptCritWeightedCB;
00199   
00200   // widgets for the third tab
00201   QPushButton *_pHBtn, *_pReBtn, *_pRuBtn, *_pFBtn, *_pRjBtn; 
00202   QString _jobHiddenColor, _jobReleasedColor;
00203   QString _jobRunningColor, _jobFinishedColor;
00204   QString _jobRejectedColor;
00205   QCheckBox *_pUsePixCheckBox;
00206   QPushButton *_pChoosePixBtn;
00207   QLineEdit *_pPixFileEdit, *_pWidthEdit, *_pHeightEdit;
00208   QButtonGroup *_pNodeShapeGroup;
00209   int _ellipseBtn, _rectangleBtn;
00210   QLineEdit *_pMachGifFileEdit;
00211   
00212   // default values
00213   QString _defJobHiddenColor,  _defJobReleasedColor; 
00214   QString _defJobRunningColor, _defJobFinishedColor;
00215   QString _defJobRejectedColor;
00216   QString _defAlgorithm;
00217   QString _defPlayerTasksystem, _defPlayerLogFile;
00218   QString _defLogTextStream;
00219   int _defLogTextSchedFilter, _defLogTextEditFilter;
00220   int _defLogTextActivated;
00221   QString _defLogPlayerStream;
00222   int _defLogPlayerActivated;
00223   int _defLogOptCritActivated;
00224   int _defLogOptCritCriterion;
00225   int _defLogOptCritType;
00226   int _defLogOptCritWeighted;
00227   int _defUsePixmaps;
00228   QString _defJobPixmapFile;
00229   int _defNodeWidth;
00230   int _defNodeHeight;
00231   QString _defNodeShape;
00232   QString _defMachGifFile;
00233 
00236   int chooseFile( QString filter, QString caption, QFileDialog::Mode mode,
00237       QString &selfile );
00238   int setCriterionType();
00239   int setCriterionCrit();
00240   void updateCombo();
00241   leda_string _defaultClassification;
00242 private slots:
00245   void setPreferences();
00249   void getPreferences();
00254   void getDefaultValues();
00258   void setDefaultValues();
00261   void saveAndClose();
00265   void cancel();
00269   void enableApply();
00273   void enableApply( int );
00277   void enableApply( const QString& );
00280   void hiddenCol(); 
00283   void releasedCol(); 
00286   void runningCol(); 
00289   void finishedCol();
00292   void rejectedCol();
00295   void selectAlgorithm( int );
00298   void choosePlayerTSFile();
00302   void choosePlayerLogFile();
00306   void selectLogTextDest();
00310   void selectLogPlayerDest();
00318   void selectPixFile();
00321   void selectMachGifFile();
00326   void validatePixFile();
00329   void toggleNodeUsePixmaps();
00335   void toggleLogTab1(); 
00339   void toggleLogTab2();
00343   void toggleLogTab3(); 
00344   void toggleCombo1(int);
00345   void toggleCombo2(int);
00346   void setCriterion();
00347   void showBibEntry();
00348   void showDescription();
00349 };
00350 
00351 #endif //SPREFDIALOG_H

Generated on Thu May 22 16:48:09 2003 for Sketch-it! by doxygen1.2.18