Mercurial > minori
comparison src/include/ui_utils.h @ 7:07a9095eaeed
Update
Refactored some code, moved some around
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Thu, 24 Aug 2023 23:11:38 -0400 |
parents | 1d82f6e04d7d |
children | b1f73678ef61 |
comparison
equal
deleted
inserted
replaced
6:1d82f6e04d7d | 7:07a9095eaeed |
---|---|
4 #include <QString> | 4 #include <QString> |
5 #include <QPoint> | 5 #include <QPoint> |
6 #include <QSize> | 6 #include <QSize> |
7 #include <QDateTime> | 7 #include <QDateTime> |
8 #include <QIcon> | 8 #include <QIcon> |
9 #include <QPlainTextEdit> | |
9 namespace UiUtils { | 10 namespace UiUtils { |
10 QIcon CreateSideBarIcon(const char* file); | 11 QIcon CreateSideBarIcon(const char* file); |
11 bool IsInDarkMode(); | 12 bool IsInDarkMode(); |
12 std::string GetLengthFromQDateTime(QDateTime stamp); | 13 std::string GetLengthFromQDateTime(QDateTime stamp); |
13 QPlainTextEdit* CreateTextParagraph(QWidget* parent, QString title, QString data, QPoint point, QSize size); | 14 QPlainTextEdit* CreateTextParagraph(QWidget* parent, QString title, QString data); |
14 QPlainTextEdit* CreateTextParagraphWithLabels(QWidget* parent, QString title, QString label, QString data, QPoint point, QSize size); | 15 QPlainTextEdit* CreateTextParagraphWithLabels(QWidget* parent, QString title, QString label, QString data); |
15 QPlainTextEdit* CreateSelectableTextParagraph(QWidget* parent, QString title, QString data, QPoint point, QSize size); | 16 QPlainTextEdit* CreateSelectableTextParagraph(QWidget* parent, QString title, QString data); |
16 void CreateTextHeader(QWidget* parent, QString title, QPoint point, QSize size); | 17 void SetPlainTextEditData(QPlainTextEdit* text_edit, QString data); |
18 void CreateTextHeader(QWidget* parent, QString title); | |
19 }; | |
20 | |
21 class Paragraph : public QPlainTextEdit { | |
22 public: | |
23 Paragraph(QString text, QWidget* parent = nullptr); | |
24 QSize minimumSizeHint() const override; | |
25 QSize sizeHint() const override; | |
17 }; | 26 }; |
18 #endif // __ui_utils_h | 27 #endif // __ui_utils_h |