SplashScreenAction
Qualified name: mv::gui::SplashScreenAction
-
class SplashScreenAction : public mv::gui::HorizontalGroupAction
Splash screen action class.
For configuring and displaying a splash screen.
Note: This action is developed for internal use only
- Author
Thomas Kroes
Public Functions
-
SplashScreenAction(QObject *parent, bool mayCloseSplashScreenWidget = false)
Construct with
parentobject and optional parameter to control whether the user can close the splash screen widget with a close tool button.- Parameters:
parent – Pointer to parent object
mayCloseSplashScreenWidget – Whether the user can close the splash screen widget with a close tool button
-
~SplashScreenAction() override = default
Destructor A destructor is mandatory here because of the SplashScreenAction::_splashScreenDialog QScopePointer https://doc.qt.io/qt-6/qscopedpointer.html#forward-declared-pointers.
-
Alerts getAlerts() const
Get alerts.
- Returns:
Vector of alerts
-
bool getMayCloseSplashScreenWidget() const
Get may close splash screen widget.
- Returns:
Whether the user can close the splash screen widget with a close tool button
-
void setMayCloseSplashScreenWidget(bool mayCloseSplashScreenWidget)
Set may close splash screen widget.
- Parameters:
mayCloseSplashScreenWidget – Whether the user can close the splash screen widget with a close tool button
-
QString getHtml() const
Get HTML content.
- Returns:
HTML content, empty string if not available
-
ProjectMetaAction *getProjectMetaAction() const
Get project meta action.
- Returns:
Pointer to project meta action, nullptr if not available
-
void setProjectMetaAction(ProjectMetaAction *projectMetaAction)
Get project meta action to
projectMetaAction.- Parameters:
projectMetaAction – Pointer to project meta action
-
virtual void fromVariantMap(const QVariantMap &variantMap) override
Load splash screen action from variant.
- Parameters:
variantMap – Variant representation of the project
-
virtual QVariantMap toVariantMap() const override
Save splash screen action to variant.
- Returns:
Variant representation of the project
Public Static Functions
-
static QString pixmapToBase64(const QPixmap &pixmap)
Convert
pixmapto base64 string.- Parameters:
pixmap – Pixmap to convert
- Returns:
Base64 representation of the pixmap, empty string if not available
Protected Functions
-
void showSplashScreenWidget()
Shows the splash screen widget.
-
void closeSplashScreenWidget()
Animates the splash screen widget’s opacity and position and afterwards closes it.
-
bool shouldDisplayProjectInfo() const
Establishes whether project information should be shown or not.
-
QString getHtmlFromTemplate() const
Get HTML from template (located in resources)
- Returns:
HTML content from template, empty string if not available
Friends
- friend class mv::Application
-
class Alert
Basic class to add an alert on the splash screen.
Public Functions
-
inline Alert(const Type &type, const QString &iconName, const QString &message, const QColor &color = Qt::black)
Construct from
type,iconName,messageand color.- Parameters:
type – Alert type
iconName – Name of the icon (FontAwesome web fonts)
message – Error message
color – Icon and error message color
-
inline Alert(const Type &type, const QString &iconName, const QString &message, const QColor &color = Qt::black)