Freeciv-3.2
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
progress_bar Class Reference

#include <citydlg.h>

+ Inheritance diagram for progress_bar:

Signals

void clicked ()
 

Public Member Functions

 progress_bar (QWidget *parent)
 
 ~progress_bar ()
 
void mousePressEvent (QMouseEvent *event)
 
void set_pixmap (struct universal *target)
 
void set_pixmap (int n)
 

Protected Member Functions

void paintEvent (QPaintEvent *event)
 
void timerEvent (QTimerEvent *event)
 
void resizeEvent (QResizeEvent *event)
 

Private Member Functions

void create_region ()
 

Private Attributes

QElapsedTimer m_timer
 
int m_animate_step
 
QPixmappix
 
QRegion reg
 
QFontsfont
 

Detailed Description

Definition at line 111 of file citydlg.h.

Constructor & Destructor Documentation

◆ progress_bar()

progress_bar::progress_bar ( QWidget *  parent)

Custom progressbar constructor

Definition at line 82 of file citydlg.cpp.

◆ ~progress_bar()

progress_bar::~progress_bar ( )

Custom progressbar destructor

Definition at line 95 of file citydlg.cpp.

Member Function Documentation

◆ clicked

void progress_bar::clicked ( )
signal

◆ create_region()

void progress_bar::create_region ( )
private

Creates region with diagonal lines

Definition at line 326 of file citydlg.cpp.

Referenced by progress_bar(), and resizeEvent().

◆ mousePressEvent()

void progress_bar::mousePressEvent ( QMouseEvent event)
inline

Definition at line 121 of file citydlg.h.

◆ paintEvent()

void progress_bar::paintEvent ( QPaintEvent event)
protected

Paint event for custom progress bar

Definition at line 188 of file citydlg.cpp.

◆ resizeEvent()

void progress_bar::resizeEvent ( QResizeEvent event)
protected

Custom progressbar resize event

Definition at line 106 of file citydlg.cpp.

◆ set_pixmap() [1/2]

void progress_bar::set_pixmap ( int  n)

Sets pixmap from given tech number for custom progressbar

Definition at line 147 of file citydlg.cpp.

◆ set_pixmap() [2/2]

void progress_bar::set_pixmap ( struct universal target)

Sets pixmap from given universal for custom progressbar

Definition at line 114 of file citydlg.cpp.

Referenced by city_dialog::update_building(), and science_report::update_report().

◆ timerEvent()

void progress_bar::timerEvent ( QTimerEvent event)
protected

Timer event used to animate progress

Definition at line 176 of file citydlg.cpp.

Field Documentation

◆ m_animate_step

int progress_bar::m_animate_step
private

Definition at line 133 of file citydlg.h.

Referenced by paintEvent(), progress_bar(), and timerEvent().

◆ m_timer

QElapsedTimer progress_bar::m_timer
private

Definition at line 114 of file citydlg.h.

Referenced by progress_bar(), and timerEvent().

◆ pix

QPixmap* progress_bar::pix
private

Definition at line 134 of file citydlg.h.

Referenced by paintEvent(), progress_bar(), set_pixmap(), set_pixmap(), and ~progress_bar().

◆ reg

QRegion progress_bar::reg
private

Definition at line 135 of file citydlg.h.

Referenced by create_region(), and paintEvent().

◆ sfont

QFont* progress_bar::sfont
private

Definition at line 136 of file citydlg.h.

Referenced by paintEvent(), progress_bar(), and ~progress_bar().