12 #ifndef hifi_BaseLogDialog_h
13 #define hifi_BaseLogDialog_h
16 #include <QSyntaxHighlighter>
18 const int ELEMENT_MARGIN = 7;
19 const int ELEMENT_HEIGHT = 32;
20 const int CHECKBOX_MARGIN = 12;
21 const int CHECKBOX_WIDTH = 110;
22 const int COMBOBOX_WIDTH = 160;
23 const int BUTTON_MARGIN = 8;
29 class Highlighter :
public QSyntaxHighlighter {
31 Highlighter(QTextDocument* parent =
nullptr);
32 void setBold(
int indexToBold);
36 void highlightBlock(
const QString& text)
override;
39 QTextCharFormat boldFormat;
40 QTextCharFormat keywordFormat;
44 class BaseLogDialog :
public QDialog {
48 BaseLogDialog(QWidget* parent);
52 virtual void appendLogLine(QString logLine);
55 void updateSelection();
56 void handleSearchButton();
57 void handleSearchTextChanged(QString text);
58 void toggleSearchPrev();
59 void toggleSearchNext();
64 QPlainTextEdit* _logTextBox{
nullptr };
65 Highlighter* _highlighter{
nullptr };
67 void resizeEvent(QResizeEvent* event)
override;
68 void showEvent(QShowEvent* event)
override;
69 virtual QString getCurrentLog() = 0;
73 QPushButton* _searchButton{
nullptr };
74 QLineEdit* _searchTextBox{
nullptr };
75 QPushButton* _searchPrevButton{
nullptr };
76 QPushButton* _searchNextButton{
nullptr };