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

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

Go to the documentation of this file.
00001 #ifndef _STATEDIALOGS_H_4314235325_
00002 #define _STATEDIALOGS_H_4314235325_
00003 
00004 #include <QDialog>
00005 
00006 class QLineEdit;
00007 class QCheckBox;
00008 class QComboBox;
00009 class Editor;
00010 class State;
00011 
00012 class NameAcceptDialog : public QDialog
00013 {
00014     Q_OBJECT
00015 public:
00016     NameAcceptDialog(QWidget *parent = 0);
00017     
00018 protected:
00019     QLineEdit* edtLabel;
00020     QLineEdit* edtName;
00021 
00022     void showMessage(const QString &msg);
00023 
00024 protected slots:
00025     void myAccept();
00026 };
00027 
00028 
00029 
00030 class StateDialog : public NameAcceptDialog
00031 {
00032     Q_OBJECT
00033 public:
00034     enum EMode {eAdd, eEdit};
00035 
00036     StateDialog(Editor *editor, const QList<QString> &typeList, EMode mode = eAdd, bool hasInitial = false, QWidget* parent = 0);
00037 
00038     QString getLabel() const;
00039     QString getName() const;
00040     int getType() const;
00041     bool isDimmed() const;
00042     bool isAutoNammed() const;
00043 
00044     bool quickInitial() const;
00045 
00046     void setLabel(const QString &label);
00047     void setName(const QString &name, bool editing = true);
00048     void setType(int type);
00049     void setDimmed(bool dim);
00050     void setAutoNammed(bool aN);
00051 
00052 protected:
00053     bool nameBraceMatch();
00054     
00055     QCheckBox* checkAutoName;
00056     QComboBox* comboType;
00057     QCheckBox* checkDimmed;
00058     QCheckBox* checkQuickInitial;
00059     
00060     Editor *editor;
00061     QString currentStateName;
00062     
00063 protected slots:
00064     void changeAutoName();
00065     void testAccept();
00066 };
00067 
00068 
00069 
00070 class StateExtendedDialog: public QDialog{
00071   Q_OBJECT
00072 public:
00073     StateExtendedDialog(QWidget *parent = 0);
00074 
00075     void setParams(State *state);
00076 
00077     Qt::PenStyle getLineStyle();
00078     float getLineWidth();
00079     QString getLineColor();
00080     QString getLabelColor();
00081     float getLabelScale();
00082     Qt::BrushStyle getFillStatus();
00083     QString getFillColor();
00084 
00085     Qt::PenStyle getDimLineStyle();
00086     QString getDimLineColor();
00087     float getDimLineCoef();
00088     QString getDimLabelColor();
00089     QString getDimFillColor();
00090 
00091     float getLineDblCoef();
00092     float getLineDblSep();
00093   
00094 protected:
00095     // adjusted
00096     QComboBox *comboLineStyle;
00097     QLineEdit *edtLineWidth;
00098     QLineEdit *edtLineColor;
00099     QLineEdit *edtLabelColor;
00100     QLineEdit *edtLabelScale;
00101     QComboBox *comboFillStatus;
00102     QLineEdit *edtFillColor;
00103     // preset
00104     QComboBox *comboDimLineStyle;
00105     QLineEdit *edtDimLineColor;
00106     QLineEdit *edtDimLineCoef;
00107     QLineEdit *edtDimLabelColor;
00108     QLineEdit *edtDimFillColor;
00109     // double
00110     QLineEdit *edtLineDblCoef;
00111     QLineEdit *edtLineDblSep;
00112 };
00113 
00114 #endif //_STATEDIALOGS_H_4314235325_

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