Mercurial > minori
annotate 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 |
rev | line source |
---|---|
2 | 1 #ifndef __ui_utils_h |
2 #define __ui_utils_h | |
3 #include <QWidget> | |
4 #include <QString> | |
5 #include <QPoint> | |
6 #include <QSize> | |
7 #include <QDateTime> | |
6
1d82f6e04d7d
Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
8 #include <QIcon> |
7 | 9 #include <QPlainTextEdit> |
2 | 10 namespace UiUtils { |
6
1d82f6e04d7d
Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
11 QIcon CreateSideBarIcon(const char* file); |
2 | 12 bool IsInDarkMode(); |
13 std::string GetLengthFromQDateTime(QDateTime stamp); | |
7 | 14 QPlainTextEdit* CreateTextParagraph(QWidget* parent, QString title, QString data); |
15 QPlainTextEdit* CreateTextParagraphWithLabels(QWidget* parent, QString title, QString label, QString data); | |
16 QPlainTextEdit* CreateSelectableTextParagraph(QWidget* parent, QString title, QString data); | |
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; | |
2 | 26 }; |
1 | 27 #endif // __ui_utils_h |