diff options
Diffstat (limited to 'aoapplication.cpp')
| -rw-r--r-- | aoapplication.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/aoapplication.cpp b/aoapplication.cpp index d3376019..87525a80 100644 --- a/aoapplication.cpp +++ b/aoapplication.cpp @@ -3,6 +3,7 @@ #include "lobby.h" #include "courtroom.h" #include "networkmanager.h" +#include "text_file_functions.h" #include "aoapplication.h" @@ -68,4 +69,32 @@ void AOApplication::destruct_courtroom() courtroom_constructed = false; } +QString AOApplication::get_version_string(){ + return + QString::number(RELEASE) + "." + + QString::number(MAJOR_VERSION) + "." + + QString::number(MINOR_VERSION); +} + +void AOApplication::set_user_theme(){ + user_theme = read_user_theme(); +} +void AOApplication::set_favorite_list() +{ + favorite_list = read_serverlist_txt(); +} + +void AOApplication::add_favorite_server(int p_server) +{ + if (p_server < 0 || p_server >= server_list.size()) + return; + + server_type fav_server = server_list.at(p_server); + + QString str_port = QString::number(fav_server.port); + + QString server_line = fav_server.ip + ":" + str_port + ":" + fav_server.name; + + write_to_serverlist_txt(server_line); +} |
