mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
34 lines
582 B
C++
34 lines
582 B
C++
#ifndef CONSOLEVIEWER_H
|
|
#define CONSOLEVIEWER_H
|
|
|
|
#include <QFrame>
|
|
|
|
class QPlainTextEdit;
|
|
|
|
namespace vnotex
|
|
{
|
|
class TitleBar;
|
|
|
|
class ConsoleViewer : public QFrame
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ConsoleViewer(QWidget *p_parent = nullptr);
|
|
|
|
void append(const QString &p_text);
|
|
|
|
void clear();
|
|
|
|
private:
|
|
void setupUI();
|
|
|
|
void setupTitleBar(const QString &p_title, QWidget *p_parent = nullptr);
|
|
|
|
TitleBar *m_titleBar = nullptr;
|
|
|
|
QPlainTextEdit *m_consoleEdit = nullptr;
|
|
};
|
|
}
|
|
|
|
#endif // CONSOLEVIEWER_H
|