diff options
author | daniel-Jones <daniel@danieljon.es> | 2016-08-16 08:20:06 +0930 |
---|---|---|
committer | daniel-Jones <daniel@danieljon.es> | 2016-08-16 08:25:42 +0930 |
commit | a2cbf0f5948c89334511aff60df12f4a77b4bb5e (patch) | |
tree | 338a56696894e8f5f633a99ee0afce2a4b2b466e /stats_display_window.cpp | |
parent | ca548026050c9643c82640cb46926545c2114949 (diff) | |
download | csgo_stats-a2cbf0f5948c89334511aff60df12f4a77b4bb5e.tar.gz csgo_stats-a2cbf0f5948c89334511aff60df12f4a77b4bb5e.zip |
Many changes to the stat viewer - work on the stat viewer halted for now. I have added CS:GO game integration. You can now view live game information. Uses port 3000 (see the CS:GO wiki for setting up game integration).
Diffstat (limited to 'stats_display_window.cpp')
-rw-r--r-- | stats_display_window.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/stats_display_window.cpp b/stats_display_window.cpp index 577586e..5e9b570 100644 --- a/stats_display_window.cpp +++ b/stats_display_window.cpp @@ -7,6 +7,7 @@ stats_display_window::stats_display_window(QWidget *parent) : { ui->setupUi(this); connect(this, SIGNAL(window_loaded()), this, SLOT(window_open()), Qt::ConnectionType(Qt::QueuedConnection | Qt::UniqueConnection)); + ui->graphical_view_button->hide(); /* will i ever do this? */ } stats_display_window::~stats_display_window() @@ -14,6 +15,13 @@ stats_display_window::~stats_display_window() delete ui; } +QStringList stats_display_window::get_most_kills_gun() +{ + QStringList ret; + ret << "1" << "2"; + return ret; +} + void stats_display_window::setup_user() { /* @@ -27,7 +35,11 @@ void stats_display_window::setup_user() user.user_64id = parse.parse_user_data("\"steamid\":", ": "); download.download_file(user.avatar_url, "avatar.jpg"); /* now we have to deal with our user account details */ - ui->username_label->setText(user.username.left(15)); + if (user.username.length() > 15) + { + ui->username_label->setText(user.username.left(15) + "[...]"); + } else + ui->username_label->setText(user.username); if (user.realname == "null") ui->realname_label->setText("Real name not set"); else @@ -222,3 +234,16 @@ void stats_display_window::on_manage_users_button_clicked() { manage.show(); } + +void stats_display_window::on_graphical_view_button_clicked() +{ + graphs.show(); +} + +void stats_display_window::on_game_integration_button_clicked() +{ + /* + * game state integration + */ + game.show(); +} |