• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

C:/CVUT/diplomka/Automata_editor/sources/transitionDialogs.h

Go to the documentation of this file.
00001 #ifndef _TRANSITIONDIALOGS_H_234896546321_
00002 #define _TRANSITIONDIALOGS_H_234896546321_
00003 
00004 #include "stateDialogs.h" // due to NameAcceptDialog predecessor
00005 
00006 #include <QDialog>
00007 
00008 class Transition;
00009 class Editor;
00010 class LabelX;
00011 
00012 class QLineEdit;
00013 class QCheckBox;
00014 class QComboBox;
00015 class QListWidget;
00016 
00017 class TransitionDialog : public NameAcceptDialog
00018 {
00019     Q_OBJECT
00020 public:
00021     enum EMode {eAdd, eEdit};
00022 
00023     TransitionDialog(EMode mode = eAdd, QWidget* parent = 0);
00024 
00025     QString getLabel() const;
00026     float getLabelPos() const;
00027     int getType() const;
00028     bool isLeftOriented() const;
00029     bool isRadius() const;
00030     bool isDimmed() const;
00031     float getNCurv() const;
00032     int getArcAngle() const;
00033     int getArcAngleB() const;
00034 
00035     void setName(const QString& name);
00036     void setLabelPos(float lp);
00037     void setDimmed(bool dimmed);
00038     void setType(int type);
00039     void setTrOrientation(bool leftOriented);
00040     void setRadius(bool radius);
00041     void setNCurv(float ncurv);
00042     void setArcAngle(int arcA);
00043     void setArcAngleB(int arcAB);
00044     
00045 protected:
00046     QLineEdit* lineLabelPos; 
00047     QCheckBox* checkDimmed;
00048     QComboBox* comboType;
00049     QComboBox* comboOrientation;    
00050     QLineEdit* edtArcAngle;
00051     QLineEdit* edtArcAngleB;
00052     QLineEdit* edtNCurv;    
00053     
00054 protected slots:    
00055     void showEdits(int typ);
00056     
00057 private:
00058     EMode   m_mode; //!< holds selected mode
00059 };
00060 
00061 class TransitionLoopSEDialog : public NameAcceptDialog
00062 {
00063   Q_OBJECT
00064 public:
00065   enum EMode {eAdd, eEdit};
00066 
00067   TransitionLoopSEDialog(EMode mode = eAdd, QWidget *parent = 0);
00068   
00069   QString getLabel() const;
00070   float getLabelPos() const;
00071   bool isDimmed() const;
00072   int getDirection() const;
00073   int getType() const;
00074   
00075   void setLabel(const QString &lab);
00076   void setLabelPos(float lp);
00077   void setDimmed(bool d);
00078   void setDirection(int d);
00079   void setType(int typ);
00080   
00081 protected:
00082   QLineEdit* lineLabelPos; 
00083   QComboBox *comboType;
00084   QComboBox *comboDirection;
00085   QCheckBox *checkDimmed;  
00086 
00087       
00088 protected slots:
00089     void showEdits(int typ);
00090     
00091 private:
00092     EMode   m_mode; //!< holds selected mode
00093 };
00094 
00095 class TransitionExtendedDialog: public QDialog
00096 {
00097   Q_OBJECT
00098 public:
00099   TransitionExtendedDialog(QWidget *parent = 0);
00100   
00101   void setParams(Transition *tr);
00102 
00103   Qt::PenStyle getLineStyle();
00104   float getLineWidth();
00105   QString getLineColor();
00106   QString getLabelColor();
00107   float getLabelScale();
00108   bool getDblStatus();
00109   
00110   Qt::PenStyle getDimLineStyle();
00111   QString getDimLineColor();
00112   float getDimLineCoef();
00113   QString getDimLabelColor();
00114   
00115   float getLineBorderCoef();
00116   QString getLineBorderColor();
00117   
00118   float getLineDblCoef();
00119   float getLineDblSep();
00120   
00121 protected:
00122   // adjusted
00123   QComboBox *comboLineStyle;
00124   QLineEdit *edtLineWidth;
00125   QLineEdit *edtLineColor;
00126   QLineEdit *edtLabelColor;
00127   QLineEdit *edtLabelScale;
00128   QCheckBox *checkDblStatus;
00129   // preset
00130   QComboBox *comboDimLineStyle;
00131   QLineEdit *edtDimLineColor;
00132   QLineEdit *edtDimLineCoef;
00133   QLineEdit *edtDimLabelColor;
00134   // border
00135   QLineEdit *edtLineBorderCoef;
00136   QLineEdit *edtLineBorderColor;
00137   // double
00138   QLineEdit *edtLineDblCoef;
00139   QLineEdit *edtLineDblSep;
00140 };
00141 
00142 
00143 
00144 class NextLabelsDialog : public QDialog
00145 {
00146     Q_OBJECT
00147 public:
00148     NextLabelsDialog(Editor *editor, Transition *tr, QWidget *parent = 0);
00149 
00150 protected:
00151     Editor          *m_pEditor;
00152     Transition      *m_pTransition;
00153     
00154     QListWidget     *labelList;
00155     QPushButton     *btnAdd;
00156     QPushButton     *btnEdit;
00157     QPushButton     *btnDelete;
00158 
00159     enum EActionType {eAdd, eEdit};    
00160 
00161     QString getListLine(LabelX *label);
00162 
00163     class NextLabelsEditDialog : public QDialog
00164     {            
00165     public:
00166         NextLabelsEditDialog(EActionType action, QWidget *parent);
00167         NextLabelsEditDialog(EActionType action, QWidget *parent, const QString& str,
00168                              float pos, bool left);
00169 
00170         QLineEdit *edtLabel;
00171         QLineEdit *edtPos;  
00172         QCheckBox *checkLeft;
00173 
00174     private:
00175         void init(EActionType action, const QString &str, float pos, bool left);
00176     };
00177 
00178 protected slots:
00179     void selectionChanged();
00180     
00181     void addLabel();
00182     void editLabel();
00183     void deleteLabel();
00184 };
00185 
00186 #endif //_TRANSITIONDIALOGS_H_234896546321_

Generated on Tue Jan 4 2011 03:03:24 for Autoamata editor by  doxygen 1.7.0