NeTrainSim 0.1.1 beta
The Open-Source Network Trains Simulator
 
Loading...
Searching...
No Matches
CustomProgressBar Class Reference

The CustomProgressBar class provides a customized progress bar with start and stop functionality. More...

#include <customprogressbar.h>

Inheritance diagram for CustomProgressBar:

Signals

void progressStarted ()
 Signal emitted when the progress starts.
 
void progressStopped ()
 Signal emitted when the progress stops.
 

Public Member Functions

 CustomProgressBar (QWidget *parent=nullptr)
 Constructs a CustomProgressBar object.
 
 ~CustomProgressBar ()
 Destroys the CustomProgressBar object.
 
void start ()
 Starts the progress bar.
 
void stop ()
 Stops the progress bar.
 

Detailed Description

The CustomProgressBar class provides a customized progress bar with start and stop functionality.

It emits signals when the progress starts and stops.

Constructor & Destructor Documentation

◆ CustomProgressBar()

CustomProgressBar::CustomProgressBar ( QWidget *  parent = nullptr)
inline

Constructs a CustomProgressBar object.

Parameters
parentThe parent widget.

◆ ~CustomProgressBar()

CustomProgressBar::~CustomProgressBar ( )
inline

Destroys the CustomProgressBar object.

Member Function Documentation

◆ progressStarted

void CustomProgressBar::progressStarted ( )
signal

Signal emitted when the progress starts.

This signal indicates that the progress bar has started and is being displayed.

◆ progressStopped

void CustomProgressBar::progressStopped ( )
signal

Signal emitted when the progress stops.

This signal indicates that the progress bar has stopped and is no longer being displayed.

◆ start()

void CustomProgressBar::start ( )
inline

Starts the progress bar.

The progress bar is shown and the progressStarted() signal is emitted.

◆ stop()

void CustomProgressBar::stop ( )
inline

Stops the progress bar.

The progress bar is hidden and the progressStopped() signal is emitted. After a timeout period of 5000 milliseconds (5 seconds), the progress bar automatically stops and emits the progressStopped() signal.