diff options
| author | Crystalwarrior <varsash@gmail.com> | 2020-08-21 18:01:24 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2020-08-21 18:01:24 +0300 |
| commit | f27f210efeb13a5ac29727fef271f8249e3e8c5d (patch) | |
| tree | 50051262a3982f4a6a0cb95847b233b498cf2282 /src/courtroom.cpp | |
| parent | edf3d463e990ff8573bb6655c793490e6b1ea82c (diff) | |
Proof of concept complete. The timer will now take int msecs to start, and will properly display the time remaining until target time in hh:mm:ss.zzz
Clock can be defined in courtroom_config.ini and its font set in courtroom_fonts.ini
Pause and resume functions will not work as expected atm.
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 2484bcb0..e2b372c5 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -112,6 +112,9 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() ui_music_name->setText(tr("None")); ui_music_name->setAttribute(Qt::WA_TransparentForMouseEvents); + ui_clock = new AOClockLabel(this); + ui_clock->setAttribute(Qt::WA_TransparentForMouseEvents); + ui_ic_chat_name = new QLineEdit(this); ui_ic_chat_name->setFrame(false); ui_ic_chat_name->setPlaceholderText(tr("Showname")); @@ -619,6 +622,9 @@ void Courtroom::set_widgets() ui_music_display->play("music_display"); ui_music_display->set_play_once(false); + set_size_and_pos(ui_clock, "clock"); + ui_clock->start(30000); + if (is_ao2_bg) { set_size_and_pos(ui_ic_chat_message, "ao2_ic_chat_message"); set_size_and_pos(ui_vp_chatbox, "ao2_chatbox"); @@ -943,6 +949,7 @@ void Courtroom::set_fonts(QString p_char) set_font(ui_music_list, "", "music_list", p_char); set_font(ui_area_list, "", "area_list", p_char); set_font(ui_music_name, "", "music_name", p_char); + set_font(ui_clock, "", "clock", p_char); set_dropdowns(); } |
