summaryrefslogtreecommitdiff
path: root/user_select_dialog.cpp
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2016-07-27 17:27:44 +0930
committerdaniel-Jones <daniel@danieljon.es>2016-07-27 17:27:44 +0930
commit536bc6c7a1ea06769566f0558071ed92afaf57cd (patch)
tree0988bb1f3c59591c9f02cab32b0f1484df3b9e19 /user_select_dialog.cpp
parentcdb03cae2c21c9a5ada496b92e705995334e9e9a (diff)
downloadcsgo_stats-536bc6c7a1ea06769566f0558071ed92afaf57cd.tar.gz
csgo_stats-536bc6c7a1ea06769566f0558071ed92afaf57cd.zip
Added the ability to select users from file - see source code for file example. you can dynamically refresh the stats and info to any person on the list/with a new ID. Added weapon icons from the games iconlibs.swf file; the images were ugly. added a few new stats etc
Diffstat (limited to 'user_select_dialog.cpp')
-rw-r--r--user_select_dialog.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/user_select_dialog.cpp b/user_select_dialog.cpp
index 6a6f4b2..1ba0593 100644
--- a/user_select_dialog.cpp
+++ b/user_select_dialog.cpp
@@ -6,6 +6,7 @@ user_select_dialog::user_select_dialog(QWidget *parent) :
ui(new Ui::user_select_dialog)
{
ui->setupUi(this);
+ load_players();
}
user_select_dialog::~user_select_dialog()
@@ -49,6 +50,8 @@ void user_select_dialog::download_info()
{
qDebug() << "Downloaded everything"; /* file could be ANYTHING or empty! */
n_window.show();
+ usernames.clear();
+ userids.clear();
this->hide();
}
else
@@ -63,5 +66,17 @@ void user_select_dialog::download_info()
void user_select_dialog::load_players()
{
+ parse.parse_users();
+ usernames = parse.get_usernames();
+ userids = parse.get_ids();
+ for (int x = 0; x < usernames.length(); x++)
+ {
+ ui->player_dropdown->addItem(usernames.at(x));
+ }
+}
+void user_select_dialog::on_player_dropdown_currentIndexChanged(int index)
+{
+ if (!usernames.isEmpty())
+ ui->steam_url_text->setText(userids.at(index));
}