The Battle for Wesnoth  1.15.2+dev
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
gui2::dialogs::debug_clock Class Reference

Clock to test the draw events. More...

#include <debug_clock.hpp>

Inheritance diagram for gui2::dialogs::debug_clock:
Inheritance graph

Classes

struct  time
 Helper struct to keep track of the time. More...
 

Public Member Functions

 debug_clock ()
 
- Public Member Functions inherited from gui2::dialogs::modeless_dialog
 modeless_dialog ()
 
virtual ~modeless_dialog ()
 
void show (const bool allow_interaction=false, const unsigned auto_close_time=0)
 Shows the window. More...
 
void hide ()
 Hides the window. More...
 
windowget_window () const
 Returns a pointer to the dialog's window. More...
 

Private Member Functions

virtual const std::string & window_id () const override
 Inherited from modal_dialog, implemented by REGISTER_DIALOG. More...
 
virtual void pre_show (window &window) override
 Inherited from modal_dialog. More...
 
virtual void post_show (CVideo &video)
 Inherited from modal_dialog. More...
 
void update_time (const bool force)
 The callback for the drawing routine. More...
 

Private Attributes

progress_barhour_percentage_
 Progress bar for displaying the hours as a percentage. More...
 
progress_barminute_percentage_
 Progress bar for displaying the minutes as a percentage. More...
 
progress_barsecond_percentage_
 Progress bar for displaying the seconds as a percentage. More...
 
integer_selectorhour_
 An integer selector to display the total seconds. More...
 
integer_selectorminute_
 An integer selector to display the total seconds this hour. More...
 
integer_selectorsecond_
 An integer selector to display the seconds this minute. More...
 
panepane_
 
styled_widgetclock_
 A widget that can display the time. More...
 
event::signal_function signal_
 The signal patched in the drawing routine. More...
 
time time_
 The `current' time. More...
 

Additional Inherited Members

- Protected Attributes inherited from gui2::dialogs::modeless_dialog
std::unique_ptr< windowwindow_
 The window, used in show. More...
 

Detailed Description

Clock to test the draw events.

Definition at line 33 of file debug_clock.hpp.

Constructor & Destructor Documentation

◆ debug_clock()

gui2::dialogs::debug_clock::debug_clock ( )
inline

Definition at line 36 of file debug_clock.hpp.

Member Function Documentation

◆ post_show()

void gui2::dialogs::debug_clock::post_show ( CVideo video)
privatevirtual

◆ pre_show()

void gui2::dialogs::debug_clock::pre_show ( window window)
overrideprivatevirtual

Inherited from modal_dialog.

Reimplemented from gui2::dialogs::modeless_dialog.

Definition at line 80 of file debug_clock.cpp.

References gui2::event::connect_signal_on_draw(), and update_time().

◆ update_time()

void gui2::dialogs::debug_clock::update_time ( const bool  force)
private

◆ window_id()

virtual const std::string& gui2::dialogs::debug_clock::window_id ( ) const
overrideprivatevirtual

Inherited from modal_dialog, implemented by REGISTER_DIALOG.

Implements gui2::dialogs::modeless_dialog.

Member Data Documentation

◆ clock_

styled_widget* gui2::dialogs::debug_clock::clock_
private

A widget that can display the time.

Definition at line 73 of file debug_clock.hpp.

Referenced by update_time().

◆ hour_

integer_selector* gui2::dialogs::debug_clock::hour_
private

An integer selector to display the total seconds.

Definition at line 62 of file debug_clock.hpp.

Referenced by update_time().

◆ hour_percentage_

progress_bar* gui2::dialogs::debug_clock::hour_percentage_
private

Progress bar for displaying the hours as a percentage.

Definition at line 53 of file debug_clock.hpp.

Referenced by update_time().

◆ minute_

integer_selector* gui2::dialogs::debug_clock::minute_
private

An integer selector to display the total seconds this hour.

Definition at line 65 of file debug_clock.hpp.

Referenced by update_time().

◆ minute_percentage_

progress_bar* gui2::dialogs::debug_clock::minute_percentage_
private

Progress bar for displaying the minutes as a percentage.

Definition at line 56 of file debug_clock.hpp.

Referenced by update_time().

◆ pane_

pane* gui2::dialogs::debug_clock::pane_
private

Definition at line 70 of file debug_clock.hpp.

Referenced by update_time().

◆ second_

integer_selector* gui2::dialogs::debug_clock::second_
private

An integer selector to display the seconds this minute.

Definition at line 68 of file debug_clock.hpp.

Referenced by update_time().

◆ second_percentage_

progress_bar* gui2::dialogs::debug_clock::second_percentage_
private

Progress bar for displaying the seconds as a percentage.

Definition at line 59 of file debug_clock.hpp.

Referenced by update_time().

◆ signal_

event::signal_function gui2::dialogs::debug_clock::signal_
private

The signal patched in the drawing routine.

Definition at line 76 of file debug_clock.hpp.

Referenced by post_show().

◆ time_

time gui2::dialogs::debug_clock::time_
private

The `current' time.

Note
Since the dialog is used to test the drawing routine by keeping track of the calls to the drawing routine, the clock might be off.

Definition at line 123 of file debug_clock.hpp.

Referenced by update_time().


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