1 // Thomas Nagy 2014-2021 GPLV3 2 3 #ifndef BOX_CLASS_PROPERTIES_H 4 #define BOX_CLASS_PROPERTIES_H 5 6 #include <QSyntaxHighlighter> 7 #include <QTextEdit> 8 #include <KDE/KDialog> 9 #include "box_class.h" 10 11 class class_highlighter_rule 12 { 13 public: 14 QRegExp m_oPattern; 15 QTextCharFormat m_oFormat; 16 }; 17 18 class class_highlighter: public QSyntaxHighlighter 19 { 20 public: 21 class_highlighter(QTextDocument *i_oP=0); 22 void highlightBlock(const QString &); 23 QVector<class_highlighter_rule> m_oRules; 24 }; 25 26 class box_class_properties : public KDialog 27 { 28 Q_OBJECT 29 public: 30 box_class_properties(QWidget*, box_class*); 31 box_class *m_oClass; 32 QTextEdit *m_oClassDefinition; 33 34 public slots: 35 void apply(); 36 void enable_apply(int); 37 void enable_apply(); 38 }; 39 40 #endif 41 42