gboard
Loading...
Searching...
No Matches
gboard.h
Go to the documentation of this file.
1#pragma once
2
3// gemc
4#include "gbase.h"
5
6// qt
7#include <QtWidgets>
8#include <memory>
9
10constexpr const char* GBOARD_LOGGER = "gboard";
11
19namespace gboard {
32}
33
34
55class GBoard : public QWidget, public GBase<GBoard>
56{
57 Q_OBJECT
58
59public:
72 explicit GBoard(const std::shared_ptr<GOptions>& gopt, QWidget* parent = nullptr);
73
74 GBoard(const GBoard&) = delete;
75 GBoard& operator=(const GBoard&) = delete;
76 GBoard(GBoard&&) = delete;
77 GBoard& operator=(GBoard&&) = delete;
78
90 void appendLog(const QString& text);
91
92private
93slots :
102 void filterLog(const QString& filterText);
103
109 void clearLog();
110
117 void saveLog();
118
131 void updateDisplay();
132
133private:
139 QLineEdit* searchLineEdit{};
140
146 QToolButton* clearButton{};
147
153 QToolButton* saveButton{};
154
161 QTextEdit* logTextEdit{};
162
168 QStringList fullLogLines;
169
175 QString currentFilterText{};
176};
A Qt widget that displays read-only log text with a compact "top bar" UI.
Definition gboard.h:56
GBoard(const std::shared_ptr< GOptions > &gopt, QWidget *parent=nullptr)
Constructs a new GBoard widget.
Definition gboard.cc:10
GBoard(GBoard &&)=delete
void appendLog(const QString &text)
Appends a log line to the internal history and updates the display.
Definition gboard.cc:73
GBoard & operator=(GBoard &&)=delete
GBoard & operator=(const GBoard &)=delete
GBoard(const GBoard &)=delete
constexpr const char * GBOARD_LOGGER
Definition gboard.h:10
Helper namespace for the gboard module.
GOptions defineOptions()
Defines the module options used by the gboard components.
Definition gboard.h:28