diff include/gui/widgets/text.h @ 253:b3549da699a6

*: ooooh! stupid big commit! oops
author Paper <paper@paper.us.eu.org>
date Tue, 06 Feb 2024 16:56:32 -0500
parents 8043152ef9d4
children 862d0d8619f6
line wrap: on
line diff
--- a/include/gui/widgets/text.h	Tue Feb 06 02:24:49 2024 -0500
+++ b/include/gui/widgets/text.h	Tue Feb 06 16:56:32 2024 -0500
@@ -8,7 +8,8 @@
 #include <QWidget>
 
 class QFrame;
-class QLabel;
+
+#include <QLabel>
 
 namespace TextWidgets {
 
@@ -24,23 +25,34 @@
 		QFrame* static_text_line;
 };
 
-class Paragraph : public QPlainTextEdit {
-		Q_OBJECT
+class Paragraph : public QLabel {
+	Q_OBJECT
 
-	public:
-		Paragraph(const QString& text, QWidget* parent = nullptr);
-		void SetText(const QString& text);
-		QSize minimumSizeHint() const override;
-		QSize sizeHint() const override;
+public:
+	Paragraph(const QString& text, QWidget* parent = nullptr);
+	void SetText(const QString& text);
 };
 
-class Line : public QLineEdit {
-		Q_OBJECT
+class LabelledParagraph final : public QWidget {
+	Q_OBJECT
+
+public:
+	LabelledParagraph(const QString& label, const QString& data, QWidget* parent = nullptr);
+	Paragraph* GetLabels();
+	Paragraph* GetParagraph();
 
-	public:
-		Line(QWidget* parent = nullptr);
-		Line(const QString& text, QWidget* parent = nullptr);
-		void SetText(const QString& text);
+private:
+	Paragraph* labels;
+	Paragraph* paragraph;
+};
+
+class Line : public Paragraph {
+	Q_OBJECT
+
+public:
+	Line(QWidget* parent = nullptr);
+	Line(const QString& text, QWidget* parent = nullptr);
+	void SetText(const QString& text);
 };
 
 class Title final : public Line {
@@ -74,8 +86,7 @@
 
 	private:
 		Header* header;
-		Paragraph* labels;
-		Paragraph* paragraph;
+		LabelledParagraph* content;
 };
 
 class SelectableSection final : public QWidget {