diff options
Diffstat (limited to 'include/courtroom.h')
| -rw-r--r-- | include/courtroom.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/include/courtroom.h b/include/courtroom.h index 92b5a03c..4d4f1733 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -6,6 +6,7 @@ #include "aobutton.h" #include "aocharbutton.h" #include "aocharmovie.h" +#include "aoclocklabel.h" #include "aoemotebutton.h" #include "aoevidencebutton.h" #include "aoevidencedisplay.h" @@ -57,7 +58,7 @@ #include <QScrollBar> #include <QTextBoundaryFinder> #include <QTextCharFormat> -//#include <QRandomGenerator> +#include <QElapsedTimer> #include <algorithm> #include <stack> @@ -296,11 +297,18 @@ public: void check_connection_received(); + void start_clock(int id); + void start_clock(int id, qint64 msecs); + void set_clock(int id, qint64 msecs); + void pause_clock(int id); + void stop_clock(int id); + void set_clock_visibility(int id, bool visible); + + qint64 pong(); // Truncates text so it fits within theme-specified boundaries and sets the tooltip to the full string void truncate_label_text(QWidget* p_widget, QString p_identifier); ~Courtroom(); - private: AOApplication *ao_app; @@ -350,13 +358,16 @@ private: QVector<chatlogpiece> ic_chatlog_history; - QQueue<QStringList> chatmessage_queue; - - // triggers ping_server() every 60 seconds + // triggers ping_server() every 45 seconds QTimer *keepalive_timer; // determines how fast messages tick onto screen QTimer *chat_tick_timer; + + // count up timer to check how long it took for us to get a response from ping_server() + QElapsedTimer ping_timer; + bool is_pinging = false; + // int chat_tick_interval = 60; // which tick position(character in chat message) we are at int tick_pos = 0; @@ -600,6 +611,9 @@ private: ScrollText *ui_music_name; AOMovie *ui_music_display; + static const int max_clocks = 5; + AOClockLabel *ui_clock[max_clocks]; + AOButton *ui_pair_button; QListWidget *ui_pair_list; QSpinBox *ui_pair_offset_spinbox; |
