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