OpenStudioCore:utilities
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages

#include "ProgressBar.hpp"

Inheritance diagram for openstudio::ProgressBar:

Public Slots

void setRange (int min, int max)
void setValue (int value)
void setWindowTitle (const QString &windowTitle)

Signals

void percentageUpdated (double percentage)

Public Member Functions

bool isVisible () const
int maximum () const
int minimum () const
virtual void onPercentageUpdated (double percentage)
 ProgressBar (bool visible,*parent=nullptr)
void setMaximum (int max)
void setMinimum (int min)
void setVisible (bool visible)
void setWindowTitle (const std::string &title)
std::string text () const
int value () const
std::string windowTitle () const
virtual ~ProgressBar ()

Public Attributes

ProgressBarparent

Detailed Description

ProgressBar wraps a QProgressBar and provides virtual methods setRange, setValue, and setWindowTitle(QString) which may be overridden.

ProgressBar an atypical QObject because it is designed to be stack allocated. In many cases it would be preferred to connect your own heap allocated QObject to the signals directly rather than using this convenience class.

Constructor & Destructor Documentation

openstudio::ProgressBar::ProgressBar ( bool  visible,
parent = nullptr 
)

constructor

virtual openstudio::ProgressBar::~ProgressBar ( )
virtual

constructor from impl

virtual destructor

Member Function Documentation

bool openstudio::ProgressBar::isVisible ( ) const

get if visible

int openstudio::ProgressBar::maximum ( ) const

get max

int openstudio::ProgressBar::minimum ( ) const

get min

virtual void openstudio::ProgressBar::onPercentageUpdated ( double  percentage)
virtual

virtual method called every time percentageUpdated fires

void openstudio::ProgressBar::percentageUpdated ( double  percentage)
signal

called every time progress increases by 1% more than last progress

void openstudio::ProgressBar::setMaximum ( int  max)

set max

void openstudio::ProgressBar::setMinimum ( int  min)

set min

void openstudio::ProgressBar::setRange ( int  min,
int  max 
)
slot

set range

void openstudio::ProgressBar::setValue ( int  value)
slot

set value

void openstudio::ProgressBar::setVisible ( bool  visible)

set if visible

void openstudio::ProgressBar::setWindowTitle ( const std::string &  title)

set the window title

void openstudio::ProgressBar::setWindowTitle ( const QString &  windowTitle)
slot

set window title

std::string openstudio::ProgressBar::text ( ) const

get the text

int openstudio::ProgressBar::value ( ) const

get value

std::string openstudio::ProgressBar::windowTitle ( ) const

get the window title

Member Data Documentation

ProgressBar* openstudio::ProgressBar::parent

constructor