ToolX 1.11.1 [e3f477f]
A GUI debug tool chain for diagnosing GVA systems
Loading...
Searching...
No Matches
AstuteWelcomePage.h
1//
2// Copyright (c) 2026 Astute Systems PTY LTD
3//
4// Welcome page shared by the Astute Qt6 tools: tool logo on the brand navy,
5// a one-sentence description, the version and git hash, and the copyright
6// line. The About dialog (AstuteAboutDialog.h) reuses it.
7//
8// Layout and content rules: .github/skills/qt6-welcome-page/SKILL.md
9//
10
11#ifndef ASTUTE_WELCOME_PAGE_H
12#define ASTUTE_WELCOME_PAGE_H
13
14#include <QColor>
15#include <QFont>
16#include <QString>
17#include <QWidget>
18
19class QLabel;
20class QVBoxLayout;
21
22namespace Astute {
23
25inline QColor brandNavy()
26{
27 return QColor(0x01, 0x21, 0x41);
28}
29
32{
33 QString version;
34 QString gitHash;
35};
36
38QString copyrightLine();
39
42QLabel *makeBrandLabel(const QString &text, int pixelSize, QFont::Weight weight,
43 const QColor &colour, QWidget *parent);
44
47class WelcomePage : public QWidget
48{
49 Q_OBJECT
50
51public:
57 WelcomePage(const QString &logoResource, const QString &description, const BuildInfo &build,
58 QWidget *parent = nullptr);
59
61 void addDetails(QWidget *widget);
62
63protected:
64 void resizeEvent(QResizeEvent *event) override;
65
66private:
67 QVBoxLayout *m_details = nullptr;
68 QLabel *m_description = nullptr;
69};
70
71} // namespace Astute
72
73#endif // ASTUTE_WELCOME_PAGE_H
WelcomePage(const QString &logoResource, const QString &description, const BuildInfo &build, QWidget *parent=nullptr)
Definition AstuteWelcomePage.cpp:49
void addDetails(QWidget *widget)
Extra content between the version line and the copyright (the About dialog uses this).
Definition AstuteWelcomePage.cpp:118
Build identity shown under the logo as "Version 10.0.0 (#a1b2c3d)".
Definition AstuteWelcomePage.h:32
QString gitHash
Short git hash; empty when unknown (the hash is then omitted).
Definition AstuteWelcomePage.h:34
QString version
Version including any suffix, e.g. "10.0.0" or "10.0.0-rc1".
Definition AstuteWelcomePage.h:33