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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
1 #ifndef __ui_utils_h
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
2 #define __ui_utils_h
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
3 #include <QWidget>
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
4 #include <QString>
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
5 #include <QPoint>
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
6 #include <QSize>
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
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
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
9 #include <QPlainTextEdit>
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
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
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
12 bool IsInDarkMode();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
13 std::string GetLengthFromQDateTime(QDateTime stamp);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
14 QPlainTextEdit* CreateTextParagraph(QWidget* parent, QString title, QString data);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
15 QPlainTextEdit* CreateTextParagraphWithLabels(QWidget* parent, QString title, QString label, QString data);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
16 QPlainTextEdit* CreateSelectableTextParagraph(QWidget* parent, QString title, QString data);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
17 void SetPlainTextEditData(QPlainTextEdit* text_edit, QString data);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
18 void CreateTextHeader(QWidget* parent, QString title);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
19 };
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
20
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
21 class Paragraph : public QPlainTextEdit {
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
22 public:
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
23 Paragraph(QString text, QWidget* parent = nullptr);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
24 QSize minimumSizeHint() const override;
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
25 QSize sizeHint() const override;
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
26 };
1
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
27 #endif // __ui_utils_h