gui: add basic gui code.

This commit is contained in:
2025-06-15 14:31:54 +08:00
parent 72df3216a5
commit 7d123b2c06
40 changed files with 1483 additions and 12 deletions

38
Gui/Control/LogControl.h Normal file
View File

@@ -0,0 +1,38 @@
#ifndef LOGCONTROL_H
#define LOGCONTROL_H
#include <QBrush>
#include <QStandardItemModel>
#include <QWidget>
namespace Ui {
class LogPrint;
}
class LogPrint : public QWidget
{
Q_OBJECT
public:
explicit LogPrint(QWidget* parent = nullptr);
~LogPrint();
public:
void Info(const QString& message);
void Warn(const QString& message);
void Error(const QString& message);
void Debug(const QString& message);
public:
std::string now_str();
private:
void InitControl();
void Print(const QString& message, const QBrush& color);
private:
Ui::LogPrint* ui;
QStandardItemModel* model_;
};
#endif // LOGCONTROL_H