g4dialog
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
17class GBoard : public QWidget, public GBase<GBoard> {
18 Q_OBJECT
19
20public:
26 explicit GBoard(const std::shared_ptr<GOptions>& gopt, QWidget* parent = nullptr);
27
28 GBoard(const GBoard&) = delete;
29 GBoard& operator=(const GBoard&) = delete;
30 GBoard(GBoard&&) = delete;
31 GBoard& operator=(GBoard&&) = delete;
32
37 void appendLog(const QString& text);
38
39private slots:
44 void filterLog(const QString& filterText);
45
49 void clearLog();
50
54 void saveLog();
55
56private:
57 QLineEdit* searchLineEdit{};
58 QToolButton* clearButton{};
59 QToolButton* saveButton{};
60 QTextEdit* logTextEdit{};
61
62 // Maintains all log lines for filtering purposes.
63 QString currentFilterText{};
64
65};
A widget that displays read-only log text along with a top bar for search, clear, and save actions.
Definition gboard.h:17
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 message to the log tab.
Definition gboard.cc:64
GBoard & operator=(GBoard &&)=delete
GBoard & operator=(const GBoard &)=delete
GBoard(const GBoard &)=delete