VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreLoadingPage Class Reference

Detailed Description

DtVreLoadingPage provides a user interface for displaying loading progress during resource-intensive operations like terrain or scenario loading. It includes a progress bar, status text, and timer functionality to show both current progress and estimated time remaining. The page inherits from DtVreHeaderFooterUIBase to maintain consistent UI styling with the rest of the application.

#include <vreLoadingPage.h>

Inheritance diagram for makVre::DtVreLoadingPage:
[legend]

Public Member Functions

 DtVreLoadingPage (DtPlayerStationApp &app, const std::string &target_window="")
 
virtual ~DtVreLoadingPage () override
 
virtual void tick (double dt) override
 
virtual void initMain () override
 
virtual void setVisibility (bool visible) override
 
virtual void setMaximumTime (int ms)
 
virtual void setElapsedTime (int ms)
 
virtual void setProgress (int percent=100)
 
virtual void setLoadingBarText (const QString &msg)
 
virtual void resetProgressBar ()
 
virtual int getElapsedTime () const
 
virtual int getImageSeed () const
 
virtual void startTimer ()
 
virtual void restartTimer ()
 
virtual void stopTimer ()
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ DtVreLoadingPage()

makVre::DtVreLoadingPage::DtVreLoadingPage ( DtPlayerStationApp & app,
const std::string & target_window = "" )

Constructor.

Parameters
appReference to the player station application
target_windowName of the window to display in (empty for default)

Creates a new loading page UI component associated with the given application and target window. The component starts hidden and must be shown explicitly.

◆ ~DtVreLoadingPage()

virtual makVre::DtVreLoadingPage::~DtVreLoadingPage ( )
overridevirtual

Virtual destructor.

Ensures proper cleanup of loading page resources.

Member Function Documentation

◆ tick()

virtual void makVre::DtVreLoadingPage::tick ( double dt)
overridevirtual

Updates the loading page each frame.

Parameters
dtTime in seconds since the last update

Called once per frame to update the loading page UI elements. This may include progress bar animations, timer updates, and any other time-dependent visual effects.

Implements makVre::DtVreHeaderFooterUIBase.

◆ initMain()

virtual void makVre::DtVreLoadingPage::initMain ( )
overridevirtual

Initializes the loading page UI.

Sets up the UI elements, connects signals and slots, and prepares the loading page for display. This is called automatically during construction but can be called again if the UI needs to be reset.

Implements makVre::DtVreHeaderFooterUIBase.

◆ setVisibility()

virtual void makVre::DtVreLoadingPage::setVisibility ( bool visible)
overridevirtual

Sets the visibility of the loading page.

Parameters
visibleTrue to show the page, false to hide it

Controls whether the loading page is visible to the user. This override ensures any updated information about the page is properly handled when visibility changes.

Reimplemented from makVre::DtVreHeaderFooterUIBase.

◆ setMaximumTime()

virtual void makVre::DtVreLoadingPage::setMaximumTime ( int ms)
virtual

Sets the maximum expected loading time.

Parameters
msMaximum loading time in milliseconds

Sets the maximum time value for the progress bar, establishing the scale against which elapsed time is measured. This affects the visual width of the progress bar and any time remaining calculations.

◆ setElapsedTime()

virtual void makVre::DtVreLoadingPage::setElapsedTime ( int ms)
virtual

Sets the current elapsed loading time.

Parameters
msCurrent elapsed time in milliseconds

Updates the elapsed time displayed on the loading page and the current position of the progress bar. This should be a value between 0 and the maximum time set with setMaximumTime().

◆ setProgress()

virtual void makVre::DtVreLoadingPage::setProgress ( int percent = 100)
virtual

Sets the progress bar percentage directly.

Parameters
percentProgress percentage (0-100)

Updates the progress bar to display the specified percentage of completion. This is an alternative to setElapsedTime() that allows setting the progress directly as a percentage rather than calculating it from elapsed time.

◆ setLoadingBarText()

virtual void makVre::DtVreLoadingPage::setLoadingBarText ( const QString & msg)
virtual

Sets the text displayed on the loading bar.

Parameters
msgText message to display

Updates the status text displayed on or near the loading bar. This is typically used to indicate the current operation being performed, such as "Loading terrain..." or "Initializing entities...".

◆ resetProgressBar()

virtual void makVre::DtVreLoadingPage::resetProgressBar ( )
virtual

Resets the progress bar to initial state.

Resets the position of the progress bar and the elapsed time to zero. This is typically called when starting a new loading operation or when restarting the current one.

◆ getElapsedTime()

virtual int makVre::DtVreLoadingPage::getElapsedTime ( ) const
virtual

Gets the current elapsed loading time.

Returns
Current elapsed time in milliseconds

Returns the current elapsed time being displayed on the loading page. This may be used to calculate progress percentages or time remaining.

◆ getImageSeed()

virtual int makVre::DtVreLoadingPage::getImageSeed ( ) const
virtual

Gets the random seed for loading screen imagery.

Returns
Seed value for random image generation

Returns the random seed value used for generating visual elements on the loading screen. This allows for consistent visuals across multiple instances or loading operations.

◆ startTimer()

virtual void makVre::DtVreLoadingPage::startTimer ( )
virtual

Starts the loading timer.

Begins the timer that tracks elapsed loading time. This is typically called when a loading operation begins to provide accurate timing.

◆ restartTimer()

virtual void makVre::DtVreLoadingPage::restartTimer ( )
virtual

Restarts the loading timer.

Resets and restarts the timer that tracks elapsed loading time. This is useful when a loading operation is restarted or when switching between different loading phases.

◆ stopTimer()

virtual void makVre::DtVreLoadingPage::stopTimer ( )
virtual

Stops the loading timer.

Pauses the timer that tracks elapsed loading time. This is typically called when a loading operation completes or is paused.


The documentation for this class was generated from the following file: