ACF $AcfVersion:0$
CSplashScreenGuiComp.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QtGlobal>
7#if QT_VERSION >= 0x050000
8#include <QtWidgets/QSplashScreen>
9#else
10#include <QtGui/QSplashScreen>
11#endif
12
13// ACF includes
14#include <iattr/TAttribute.h>
18
19#include <GeneratedFiles/iqtgui/ui_CSplashScreenGuiComp.h>
20
21
22namespace iqtgui
23{
24
25
31class CSplashScreenCustom: public QSplashScreen
32{
33public:
34 CSplashScreenCustom(QWidget* parent = nullptr)
35 :QSplashScreen()
36 {
37 Q_UNUSED(parent);
38 }
39};
40
41
43 public TDesignerGuiCompBase<Ui::CSplashScreenGuiComp, CSplashScreenCustom>,
44 virtual public ilog::IMessageConsumer
45{
46 Q_OBJECT
47public:
49
50 I_BEGIN_COMPONENT(CSplashScreenGuiComp);
51 I_REGISTER_INTERFACE(ilog::IMessageConsumer);
52 I_ASSIGN(m_applicationInfoCompPtr, "ApplicationInfo", "Version management for application", false, "Application");
53 I_ASSIGN(m_imagePathAttrPtr, "ImagePath", "Path of image shown as splash screen", true, "Splash.jpg");
54 I_ASSIGN(m_showProductNameAttrPtr, "ShowProductName", "If true, product name will be shown, disable it, if it was painted on background image", true, true);
55 I_ASSIGN(m_showApplicationNameAttrPtr, "ShowApplicationName", "If true, application name will be shown, disable it, if it was painted on background image", true, true);
56 I_ASSIGN(m_showApplicationSubnameAttrPtr, "ShowApplicationSubName", "If true, application subname will be shown, disable it, if it was painted on background image", true, false);
57 I_ASSIGN(m_showProductTypeAttrPtr, "ShowProductType", "Additional product description shown over version info", true, false);
58 I_ASSIGN(m_showLegalCopyrightAttrPtr, "ShowLegalCopyright", "If enabled legal copyrights will be shown", true, true);
59 I_ASSIGN_MULTI_1(m_versionIdsAttrPtr, "VersionIds", "List of version ID's for version information should be displayed", false, 0);
60 I_ASSIGN_MULTI_1(m_versionNamesAttrPtr, "VersionNames", "List of version names will be used as version description", false, "Version");
61 I_END_COMPONENT;
62
64
65 // reimplemented (ilog::IMessageConsumer)
66 virtual bool IsMessageSupported(
67 int messageCategory = -1,
68 int messageId = -1,
69 const istd::IInformationProvider* messagePtr = NULL) const override;
70 virtual void AddMessage(const MessagePtr& messagePtr) override;
71
72Q_SIGNALS:
73 void EmitAddMessage(const MessagePtr& messagePtr);
74
75protected:
76 // reimplemented (iqtgui::CGuiComponentBase)
77 virtual void OnGuiCreated() override;
78 virtual void OnGuiRetranslate() override;
79
80protected Q_SLOTS:
81 void OnAddMessage(const MessagePtr& messagePtr);
82
83private:
84 I_REF(ibase::IApplicationInfo, m_applicationInfoCompPtr);
85 I_ATTR(QString, m_imagePathAttrPtr);
86 I_ATTR(bool, m_showProductNameAttrPtr);
87 I_ATTR(bool, m_showApplicationNameAttrPtr);
88 I_ATTR(bool, m_showApplicationSubnameAttrPtr);
89 I_ATTR(bool, m_showProductTypeAttrPtr);
90 I_ATTR(bool, m_showLegalCopyrightAttrPtr);
91 I_MULTIATTR(int, m_versionIdsAttrPtr);
92 I_MULTITEXTATTR(m_versionNamesAttrPtr);
93
94 int m_mainVersionId;
95};
96
97
98} // namespace iqtgui
99
100
101
102
This interface provides some information about the application.
Common interface for a message container consuming information objects (messages).
Splash screen component.
CSplashScreenCustom(QWidget *parent=nullptr)
virtual bool IsMessageSupported(int messageCategory=-1, int messageId=-1, const istd::IInformationProvider *messagePtr=NULL) const override
Check if a message is supported by this consumer.
virtual void OnGuiCreated() override
Called just after GUI is initialized.
void OnAddMessage(const MessagePtr &messagePtr)
virtual void AddMessage(const MessagePtr &messagePtr) override
Adds a message to this consumer.
void EmitAddMessage(const MessagePtr &messagePtr)
TDesignerGuiCompBase< Ui::CSplashScreenGuiComp, CSplashScreenCustom > BaseClass
virtual void OnGuiRetranslate() override
Called from widget event filter when GUI should be retranslated.
Base class for all Qt GUI components, which use the Qt designer's UI.
Common interface for class providing some basic information object.
Shared ownership smart pointer for interface types.
#define I_MULTITEXTATTR(member)
Declare translatable multiple text attribute member.
#define NULL
Definition istd.h:74
Standard GUI specific interfaces and components based on Qt.