init
authorJan Cermak <me@johniez.cz>
Sat, 7 Mar 2009 23:15:08 +0000 (00:15 +0100)
committerJan Cermak <me@johniez.cz>
Sat, 7 Mar 2009 23:15:08 +0000 (00:15 +0100)
38 files changed:
README [new file with mode: 0755]
abouttab.cc [new file with mode: 0644]
abouttab.h [new file with mode: 0644]
aspt.pro [new file with mode: 0755]
clubtab.cc [new file with mode: 0644]
clubtab.h [new file with mode: 0644]
configtab.cc [new file with mode: 0755]
configtab.h [new file with mode: 0755]
img/splash.jpg [new file with mode: 0644]
lang/tran_cs.qm [new file with mode: 0755]
lang/tran_cs.ts [new file with mode: 0755]
lang/tran_lt.qm [new file with mode: 0644]
lang/tran_lt.ts [new file with mode: 0644]
lang/tran_pl.qm [new file with mode: 0644]
lang/tran_pl.ts [new file with mode: 0644]
lang/tran_ro.qm [new file with mode: 0644]
lang/tran_ro.ts [new file with mode: 0644]
lang/tran_xx.ts [new file with mode: 0644]
loadtab.cc [new file with mode: 0644]
loadtab.h [new file with mode: 0644]
main.cc [new file with mode: 0644]
main.h [new file with mode: 0755]
mainwindow.cc [new file with mode: 0644]
mainwindow.h [new file with mode: 0644]
performance.cc [new file with mode: 0644]
performance.h [new file with mode: 0644]
playerdetail.cc [new file with mode: 0755]
playerdetail.h [new file with mode: 0755]
playertab.cc [new file with mode: 0755]
playertab.h [new file with mode: 0755]
proxyset.cc [new file with mode: 0644]
proxyset.h [new file with mode: 0644]
stadiumtab.cc [new file with mode: 0644]
stadiumtab.h [new file with mode: 0644]
staffmember.cc [new file with mode: 0644]
staffmember.h [new file with mode: 0644]
stafftab.cc [new file with mode: 0644]
stafftab.h [new file with mode: 0644]

diff --git a/README b/README
new file mode 100755 (executable)
index 0000000..0a39365
--- /dev/null
+++ b/README
@@ -0,0 +1,116 @@
+ANOTHER SOCCER PROJECT TOOL - ASPT
+Jan Cermak | johniez
+
+23.12.2007 | v 0.2.7
+
+http://www.soccerproject.com   - just the game
+http://aspt.johniez.com                        - this tool's home
+
+This is OpenSource, released under CreativeCommons(by-nc-nd 2.5) license.
+CC 2.5 Attribution-NonCommercial-NoDerivs
+http://creativecommons.org/licenses/by-nc-nd/2.5/
+
+shortly:
+You can use or share this product absolutely for free.
+but no commercial usage is approved.
+More on the license web.
+
+-------------------------------------------------------
+
+SUPPORT
+
+Based on Trolltech Qt 4.3 - OpenSource (http://trolltech.com)
+
+Supported platforms:
+Windows, Linux, Mac
+
+Qt4 required.
+
+Compilation:
+
+1) qmake aspt.proj
+
+this will create your Makefile, depending on Your system
+
+2) make
+
+to compile the program
+
+3) make clean
+
+if you want to delete temporary build files
+
+If everything run without a problem, binary file is ready.
+
+run: ./aspt in linux platform
+
+program need directory "data" with writting permissions and directory "conf" with writting permissions.
+
+-------------------------------------------------------
+
+Creative Commons Legal Code
+
+Attribution-NonCommercial-NoDerivs 2.5
+CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
+
+License
+
+THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
+
+BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
+
+1. Definitions
+
+   1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
+   2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
+   3. "Licensor" means the individual or entity that offers the Work under the terms of this License.
+   4. "Original Author" means the individual or entity who created the Work.
+   5. "Work" means the copyrightable work of authorship offered under the terms of this License.
+   6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
+
+2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.
+
+3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
+
+   1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
+   2. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
+
+The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Derivative Works. All rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Sections 4(d) and 4(e).
+
+4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
+
+   1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested.
+   2. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works.
+   3. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; and to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.
+   4.
+
+      For the avoidance of doubt, where the Work is a musical composition:
+         1. Performance Royalties Under Blanket Licenses. Licensor reserves the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work if that performance is primarily intended for or directed toward commercial advantage or private monetary compensation.
+         2. Mechanical Rights and Statutory Royalties. Licensor reserves the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions), if Your distribution of such cover version is primarily intended for or directed toward commercial advantage or private monetary compensation.
+   5. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor reserves the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions), if Your public digital performance is primarily intended for or directed toward commercial advantage or private monetary compensation.
+
+5. Representations, Warranties and Disclaimer
+
+UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
+
+6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. Termination
+
+   1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
+   2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
+
+8. Miscellaneous
+
+   1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
+   2. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+   3. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
+   4. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
+
+Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.
+
+Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time.
+
+Creative Commons may be contacted at http://creativecommons.org/.
+? Back to Commons Deed
+
diff --git a/abouttab.cc b/abouttab.cc
new file mode 100644 (file)
index 0000000..7e7d500
--- /dev/null
@@ -0,0 +1,34 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "abouttab.h"
+
+AboutTab::AboutTab(QWidget *parent) : QWidget(parent) {
+       init();
+}
+
+AboutTab::~AboutTab() {
+       delete label;
+       delete mainLayout;
+}
+
+void AboutTab::init() {
+       mainLayout = new QVBoxLayout;
+       QString text;
+       text = "<h3>Another SoccerProject Tool</h3>";
+       text += "v 0.2.7 | 23.12.2007<br><br>";
+       text += "johniez | <a href=\"http://aspt.johniez.com\">aspt homepage</a>";
+       text += "<hr>";
+       text += "<b>" + tr("Translators") + ":</b><br>";
+       text += "UniCool [RO]<br>";
+       text += "Gladiator [PL]<br>";
+       text += "arsportas [LT]<br>";
+       text += "<hr>";
+       text += "<a href=\"http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode\">Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license</a>";
+       label = new QLabel(text);
+       mainLayout->addWidget(label);
+       setLayout(mainLayout);
+}
diff --git a/abouttab.h b/abouttab.h
new file mode 100644 (file)
index 0000000..fb2e7c7
--- /dev/null
@@ -0,0 +1,25 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef ABOUTTAB__H__
+#define ABOUTTAB__H__
+
+#include <QWidget>
+#include <QVBoxLayout>
+#include <QLabel>
+
+class AboutTab: public QWidget {
+       Q_OBJECT
+       QVBoxLayout *mainLayout;
+       QLabel *label;
+public:
+       AboutTab(QWidget *parent = 0);
+       ~AboutTab();
+private:
+       void init();
+};
+
+#endif
diff --git a/aspt.pro b/aspt.pro
new file mode 100755 (executable)
index 0000000..102ebe7
--- /dev/null
+++ b/aspt.pro
@@ -0,0 +1,5 @@
+CONFIG += qt release
+SOURCES += main.cc mainwindow.cc configtab.cc playertab.cc playerdetail.cc staffmember.cc stafftab.cc stadiumtab.cc clubtab.cc loadtab.cc proxyset.cc abouttab.cc performance.cc
+HEADERS += mainwindow.h configtab.h playertab.h playerdetail.h staffmember.h stafftab.h stadiumtab.h clubtab.h loadtab.h proxyset.h abouttab.h performance.h
+QT += xml network
+TRANSLATIONS += lang/tran_cs.ts lang/tran_ro.ts lang/tran_pl.ts lang/tran_xx.ts lang/tran_lt.ts
diff --git a/clubtab.cc b/clubtab.cc
new file mode 100644 (file)
index 0000000..8418ee9
--- /dev/null
@@ -0,0 +1,70 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "clubtab.h"
+
+ClubTab::ClubTab(QWidget *parent) : QWidget(parent) {
+       init();
+}
+
+ClubTab::~ClubTab() {
+       delete label;
+       delete mainLayout;
+}
+
+void ClubTab::init() {
+       mainLayout = new QVBoxLayout;
+       QString text;
+       text = "<table cellspacing=\"3\">";
+       text += "<tr><td>" + tr("Club") + "</td><td><span style=\"color:red;\">" + club.name + "</span></td></tr>";
+       text += "<tr><td>" + tr("Budget") + "</td><td>" + club.budget + "&euro;</td></tr>";
+       text += "<tr><td>" + tr("Rating") + "</td><td>" + QString().setNum((float)club.rat.toInt()/10) + "%</td></tr>";
+       text += "<tr><td>" + tr("Team spirit") + "</td><td>" + QString().setNum((float)club.spirit.toInt()/10) + "%</td></tr>";
+       QString division;
+       if(club.curdiv.toInt()<=1) {
+               division = "A";
+       } else if(club.curdiv.toInt()<=4) {
+               int number = club.curdiv.toInt() - 1;
+               division = "B." + QString().setNum(number);
+       } else if(club.curdiv.toInt()<=13) {
+               int number = club.curdiv.toInt() - 4;
+               division = "C." + QString().setNum(number);
+       } else if(club.curdiv.toInt()<=40) {
+               int number = club.curdiv.toInt() - 13;
+               division = "D." + QString().setNum(number);
+       } else if(club.curdiv.toInt()<=121) {
+               int number = club.curdiv.toInt() - 40;
+               division = "E." + QString().setNum(number);
+       } else if(club.curdiv.toInt()<=364) {
+               int number = club.curdiv.toInt() - 121;
+               division = "F." + QString().setNum(number);
+       } else if(club.curdiv.toInt()<=1093) {
+               int number = club.curdiv.toInt() - 364;
+               division = "G." + QString().setNum(number);
+       } else if(club.curdiv.toInt()<=3280) {
+               int number = club.curdiv.toInt() - 1093;
+               division = "H." + QString().setNum(number);
+       } else if(club.curdiv.toInt()<=9841) {
+               int number = club.curdiv.toInt() - 3280;
+               division = "I." + QString().setNum(number);
+       }
+       text += "<tr><td>" + tr("Current position") + "</td><td>" + club.curpos + ". " + division + "</td></tr>";
+       text += "<tr><td>" + tr("Form") + "</td><td>" + club.form + "</td></tr>";
+       text += "</table>";
+       label = new QLabel(text);
+       mainLayout->addWidget(label);
+       setLayout(mainLayout);
+}
+
+void ClubTab::dataChanged() {
+       rebuildUI();
+}
+
+void ClubTab::rebuildUI() {
+       label->clear();
+       delete mainLayout;
+       init();
+}
diff --git a/clubtab.h b/clubtab.h
new file mode 100644 (file)
index 0000000..54e0b1a
--- /dev/null
+++ b/clubtab.h
@@ -0,0 +1,38 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef CLUBTAB__H__
+#define CLUBTAB__H__
+
+#include <QWidget>
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QLabel>
+
+struct ClubStruct {
+       QString name, budget, rat, fndd, spirit, curpos, curdiv, totgmade, totgrecv, curgmade, curgrecv, curlgmade, curlgrecv, tothgames, totwins, totdraws, totlosts, curhgames, curwins, curdraws, curlosts, curlwins, curldraws, curllosts, totmaxatt, curmaxatt, totavgatt, curavgatt, form, for_a, tactic_a, attstyle_a, agr_a, cap_a;
+       bool incup;
+};
+
+extern void parse(const QString &);
+extern ClubStruct club;
+
+class ClubTab: public QWidget {
+       Q_OBJECT
+       QVBoxLayout *mainLayout;
+       QLabel *label;
+public:
+       ClubTab(QWidget *parent = 0);
+       ~ClubTab();
+       
+       void rebuildUI();
+private:
+       void init();
+public slots:
+       void dataChanged();
+};
+
+#endif
diff --git a/configtab.cc b/configtab.cc
new file mode 100755 (executable)
index 0000000..841dd04
--- /dev/null
@@ -0,0 +1,185 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "configtab.h"
+
+ConfigTab::ConfigTab(QWidget *parent): QWidget(parent) {
+       file = 0;
+       http = new QHttp;
+       QSettings settings("config/global.ini", QSettings::IniFormat);
+       langToSave = settings.value("lang", 0).toInt();
+       useProxy = settings.value("Network/proxyUsed", 0).toInt();
+       num = settings.value("nextXmlId", "0").toString();
+       //old data count
+       int val = num.toInt(); val--;
+       QString old;
+       old.setNum(val);
+       parse("data/data_"+old+".xml");
+       
+       connect(http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpRequestFinished(int, bool)));
+       connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), this, SLOT(readResponseHeader(const QHttpResponseHeader &)));
+       
+       msgbox = new QLabel("");
+       connect(this, SIGNAL(errMsgBox(const QString &)), this, SLOT(showMsgBox(const QString &)));
+       
+       nick = new QLineEdit("");
+       pass = new QLineEdit("");
+       nick->setText(settings.value("username", "").toString());
+       warnLabel = new QLabel(tr("<span style=\"color:red;\">Warning:</span><br>You can download data file only once between simulations.<br>Data files could be used for building statistics, do not delete them.<br>If you want to download your data, type your soccerproject.com login details.<br>Bugs or feature requests on: http://flyspray.johniez.com/proj2"));
+       nickLabel = new QLabel(tr("soccerproject.com <span style=\"color:red;\">nickname:</span>"));
+       passLabel = new QLabel(tr("soccerproject.com <span style=\"color:red;\">password:</span>"));
+       pass->setEchoMode(QLineEdit::Password);
+       butDown = new QPushButton(tr("Download"));
+       connect(butDown, SIGNAL(clicked()), this, SLOT(downloadLatest()));
+       butProxy = new QPushButton(tr("Proxy server settings"));
+       connect(butProxy, SIGNAL(clicked()), this, SLOT(openProxy()));
+       proxyWin = 0;
+
+       group1 = new QGroupBox(tr("Users data download"));
+       group1Layout = new QVBoxLayout;
+       group1Layout->addWidget(warnLabel);
+       row1 = new QHBoxLayout();
+       row1->addWidget(nickLabel);
+       row1->addWidget(nick);
+       group1Layout->addLayout(row1);
+       row2 = new QHBoxLayout();
+       row2->addWidget(passLabel);
+       row2->addWidget(pass);
+       group1Layout->addLayout(row2);
+       group1Layout->addWidget(butDown);
+       group1Layout->addWidget(butProxy);
+       group1Layout->addWidget(msgbox);
+       group1->setLayout(group1Layout);
+       group2 = new QGroupBox(tr("Language selection"));
+       group2Layout = new QVBoxLayout;
+       lang = new QComboBox();
+       lang->addItem(tr("English"), "en");
+       lang->addItem(tr("Czech"), "cs");
+       lang->addItem(tr("Romanian"), "ro");
+       lang->addItem(tr("Polish"), "pl");
+       lang->addItem(tr("Lithuanian"), "lt");
+       lang->setCurrentIndex(lang->findData(settings.value("lang", "en").toString()));
+       setLang = new QPushButton(tr("save change"));
+       langWarn = new QLabel(tr("Language selection take effect after application restart."));
+       group2Layout->addWidget(langWarn);
+       group2Layout->addWidget(lang);
+       group2Layout->addWidget(setLang);
+       connect(lang, SIGNAL(activated(int)), this, SLOT(changeLang(int)));
+       connect(setLang, SIGNAL(clicked()), this, SLOT(saveSettings()));
+       group2->setLayout(group2Layout);
+       mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(group1);
+       mainLayout->addWidget(group2);
+       setLayout(mainLayout);
+}
+
+ConfigTab::~ConfigTab() {
+       if(file) delete file;
+       delete http;
+       delete nick;
+       delete pass;
+       delete butDown;
+       delete butProxy;
+       delete msgbox;
+       if(proxyWin) delete proxyWin;
+       delete warnLabel;
+       delete nickLabel;
+       delete passLabel;
+       delete lang;
+       delete setLang;
+       delete langWarn;
+       delete row1;
+       delete row2;
+       delete group1Layout;
+       delete group1;
+       delete group2Layout;
+       delete group2;
+       delete mainLayout;
+}
+
+void ConfigTab::changeLang(int langId) {
+       langToSave = langId;
+}
+
+void ConfigTab::openProxy() {
+       proxyWin = new ProxySet();
+}
+
+void ConfigTab::saveSettings() {
+       const char* langs[5] = {"en", "cs", "ro", "pl", "lt"};
+       QSettings settings("config/global.ini", QSettings::IniFormat);
+       if(langs) {
+               settings.setValue("lang", langs[langToSave]);
+               settings.sync();
+       }
+}
+
+void ConfigTab::downloadLatest() {
+       QSettings settings("config/global.ini", QSettings::IniFormat);
+       useProxy = settings.value("Network/proxyUsed", 0).toInt();
+       butDown->setEnabled(false);
+       msgbox->setText("downloading...");
+       file = new QFile("data/data_"+num+".xml");
+       file->open(QIODevice::WriteOnly);
+       QUrl url("http://www.soccerproject.com/sptd.php");
+       int p_port = settings.value("Network/proxyPort", 80).toInt();
+       if(useProxy) http->setProxy(settings.value("Network/proxyAddr", "").toString(), p_port, settings.value("Network/proxyName", "").toString(), settings.value("Network/proxyPass", "").toString());
+       http->setHost(url.host(), 80);
+       //QTextStream out(stdout); out << "log";
+       httpId = http->get(url.path() + "?login=" + QUrl::toPercentEncoding(nick->text()) + "&pw=" + QUrl::toPercentEncoding(pass->text()) + "&sptdid=8&sptdpw=Cerm12", file);
+       settings.setValue("username", nick->text());
+       settings.sync();
+}
+
+void ConfigTab::httpRequestFinished(int requestId, bool error) {
+       if (requestId != httpId) return;
+
+       file->close();
+
+       if (error) {
+               file->remove();
+               emit errMsgBox(tr("Download failed: %1.").arg(http->errorString()));
+       } else {
+               QFile control("data/data_"+num+".xml");
+               control.open(QIODevice::ReadOnly);
+               char c;
+               control.getChar(&c);
+               if(c == '<') {
+                       control.close();
+                       QSettings settings("config/global.ini", QSettings::IniFormat);
+                       QString parseNum = num;
+                       int val = num.toInt();
+                       num.setNum(++val);
+                       settings.setValue("nextXmlId", num);
+                       settings.sync();
+                       emit errMsgBox(QString("<span style=\"color:green;\">") + tr("Download OK") + "</span>");
+                       parse("data/data_"+parseNum+".xml");
+                       emit dataLoaded();
+               } else {
+                       char err[512];
+                       control.ungetChar(c);
+                       control.readLine(err, sizeof(err));
+                       control.close();
+                       emit errMsgBox(QString("<span style=\"color:red;\">") + tr("Error: ") + err + "</span>");
+                       butDown->setEnabled(true);
+               }
+       }
+       delete file;
+       file = 0;
+}
+
+void ConfigTab::readResponseHeader(const QHttpResponseHeader &responseHeader) {
+       if (responseHeader.statusCode() != 200) {
+               QMessageBox::information(this, tr("HTTP"), tr("Download failed: %1.").arg(responseHeader.reasonPhrase()));
+               http->abort();
+               return;
+       }
+}
+
+void ConfigTab::showMsgBox(const QString &text) {
+       msgbox->clear();
+       msgbox->setText(text);
+}
diff --git a/configtab.h b/configtab.h
new file mode 100755 (executable)
index 0000000..047a4a3
--- /dev/null
@@ -0,0 +1,65 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef CONFIGTAB__H__
+#define CONFIGTAB__H__
+
+#include <QWidget>
+#include <QTabWidget>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QGroupBox>
+#include <QPushButton>
+#include <QComboBox>
+#include <QLabel>
+#include <QLineEdit>
+#include <QFile>
+#include <QtNetwork>
+#include <QMessageBox>
+//#include <QTextStream>
+
+#include "proxyset.h"
+
+extern void parse(const QString &);
+
+class ConfigTab: public QWidget {
+       Q_OBJECT
+       QVBoxLayout *mainLayout, *group1Layout, *group2Layout;
+       QHBoxLayout *row1, *row2;
+       QFile *file;
+       QHttp *http;
+       QString num;
+       int httpId;
+       QLineEdit *nick, *pass;
+       QPushButton *butDown, *butProxy;
+       int langToSave;
+       QLabel *msgbox;
+       int useProxy;
+       ProxySet *proxyWin;
+       QLabel *warnLabel, *nickLabel, *passLabel;
+       QGroupBox *group1, *group2;
+       QComboBox *lang;
+       QPushButton *setLang;
+       QLabel *langWarn;
+public:
+       ConfigTab(QWidget *parent = 0);
+       ~ConfigTab();
+private slots:
+       void httpRequestFinished(int requestId, bool error);
+       void readResponseHeader(const QHttpResponseHeader &responseHeader);
+       void downloadLatest();
+       
+       void changeLang(int langId);
+       void saveSettings();
+       
+       void showMsgBox(const QString &);
+       void openProxy();
+signals:
+       void dataLoaded();
+       void errMsgBox(const QString &);
+};
+
+#endif
diff --git a/img/splash.jpg b/img/splash.jpg
new file mode 100644 (file)
index 0000000..fb72e54
Binary files /dev/null and b/img/splash.jpg differ
diff --git a/lang/tran_cs.qm b/lang/tran_cs.qm
new file mode 100755 (executable)
index 0000000..10bc035
Binary files /dev/null and b/lang/tran_cs.qm differ
diff --git a/lang/tran_cs.ts b/lang/tran_cs.ts
new file mode 100755 (executable)
index 0000000..44f2398
--- /dev/null
@@ -0,0 +1,694 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="cs">
+<defaultcodec></defaultcodec>
+<context>
+    <name>AboutTab</name>
+    <message>
+        <location filename="../abouttab.cc" line="25"/>
+        <source>Translators</source>
+        <translation>Překladatelé</translation>
+    </message>
+</context>
+<context>
+    <name>ClubTab</name>
+    <message>
+        <location filename="../clubtab.cc" line="22"/>
+        <source>Club</source>
+        <translation>Klub</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="23"/>
+        <source>Budget</source>
+        <translation>Rozpočet</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="24"/>
+        <source>Rating</source>
+        <translation>Hodnocení</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="25"/>
+        <source>Team spirit</source>
+        <translation>Nálada v týmu</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="54"/>
+        <source>Current position</source>
+        <translation>Pozice v lize</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="55"/>
+        <source>Form</source>
+        <translation>Forma</translation>
+    </message>
+</context>
+<context>
+    <name>ConfigTab</name>
+    <message>
+        <location filename="../configtab.cc" line="28"/>
+        <source>&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt;&lt;br&gt;You can download data file only once between simulations.&lt;br&gt;Data files could be used for building statistics, do not delete them.&lt;br&gt;If you want to download your data, type your soccerproject.com login details.&lt;br&gt;This is just the beta version ;-)</source>
+        <translation type="obsolete">&lt;span style=&quot;color:red;&quot;&gt;Varování:&lt;/span&gt;&lt;br&gt;Datový soubor můžete stahovat pouze jedenkrát mezi simulacemi!&lt;br&gt;Datový soubor nemažte, bude využit k tvoření statistik.&lt;br&gt;Ke stažení dat vyplňte jméno a heslo soccerproject.com&lt;br&gt;chyby nebo pozadavky na http://flyspray.johniez.com</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="31"/>
+        <source>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;nickname:&lt;/span&gt;</source>
+        <translation>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;login:&lt;/span&gt;</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="32"/>
+        <source>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;password:&lt;/span&gt;</source>
+        <translation>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;heslo:&lt;/span&gt;</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="34"/>
+        <source>Download</source>
+        <translation>Stáhnout</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="173"/>
+        <source>HTTP</source>
+        <translation>HTTP</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="173"/>
+        <source>Download failed: %1.</source>
+        <translation>Chyba stahování: %1.</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="155"/>
+        <source>Download OK</source>
+        <translation>Staženo OK</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="40"/>
+        <source>Users data download</source>
+        <translation>Stažení uživatelských dat</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="55"/>
+        <source>Language selection</source>
+        <translation>Výběr jazyka</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="58"/>
+        <source>English</source>
+        <translation>Anglicky</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="59"/>
+        <source>Czech</source>
+        <translation>Česky</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="64"/>
+        <source>save change</source>
+        <translation>uložit změny</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="65"/>
+        <source>Language selection take effect after application restart.</source>
+        <translation>Výběr jazyka se projeví po dalším spuštění programu.</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="163"/>
+        <source>Error: </source>
+        <translation>Chyba: </translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="36"/>
+        <source>Proxy server settings</source>
+        <translation>Nastavení proxy serveru</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="60"/>
+        <source>Romanian</source>
+        <translation>Rumunsky</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="61"/>
+        <source>Polish</source>
+        <translation>Polsky</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="30"/>
+        <source>&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt;&lt;br&gt;You can download data file only once between simulations.&lt;br&gt;Data files could be used for building statistics, do not delete them.&lt;br&gt;If you want to download your data, type your soccerproject.com login details.&lt;br&gt;Bugs or feature requests on: http://flyspray.johniez.com/proj2</source>
+        <translation>&lt;span style=&quot;color:red;&quot;&gt;Varování:&lt;/span&gt;&lt;br&gt;Datové soubor můžete stahovat pouze jedenkrát mezi simulacemi!&lt;br&gt;Datové soubor nemažte, bude využit k tvoření statistik.&lt;br&gt;Ke stažení dat vyplňte jméno a SPTD heslo soccerproject.com&lt;br&gt;chyby nebo pozadavky na http://flyspray.johniez.com/proj2</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="62"/>
+        <source>Lithuanian</source>
+        <translation>Litevsky</translation>
+    </message>
+</context>
+<context>
+    <name>LoadTab</name>
+    <message>
+        <location filename="../loadtab.cc" line="69"/>
+        <source>Loaded file: </source>
+        <translation>Načtený soubor: </translation>
+    </message>
+</context>
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="../mainwindow.cc" line="20"/>
+        <source>Config</source>
+        <translation>Nastavení</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="21"/>
+        <source>Players</source>
+        <translation>Hráči</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="23"/>
+        <source>Staff</source>
+        <translation>Zaměstnanci</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="24"/>
+        <source>Stadium</source>
+        <translation>Stadion</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="25"/>
+        <source>Club</source>
+        <translation>Klub</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="26"/>
+        <source>Load</source>
+        <translation>Načíst</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="27"/>
+        <source>About</source>
+        <translation>O programu</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="22"/>
+        <source>Performance</source>
+        <translation>Výkonost</translation>
+    </message>
+</context>
+<context>
+    <name>PerformanceTab</name>
+    <message>
+        <location filename="../performance.cc" line="28"/>
+        <source>aggression </source>
+        <translation>agresivita </translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="35"/>
+        <source>play home</source>
+        <translation>zápas doma</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="36"/>
+        <source>play away</source>
+        <translation>zápas venku</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="73"/>
+        <source>count team performance</source>
+        <translation>vypočítat výkonost týmu</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>Results could be inaccurate!</source>
+        <translation>Výsledky mohou být nepřesné!</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="287"/>
+        <source>Choose a formation</source>
+        <translation>Vyberte formaci</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Long Ball</source>
+        <translation>Dlouhé míče</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Without tactics</source>
+        <translation>Bez taktiky</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Kick and rush</source>
+        <translation>Protiútoky</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Passing</source>
+        <translation>Přihrávky</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Defensive wall</source>
+        <translation>Beton</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="203"/>
+        <source>normal</source>
+        <translation type="obsolete">normální</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>Set formation, aggression and players.&lt;br&gt;</source>
+        <translation>Nastav formaci, agresivitu a hráče.&lt;br&gt;</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="212"/>
+        <source>offensive</source>
+        <translation>útočný</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="226"/>
+        <source>defensive</source>
+        <translation>obranný</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>This version do not penalize players at wrong position!&lt;br&gt;See http://flyspray.johniez.com/task/14</source>
+        <translation>Tato verze nebere v úvahu horší výkon hráče na špatném postu!&lt;br&gt;Sleduj http://flyspray.johniez.com/task/14</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="21"/>
+        <source>Team formation.</source>
+        <translation>Rozestavení týmu.</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="23"/>
+        <source>reorder players</source>
+        <translation>přeskupit hráče</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="24"/>
+        <source>This button set on positions with wrong player type this player, who plays there (LM on LM post..).</source>
+        <translation>Toto tlačítko nastaví na pozice se špatným typem hráče takového, který tam běžně hraje (LM na LM atd.).</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="31"/>
+        <source>Team aggression, same as you set in match.</source>
+        <translation>Agresivita, kterou chcete hrát v zápase.</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="37"/>
+        <source>Where you will play the match.</source>
+        <translation>Kde bude zápas odehrán.</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="43"/>
+        <source>&apos;Ind. order&apos; mean one of: Normal, Play along, Play along wing, Play it out, Passing, Own chance, Targetman and Free role.</source>
+        <translation>&apos;ind. pokyn&apos; znamená jedno z: Normální, Odehrát, Hrát po křídle, Přihrávky, Na sebe, Koncový a Volná role.</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="239"/>
+        <source>ind. order</source>
+        <translation>ind. pokyn</translation>
+    </message>
+</context>
+<context>
+    <name>PlayerDetail</name>
+    <message>
+        <location filename="../playerdetail.cc" line="13"/>
+        <source>Position</source>
+        <translation>Pozice</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="14"/>
+        <source>Rating</source>
+        <translation>Hodnocení</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="16"/>
+        <source>Aggresion</source>
+        <translation>Agresivita</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="17"/>
+        <source>Fitness</source>
+        <translation>Fyzička</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="18"/>
+        <source>Experience</source>
+        <translation>Zkušenosti</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="20"/>
+        <source>Best rate</source>
+        <translation>Nejlepší výkon</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="21"/>
+        <source>Form</source>
+        <translation>Forma</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="23"/>
+        <source>Speed</source>
+        <translation>Rychlost</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="26"/>
+        <source>Courage</source>
+        <translation>Odvaha</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="75"/>
+        <source>Play along</source>
+        <translation>Hrát vpřed</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="31"/>
+        <source>Reflex</source>
+        <translation>Reflex</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="107"/>
+        <source>Passing</source>
+        <translation>Přihrávky</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="52"/>
+        <source>Shooting</source>
+        <translation>Střelba</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="91"/>
+        <source>Play it out</source>
+        <translation>Odehrát</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="50"/>
+        <source>Strength</source>
+        <translation>Síla</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="51"/>
+        <source>Heading</source>
+        <translation>Hlavičky</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="48"/>
+        <source>Tackling</source>
+        <translation>Bránění / souboje</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="45"/>
+        <source>Playmaking</source>
+        <translation>Tvorba hry</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="49"/>
+        <source>Insight</source>
+        <translation>Vápno</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="123"/>
+        <source>Order</source>
+        <translation>Pokyny</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="97"/>
+        <source>Play along wing</source>
+        <translation>Hrát po křídle</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="113"/>
+        <source>Own chance</source>
+        <translation>Na sebe</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="118"/>
+        <source>Targetman</source>
+        <translation>Koncový</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="123"/>
+        <source>Free role</source>
+        <translation>Volná role</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="15"/>
+        <source>Moral</source>
+        <translation>Morálka</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="19"/>
+        <source>Stamina</source>
+        <translation>Energie</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="24"/>
+        <source>Ball controll</source>
+        <translation>Kontrola míče</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="27"/>
+        <source>Flexibility</source>
+        <translation>Přizpůsobivost</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="28"/>
+        <source>Jumping</source>
+        <translation>Skoky</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="29"/>
+        <source>Goalkicks</source>
+        <translation>Výkopy</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="56"/>
+        <source>Estimated Hidden</source>
+        <translation>Vypočítaná skrytá</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="59"/>
+        <source>Rating with 100% morale</source>
+        <translation>Hodnocení se 100% morálkou</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="63"/>
+        <source>Rating with 100% experience and morale</source>
+        <translation>Hodnocení se 100% morálkou i zkušenostmi</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="66"/>
+        <source>Rating with 100% experience</source>
+        <translation>Hodnocení se 100% zkušenostmi</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="69"/>
+        <source>Normal</source>
+        <translation>Normální</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="126"/>
+        <source>&lt;br&gt;How much points of performance orders add,&lt;br&gt;or remove if result is negative.</source>
+        <translation>&lt;br&gt;Kolik bodů výkonu pokyn přidá,&lt;br&gt;nebo ubere, pokud je výsledek záporný.</translation>
+    </message>
+</context>
+<context>
+    <name>ProxySet</name>
+    <message>
+        <location filename="../proxyset.cc" line="18"/>
+        <source>Use proxy server</source>
+        <translation>Použít proxy server</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="21"/>
+        <source>proxy address:</source>
+        <translation>adresa proxy serveru:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="22"/>
+        <source>proxy port:</source>
+        <translation>port proxy serveru:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="23"/>
+        <source>proxy username:</source>
+        <translation>proxy uživatel:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="24"/>
+        <source>proxy password:</source>
+        <translation>heslo proxy serveru:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="30"/>
+        <source>Save changes</source>
+        <translation>Uložit změny</translation>
+    </message>
+</context>
+<context>
+    <name>StadiumTab</name>
+    <message>
+        <location filename="../stadiumtab.cc" line="24"/>
+        <source>Stadium</source>
+        <translation>Stadion</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="25"/>
+        <source>Field condition</source>
+        <translation>Stav hřiště</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="27"/>
+        <source>Fan base</source>
+        <translation>Fanoušků</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="28"/>
+        <source>satisfaction</source>
+        <translation>spokojenost</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="29"/>
+        <source>Capacity</source>
+        <translation>Kapacita</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="31"/>
+        <source>Parking</source>
+        <translation>Parkoviště</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="38"/>
+        <source>unhappy!!</source>
+        <translation>nešťastní!!</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="51"/>
+        <source>Toilets</source>
+        <translation>Toalety</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="54"/>
+        <source>Buffets</source>
+        <translation>Bary</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="37"/>
+        <source>minimal</source>
+        <translation>minimum</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="41"/>
+        <source>Price league</source>
+        <translation>Vstupné liga</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="44"/>
+        <source>attendance gives cca. </source>
+        <translation>návštěva dá cca. </translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="42"/>
+        <source>Price cup</source>
+        <translation>Vstupné pohár</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="43"/>
+        <source>Price friendly</source>
+        <translation>Vstupné přátelák</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="44"/>
+        <source>Price friendly cup</source>
+        <translation>Vstupné přátelský pohár</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="46"/>
+        <source>Increasing 1000 places on stadium (calculations)</source>
+        <translation>Zvýšení kapacity o 1000 míst (výpočty)</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="54"/>
+        <source>You need</source>
+        <translation>Potřebujete</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="48"/>
+        <source>Parking places</source>
+        <translation>Parkovacích míst</translation>
+    </message>
+</context>
+<context>
+    <name>StaffMember</name>
+    <message>
+        <location filename="../staffmember.cc" line="13"/>
+        <source>Role</source>
+        <translation>Role</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="25"/>
+        <source>Wage</source>
+        <translation>Plat</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>Contract</source>
+        <translation>Smlouva</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>days left</source>
+        <translation>zbývá dní</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>Birthday</source>
+        <translation type="obsolete">Narozeniny</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="28"/>
+        <source>Course</source>
+        <translation>Kurz</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="29"/>
+        <source>Rating</source>
+        <translation>Hodnocení</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="15"/>
+        <source>Trainer</source>
+        <translation>Trenér</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="16"/>
+        <source>Scout</source>
+        <translation>Skaut</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="17"/>
+        <source>Doctor</source>
+        <translation>Doktor</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="18"/>
+        <source>Groundkeeper</source>
+        <translation>Správce hřiště</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="19"/>
+        <source>Assistent</source>
+        <translation>Asistent</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="20"/>
+        <source>Physiotherapy</source>
+        <translation>Fyzioterapeut</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="21"/>
+        <source>Youth manager</source>
+        <translation>Šéftrenér mládeže</translation>
+    </message>
+</context>
+</TS>
diff --git a/lang/tran_lt.qm b/lang/tran_lt.qm
new file mode 100644 (file)
index 0000000..31ff269
Binary files /dev/null and b/lang/tran_lt.qm differ
diff --git a/lang/tran_lt.ts b/lang/tran_lt.ts
new file mode 100644 (file)
index 0000000..84b7736
--- /dev/null
@@ -0,0 +1,703 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="so">
+<context>
+    <name>AboutTab</name>
+    <message>
+        <location filename="../abouttab.cc" line="25"/>
+        <source>Translators</source>
+        <translation>Vertėjai</translation>
+    </message>
+</context>
+<context>
+    <name>ClubTab</name>
+    <message>
+        <location filename="../clubtab.cc" line="22"/>
+        <source>Club</source>
+        <translation>Klubas</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="23"/>
+        <source>Budget</source>
+        <translation>Biudžetas</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="24"/>
+        <source>Rating</source>
+        <translation>Reitingas</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="25"/>
+        <source>Team spirit</source>
+        <translation>Komandinė dvasia</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="54"/>
+        <source>Current position</source>
+        <translation>Užimama pozicija</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="55"/>
+        <source>Form</source>
+        <translation>Forma</translation>
+    </message>
+</context>
+<context>
+    <name>ConfigTab</name>
+    <message>
+        <location filename="../configtab.cc" line="31"/>
+        <source>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;nickname:&lt;/span&gt;</source>
+        <translation>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;vartotojo vardas:&lt;/span&gt;</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="32"/>
+        <source>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;password:&lt;/span&gt;</source>
+        <translation>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;slaptažodis:&lt;/span&gt;</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="34"/>
+        <source>Download</source>
+        <translation>Jungtis</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="40"/>
+        <source>Users data download</source>
+        <translation>Vartotojo duomenų atsiuntimas</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="55"/>
+        <source>Language selection</source>
+        <translation>Kalbos pasirinkimas</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="58"/>
+        <source>English</source>
+        <translation>Anglų</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="59"/>
+        <source>Czech</source>
+        <translation>Čekų</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="64"/>
+        <source>save change</source>
+        <translation>Išsaugoti pakeitimus</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="65"/>
+        <source>Language selection take effect after application restart.</source>
+        <translation>Kalba bus pakeista kitą kartą paleidus programą.</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="173"/>
+        <source>Download failed: %1.</source>
+        <translation>Duomenys neatsiųsti: %1.</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="155"/>
+        <source>Download OK</source>
+        <translation>Duomenys atsiųsti</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="130"/>
+        <source>Error:</source>
+        <translation type="obsolete">Klaida:</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="173"/>
+        <source>HTTP</source>
+        <translation>HTTP</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="36"/>
+        <source>Proxy server settings</source>
+        <translation>Proxy serverio nustatymai</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="60"/>
+        <source>Romanian</source>
+        <translation>Rumunų</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="61"/>
+        <source>Polish</source>
+        <translation>Lenkų</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="30"/>
+        <source>&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt;&lt;br&gt;You can download data file only once between simulations.&lt;br&gt;Data files could be used for building statistics, do not delete them.&lt;br&gt;If you want to download your data, type your soccerproject.com login details.&lt;br&gt;Bugs or feature requests on: http://flyspray.johniez.com/proj2</source>
+        <translation>&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt;&lt;br&gt;Duomenis galite atsisiųsti tik vieną kartą tarp rungtynių simuliacijų.&lt;br&gt;Duomenų laikmena bus naudojama statistikai, neištrinkite jos!&lt;br&gt;Jei norite atsisiųsti duomenis, įveskite savo soccerproject.com vartotojo vardą ir slaptažodį.&lt;br&gt;Naujienos apie programos bug‘us: http://flyspray.johniez.com/proj2</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="62"/>
+        <source>Lithuanian</source>
+        <translation>Lithuanian</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="163"/>
+        <source>Error: </source>
+        <translation>Klaida: </translation>
+    </message>
+</context>
+<context>
+    <name>LoadTab</name>
+    <message>
+        <location filename="../loadtab.cc" line="63"/>
+        <source>Loaded file:</source>
+        <translation type="obsolete">Duomenys atsiųsti:</translation>
+    </message>
+    <message>
+        <location filename="../loadtab.cc" line="69"/>
+        <source>Loaded file: </source>
+        <translation>Duomenys atsiųsti: </translation>
+    </message>
+</context>
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="../mainwindow.cc" line="20"/>
+        <source>Config</source>
+        <translation>Nustatymai</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="21"/>
+        <source>Players</source>
+        <translation>Žaidėjai</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="23"/>
+        <source>Staff</source>
+        <translation>Personalas</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="24"/>
+        <source>Stadium</source>
+        <translation>Stadionas</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="25"/>
+        <source>Club</source>
+        <translation>Klubas</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="26"/>
+        <source>Load</source>
+        <translation>Duomenys</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="27"/>
+        <source>About</source>
+        <translation>Apie</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="22"/>
+        <source>Performance</source>
+        <translation>Pasirodymas</translation>
+    </message>
+</context>
+<context>
+    <name>PerformanceTab</name>
+    <message>
+        <location filename="../performance.cc" line="24"/>
+        <source>aggression</source>
+        <translation type="obsolete">agresija</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="35"/>
+        <source>play home</source>
+        <translation>rungtynės namuose</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="36"/>
+        <source>play away</source>
+        <translation>rungtynės išvykoje</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="73"/>
+        <source>count team performance</source>
+        <translation>perskaičiuoti komandos pasirodymą</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>Results could be inaccurate!</source>
+        <translation>Rezultatai gali būti netikslūs!</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="287"/>
+        <source>Choose a formation</source>
+        <translation>Pasirinkite išsidėstymą</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Long Ball</source>
+        <translation>Tolimi spyriai</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Without tactics</source>
+        <translation>Be taktikos</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Kick and rush</source>
+        <translation>Spirk ir bėk</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Passing</source>
+        <translation>Pasavimas</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Defensive wall</source>
+        <translation>Gynybinė siena</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="203"/>
+        <source>normal</source>
+        <translation type="obsolete">Normaliai</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>Set formation, aggression and players.&lt;br&gt;</source>
+        <translation>Pasirinkite išsidėstymą, agresiją ir žaidėjus.&lt;br&gt;</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="212"/>
+        <source>offensive</source>
+        <translation>Puolimas</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="226"/>
+        <source>defensive</source>
+        <translation>Gynyba</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>This version do not penalize players at wrong position!&lt;br&gt;See http://flyspray.johniez.com/task/14</source>
+        <translation>Ši versija neįvertina žaidėjų žaidimo ne savo pozicijoje!&lt;br&gt;Žiūrėti: http://flyspray.johniez.com/task/14</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="28"/>
+        <source>aggression </source>
+        <translation>agresija </translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="21"/>
+        <source>Team formation.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="23"/>
+        <source>reorder players</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="24"/>
+        <source>This button set on positions with wrong player type this player, who plays there (LM on LM post..).</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="31"/>
+        <source>Team aggression, same as you set in match.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="37"/>
+        <source>Where you will play the match.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="43"/>
+        <source>&apos;Ind. order&apos; mean one of: Normal, Play along, Play along wing, Play it out, Passing, Own chance, Targetman and Free role.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="239"/>
+        <source>ind. order</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>PlayerDetail</name>
+    <message>
+        <location filename="../playerdetail.cc" line="13"/>
+        <source>Position</source>
+        <translation>Pozicija</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="14"/>
+        <source>Rating</source>
+        <translation>Reitingas</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="15"/>
+        <source>Moral</source>
+        <translation>Moralė</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="16"/>
+        <source>Aggresion</source>
+        <translation>Agresija</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="17"/>
+        <source>Fitness</source>
+        <translation>Fizinis pasiruošimas</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="18"/>
+        <source>Experience</source>
+        <translation>Patirtis</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="19"/>
+        <source>Stamina</source>
+        <translation>Ištvermė</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="20"/>
+        <source>Best rate</source>
+        <translation>Geriausias pasirodymas</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="21"/>
+        <source>Form</source>
+        <translation>Forma</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="23"/>
+        <source>Speed</source>
+        <translation>Greitis</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="24"/>
+        <source>Ball controll</source>
+        <translation>Kamuolio valdymas</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="26"/>
+        <source>Courage</source>
+        <translation>Drąsa</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="27"/>
+        <source>Flexibility</source>
+        <translation>Lankstumas</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="28"/>
+        <source>Jumping</source>
+        <translation>Šuoliai</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="29"/>
+        <source>Goalkicks</source>
+        <translation>Smūgiai nuo vartų</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="75"/>
+        <source>Play along</source>
+        <translation>Žaidimas aikštėje</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="31"/>
+        <source>Reflex</source>
+        <translation>Refleksai</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="107"/>
+        <source>Passing</source>
+        <translation>Pasavimas</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="52"/>
+        <source>Shooting</source>
+        <translation>Smūgiai</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="91"/>
+        <source>Play it out</source>
+        <translation>Sprendimai</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="50"/>
+        <source>Strength</source>
+        <translation>Jėga</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="51"/>
+        <source>Heading</source>
+        <translation>Smūgiai galva</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="48"/>
+        <source>Tackling</source>
+        <translation>Kamuolio atkovojimas</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="45"/>
+        <source>Playmaking</source>
+        <translation>Kombinacijos</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="49"/>
+        <source>Insight</source>
+        <translation>Nuovoka</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="56"/>
+        <source>Estimated Hidden</source>
+        <translation>Paslėptas įgūdis</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="123"/>
+        <source>Order</source>
+        <translation>Nurodymas</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="97"/>
+        <source>Play along wing</source>
+        <translation>Varytis pirmyn kraštuose</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="113"/>
+        <source>Own chance</source>
+        <translation>Pulk pats</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="118"/>
+        <source>Targetman</source>
+        <translation>Pagrindinis vyras</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="123"/>
+        <source>Free role</source>
+        <translation>Spręsk pats</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="59"/>
+        <source>Rating with 100% morale</source>
+        <translation>Reitingas su 100% morale</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="63"/>
+        <source>Rating with 100% experience and morale</source>
+        <translation>Reitingas su 100% patirtimi ir morale</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="66"/>
+        <source>Rating with 100% experience</source>
+        <translation>Reitingas su 100% patirtimi</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="69"/>
+        <source>Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="126"/>
+        <source>&lt;br&gt;How much points of performance orders add,&lt;br&gt;or remove if result is negative.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ProxySet</name>
+    <message>
+        <location filename="../proxyset.cc" line="18"/>
+        <source>Use proxy server</source>
+        <translation>Vartotojo proxy serveris</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="21"/>
+        <source>proxy address:</source>
+        <translation>proxy adresas:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="22"/>
+        <source>proxy port:</source>
+        <translation>proxy prievadas:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="23"/>
+        <source>proxy username:</source>
+        <translation>proxy vartotojo vardas:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="24"/>
+        <source>proxy password:</source>
+        <translation>proxy slaptažodis:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="30"/>
+        <source>Save changes</source>
+        <translation>Išsaugoti pakeitimus</translation>
+    </message>
+</context>
+<context>
+    <name>StadiumTab</name>
+    <message>
+        <location filename="../stadiumtab.cc" line="24"/>
+        <source>Stadium</source>
+        <translation>Stadionas</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="25"/>
+        <source>Field condition</source>
+        <translation>Dangos būklė</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="27"/>
+        <source>Fan base</source>
+        <translation>Sirgalių skaičius</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="28"/>
+        <source>satisfaction</source>
+        <translation>Sirgalių pasitenkinimas</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="29"/>
+        <source>Capacity</source>
+        <translation>Talpa</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="31"/>
+        <source>Parking</source>
+        <translation>Automobilių aikštelė</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="37"/>
+        <source>minimal</source>
+        <translation>ne mažiau kaip</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="38"/>
+        <source>unhappy!!</source>
+        <translation>nepatenkinti!!</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="51"/>
+        <source>Toilets</source>
+        <translation>Tualetai</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="54"/>
+        <source>Buffets</source>
+        <translation>Barai</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="41"/>
+        <source>Price league</source>
+        <translation>Lygos bilieto kaina</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="38"/>
+        <source>attendance gives cca.</source>
+        <translation type="obsolete">pajamos.</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="42"/>
+        <source>Price cup</source>
+        <translation>Taurės bilieto kaina</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="43"/>
+        <source>Price friendly</source>
+        <translation>Dr. rungtynių bilieto kaina</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="44"/>
+        <source>Price friendly cup</source>
+        <translation>Dr. taurės bilieto kaina</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="46"/>
+        <source>Increasing 1000 places on stadium (calculations)</source>
+        <translation>Padidinti stadioną 1000 vietų (skaičiavimai)</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="54"/>
+        <source>You need</source>
+        <translation>jums reikia</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="48"/>
+        <source>Parking places</source>
+        <translation>Automobilių stovėjimo vietos</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="44"/>
+        <source>attendance gives cca. </source>
+        <translation>pajamos. </translation>
+    </message>
+</context>
+<context>
+    <name>StaffMember</name>
+    <message>
+        <location filename="../staffmember.cc" line="13"/>
+        <source>Role</source>
+        <translation>Darbuotojas</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="15"/>
+        <source>Trainer</source>
+        <translation>Treneris</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="16"/>
+        <source>Scout</source>
+        <translation>Talentų skautas</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="17"/>
+        <source>Doctor</source>
+        <translation>Gydytojas</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="18"/>
+        <source>Groundkeeper</source>
+        <translation>Aikštelės prižiūrėtojas</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="19"/>
+        <source>Assistent</source>
+        <translation>Pavaduotojas</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="20"/>
+        <source>Physiotherapy</source>
+        <translation>Fizioterapeutas</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="21"/>
+        <source>Youth manager</source>
+        <translation>Jaunių vadovas</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="25"/>
+        <source>Wage</source>
+        <translation>Alga</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>Contract</source>
+        <translation>Sutartis</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>days left</source>
+        <translation>liko dienų</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="28"/>
+        <source>Course</source>
+        <translation>Kursai</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="29"/>
+        <source>Rating</source>
+        <translation>Reitingas</translation>
+    </message>
+</context>
+</TS>
diff --git a/lang/tran_pl.qm b/lang/tran_pl.qm
new file mode 100644 (file)
index 0000000..d526c2c
Binary files /dev/null and b/lang/tran_pl.qm differ
diff --git a/lang/tran_pl.ts b/lang/tran_pl.ts
new file mode 100644 (file)
index 0000000..57eb8cf
--- /dev/null
@@ -0,0 +1,683 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="pl">
+<context>
+    <name>AboutTab</name>
+    <message>
+        <location filename="../abouttab.cc" line="25"/>
+        <source>Translators</source>
+        <translation>Tłumacze</translation>
+    </message>
+</context>
+<context>
+    <name>ClubTab</name>
+    <message>
+        <location filename="../clubtab.cc" line="22"/>
+        <source>Club</source>
+        <translation>Klub</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="23"/>
+        <source>Budget</source>
+        <translation>Budżet</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="24"/>
+        <source>Rating</source>
+        <translation>Ocena</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="25"/>
+        <source>Team spirit</source>
+        <translation>Atmosfera w drużynie</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="54"/>
+        <source>Current position</source>
+        <translation>Aktualna pozycja</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="55"/>
+        <source>Form</source>
+        <translation>Forma</translation>
+    </message>
+</context>
+<context>
+    <name>ConfigTab</name>
+    <message>
+        <location filename="../configtab.cc" line="28"/>
+        <source>&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt;&lt;br&gt;You can download data file only once between simulations.&lt;br&gt;Data files could be used for building statistics, do not delete them.&lt;br&gt;If you want to download your data, type your soccerproject.com login details.&lt;br&gt;This is just the beta version ;-)</source>
+        <translation type="obsolete">&lt;span style=&quot;color:red;&quot;&gt;Uwaga:&lt;/span&gt;&lt;br&gt;Możesz pobrać plik z danymi tylko raz pomiędzy symulacjami.&lt;br&gt;Pliki z danymi mogą zostać użyte do tworzenia statystyk, dlatego ich nie usuwaj.&lt;br&gt;Jeśli chcesz pobrać dane dla swojego zespołu, wpisz dane jak przy logowaniu w soccerproject.com.&lt;br&gt;To jest dopiero wersja beta ;-)</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="31"/>
+        <source>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;nickname:&lt;/span&gt;</source>
+        <translation>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;użytkownik:&lt;/span&gt;</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="32"/>
+        <source>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;password:&lt;/span&gt;</source>
+        <translation>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;hasło:&lt;/span&gt;</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="34"/>
+        <source>Download</source>
+        <translation>Pobierz</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="40"/>
+        <source>Users data download</source>
+        <translation>Pobieranie danych użytkowników</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="55"/>
+        <source>Language selection</source>
+        <translation>Wybór języka</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="58"/>
+        <source>English</source>
+        <translation>Angielski</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="59"/>
+        <source>Czech</source>
+        <translation>Czeski</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="64"/>
+        <source>save change</source>
+        <translation>Zapisz zmiany</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="65"/>
+        <source>Language selection take effect after application restart.</source>
+        <translation>Zmiany w wyborze języka będą obowiązywać dopiero po ponownym uruchomieniu aplikacji.</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="173"/>
+        <source>Download failed: %1.</source>
+        <translation>Pobieranie nie powiodło się: %1.</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="155"/>
+        <source>Download OK</source>
+        <translation>Pobieranie zakończone sukcesem</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="163"/>
+        <source>Error: </source>
+        <translation>Błąd: </translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="173"/>
+        <source>HTTP</source>
+        <translation>HTTP</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="36"/>
+        <source>Proxy server settings</source>
+        <translation>Ustawienia serwera proxy</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="60"/>
+        <source>Romanian</source>
+        <translation>Rumuński</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="61"/>
+        <source>Polish</source>
+        <translation>Polski</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="30"/>
+        <source>&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt;&lt;br&gt;You can download data file only once between simulations.&lt;br&gt;Data files could be used for building statistics, do not delete them.&lt;br&gt;If you want to download your data, type your soccerproject.com login details.&lt;br&gt;Bugs or feature requests on: http://flyspray.johniez.com/proj2</source>
+        <translation type="unfinished">&lt;span style=&quot;color:red;&quot;&gt;Uwaga:&lt;/span&gt;&lt;br&gt;Możesz pobrać plik z danymi tylko raz pomiędzy symulacjami.&lt;br&gt;Pliki z danymi mogą zostać użyte do tworzenia statystyk, dlatego ich nie usuwaj.&lt;br&gt;Jeśli chcesz pobrać dane dla swojego zespołu, wpisz dane jak przy logowaniu w soccerproject.com.&lt;br&gt;Bugs or feature requests on: http://flyspray.johniez.com/proj2</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="62"/>
+        <source>Lithuanian</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>LoadTab</name>
+    <message>
+        <location filename="../loadtab.cc" line="69"/>
+        <source>Loaded file: </source>
+        <translation>Załadowano plik: </translation>
+    </message>
+</context>
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="../mainwindow.cc" line="20"/>
+        <source>Config</source>
+        <translation>Konfiguracja</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="21"/>
+        <source>Players</source>
+        <translation>Zawodnicy</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="23"/>
+        <source>Staff</source>
+        <translation>Pracownicy</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="24"/>
+        <source>Stadium</source>
+        <translation>Stadion</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="25"/>
+        <source>Club</source>
+        <translation>Klub</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="26"/>
+        <source>Load</source>
+        <translation>Wczytaj</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="27"/>
+        <source>About</source>
+        <translation>Około</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="22"/>
+        <source>Performance</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>PerformanceTab</name>
+    <message>
+        <location filename="../performance.cc" line="28"/>
+        <source>aggression </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="35"/>
+        <source>play home</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="36"/>
+        <source>play away</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="73"/>
+        <source>count team performance</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>Results could be inaccurate!</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="287"/>
+        <source>Choose a formation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Long Ball</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Without tactics</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Kick and rush</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Passing</source>
+        <translation>Podania</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Defensive wall</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>Set formation, aggression and players.&lt;br&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="212"/>
+        <source>offensive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="226"/>
+        <source>defensive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>This version do not penalize players at wrong position!&lt;br&gt;See http://flyspray.johniez.com/task/14</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="21"/>
+        <source>Team formation.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="23"/>
+        <source>reorder players</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="24"/>
+        <source>This button set on positions with wrong player type this player, who plays there (LM on LM post..).</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="31"/>
+        <source>Team aggression, same as you set in match.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="37"/>
+        <source>Where you will play the match.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="43"/>
+        <source>&apos;Ind. order&apos; mean one of: Normal, Play along, Play along wing, Play it out, Passing, Own chance, Targetman and Free role.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="239"/>
+        <source>ind. order</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>PlayerDetail</name>
+    <message>
+        <location filename="../playerdetail.cc" line="13"/>
+        <source>Position</source>
+        <translation>Pozycja</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="14"/>
+        <source>Rating</source>
+        <translation>Ocena</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="15"/>
+        <source>Moral</source>
+        <translation>Morale</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="16"/>
+        <source>Aggresion</source>
+        <translation>Agresja</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="17"/>
+        <source>Fitness</source>
+        <translation>Kondycja</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="18"/>
+        <source>Experience</source>
+        <translation>Doświadczenie</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="19"/>
+        <source>Stamina</source>
+        <translation>Wytrzymałość</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="20"/>
+        <source>Best rate</source>
+        <translation>Najlepszy występ</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="21"/>
+        <source>Form</source>
+        <translation>Forma</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="23"/>
+        <source>Speed</source>
+        <translation>Szybkość</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="24"/>
+        <source>Ball controll</source>
+        <translation>Panowanie nad piłką</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="26"/>
+        <source>Courage</source>
+        <translation>Odwaga</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="27"/>
+        <source>Flexibility</source>
+        <translation>Zwinność</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="28"/>
+        <source>Jumping</source>
+        <translation>Skoczność</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="29"/>
+        <source>Goalkicks</source>
+        <translation>Wybijanie piłki</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="75"/>
+        <source>Play along</source>
+        <translation>Wyprowadzanie piłki przez bramkarza</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="31"/>
+        <source>Reflex</source>
+        <translation>Refleks</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="107"/>
+        <source>Passing</source>
+        <translation>Podania</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="52"/>
+        <source>Shooting</source>
+        <translation>Strzał</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="91"/>
+        <source>Play it out</source>
+        <translation>Wyprowadzenie piłki</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="50"/>
+        <source>Strength</source>
+        <translation>Siła</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="51"/>
+        <source>Heading</source>
+        <translation>Gra głową</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="48"/>
+        <source>Tackling</source>
+        <translation>Odbiór piłki</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="45"/>
+        <source>Playmaking</source>
+        <translation>Rozgrywanie</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="49"/>
+        <source>Insight</source>
+        <translation>Przegląd gry</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="56"/>
+        <source>Estimated Hidden</source>
+        <translation>Szacowana ukryta umiejętność</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="123"/>
+        <source>Order</source>
+        <translation>Rozkazy</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="97"/>
+        <source>Play along wing</source>
+        <translation>Gra skrzydłami</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="113"/>
+        <source>Own chance</source>
+        <translation>Własna szansa</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="118"/>
+        <source>Targetman</source>
+        <translation>Król pola karnego</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="123"/>
+        <source>Free role</source>
+        <translation>Wolna rola</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="59"/>
+        <source>Rating with 100% morale</source>
+        <translation>Ocena przy 100% morale</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="63"/>
+        <source>Rating with 100% experience and morale</source>
+        <translation>Ocena przy 100% doświadczenia i morale</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="66"/>
+        <source>Rating with 100% experience</source>
+        <translation>Ocena przy 100% doświadczenia</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="69"/>
+        <source>Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="126"/>
+        <source>&lt;br&gt;How much points of performance orders add,&lt;br&gt;or remove if result is negative.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ProxySet</name>
+    <message>
+        <location filename="../proxyset.cc" line="18"/>
+        <source>Use proxy server</source>
+        <translation>Użyj serwera proxy</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="21"/>
+        <source>proxy address:</source>
+        <translation>adres proxy:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="22"/>
+        <source>proxy port:</source>
+        <translation>port proxy:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="23"/>
+        <source>proxy username:</source>
+        <translation>nazwa użytkownika proxy:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="24"/>
+        <source>proxy password:</source>
+        <translation>hasło proxy:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="30"/>
+        <source>Save changes</source>
+        <translation>Zapisz zmiany</translation>
+    </message>
+</context>
+<context>
+    <name>StadiumTab</name>
+    <message>
+        <location filename="../stadiumtab.cc" line="24"/>
+        <source>Stadium</source>
+        <translation>Stadion</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="25"/>
+        <source>Field condition</source>
+        <translation>Status nawierzchni</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="27"/>
+        <source>Fan base</source>
+        <translation>Liczba fanów zespołu</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="28"/>
+        <source>satisfaction</source>
+        <translation>Zadowolenie fanów</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="29"/>
+        <source>Capacity</source>
+        <translation>Pojemność</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="31"/>
+        <source>Parking</source>
+        <translation>Parking</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="37"/>
+        <source>minimal</source>
+        <translation>minimalnie</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="38"/>
+        <source>unhappy!!</source>
+        <translation>niezadowoleni!!</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="51"/>
+        <source>Toilets</source>
+        <translation>Toalety</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="54"/>
+        <source>Buffets</source>
+        <translation>Bary</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="41"/>
+        <source>Price league</source>
+        <translation>Cena biletów (Liga)</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="44"/>
+        <source>attendance gives cca. </source>
+        <translation>frekwencja daje. </translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="42"/>
+        <source>Price cup</source>
+        <translation>Cena biletów (Puchar)</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="43"/>
+        <source>Price friendly</source>
+        <translation>Cena biletów (Mecz towarzyski)</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="44"/>
+        <source>Price friendly cup</source>
+        <translation>Cena biletów (Turniej towarzyski) </translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="46"/>
+        <source>Increasing 1000 places on stadium (calculations)</source>
+        <translation>Zwiększ ilość miejsc na stadionie o 1000 (szacowanie)</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="54"/>
+        <source>You need</source>
+        <translation>Potrzebujesz</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="48"/>
+        <source>Parking places</source>
+        <translation>Miejsca parkingowe</translation>
+    </message>
+</context>
+<context>
+    <name>StaffMember</name>
+    <message>
+        <location filename="../staffmember.cc" line="13"/>
+        <source>Role</source>
+        <translation>Rola</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="15"/>
+        <source>Trainer</source>
+        <translation>Trener</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="16"/>
+        <source>Scout</source>
+        <translation>Wyszukiwacz talentów</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="17"/>
+        <source>Doctor</source>
+        <translation>Lekarz</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="18"/>
+        <source>Groundkeeper</source>
+        <translation>Opiekun boiska</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="19"/>
+        <source>Assistent</source>
+        <translation>Asystent</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="20"/>
+        <source>Physiotherapy</source>
+        <translation>Fizykoterapeuta</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="21"/>
+        <source>Youth manager</source>
+        <translation>Opiekun młodzieży</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="25"/>
+        <source>Wage</source>
+        <translation>Pensja</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>Contract</source>
+        <translation>Kontrakt</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>days left</source>
+        <translation>dni do końca kontraktu</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="28"/>
+        <source>Course</source>
+        <translation>Kurs</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="29"/>
+        <source>Rating</source>
+        <translation>Ocena</translation>
+    </message>
+</context>
+</TS>
diff --git a/lang/tran_ro.qm b/lang/tran_ro.qm
new file mode 100644 (file)
index 0000000..c3bb1e4
Binary files /dev/null and b/lang/tran_ro.qm differ
diff --git a/lang/tran_ro.ts b/lang/tran_ro.ts
new file mode 100644 (file)
index 0000000..90138b4
--- /dev/null
@@ -0,0 +1,683 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="so">
+<context>
+    <name>AboutTab</name>
+    <message>
+        <location filename="../abouttab.cc" line="25"/>
+        <source>Translators</source>
+        <translation>Traducatori</translation>
+    </message>
+</context>
+<context>
+    <name>ClubTab</name>
+    <message>
+        <location filename="../clubtab.cc" line="22"/>
+        <source>Club</source>
+        <translation>Club</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="23"/>
+        <source>Budget</source>
+        <translation>Buget</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="24"/>
+        <source>Rating</source>
+        <translation>Rating</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="25"/>
+        <source>Team spirit</source>
+        <translation>Spiritul Echipei</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="54"/>
+        <source>Current position</source>
+        <translation>Pozitia Curenta</translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="55"/>
+        <source>Form</source>
+        <translation>Forma</translation>
+    </message>
+</context>
+<context>
+    <name>ConfigTab</name>
+    <message>
+        <location filename="../configtab.cc" line="28"/>
+        <source>&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt;&lt;br&gt;You can download data file only once between simulations.&lt;br&gt;Data files could be used for building statistics, do not delete them.&lt;br&gt;If you want to download your data, type your soccerproject.com login details.&lt;br&gt;This is just the beta version ;-)</source>
+        <translation type="obsolete">&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt;&lt;br&gt;Puteti downloada date numai intre simulari.&lt;br&gt;Datele pot fi folosite pentru a face statistici,nu le stergeti.&lt;br&gt;Daca doriti sa downloadati datele voastre,tastati detaliile de logare pe soccerproject.com.&lt;br&gt;Aceasta este doar versiunea beta ;-)</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="31"/>
+        <source>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;nickname:&lt;/span&gt;</source>
+        <translation>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;nickname:&lt;/span&gt;</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="32"/>
+        <source>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;password:&lt;/span&gt;</source>
+        <translation>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;parola:&lt;/span&gt;</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="34"/>
+        <source>Download</source>
+        <translation>Download</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="40"/>
+        <source>Users data download</source>
+        <translation>Downloadeaza datele</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="55"/>
+        <source>Language selection</source>
+        <translation>Alege limba</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="58"/>
+        <source>English</source>
+        <translation>Engleza</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="59"/>
+        <source>Czech</source>
+        <translation>Ceha</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="64"/>
+        <source>save change</source>
+        <translation>Salveaza schimbarile</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="65"/>
+        <source>Language selection take effect after application restart.</source>
+        <translation>Selectia limbii va avea effect dupa restartarea aplicatiei.</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="173"/>
+        <source>Download failed: %1.</source>
+        <translation>Download intrerupt: %1.</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="155"/>
+        <source>Download OK</source>
+        <translation>Download OK</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="163"/>
+        <source>Error: </source>
+        <translation>Eroare: </translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="173"/>
+        <source>HTTP</source>
+        <translation>HTTP</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="36"/>
+        <source>Proxy server settings</source>
+        <translation>Setari server proxy</translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="60"/>
+        <source>Romanian</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="61"/>
+        <source>Polish</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="30"/>
+        <source>&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt;&lt;br&gt;You can download data file only once between simulations.&lt;br&gt;Data files could be used for building statistics, do not delete them.&lt;br&gt;If you want to download your data, type your soccerproject.com login details.&lt;br&gt;Bugs or feature requests on: http://flyspray.johniez.com/proj2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="62"/>
+        <source>Lithuanian</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>LoadTab</name>
+    <message>
+        <location filename="../loadtab.cc" line="69"/>
+        <source>Loaded file: </source>
+        <translation>Fisiere incarcate: </translation>
+    </message>
+</context>
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="../mainwindow.cc" line="20"/>
+        <source>Config</source>
+        <translation>Configurare</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="21"/>
+        <source>Players</source>
+        <translation>Jucatori</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="23"/>
+        <source>Staff</source>
+        <translation>Personal</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="24"/>
+        <source>Stadium</source>
+        <translation>Stadion</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="25"/>
+        <source>Club</source>
+        <translation>Club</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="26"/>
+        <source>Load</source>
+        <translation>Incarca</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="27"/>
+        <source>About</source>
+        <translation>Despre</translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="22"/>
+        <source>Performance</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>PerformanceTab</name>
+    <message>
+        <location filename="../performance.cc" line="28"/>
+        <source>aggression </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="35"/>
+        <source>play home</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="36"/>
+        <source>play away</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="73"/>
+        <source>count team performance</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>Results could be inaccurate!</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="287"/>
+        <source>Choose a formation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Long Ball</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Without tactics</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Kick and rush</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Passing</source>
+        <translation>Pase</translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Defensive wall</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>Set formation, aggression and players.&lt;br&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="212"/>
+        <source>offensive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="226"/>
+        <source>defensive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>This version do not penalize players at wrong position!&lt;br&gt;See http://flyspray.johniez.com/task/14</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="21"/>
+        <source>Team formation.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="23"/>
+        <source>reorder players</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="24"/>
+        <source>This button set on positions with wrong player type this player, who plays there (LM on LM post..).</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="31"/>
+        <source>Team aggression, same as you set in match.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="37"/>
+        <source>Where you will play the match.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="43"/>
+        <source>&apos;Ind. order&apos; mean one of: Normal, Play along, Play along wing, Play it out, Passing, Own chance, Targetman and Free role.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="239"/>
+        <source>ind. order</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>PlayerDetail</name>
+    <message>
+        <location filename="../playerdetail.cc" line="13"/>
+        <source>Position</source>
+        <translation>Pozitie</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="14"/>
+        <source>Rating</source>
+        <translation>Rating</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="15"/>
+        <source>Moral</source>
+        <translation>Moral</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="16"/>
+        <source>Aggresion</source>
+        <translation>Agresivitate</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="17"/>
+        <source>Fitness</source>
+        <translation>Conditie</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="18"/>
+        <source>Experience</source>
+        <translation>Experienta</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="19"/>
+        <source>Stamina</source>
+        <translation>Rezistenta</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="20"/>
+        <source>Best rate</source>
+        <translation>Cea mai buna prestatie</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="21"/>
+        <source>Form</source>
+        <translation>Forma</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="23"/>
+        <source>Speed</source>
+        <translation>Viteza</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="24"/>
+        <source>Ball controll</source>
+        <translation>Tehnica</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="26"/>
+        <source>Courage</source>
+        <translation>Curaj</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="27"/>
+        <source>Flexibility</source>
+        <translation>Flexibilitate</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="28"/>
+        <source>Jumping</source>
+        <translation>Detenta</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="29"/>
+        <source>Goalkicks</source>
+        <translation>Degajari</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="75"/>
+        <source>Play along</source>
+        <translation>Joc De Picior</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="31"/>
+        <source>Reflex</source>
+        <translation>Reflex</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="107"/>
+        <source>Passing</source>
+        <translation>Pase</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="52"/>
+        <source>Shooting</source>
+        <translation>Suturi</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="91"/>
+        <source>Play it out</source>
+        <translation>Respingeri</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="50"/>
+        <source>Strength</source>
+        <translation>Forta</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="51"/>
+        <source>Heading</source>
+        <translation>Cap</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="48"/>
+        <source>Tackling</source>
+        <translation>Deposedari</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="45"/>
+        <source>Playmaking</source>
+        <translation>Viziune</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="49"/>
+        <source>Insight</source>
+        <translation>Intuitie</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="56"/>
+        <source>Estimated Hidden</source>
+        <translation>Calitate ascunsa estimata</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="123"/>
+        <source>Order</source>
+        <translation>Ordin</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="97"/>
+        <source>Play along wing</source>
+        <translation>Extrema Ofensiva</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="113"/>
+        <source>Own chance</source>
+        <translation>Individualism</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="118"/>
+        <source>Targetman</source>
+        <translation>Finalizator</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="123"/>
+        <source>Free role</source>
+        <translation>Libero</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="59"/>
+        <source>Rating with 100% morale</source>
+        <translation>Calitate cu 100% moral</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="63"/>
+        <source>Rating with 100% experience and morale</source>
+        <translation>Calitate cu 100% experienta si moral</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="66"/>
+        <source>Rating with 100% experience</source>
+        <translation>Calitate cu 100% experienta</translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="69"/>
+        <source>Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="126"/>
+        <source>&lt;br&gt;How much points of performance orders add,&lt;br&gt;or remove if result is negative.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ProxySet</name>
+    <message>
+        <location filename="../proxyset.cc" line="18"/>
+        <source>Use proxy server</source>
+        <translation>Foloseste server proxy</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="21"/>
+        <source>proxy address:</source>
+        <translation>adresa proxy:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="22"/>
+        <source>proxy port:</source>
+        <translation>Port proxy:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="23"/>
+        <source>proxy username:</source>
+        <translation>user proxy:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="24"/>
+        <source>proxy password:</source>
+        <translation>parola proxy:</translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="30"/>
+        <source>Save changes</source>
+        <translation>Salveaza modificarile</translation>
+    </message>
+</context>
+<context>
+    <name>StadiumTab</name>
+    <message>
+        <location filename="../stadiumtab.cc" line="24"/>
+        <source>Stadium</source>
+        <translation>Stadion</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="25"/>
+        <source>Field condition</source>
+        <translation>starea terenului</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="27"/>
+        <source>Fan base</source>
+        <translation>Baza fanilor</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="28"/>
+        <source>satisfaction</source>
+        <translation>Satisfactia</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="29"/>
+        <source>Capacity</source>
+        <translation>Capacitate</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="31"/>
+        <source>Parking</source>
+        <translation>Parcari</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="37"/>
+        <source>minimal</source>
+        <translation>Minim</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="38"/>
+        <source>unhappy!!</source>
+        <translation>Nemultumiti!!</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="51"/>
+        <source>Toilets</source>
+        <translation>Toalete</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="54"/>
+        <source>Buffets</source>
+        <translation>Baruri</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="41"/>
+        <source>Price league</source>
+        <translation>Pret liga</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="44"/>
+        <source>attendance gives cca. </source>
+        <translation>Venit estimate pe meci. </translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="42"/>
+        <source>Price cup</source>
+        <translation>Pret cupa</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="43"/>
+        <source>Price friendly</source>
+        <translation>Pret amicale</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="44"/>
+        <source>Price friendly cup</source>
+        <translation>Pret cupa amicala</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="46"/>
+        <source>Increasing 1000 places on stadium (calculations)</source>
+        <translation>Cresterea cu 1000 de locuri a stadionului(calcule)</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="54"/>
+        <source>You need</source>
+        <translation>Ai nevoie</translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="48"/>
+        <source>Parking places</source>
+        <translation>Locuri de parcare</translation>
+    </message>
+</context>
+<context>
+    <name>StaffMember</name>
+    <message>
+        <location filename="../staffmember.cc" line="13"/>
+        <source>Role</source>
+        <translation>Functia</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="15"/>
+        <source>Trainer</source>
+        <translation>Antrenor</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="16"/>
+        <source>Scout</source>
+        <translation>Scout</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="17"/>
+        <source>Doctor</source>
+        <translation>Doctor</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="18"/>
+        <source>Groundkeeper</source>
+        <translation>Ingrijitor</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="19"/>
+        <source>Assistent</source>
+        <translation>Asistent</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="20"/>
+        <source>Physiotherapy</source>
+        <translation>Maseur</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="21"/>
+        <source>Youth manager</source>
+        <translation>Coordonator tineret</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="25"/>
+        <source>Wage</source>
+        <translation>Salariu</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>Contract</source>
+        <translation>Contract</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>days left</source>
+        <translation>Zile ramase</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="28"/>
+        <source>Course</source>
+        <translation>Curs</translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="29"/>
+        <source>Rating</source>
+        <translation>Rating</translation>
+    </message>
+</context>
+</TS>
diff --git a/lang/tran_xx.ts b/lang/tran_xx.ts
new file mode 100644 (file)
index 0000000..1f2c9d6
--- /dev/null
@@ -0,0 +1,678 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1">
+<context>
+    <name>AboutTab</name>
+    <message>
+        <location filename="../abouttab.cc" line="25"/>
+        <source>Translators</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ClubTab</name>
+    <message>
+        <location filename="../clubtab.cc" line="22"/>
+        <source>Club</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="23"/>
+        <source>Budget</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="24"/>
+        <source>Rating</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="25"/>
+        <source>Team spirit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="54"/>
+        <source>Current position</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../clubtab.cc" line="55"/>
+        <source>Form</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ConfigTab</name>
+    <message>
+        <location filename="../configtab.cc" line="31"/>
+        <source>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;nickname:&lt;/span&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="32"/>
+        <source>soccerproject.com &lt;span style=&quot;color:red;&quot;&gt;password:&lt;/span&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="34"/>
+        <source>Download</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="40"/>
+        <source>Users data download</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="55"/>
+        <source>Language selection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="58"/>
+        <source>English</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="59"/>
+        <source>Czech</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="64"/>
+        <source>save change</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="65"/>
+        <source>Language selection take effect after application restart.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="173"/>
+        <source>Download failed: %1.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="155"/>
+        <source>Download OK</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="163"/>
+        <source>Error: </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="173"/>
+        <source>HTTP</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="36"/>
+        <source>Proxy server settings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="60"/>
+        <source>Romanian</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="61"/>
+        <source>Polish</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="30"/>
+        <source>&lt;span style=&quot;color:red;&quot;&gt;Warning:&lt;/span&gt;&lt;br&gt;You can download data file only once between simulations.&lt;br&gt;Data files could be used for building statistics, do not delete them.&lt;br&gt;If you want to download your data, type your soccerproject.com login details.&lt;br&gt;Bugs or feature requests on: http://flyspray.johniez.com/proj2</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../configtab.cc" line="62"/>
+        <source>Lithuanian</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>LoadTab</name>
+    <message>
+        <location filename="../loadtab.cc" line="69"/>
+        <source>Loaded file: </source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="../mainwindow.cc" line="20"/>
+        <source>Config</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="21"/>
+        <source>Players</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="23"/>
+        <source>Staff</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="24"/>
+        <source>Stadium</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="25"/>
+        <source>Club</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="26"/>
+        <source>Load</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="27"/>
+        <source>About</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../mainwindow.cc" line="22"/>
+        <source>Performance</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>PerformanceTab</name>
+    <message>
+        <location filename="../performance.cc" line="28"/>
+        <source>aggression </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="35"/>
+        <source>play home</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="36"/>
+        <source>play away</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="73"/>
+        <source>count team performance</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>Results could be inaccurate!</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="287"/>
+        <source>Choose a formation</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Long Ball</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Without tactics</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Kick and rush</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Passing</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="292"/>
+        <source>Defensive wall</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>Set formation, aggression and players.&lt;br&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="212"/>
+        <source>offensive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="226"/>
+        <source>defensive</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="76"/>
+        <source>This version do not penalize players at wrong position!&lt;br&gt;See http://flyspray.johniez.com/task/14</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="21"/>
+        <source>Team formation.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="23"/>
+        <source>reorder players</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="24"/>
+        <source>This button set on positions with wrong player type this player, who plays there (LM on LM post..).</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="31"/>
+        <source>Team aggression, same as you set in match.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="37"/>
+        <source>Where you will play the match.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="43"/>
+        <source>&apos;Ind. order&apos; mean one of: Normal, Play along, Play along wing, Play it out, Passing, Own chance, Targetman and Free role.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../performance.cc" line="239"/>
+        <source>ind. order</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>PlayerDetail</name>
+    <message>
+        <location filename="../playerdetail.cc" line="13"/>
+        <source>Position</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="14"/>
+        <source>Rating</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="15"/>
+        <source>Moral</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="16"/>
+        <source>Aggresion</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="17"/>
+        <source>Fitness</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="18"/>
+        <source>Experience</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="19"/>
+        <source>Stamina</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="20"/>
+        <source>Best rate</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="21"/>
+        <source>Form</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="23"/>
+        <source>Speed</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="24"/>
+        <source>Ball controll</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="26"/>
+        <source>Courage</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="27"/>
+        <source>Flexibility</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="28"/>
+        <source>Jumping</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="29"/>
+        <source>Goalkicks</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="75"/>
+        <source>Play along</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="31"/>
+        <source>Reflex</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="107"/>
+        <source>Passing</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="52"/>
+        <source>Shooting</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="91"/>
+        <source>Play it out</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="50"/>
+        <source>Strength</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="51"/>
+        <source>Heading</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="48"/>
+        <source>Tackling</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="45"/>
+        <source>Playmaking</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="49"/>
+        <source>Insight</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="56"/>
+        <source>Estimated Hidden</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="123"/>
+        <source>Order</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="97"/>
+        <source>Play along wing</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="113"/>
+        <source>Own chance</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="118"/>
+        <source>Targetman</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="123"/>
+        <source>Free role</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="59"/>
+        <source>Rating with 100% morale</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="63"/>
+        <source>Rating with 100% experience and morale</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="66"/>
+        <source>Rating with 100% experience</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="69"/>
+        <source>Normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../playerdetail.cc" line="126"/>
+        <source>&lt;br&gt;How much points of performance orders add,&lt;br&gt;or remove if result is negative.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>ProxySet</name>
+    <message>
+        <location filename="../proxyset.cc" line="18"/>
+        <source>Use proxy server</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="21"/>
+        <source>proxy address:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="22"/>
+        <source>proxy port:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="23"/>
+        <source>proxy username:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="24"/>
+        <source>proxy password:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../proxyset.cc" line="30"/>
+        <source>Save changes</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>StadiumTab</name>
+    <message>
+        <location filename="../stadiumtab.cc" line="24"/>
+        <source>Stadium</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="25"/>
+        <source>Field condition</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="27"/>
+        <source>Fan base</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="28"/>
+        <source>satisfaction</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="29"/>
+        <source>Capacity</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="31"/>
+        <source>Parking</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="37"/>
+        <source>minimal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="38"/>
+        <source>unhappy!!</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="51"/>
+        <source>Toilets</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="54"/>
+        <source>Buffets</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="41"/>
+        <source>Price league</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="44"/>
+        <source>attendance gives cca. </source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="42"/>
+        <source>Price cup</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="43"/>
+        <source>Price friendly</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="44"/>
+        <source>Price friendly cup</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="46"/>
+        <source>Increasing 1000 places on stadium (calculations)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="54"/>
+        <source>You need</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../stadiumtab.cc" line="48"/>
+        <source>Parking places</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>StaffMember</name>
+    <message>
+        <location filename="../staffmember.cc" line="13"/>
+        <source>Role</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="15"/>
+        <source>Trainer</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="16"/>
+        <source>Scout</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="17"/>
+        <source>Doctor</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="18"/>
+        <source>Groundkeeper</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="19"/>
+        <source>Assistent</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="20"/>
+        <source>Physiotherapy</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="21"/>
+        <source>Youth manager</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="25"/>
+        <source>Wage</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>Contract</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="26"/>
+        <source>days left</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="28"/>
+        <source>Course</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../staffmember.cc" line="29"/>
+        <source>Rating</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
diff --git a/loadtab.cc b/loadtab.cc
new file mode 100644 (file)
index 0000000..62fdc47
--- /dev/null
@@ -0,0 +1,77 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "loadtab.h"
+
+LoadTab::LoadTab(QWidget * parent) : QWidget(parent) {
+       init();
+}
+
+LoadTab::~LoadTab() {
+       delete label;
+       delete older;
+       delete mainLayout;
+}
+
+void LoadTab::init() {
+       QSettings settings("config/global.ini", QSettings::IniFormat);
+       QString num = settings.value("nextXmlId", "0").toString();
+       
+       QDate initDay(2004, 7, 5);
+       
+       older = new QComboBox();
+       
+       int j = 0;
+       for(int i=num.toInt()-1; i>=0; i--) {
+               quickparse("data/data_"+QString().setNum(i)+".xml");
+               if(globSlot) {
+                       dataParsed[j][0] = globSlot;
+                       dataParsed[j][1] = curSlot;
+                       dataParsed[j][2] = curSeason;
+                       dataParsed[j][3] = i;
+               }
+               QDate cDate = initDay.addDays((dataParsed[j][0]-1)/5);
+               QString time;
+               switch((dataParsed[j][0]-1)%5) {
+                       case 0: time = " 4:00-10:00"; break;
+                       case 1: time = " 10:00-14:00"; break;
+                       case 2: time = " 14:00-18:00"; break;
+                       case 3: time = " 18:00-22:00"; break;
+                       case 4: time = " 22:00-4:00"; break;
+               }
+               older->addItem("S:" + QString().setNum(dataParsed[j][2]) + " - " + cDate.toString("d.M.yyyy") + time, "");
+               j++;
+               if(j>=20) break;
+       }
+       
+       mainLayout = new QVBoxLayout;
+       QString text;
+       
+       label = new QLabel(text);
+       mainLayout->addWidget(older);
+       mainLayout->addWidget(label);
+       setLayout(mainLayout);
+       connect(older, SIGNAL(currentIndexChanged(int)), this, SLOT(indexChanged(int)));
+}
+
+void LoadTab::dataChanged() {
+       rebuildUI();
+}
+
+void LoadTab::indexChanged(int i) {
+       int fileNum = dataParsed[i][3];
+       parse("data/data_" + QString().setNum(fileNum) + ".xml");
+       emit loaded();
+       label->clear();
+       label->setText(tr("Loaded file: ") + "data_" + QString().setNum(fileNum) + ".xml");
+}
+
+void LoadTab::rebuildUI() {
+       delete older;
+       delete label;
+       delete mainLayout;
+       init();
+}
diff --git a/loadtab.h b/loadtab.h
new file mode 100644 (file)
index 0000000..d72debf
--- /dev/null
+++ b/loadtab.h
@@ -0,0 +1,45 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef LOADOLD__H__
+#define LOADOLD__H__
+
+#include <QWidget>
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QLabel>
+#include <QSettings>
+#include <QComboBox>
+#include <QDate>
+
+extern int dataParsed[20][4];  // glob slot || slot || seazon || data #
+extern int globSlot;
+extern int curSlot;
+extern int curSeason;
+
+extern void parse(const QString &);
+extern void quickparse(const QString &);
+
+class LoadTab: public QWidget {
+       Q_OBJECT
+       QVBoxLayout *mainLayout;
+       QLabel *label;
+       QComboBox *older;
+public:
+       LoadTab(QWidget *parent = 0);
+       ~LoadTab();
+       
+       void rebuildUI();
+private:
+       void init();
+public slots:
+       void dataChanged();
+       void indexChanged(int i);
+signals:
+       void loaded();
+};
+
+#endif
diff --git a/main.cc b/main.cc
new file mode 100644 (file)
index 0000000..f112a34
--- /dev/null
+++ b/main.cc
@@ -0,0 +1,790 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "main.h"
+
+void parse(const QString &data);
+
+int playerCnt;
+Player pls[45];
+int staffCnt;
+StaffMemberStruct staff[7];
+StadiumStruct stadium;
+ClubStruct club;
+int dataParsed[20][4];
+int globSlot, curSlot, curSeason;
+
+void parse(const QString &data) {
+       QDomDocument doc("spdt");
+       QFile file( data );
+       file.open( QIODevice::ReadOnly );
+       doc.setContent( &file );
+       file.close();
+       
+       playerCnt = 0;
+       staffCnt = 0;
+       
+       QDomElement root = doc.documentElement();
+       if( root.tagName() == "SoccerProject" ) {
+               QDomNode n = root.firstChild();
+               
+               while( !n.isNull() ) {
+                       QDomElement e = n.toElement();
+                       if( !e.isNull() ) {
+                               if( e.tagName() == "GlobalInfo" ) {
+                                       QDomNode ID = e.firstChild();
+                                       while( !ID.isNull() ) {
+                                               QDomElement IDD = ID.toElement();
+                                               if(IDD.tagName() == "cur_globalslot" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       globSlot = pl.text().toInt();
+                                               }
+                                               if(IDD.tagName() == "cur_slot" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       curSlot = pl.text().toInt();
+                                               }
+                                               if(IDD.tagName() == "cur_season" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       curSeason = pl.text().toInt();
+                                               }
+                                               ID = ID.nextSibling();
+                                       }
+                               }
+                               if( e.tagName() == "Club" ) {
+                                       QDomNode ID = e.firstChild();
+                                       while( !ID.isNull() ) {
+                                               QDomElement IDD = ID.toElement();
+                                               if(IDD.tagName() == "name" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.name = pl.text();
+                                               }
+                                               if(IDD.tagName() == "budg" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.budget = pl.text();
+                                               }
+                                               if(IDD.tagName() == "rat" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.rat = pl.text();
+                                               }
+                                               if(IDD.tagName() == "incup" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.incup = pl.text().toInt();
+                                               }
+                                               if(IDD.tagName() == "fndd" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.fndd = pl.text();
+                                               }
+                                               if(IDD.tagName() == "spirit" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.spirit = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curpos" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curpos = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curdiv" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curdiv = pl.text();
+                                               }
+                                               if(IDD.tagName() == "totgmade" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.totgmade = pl.text();
+                                               }
+                                               if(IDD.tagName() == "totgrecv" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.totgrecv = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curgmade" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curgmade = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curgrecv" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curgrecv = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curlgmade" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curlgmade = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curlgrecv" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curlgrecv = pl.text();
+                                               }
+                                               if(IDD.tagName() == "tothgames" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.tothgames = pl.text();
+                                               }
+                                               if(IDD.tagName() == "totwins" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.totwins = pl.text();
+                                               }
+                                               if(IDD.tagName() == "totdraws" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.totdraws = pl.text();
+                                               }
+                                               if(IDD.tagName() == "totlosts" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.totlosts = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curhgames" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curhgames = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curwins" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curwins = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curdraws" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curdraws = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curlosts" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curlosts = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curlwins" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curlwins = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curldraws" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curldraws = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curllosts" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curllosts = pl.text();
+                                               }
+                                               if(IDD.tagName() == "totmaxatt" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.totmaxatt = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curmaxatt" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curmaxatt = pl.text();
+                                               }
+                                               if(IDD.tagName() == "totavgatt" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.totavgatt = pl.text();
+                                               }
+                                               if(IDD.tagName() == "curavgatt" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.curavgatt = pl.text();
+                                               }
+                                               if(IDD.tagName() == "form" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.form = pl.text();
+                                               }
+                                               if(IDD.tagName() == "for_a" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.for_a = pl.text();
+                                               }
+                                               if(IDD.tagName() == "tactic_a" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.tactic_a = pl.text();
+                                               }
+                                               if(IDD.tagName() == "attstyle_a" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.attstyle_a = pl.text();
+                                               }
+                                               if(IDD.tagName() == "agr_a" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.agr_a = pl.text();
+                                               }
+                                               if(IDD.tagName() == "cap_a" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       club.cap_a = pl.text();
+                                               }
+                                               ID = ID.nextSibling();
+                                       }
+                               }
+                               if( e.tagName() == "Stadium" ) {
+                                       QDomNode ID = e.firstChild();
+                                       while( !ID.isNull() ) {
+                                               QDomElement IDD = ID.toElement();
+                                               if(IDD.tagName() == "stadiumID" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.id = pl.text();
+                                               }
+                                               if(IDD.tagName() == "name" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.name = pl.text();
+                                               }
+                                               if(IDD.tagName() == "field_status" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.field_status = pl.text();
+                                               }
+                                               if(IDD.tagName() == "price_league" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.priceLeague = pl.text();
+                                               }
+                                               if(IDD.tagName() == "price_cup" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.priceCup = pl.text();
+                                               }
+                                               if(IDD.tagName() == "price_friendly" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.priceFriendly = pl.text();
+                                               }
+                                               if(IDD.tagName() == "price_friendlycup" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.priceFriendlyCup = pl.text();
+                                               }
+                                               if(IDD.tagName() == "fanpot" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.fans = pl.text();
+                                               }
+                                               if(IDD.tagName() == "fansatis" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.fanSatis = pl.text();
+                                               }
+                                               if(IDD.tagName() == "cap_n" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.cap_n = pl.text();
+                                               }
+                                               if(IDD.tagName() == "cap_e" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.cap_e = pl.text();
+                                               }
+                                               if(IDD.tagName() == "cap_w" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.cap_w = pl.text();
+                                               }
+                                               if(IDD.tagName() == "cap_s" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.cap_s = pl.text();
+                                               }
+                                               if(IDD.tagName() == "lights_ne" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.lights_ne = pl.text();
+                                               }
+                                               if(IDD.tagName() == "lights_se" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.lights_se = pl.text();
+                                               }
+                                               if(IDD.tagName() == "lights_nw" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.lights_nw = pl.text();
+                                               }
+                                               if(IDD.tagName() == "lights_sw" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.lights_sw = pl.text();
+                                               }
+                                               if(IDD.tagName() == "sb1" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.sb1 = pl.text();
+                                               }
+                                               if(IDD.tagName() == "sb2" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.sb2 = pl.text();
+                                               }
+                                               if(IDD.tagName() == "field" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.field = pl.text();
+                                               }
+                                               if(IDD.tagName() == "parking" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.parking = pl.text();
+                                               }
+                                               if(IDD.tagName() == "wc" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.wc = pl.text();
+                                               }
+                                               if(IDD.tagName() == "kantine" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.bar = pl.text();
+                                               }
+                                               if(IDD.tagName() == "youth_centre" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.youth_center = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_n" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_n = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_e" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_e = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_w" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_w = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_sn" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_s = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_lights_ne" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_lights_ne = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_lights_se" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_lights_se = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_lights_nw" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_lights_nw = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_lights_sw" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_lights_sw = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_sb1" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_sb1 = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_sb2" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_sb2 = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_bar" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_bar = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_wc" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_wc = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_park" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_park = pl.text();
+                                               }
+                                               if(IDD.tagName() == "ds_field" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.ds_field = pl.text();
+                                               }
+                                               if(IDD.tagName() == "park_fu" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.park_fu = pl.text().toInt();
+                                               }
+                                               if(IDD.tagName() == "wc_fu" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.wc_fu = pl.text().toInt();
+                                               }
+                                               if(IDD.tagName() == "bar_fu" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.bar_fu = pl.text().toInt();
+                                               }
+                                               if(IDD.tagName() == "sb_fu" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.sb_fu = pl.text().toInt();
+                                               }
+                                               if(IDD.tagName() == "lights_fu" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       stadium.lights_fu = pl.text().toInt();
+                                               }
+                                               ID = ID.nextSibling();
+                                       }
+                               }
+                               if( e.tagName() == "StaffMembers" ) {
+                                       QDomNode p = e.firstChild();
+                                       int curStaff = 0;
+                                       while( !p.isNull() ) {
+                                               QDomElement pp = p.toElement();
+                                               if( pp.tagName() == "Staff" ) {
+                                                       QDomNode ID = pp.firstChild();
+                                                       while( !ID.isNull() ) {
+                                                               QDomElement IDD = ID.toElement();
+                                                               if(IDD.tagName() == "staffID" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       staff[curStaff].id = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "role" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       staff[curStaff].role = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "name" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       staff[curStaff].name = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "wage" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       staff[curStaff].wage = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "contr" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       staff[curStaff].contr = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "age" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       staff[curStaff].age = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "bd" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       staff[curStaff].birth = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "inservice" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       staff[curStaff].inservice = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "course_slot" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       staff[curStaff].course = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "rat" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       staff[curStaff].rating = pl.text();
+                                                               }
+                                                               ID = ID.nextSibling();
+                                                       }
+                                               }
+                                               p = p.nextSibling();
+                                               curStaff++;
+                                               staffCnt++;
+                                       }
+                               }
+                               if( e.tagName() == "Players" ) {
+                                       QDomNode p = e.firstChild();
+                                       int curPlayer = 0;
+                                       while( !p.isNull() ) {
+                                               QDomElement pp = p.toElement();
+                                               if( pp.tagName() == "Player" ) {
+                                                       QDomNode ID = pp.firstChild();
+                                                       while( !ID.isNull() ) {
+                                                               QDomElement IDD = ID.toElement();
+                                                               if(IDD.tagName() == "id" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].id = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "fn" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].fname = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "ln" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].lname = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "pos" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       switch(pl.text().toInt()) {
+                                                                               case 0: pls[curPlayer].position = "GK"; break;
+                                                                               case 1: pls[curPlayer].position = "LB"; break;
+                                                                               case 2: pls[curPlayer].position = "CB"; break;
+                                                                               case 3: pls[curPlayer].position = "SW"; break;
+                                                                               case 4: pls[curPlayer].position = "RB"; break;
+                                                                               case 5: pls[curPlayer].position = "LM"; break;
+                                                                               case 6: pls[curPlayer].position = "CM"; break;
+                                                                               case 7: pls[curPlayer].position = "RM"; break;
+                                                                               case 8: pls[curPlayer].position = "LF"; break;
+                                                                               case 9: pls[curPlayer].position = "CF"; break;
+                                                                               case 10: pls[curPlayer].position = "RF"; break;
+                                                                               case 11: pls[curPlayer].position = "SB1"; break;
+                                                                               case 12: pls[curPlayer].position = "SB2"; break;
+                                                                               case 13: pls[curPlayer].position = "SB3"; break;
+                                                                               case 14: pls[curPlayer].position = "SB4"; break;
+                                                                               case 15: pls[curPlayer].position = "SB5"; break;
+                                                                               case 16: pls[curPlayer].position = "--"; break;
+                                                                       }
+                                                               }
+                                                               if(IDD.tagName() == "rat" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].rating = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "mor" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].morale = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "agr" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].aggresion = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "fit" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].fitness = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "exp" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].experience = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "con" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].condition = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "sp" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].speed = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "bc" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].ballCntrl = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "sk1" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].skill[0] = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "sk2" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].skill[1] = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "sk3" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].skill[2] = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "sk4" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].skill[3] = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "ssk1" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].specSkill[0] = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "ssk2" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].specSkill[1] = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "nr" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].number = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "bd" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].birth = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "age" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].age = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "h" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].height = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "w" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].weight = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "f" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].foot = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "injured" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].injured = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "injury" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].injury = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "l_sus" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].leagueSusp = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_sus" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].cupSusp = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "contr" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].contract = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "wage" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].wage = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "house" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].house = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "car" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].car = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "s_bonus" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].signBonus = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "w_bonus" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].winBonus = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_games" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].totalGames = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_g_l" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].leagueGoals = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_g_c" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].cupGoals = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_y_l" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].leagueCardsY = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_y_c" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].cupCardsY = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_r_l" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].leagueCardsR = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_r_c" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].cupCardsR = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_g_f" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].friendlyGoals = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_y_f" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].friendlyCardsY = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_r_f" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].friendlyCardsR = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "t_bles" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].totalInjuries = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_games" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curGames = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_g_l" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curLeagueGoals = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_g_c" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curCupGoals = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_y_l" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curLeagueCardsY = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_y_c" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curCupCardsY = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_r_l" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curLeagueCardsR = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_r_c" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curCupCardsR = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_g_f" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curFriendlyGoals = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_y_f" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curFriendlyCardsY = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_r_f" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curFriendlyCardsR = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "c_inj" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].curInjuries = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "b_rat" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].bestRate = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "form" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].form = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "nick" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].nick = pl.text();
+                                                               }
+                                                               if(IDD.tagName() == "ctr" ) {
+                                                                       QDomElement pl = IDD.toElement();
+                                                                       pls[curPlayer].country = pl.text();
+                                                               }
+                                                               ID = ID.nextSibling();
+                                                       }
+                                               }
+                                               p = p.nextSibling();
+                                               curPlayer++;
+                                               playerCnt++;
+                                       }
+                               }
+                       }
+                       n = n.nextSibling();
+               }
+       }
+}
+
+void quickparse(const QString &data) {
+       QDomDocument doc("spdt");
+       QFile file( data );
+       file.open( QIODevice::ReadOnly );
+       doc.setContent( &file );
+       file.close();
+               
+       QDomElement root = doc.documentElement();
+       if( root.tagName() == "SoccerProject" ) {
+               QDomNode n = root.firstChild();
+               
+               while( !n.isNull() ) {
+                       QDomElement e = n.toElement();
+                       if( !e.isNull() ) {
+                               if( e.tagName() == "GlobalInfo" ) {
+                                       QDomNode ID = e.firstChild();
+                                       while( !ID.isNull() ) {
+                                               QDomElement IDD = ID.toElement();
+                                               if(IDD.tagName() == "cur_globalslot" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       globSlot = pl.text().toInt();
+                                               } else if(IDD.tagName() == "cur_slot" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       curSlot = pl.text().toInt();
+                                               } else if(IDD.tagName() == "cur_season" ) {
+                                                       QDomElement pl = IDD.toElement();
+                                                       curSeason = pl.text().toInt();
+                                               }
+                                               ID = ID.nextSibling();
+                                       }
+                               }
+                       }
+                       n = n.nextSibling();
+               }
+       }
+}
+
+int main(int argc, char **argv) {
+       QSettings settings("config/global.ini", QSettings::IniFormat);
+       QString lang = settings.value("lang", "en").toString();
+       
+       QApplication app(argc, argv);
+       QPixmap pixmap(453,300);
+       QByteArray bArray;
+       QFile PixmapFile("./img/splash.jpg");
+       if(!PixmapFile.open(QIODevice::ReadOnly))
+       {
+               qDebug("Error loading Pixmap");
+               return false;
+       }
+
+       bArray=PixmapFile.readAll().toBase64();
+
+       if(!pixmap.loadFromData( bArray.fromBase64(bArray)))
+       {
+               qDebug()<<"Error pixmap processing";
+               return 0;
+       }
+
+       QSplashScreen splash(pixmap);
+       splash.show();
+       splash.showMessage("[0.2.7]     please wait parsing data files..", Qt::AlignBottom | Qt::AlignCenter, Qt::white);
+       QTranslator translator;
+       translator.load("lang/tran_"+lang);
+       app.installTranslator(&translator);
+       MainWindow win;
+       win.show();
+       splash.finish(&win);
+       return app.exec();
+}
+
diff --git a/main.h b/main.h
new file mode 100755 (executable)
index 0000000..e9db62b
--- /dev/null
+++ b/main.h
@@ -0,0 +1,17 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef MAIN__H__
+#define MAIN__H__
+
+#include <QApplication>
+#include <QDomElement>
+#include <QTranslator>
+#include <QSplashScreen>
+#include <QPixmap>
+#include "mainwindow.h"
+
+#endif
diff --git a/mainwindow.cc b/mainwindow.cc
new file mode 100644 (file)
index 0000000..ad44c8d
--- /dev/null
@@ -0,0 +1,56 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow(QWidget * parent) : QWidget(parent) {
+       tabWidget = new QTabWidget;
+       conf = new ConfigTab(this);
+       player = new PlayerTab(this);
+       perform = new PerformanceTab(this);
+       staff = new StaffTab(this);
+       stadium = new StadiumTab(this);
+       club = new ClubTab(this);
+       load = new LoadTab(this);
+       about = new AboutTab(this);
+       
+       tabWidget->addTab(conf, tr("Config"));
+       tabWidget->addTab(player, tr("Players"));
+       tabWidget->addTab(perform, tr("Performance"));
+       tabWidget->addTab(staff, tr("Staff"));
+       tabWidget->addTab(stadium, tr("Stadium"));
+       tabWidget->addTab(club, tr("Club"));
+       tabWidget->addTab(load, tr("Load"));
+       tabWidget->addTab(about, tr("About"));
+       connect(conf, SIGNAL(dataLoaded()), player, SLOT(dataChanged()));
+       connect(conf, SIGNAL(dataLoaded()), staff, SLOT(dataChanged()));
+       connect(conf, SIGNAL(dataLoaded()), stadium, SLOT(dataChanged()));
+       connect(conf, SIGNAL(dataLoaded()), club, SLOT(dataChanged()));
+       connect(conf, SIGNAL(dataLoaded()), perform, SLOT(dataChanged()));
+       
+       connect(load, SIGNAL(loaded()), player, SLOT(dataChanged()));
+       connect(load, SIGNAL(loaded()), staff, SLOT(dataChanged()));
+       connect(load, SIGNAL(loaded()), stadium, SLOT(dataChanged()));
+       connect(load, SIGNAL(loaded()), club, SLOT(dataChanged()));
+       connect(load, SIGNAL(loaded()), perform, SLOT(dataChanged()));
+       
+       mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(tabWidget);
+       setLayout(mainLayout);
+}
+
+MainWindow::~MainWindow() {
+       delete conf;
+       delete player;
+       delete perform;
+       delete staff;
+       delete stadium;
+       delete club;
+       delete load;
+       delete about;
+       delete tabWidget;
+       delete mainLayout;
+}
diff --git a/mainwindow.h b/mainwindow.h
new file mode 100644 (file)
index 0000000..df0a47f
--- /dev/null
@@ -0,0 +1,40 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef MAINWINDOW__H__
+#define MAINWINDOW__H__
+
+#include <QWidget>
+#include <QTabWidget>
+#include <QVBoxLayout>
+#include "configtab.h"
+#include "playertab.h"
+#include "stafftab.h"
+#include "stadiumtab.h"
+#include "clubtab.h"
+#include "loadtab.h"
+#include "abouttab.h"
+#include "performance.h"
+
+class MainWindow: public QWidget {
+       Q_OBJECT
+       QVBoxLayout *mainLayout;
+       QTabWidget *tabWidget;
+       QWidget *conf;
+       QWidget *player;
+       QWidget *perform;
+       QWidget *staff;
+       QWidget *stadium;
+       QWidget *club;
+       QWidget *load;
+       QWidget *about;
+public:
+       MainWindow(QWidget *parent = 0);
+       ~MainWindow();
+};
+
+
+#endif
diff --git a/performance.cc b/performance.cc
new file mode 100644 (file)
index 0000000..9da30aa
--- /dev/null
@@ -0,0 +1,412 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "performance.h"
+
+void PerformanceTab::init() {
+       QSettings settings("config/formation.ini", QSettings::IniFormat);
+       
+       format = new QComboBox();
+       format->addItem("---", QVariant(0));
+       format->addItem("5-4-1", QVariant(1));
+       format->addItem("5-3-2", QVariant(2));
+       format->addItem("4-3-3", QVariant(3));
+       format->addItem("4-4-2", QVariant(4));
+       format->addItem("4-5-1", QVariant(5));
+       format->addItem("3-4-3", QVariant(6));
+       format->addItem("3-5-2", QVariant(7));
+       format->setToolTip(tr("Team formation."));
+       
+       reorderPl = new QPushButton(tr("reorder players"));
+       reorderPl->setToolTip(tr("This button set on positions with wrong player type this player, who plays there (LM on LM post..)."));
+       
+       aggression = new QComboBox();
+       for(int i=0; i<=100; i+=5) {
+               aggression->addItem(tr("aggression ") + QString().setNum(i) + "%", i);
+       }
+       aggression->setCurrentIndex(settings.value("aggr", 0).toInt()/5);
+       aggression->setToolTip(tr("Team aggression, same as you set in match."));
+       aggress = settings.value("aggr", 0).toInt();
+       
+       home = new QComboBox();
+       home->addItem(tr("play home"), 0.0);
+       home->addItem(tr("play away"), 0.1);
+       home->setToolTip(tr("Where you will play the match."));
+       
+       for(int j=0; j<11; ++j) {
+               plCont[j] = new QHBoxLayout();
+               player[j] = new QComboBox();
+               orders[j] = new QComboBox();
+               orders[j]->setToolTip(tr("'Ind. order' mean one of: Normal, Play along, Play along wing, Play it out, Passing, Own chance, Targetman and Free role."));
+               orders[j]->addItem(tr("ind. order"), 0);
+               for(int i=0; i<playerCnt; ++i) {
+                       int oldPenale = 0;
+                       int age = pls[i].age.toInt();
+                       double perf = ((pls[i].morale.toDouble()+pls[i].fitness.toDouble())/200)*pls[i].bestRate.toDouble();
+                       if(age > 30) {
+                               oldPenale = (age-30)*3;         // 3 points penale per each year over 30
+                               perf -= oldPenale;
+                       }
+                       player[j]->addItem("[" + pls[i].position + "] " + pls[i].fname + " " + pls[i].lname, QVariant(perf));
+               }
+               player[j]->setCurrentIndex(settings.value("Player/"+QString().setNum(j), 0).toInt());
+               postLabel[j] = new QLabel("pos");
+               plPerfLabel[j] = new QLabel(QString().setNum(player[j]->itemData(player[j]->currentIndex()).toDouble(), 'f', 2));
+               plCont[j]->addWidget(postLabel[j]);
+               plCont[j]->addWidget(player[j]);
+               plCont[j]->addWidget(orders[j]);
+               plCont[j]->addWidget(plPerfLabel[j]);
+       }
+       
+       container = new QHBoxLayout();
+       
+       container->addWidget(format);
+       container->addWidget(reorderPl);
+       container->addWidget(aggression);
+       container->addWidget(home);
+       mainLayout->addLayout(container);
+       for(int j=0; j<11; ++j) mainLayout->addLayout(plCont[j]);
+       
+       cButt = new QPushButton(tr("count team performance"));
+       mainLayout->addWidget(cButt);
+       
+       result = new QLabel(tr("Set formation, aggression and players.<br>") + "<span style=\"color:red\">" + tr("Results could be inaccurate!") + "</span><br>" + tr("This version do not penalize players at wrong position!<br>See http://flyspray.johniez.com/task/14"));
+       mainLayout->addWidget(result);
+       
+       format->setCurrentIndex(settings.value("form", 0).toInt());
+       formatChange(settings.value("form", 0).toInt());
+       
+       connect(format, SIGNAL(currentIndexChanged(int)), this, SLOT(formatChange(int)));
+       connect(aggression, SIGNAL(currentIndexChanged(int)), this, SLOT(aggressChange(int)));
+       connect(cButt, SIGNAL(clicked()), this, SLOT(recount()));
+       for(int i=0; i<11; i++) {
+               connect(player[i], SIGNAL(currentIndexChanged(int)), this, SLOT(playerChange(int)));
+       }
+       connect(reorderPl, SIGNAL(clicked()), this, SLOT(reorderPlayers()));
+       mainLayout->update();
+}
+
+PerformanceTab::PerformanceTab(QWidget *parent): QWidget(parent), defs(0), mids(0), fors(0) {
+       mainLayout = new QVBoxLayout;
+       setLayout(mainLayout);
+       init();
+}
+
+PerformanceTab::~PerformanceTab() {
+       for(int i=0; i<11; ++i) {
+               delete player[i];
+               delete postLabel[i];
+               delete plPerfLabel[i];
+               delete orders[i];
+               delete plCont[i];
+       }
+       delete format;
+       delete aggression;
+       delete home;
+       delete result;
+       delete cButt;
+       delete container;
+       delete reorderPl;
+       delete mainLayout;
+}
+
+void PerformanceTab::dataChanged() {
+       container->removeWidget(format);
+       delete format;
+       container->removeWidget(aggression);
+       delete aggression;
+       container->removeWidget(home);
+       delete home;
+       container->removeWidget(reorderPl);
+       delete reorderPl;
+       mainLayout->removeWidget(reinterpret_cast<QWidget*>(container));
+       delete container;
+       
+       for(int i=0; i<11; ++i) {
+               mainLayout->removeWidget(reinterpret_cast<QWidget*>(plCont[i]));
+               delete plCont[i];
+               delete player[i];
+               delete plPerfLabel[i];
+               delete postLabel[i];
+               delete orders[i];
+       }
+       mainLayout->removeWidget(cButt);
+       delete cButt;
+       mainLayout->removeWidget(result);
+       delete result;
+       mainLayout->update();
+       init();
+}
+
+void PerformanceTab::postLabels() {
+       int LMpos = 0;
+       if(!defsC) {
+               for(int i=0; i<11; ++i) {
+                       postLabel[i]->setText("??");
+               }
+       }
+       postLabel[0]->setText("GK");
+       postLabel[1]->setText("LB");
+       orders[1]->clear();
+       orders[1]->addItem(tr("ind. order"), 0);
+       orders[1]->addItem(tr("offensive"), 2);
+       postLabel[2]->setText("CB");
+       switch(defsC) {
+               case 5:
+                       postLabel[3]->setText("SW");
+                       orders[3]->clear();
+                       orders[3]->addItem(tr("ind. order"), 0);
+                       postLabel[4]->setText("CB");
+                       orders[4]->clear();
+                       orders[4]->addItem(tr("ind. order"), 0);
+                       postLabel[5]->setText("RB");
+                       orders[5]->clear();
+                       orders[5]->addItem(tr("ind. order"), 0);
+                       orders[5]->addItem(tr("offensive"), 2);
+                       LMpos = 6;
+                       break;
+               case 4:
+                       postLabel[3]->setText("CB");
+                       orders[3]->clear();
+                       orders[3]->addItem(tr("ind. order"), 0);
+                       postLabel[4]->setText("RB");
+                       orders[4]->clear();
+                       orders[4]->addItem(tr("ind. order"), 0);
+                       orders[4]->addItem(tr("offensive"), 2);
+                       LMpos = 5;
+                       break;
+               case 3:
+                       postLabel[3]->setText("RB");
+                       orders[3]->clear();
+                       orders[3]->addItem(tr("ind. order"), 0);
+                       orders[3]->addItem(tr("offensive"), 2);
+                       LMpos = 4;
+                       break;
+       }
+       switch(midsC) {
+               case 5:
+                       postLabel[LMpos]->setText("LM");
+                       postLabel[LMpos+1]->setText("CM");
+                       postLabel[LMpos+2]->setText("CM");
+                       postLabel[LMpos+3]->setText("CM");
+                       postLabel[LMpos+4]->setText("RM");
+                       break;
+               case 4:
+                       postLabel[LMpos]->setText("LM");
+                       postLabel[LMpos+1]->setText("CM");
+                       postLabel[LMpos+2]->setText("CM");
+                       postLabel[LMpos+3]->setText("RM");
+                       break;
+               case 3:
+                       postLabel[LMpos]->setText("LM");
+                       postLabel[LMpos+1]->setText("CM");
+                       postLabel[LMpos+2]->setText("RM");
+       }
+       for(int i=LMpos; i<LMpos+midsC; ++i) {
+               orders[i]->clear();
+               orders[i]->addItem(tr("ind. order"), 0);
+               orders[i]->addItem(tr("defensive"), 1);
+               orders[i]->addItem(tr("offensive"), 2);
+       }
+       switch(forsC) {
+               case 3:
+                       postLabel[8]->setText("LF");
+                       orders[8]->clear();
+                       orders[8]->addItem(tr("ind. order"), 0);
+                       orders[8]->addItem(tr("defensive"), 1);
+                       postLabel[9]->setText("CF");
+                       orders[9]->clear();
+                       orders[9]->addItem(tr("ind. order"), 0);
+                       postLabel[10]->setText("RF");
+                       orders[10]->clear();
+                       orders[10]->addItem(tr("ind. order"), 0);
+                       orders[10]->addItem(tr("defensive"), 1);
+                       break;
+               case 2:
+                       postLabel[9]->setText("CF");
+                       orders[9]->clear();
+                       orders[9]->addItem(tr("ind. order"), 0);
+                       postLabel[10]->setText("CF");
+                       orders[10]->clear();
+                       orders[10]->addItem(tr("ind. order"), 0);
+                       break;
+               case 1:
+                       postLabel[10]->setText("CF");
+                       orders[10]->clear();
+                       orders[10]->addItem(tr("ind. order"), 0);
+                       break;
+       }
+}
+
+void PerformanceTab::countPerf() {
+       defs = 0;
+       mids = 0;
+       fors = 0;
+       double perf;
+       for(int i=0; i<=defsC; ++i) {
+               perf = player[i]->itemData(player[i]->currentIndex()).toDouble();
+               if(orders[i]->itemData(orders[i]->currentIndex()).toInt()==0) {
+                       defs += perf;
+               } else {
+                       defs += (0.78 * perf);
+                       mids += (0.22 * perf);
+               }
+       }
+       for(int i=defsC+1; i<=defsC+midsC; ++i) {
+               perf = player[i]->itemData(player[i]->currentIndex()).toDouble();
+               if(orders[i]->itemData(orders[i]->currentIndex()).toInt()==0) {
+                       mids += perf;
+               } else if(orders[i]->itemData(orders[i]->currentIndex()).toInt()==1) {
+                       defs += (0.22 * perf);
+                       mids += (0.78 * perf);
+               } else {
+                       fors += (0.22 * perf);
+                       mids += (0.78 * perf);
+               }
+       }
+       for(int i=defsC+midsC+1; i<11; ++i) {
+               perf = player[i]->itemData(player[i]->currentIndex()).toDouble();
+               if(orders[i]->itemData(orders[i]->currentIndex()).toInt()==0) {
+                       fors += perf;
+               } else {
+                       fors += (0.78 * perf);
+                       mids += (0.22 * perf);
+               }
+       }
+}
+
+void PerformanceTab::recount() {
+       double homeMod = home->itemData(home->currentIndex()).toDouble();
+       double pre = (1.0+((double)aggress/1000))/(7.0 - (club.spirit.toDouble()/1000) + homeMod);
+
+       countPerf();
+       QString text;
+       if(!defsC) text = tr("Choose a formation");
+       else {
+               double O = pre*defs;
+               double M = pre*mids;
+               double F = pre*fors;
+               text = "<table cellpadding=\"1\" width=\"100%\"><tr><td>----</td><td style=\"color:blue;\"  align=\"right\">"+tr("Long Ball")+"</td><td align=\"right\">"+tr("Without tactics")+"</td><td style=\"color:blue;\" align=\"right\">"+tr("Kick and rush")+"</td><td align=\"right\">"+tr("Passing")+"</td><td style=\"color:blue;\" align=\"right\">"+tr("Defensive wall")+"</td></tr><tr><td>D</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum(O*1.05,'f',2)+"</td><td align=\"right\">"+QString().setNum(O,'f',2)+"</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum(O*0.9,'f',2)+"</td><td align=\"right\">"+QString().setNum(O*0.9,'f',2)+"</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum(O*1.08,'f',2)+"</td></tr><tr><td>M</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum(M*0.9,'f',2)+"</td><td align=\"right\">"+QString().setNum(M,'f',2)+"</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum(M*0.9,'f',2)+"</td><td align=\"right\">"+QString().setNum(M*1.1,'f',2)+"</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum(M*0.9,'f',2)+"</td></tr><tr><td>F</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum(F*1.05,'f',2)+"</td><td align=\"right\">"+QString().setNum(F,'f',2)+"</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum(F*1.27,'f',2)+"</td><td align=\"right\">"+QString().setNum(F*0.9,'f',2)+"</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum(F*0.9,'f',2)+"</td></tr><tr><td>Sum</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum((O*1.05+M*0.9+F*1.05),'f',2)+"</td><td align=\"right\">"+QString().setNum((O+M+F),'f',2)+"</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum((O*0.9+M*0.9+F*1.27),'f',2)+"</td><td align=\"right\">"+QString().setNum((O*0.9+M*1.1+F*0.9),'f',2)+"</td><td style=\"color:blue;\" align=\"right\">"+QString().setNum((O*1.08+M*0.9+F*0.9),'f',2)+"</td></tr></table>";
+       }
+       result->setText(text);
+}
+
+void PerformanceTab::aggressChange(int a) {
+       aggress = a*5;
+       QSettings settings("config/formation.ini", QSettings::IniFormat);
+       settings.setValue("aggr", aggress);
+       settings.sync();
+}
+
+void PerformanceTab::formatChange(int t) {
+       QSettings settings("config/formation.ini", QSettings::IniFormat);
+       if(t<8 && t>=0) { settings.setValue("form", t); settings.sync(); }
+       switch(t) {
+               case 0: 
+                       defsC = 0; midsC = 0; forsC = 0;
+                       break;
+               case 1:
+                       defsC = 5; midsC = 4; forsC = 1;
+                       break;
+               case 2:
+                       defsC = 5; midsC = 3; forsC = 2;
+                       break;
+               case 3:
+                       defsC = 4; midsC = 3; forsC = 3;
+                       break;
+               case 4:
+                       defsC = 4; midsC = 4; forsC = 2;
+                       break;
+               case 5:
+                       defsC = 4; midsC = 5; forsC = 1;
+                       break;
+               case 6:
+                       defsC = 3; midsC = 4; forsC = 3;
+                       break;
+               case 7:
+                       defsC = 3; midsC = 5; forsC = 2;
+                       break;
+       }
+       postLabels();
+       reorderPlayers();
+}
+
+void PerformanceTab::playerChange(int id) {
+       id = 1; //avoid warning :-D
+       QSettings settings("config/formation.ini", QSettings::IniFormat);
+       for(int i=0; i<11; ++i) {
+               settings.setValue("Player/"+QString().setNum(i), player[i]->currentIndex());
+               plPerfLabel[i]->setText(QString().setNum(player[i]->itemData(player[i]->currentIndex()).toDouble(), 'f', 2)); //player[i]->itemData(player[i]->currentIndex()).toInt()
+       }
+       settings.sync();
+}
+
+void PerformanceTab::reorderPlayers() {
+       int i;
+       int from = 0;
+       for(i=1; i<=defsC; ++i) {               // defenders
+               if(i==1) {              // LB
+                       if(pls[player[i]->currentIndex()].position != "LB") {
+                               player[i]->setCurrentIndex(findFirstOnPost("LB"));
+                       }
+               } else if(i==defsC) {           // RB
+                       if(pls[player[i]->currentIndex()].position != "RB") {
+                               player[i]->setCurrentIndex(findFirstOnPost("RB"));
+                       }
+                       // RB is last managed from defenders, should set finding from him
+                       from = player[i]->currentIndex();
+               } else if(defsC == 5 && i==3) {         // SW
+                       if(pls[player[i]->currentIndex()].position != "SW") {
+                               player[i]->setCurrentIndex(findFirstOnPost("SW"));
+                       }
+               } else {                // CB
+                       if(pls[player[i]->currentIndex()].position != "CB") {
+                               player[i]->setCurrentIndex(findFirstOnPost("CB"));
+                       }
+               }
+       }
+       for(i=defsC+1; i<=defsC+midsC; ++i) {
+               if(i==defsC+1) {                // LM
+                       if(pls[player[i]->currentIndex()].position != "LM") {
+                               player[i]->setCurrentIndex(findFirstOnPost("LM"));
+                       }
+               } else if(i==defsC+midsC) {             // RM
+                       if(pls[player[i]->currentIndex()].position != "RM") {
+                               player[i]->setCurrentIndex(findFirstOnPost("RM"));
+                       }
+                       // RM is last managed from midfields, should set finding from him
+                       from = player[i]->currentIndex();
+               } else {                // CM
+                       if(pls[player[i]->currentIndex()].position != "CM") {
+                               player[i]->setCurrentIndex(findFirstOnPost("CM"));
+                       }
+               }
+       }
+       for(i=defsC+midsC+1; i<=defsC+midsC+forsC; ++i) {
+               if(forsC==3) {
+                       if(i==defsC+midsC+1) {          // LF
+                               if(pls[player[i]->currentIndex()].position != "LF") {
+                                       player[i]->setCurrentIndex(findFirstOnPost("LF"));
+                               }
+                       } else if(i==10) {              // RF
+                               if(pls[player[i]->currentIndex()].position != "RF") {
+                                       player[i]->setCurrentIndex(findFirstOnPost("RF"));
+                               }
+                       }
+               } else {                // always CF
+                       if(pls[player[i]->currentIndex()].position != "CF") {
+                               player[i]->setCurrentIndex(findFirstOnPost("CF"));
+                       }
+               }
+       }
+}
+
+int PerformanceTab::findFirstOnPost(const QString &post) {
+       for(int i=0; i<playerCnt; ++i) {
+               if(post == pls[i].position) return i;
+       }
+       return 0;
+}
diff --git a/performance.h b/performance.h
new file mode 100644 (file)
index 0000000..ae65fb0
--- /dev/null
@@ -0,0 +1,67 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef PERFORMANCETAB__H__
+#define PERFORMANCETAB__H__
+
+#include <QWidget>
+#include <QComboBox>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QPushButton>
+#include <QLabel>
+#include <QSettings>
+
+#include "playerdetail.h"
+#include "clubtab.h"
+
+extern void parse(const QString &);
+extern int playerCnt;
+extern Player pls[];
+
+extern ClubStruct club;
+
+class PerformanceTab: public QWidget {
+       Q_OBJECT
+       QVBoxLayout *mainLayout;
+       QComboBox *player[11];
+       QLabel *postLabel[11];
+       QLabel *plPerfLabel[11];
+       QComboBox *orders[11];
+       QComboBox *format;
+       QComboBox *aggression;
+       QComboBox *home;
+       QHBoxLayout *plCont[11];
+       QLabel *result;
+       QPushButton *cButt;
+       QHBoxLayout *container;
+       QPushButton *reorderPl;
+       
+       double defs;    //defender points count
+       int defsC;      //count of defenders
+       double mids;    //midfield points count
+       int midsC;
+       double fors;            //forward points count
+       int forsC;
+       int aggress;    //aggression
+       
+       void countPerf();
+       void postLabels();      //redraw position labels
+       void init();
+       int findFirstOnPost(const QString &);           // find first player of
+public:
+       PerformanceTab(QWidget *parent = 0);
+       ~PerformanceTab();
+protected slots:
+       void formatChange(int);
+       void recount();
+       void aggressChange(int);
+       void playerChange(int);
+       void dataChanged();
+       void reorderPlayers();
+};
+
+#endif
diff --git a/playerdetail.cc b/playerdetail.cc
new file mode 100755 (executable)
index 0000000..a97361b
--- /dev/null
@@ -0,0 +1,137 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "playerdetail.h"
+
+PlayerDetail::PlayerDetail(int idx, QWidget * parent): QWidget(parent), i(idx) {
+       mainLayout = new QVBoxLayout;
+       QString info = "<table>";
+       info += "<tr><td>" + pls[i].fname + " " + pls[i].lname + "</td><td>[" + pls[i].age + "]</td></td>";
+       info += "<tr><td>" + tr("Position") + "</td><td><span style=\"color:red;\">" + pls[i].position + "</span></td></td>";
+       info += "<td><td>" + tr("Rating") + "</td><td><span style=\"color:red;\">" + pls[i].rating + "%</span></td></tr>";
+       info += "<tr><td>" + tr("Moral") + "</td><td><span style=\"color:red;\">" + pls[i].morale + "%</span></td></td>";
+       info += "<td><td>" + tr("Aggresion") + "</td><td><span style=\"color:red;\">" + pls[i].aggresion + "%</span></td></tr>";
+       info += "<tr><td>" + tr("Fitness") + "</td><td><span style=\"color:red;\">" + pls[i].fitness + "%</span></td></td>";
+       info += "<td><td>" + tr("Experience") + "</td><td><span style=\"color:red;\">" + pls[i].experience + "%</span></td></tr>";
+       info += "<tr><td>" + tr("Stamina") + "</td><td><span style=\"color:red;\">" + pls[i].condition + "%</span></td></td>";
+       info += "<td><td>" + tr("Best rate") + "</td><td><span style=\"color:red;\">" + pls[i].bestRate + "</span></td></tr>";
+       info += "<tr><td>" + tr("Form") + "</td><td><span style=\"color:red;\">" + pls[i].form + "</span></td></tr>";
+       info += "<tr></tr>";
+       info += "<tr><td>" + tr("Speed") + "</td><td><span style=\"color:red;\">" + pls[i].speed + "%</span></td></td>";
+       info += "<td><td>" + tr("Ball controll") + "</td><td><span style=\"color:red;\">" + pls[i].ballCntrl + "%</span></td></tr>";
+       if(pls[i].position=="GK") {
+               info += "<tr><td>" + tr("Courage") + "</td><td><span style=\"color:red;\">" + pls[i].skill[0] + "%</span></td></td>";
+               info += "<td><td>" + tr("Flexibility") + "</td><td><span style=\"color:red;\">" + pls[i].skill[1] + "%</span></td></tr>";
+               info += "<tr><td>" + tr("Jumping") + "</td><td><span style=\"color:red;\">" + pls[i].skill[2] + "%</span></td></td>";
+               info += "<td><td>" + tr("Goalkicks") + "</td><td><span style=\"color:red;\">" + pls[i].skill[3] + "%</span></td></tr>";
+               info += "<tr><td>" + tr("Play along") + "</td><td><span style=\"color:red;\">" + pls[i].specSkill[0] + "%</span></td></td>";
+               info += "<td><td>" + tr("Reflex") + "</td><td><span style=\"color:red;\">" + pls[i].specSkill[1] + "%</span></td></tr>";
+       } else if(pls[i].position == "LB" || pls[i].position == "CB" || pls[i].position == "RB" || pls[i].position == "SW") {
+               info += "<tr><td>" + tr("Passing") + "</td><td><span style=\"color:red;\">" + pls[i].skill[0] + "%</span></td></td>";
+               info += "<td><td>" + tr("Shooting") + "</td><td><span style=\"color:red;\">" + pls[i].skill[1] + "%</span></td></tr>";
+               info += "<tr><td>" + tr("Play it out") + "</td><td><span style=\"color:red;\">" + pls[i].skill[2] + "%</span></td></td>";
+               info += "<td><td>" + tr("Strength") + "</td><td><span style=\"color:red;\">" + pls[i].skill[3] + "%</span></td></tr>";
+               info += "<tr><td>" + tr("Heading") + "</td><td><span style=\"color:red;\">" + pls[i].specSkill[0] + "%</span></td></td>";
+               info += "<td><td>" + tr("Tackling") + "</td><td><span style=\"color:red;\">" + pls[i].specSkill[1] + "%</span></td></tr>";
+       } else if(pls[i].position == "LM" || pls[i].position == "CM" || pls[i].position == "RM") {
+               info += "<tr><td>" + tr("Heading") + "</td><td><span style=\"color:red;\">" + pls[i].skill[0] + "%</span></td></td>";
+               info += "<td><td>" + tr("Shooting") + "</td><td><span style=\"color:red;\">" + pls[i].skill[1] + "%</span></td></tr>";
+               info += "<tr><td>" + tr("Tackling") + "</td><td><span style=\"color:red;\">" + pls[i].skill[2] + "%</span></td></td>";
+               info += "<td><td>" + tr("Strength") + "</td><td><span style=\"color:red;\">" + pls[i].skill[3] + "%</span></td></tr>";
+               info += "<tr><td>" + tr("Passing") + "</td><td><span style=\"color:red;\">" + pls[i].specSkill[0] + "%</span></td></td>";
+               info += "<td><td>" + tr("Playmaking") + "</td><td><span style=\"color:red;\">" + pls[i].specSkill[1] + "%</span></td></tr>";
+       } else if(pls[i].position == "LF" || pls[i].position == "CF" || pls[i].position == "RF") {
+               info += "<tr><td>" + tr("Passing") + "</td><td><span style=\"color:red;\">" + pls[i].skill[0] + "%</span></td></td>";
+               info += "<td><td>" + tr("Tackling") + "</td><td><span style=\"color:red;\">" + pls[i].skill[1] + "%</span></td></tr>";
+               info += "<tr><td>" + tr("Insight") + "</td><td><span style=\"color:red;\">" + pls[i].skill[2] + "%</span></td></td>";
+               info += "<td><td>" + tr("Strength") + "</td><td><span style=\"color:red;\">" + pls[i].skill[3] + "%</span></td></tr>";
+               info += "<tr><td>" + tr("Heading") + "</td><td><span style=\"color:red;\">" + pls[i].specSkill[0] + "%</span></td></td>";
+               info += "<td><td>" + tr("Shooting") + "</td><td><span style=\"color:red;\">" + pls[i].specSkill[1] + "%</span></td></tr>";
+       }
+       info += "</table><hr><table>";
+       int hidden = ((pls[i].rating.toInt() * 15) - pls[i].morale.toInt() - pls[i].experience.toInt() - pls[i].condition.toInt() - pls[i].speed.toInt() - pls[i].ballCntrl.toInt() - pls[i].skill[0].toInt() - pls[i].skill[1].toInt() - pls[i].skill[2].toInt() - pls[i].skill[3].toInt() - 2*pls[i].specSkill[0].toInt() - 2*pls[i].specSkill[1].toInt())/2;
+       info += "<tr><td>" + tr("Estimated Hidden") + "</td><td><span style=\"color:red;\">" + QString().setNum(hidden) + "%</span></td></tr>";
+       if(pls[i].morale.toInt()<100) {
+               int rating_mor = ((pls[i].rating.toInt() * 15) + (100 - pls[i].morale.toInt())) / 15;
+               info += "<tr><td>" + tr("Rating with 100% morale") + "</td><td><span style=\"color:red;\">" + QString().setNum(rating_mor) + "%</span></td></tr>";
+       }
+       if(pls[i].experience.toInt()<100 && pls[i].morale.toInt()<100) {
+               int rating_all = ((pls[i].rating.toInt() * 15) + (100 - pls[i].experience.toInt()) + (100 - pls[i].morale.toInt())) / 15;
+               info += "<tr><td>" + tr("Rating with 100% experience and morale") + "</td><td><span style=\"color:red;\">" + QString().setNum(rating_all) + "%</span></td></tr>";
+       } else if(pls[i].experience.toInt()<100) {
+               int rating_exp = ((pls[i].rating.toInt() * 15) + (100 - pls[i].experience.toInt())) / 15;
+               info += "<tr><td>" + tr("Rating with 100% experience") + "</td><td><span style=\"color:red;\">" + QString().setNum(rating_exp) + "%</span></td></tr>";
+       }
+       info += "<tr><td></td><td></td></tr>";
+       info += "<tr><td>" + tr("Order") + " - " + tr("Normal") + "</td><td>0.00%</td></tr>";
+       if(pls[i].position=="GK") {
+               int plus = pls[i].specSkill[0].toInt() + pls[i].speed.toInt();
+               int minus = pls[i].specSkill[1].toInt() + pls[i].skill[0].toInt();
+               QString temp;
+               temp.setNum((float)(plus-minus)/20, 'f', 2);
+               info += "<tr><td>" + tr("Order") + " - " + tr("Play along") + "</td><td>" + temp + "%</td></tr>";
+       } else if(pls[i].position == "LB" || pls[i].position == "RB") {
+               int plus = pls[i].skill[0].toInt() + pls[i].speed.toInt();
+               int minus = pls[i].specSkill[0].toInt() + pls[i].skill[3].toInt();
+               QString temp;
+               temp.setNum((float)(plus-minus)/20, 'f', 2);
+               QString text = "<tr><td>" + tr("Order") + " - " + tr("Play along wing") + "</td><td>" + temp + "%</td></tr>";
+               plus = pls[i].skill[0].toInt();
+               minus = pls[i].specSkill[1].toInt();
+               temp.setNum((float)(plus-minus)/20, 'f', 2);
+               info += text + "<tr><td>" + tr("Order") + " - " + tr("Play it out") + "</td><td>" + temp + "%</td></tr>";
+       } else if(pls[i].position == "CB") {
+               int plus = pls[i].skill[0].toInt();
+               int minus = pls[i].specSkill[1].toInt();
+               QString temp;
+               temp.setNum((float)(plus-minus)/20, 'f', 2);
+               info += "<tr><td>" + tr("Order") + " - " + tr("Play it out") + "</td><td>" + temp + "%</td></tr>";
+       } else if(pls[i].position == "LM" || pls[i].position == "RM") {
+               int plus = pls[i].specSkill[0].toInt() + pls[i].speed.toInt();
+               int minus = pls[i].skill[3].toInt() + pls[i].skill[0].toInt();
+               QString temp, text;
+               temp.setNum((float)(plus-minus)/20, 'f', 2);
+               text = "<tr><td>" + tr("Order") + " - " + tr("Play along wing") + "</td><td>" + temp + "%</td></tr>";
+               plus = pls[i].specSkill[0].toInt() + pls[i].specSkill[1].toInt();
+               minus = pls[i].skill[0].toInt() + pls[i].skill[1].toInt();
+               temp.setNum((float)(plus-minus)/20, 'f', 2);
+               info += text + "<tr><td>" + tr("Order") + " - " + tr("Passing") + "</td><td>" + temp + "%</td></tr>";
+       } else if(pls[i].position == "CM") {
+               int plus = pls[i].specSkill[0].toInt() + pls[i].specSkill[1].toInt();
+               int minus = pls[i].skill[0].toInt() + pls[i].skill[1].toInt();
+               QString temp;
+               temp.setNum((float)(plus-minus)/20, 'f', 2);
+               info += "<tr><td>" + tr("Order") + " - " + tr("Passing") + "</td><td>" + temp + "%</td></tr>";
+       } else if(pls[i].position == "LF" || pls[i].position == "CF" || pls[i].position == "RF") {
+               int plus = pls[i].specSkill[1].toInt() + pls[i].skill[1].toInt();
+               int minus = pls[i].specSkill[0].toInt() + pls[i].skill[0].toInt();
+               QString temp, text;
+               temp.setNum((float)(plus-minus)/20, 'f', 2);
+               text = "<tr><td>" + tr("Order") + " - " + tr("Own chance") + "</td><td>" + temp + "%</td></tr>";
+               if(pls[i].position == "CF") {
+                       plus = pls[i].specSkill[0].toInt() + pls[i].skill[3].toInt();
+                       minus = pls[i].specSkill[1].toInt() + pls[i].skill[1].toInt();
+                       temp.setNum((float)(plus-minus)/20, 'f', 2);
+                       text += "<tr><td>" + tr("Order") + " - " + tr("Targetman") + "</td><td>" + temp + "%</td></tr>";
+               }
+               plus = pls[i].skill[2].toInt();
+               minus = pls[i].skill[1].toInt();
+               temp.setNum((float)(plus-minus)/20, 'f', 2);
+               info += text + "<tr><td>" + tr("Order") + " - " + tr("Free role") + "</td><td>" + temp + "%</td></tr>";
+       }
+       info += "</table>";
+       info += tr("<br>How much points of performance orders add,<br>or remove if result is negative.");
+       
+       player = new QLabel(info);
+       mainLayout->addWidget(player);
+       setLayout(mainLayout);
+}
+
+PlayerDetail::~PlayerDetail() {
+       delete player;
+       delete mainLayout;
+}
+
diff --git a/playerdetail.h b/playerdetail.h
new file mode 100755 (executable)
index 0000000..9d1663e
--- /dev/null
@@ -0,0 +1,47 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef PLAYERDETAIL__H__
+#define PLAYERDETAIL__H__
+
+#include <QWidget>
+#include <QTabWidget>
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QLabel>
+
+struct Player {
+       QString id;
+       QString fname;
+       QString lname;
+       QString position;
+       QString rating;
+       QString morale;
+       QString aggresion;
+       QString fitness;
+       QString experience;
+       QString condition;
+       QString speed;
+       QString ballCntrl;
+       QString skill[4];
+       QString specSkill[2];
+       QString number, birth, age, height, weight, foot, injured, injury, leagueSusp, cupSusp, contract, wage, house, car, signBonus, winBonus, totalGames, leagueGoals, cupGoals, leagueCardsY, cupCardsY, leagueCardsR, cupCardsR, friendlyGoals, friendlyCardsY, friendlyCardsR, totalInjuries, curGames, curLeagueGoals, curCupGoals, curLeagueCardsY, curCupCardsY, curLeagueCardsR, curCupCardsR, curFriendlyGoals, curFriendlyCardsY, curFriendlyCardsR, curInjuries, bestRate, form, nick, country;
+};
+
+extern Player pls[];
+extern int playerCnt;
+
+class PlayerDetail: public QWidget {
+       Q_OBJECT
+       QVBoxLayout *mainLayout;
+       QLabel *player;
+       int i;
+public:
+       PlayerDetail(int idx, QWidget *parent = 0);
+       ~PlayerDetail();
+};
+
+#endif
diff --git a/playertab.cc b/playertab.cc
new file mode 100755 (executable)
index 0000000..9c05369
--- /dev/null
@@ -0,0 +1,86 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "playertab.h"
+
+PlayerCont::PlayerCont(int pos, QWidget *parent) : QWidget(parent) {
+       tabWidget = new QTabWidget;
+       tabWidget->setTabPosition(QTabWidget::West);
+       for(int i=0; i<playerCnt; ++i) {
+               if(pos==0) {
+                       if(pls[i].position=="GK") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               } else if(pos==1) {
+                       if(pls[i].position=="LB") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               } else if(pos==2) {
+                       if(pls[i].position=="CB") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               } else if(pos==3) {
+                       if(pls[i].position=="SW") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               } else if(pos==4) {
+                       if(pls[i].position=="RB") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               } else if(pos==5) {
+                       if(pls[i].position=="LM") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               } else if(pos==6) {
+                       if(pls[i].position=="CM") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               } else if(pos==7) {
+                       if(pls[i].position=="RM") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               } else if(pos==8) {
+                       if(pls[i].position=="LF") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               } else if(pos==9) {
+                       if(pls[i].position=="CF") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               } else if(pos==10) {
+                       if(pls[i].position=="RF") tabWidget->addTab(new PlayerDetail(i, this), pls[i].fname + " " + pls[i].lname);
+               }
+       }
+       mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(tabWidget);
+       setLayout(mainLayout);
+}
+
+PlayerCont::~PlayerCont() {
+       delete tabWidget;
+       delete mainLayout;
+}
+
+PlayerTab::PlayerTab(QWidget *parent) : QWidget(parent) {
+       initTabs();
+}
+
+PlayerTab::~PlayerTab() {
+       delete tabWidget;
+       delete mainLayout;
+}
+
+void PlayerTab::initTabs() {
+       tabWidget = new QTabWidget;
+       tabWidget->setTabPosition(QTabWidget::North);
+       tabWidget->addTab(new PlayerCont(0), "GK");
+       tabWidget->addTab(new PlayerCont(1), "LB");
+       tabWidget->addTab(new PlayerCont(2), "CB");
+       tabWidget->addTab(new PlayerCont(3), "SW");
+       tabWidget->addTab(new PlayerCont(4), "RB");
+       tabWidget->addTab(new PlayerCont(5), "LM");
+       tabWidget->addTab(new PlayerCont(6), "CM");
+       tabWidget->addTab(new PlayerCont(7), "RM");
+       tabWidget->addTab(new PlayerCont(8), "LF");
+       tabWidget->addTab(new PlayerCont(9), "CF");
+       tabWidget->addTab(new PlayerCont(10), "RF");
+       
+       mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(tabWidget);
+       setLayout(mainLayout);
+}
+
+void PlayerTab::dataChanged() {
+       rebuildUI();
+}
+
+void PlayerTab::rebuildUI() {
+       delete tabWidget;
+       delete mainLayout;
+       
+       initTabs();
+}
+
diff --git a/playertab.h b/playertab.h
new file mode 100755 (executable)
index 0000000..f09a6f4
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef PLAYERTAB__H__
+#define PLAYERTAB__H__
+
+#include <QWidget>
+#include <QTabWidget>
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QLabel>
+
+#include "playerdetail.h"
+
+extern void parse(const QString &);
+extern int playerCnt;
+extern Player pls[];
+
+class PlayerCont: public QWidget {
+       Q_OBJECT
+       QTabWidget *tabWidget;
+       QVBoxLayout *mainLayout;
+public:
+       PlayerCont(int pos, QWidget *parent = 0);
+       ~PlayerCont();
+};
+
+class PlayerTab: public QWidget {
+       Q_OBJECT
+       QTabWidget *tabWidget;
+       QVBoxLayout *mainLayout;
+public:
+       PlayerTab(QWidget *parent = 0);
+       ~PlayerTab();
+       
+       void rebuildUI();
+private:
+       void initTabs();
+public slots:
+       void dataChanged();
+};
+
+#endif
diff --git a/proxyset.cc b/proxyset.cc
new file mode 100644 (file)
index 0000000..51de32b
--- /dev/null
@@ -0,0 +1,72 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "proxyset.h"
+
+ProxySet::ProxySet(QWidget *parent) : QWidget(parent) {
+       QSettings settings("config/global.ini", QSettings::IniFormat);
+       useProxy = settings.value("Network/proxyUsed", 0).toInt();
+       QString addrS = settings.value("Network/proxyAddr", "").toString();
+       QString portS = settings.value("Network/proxyPort", "").toString();
+       QString nameS = settings.value("Network/proxyName", "").toString();
+       QString passS = settings.value("Network/proxyPass", "").toString();
+       
+       mainLayout = new QVBoxLayout;
+       proxy = new QCheckBox(tr("Use proxy server"));
+       proxy->setCheckState((Qt::CheckState) useProxy);
+       connect(proxy, SIGNAL(stateChanged(int)), this, SLOT(checkChange(int)));
+       addr = new QLabel(tr("proxy address:"));
+       port = new QLabel(tr("proxy port:"));
+       name = new QLabel(tr("proxy username:"));
+       pass = new QLabel(tr("proxy password:"));
+       addrP = new QLineEdit(addrS);
+       portP = new QLineEdit(portS);
+       nameP = new QLineEdit(nameS);
+       passP = new QLineEdit(passS);
+       passP->setEchoMode(QLineEdit::Password);
+       saveButt = new QPushButton(tr("Save changes"));
+       connect(saveButt, SIGNAL(clicked()), this, SLOT(save()));
+       mainLayout->addWidget(proxy);
+       mainLayout->addWidget(addr);
+       mainLayout->addWidget(addrP);
+       mainLayout->addWidget(port);
+       mainLayout->addWidget(portP);
+       mainLayout->addWidget(name);
+       mainLayout->addWidget(nameP);
+       mainLayout->addWidget(pass);
+       mainLayout->addWidget(passP);
+       mainLayout->addWidget(saveButt);
+       setLayout(mainLayout);
+       this->show();
+}
+
+ProxySet::~ProxySet() {
+       delete addrP;
+       delete portP;
+       delete nameP;
+       delete passP;
+       delete proxy;
+       delete addr;
+       delete port;
+       delete name;
+       delete pass;
+       delete saveButt;
+       delete mainLayout;
+}
+
+void ProxySet::save() {
+       QSettings settings("config/global.ini", QSettings::IniFormat);
+       settings.setValue("Network/proxyUsed", useProxy);
+       settings.setValue("Network/proxyAddr", addrP->text());
+       settings.setValue("Network/proxyPort", portP->text());
+       settings.setValue("Network/proxyName", nameP->text());
+       settings.setValue("Network/proxyPass", passP->text());
+       settings.sync();
+}
+
+void ProxySet::checkChange(int state) {
+       useProxy = state;
+}
diff --git a/proxyset.h b/proxyset.h
new file mode 100644 (file)
index 0000000..a9d388c
--- /dev/null
@@ -0,0 +1,34 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef PROXYSET__H__
+#define PROXYSET__H__
+
+#include <QWidget>
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QCheckBox>
+#include <QLabel>
+#include <QLineEdit>
+#include <QSettings>
+
+class ProxySet: public QWidget {
+       Q_OBJECT
+       QVBoxLayout *mainLayout;
+       QLineEdit *addrP, *portP, *nameP, *passP;
+       QCheckBox *proxy;
+       QLabel *addr, *port, *name, *pass;
+       QPushButton *saveButt;
+       int useProxy;
+public:
+       ProxySet(QWidget *parent = 0);
+       ~ProxySet();
+public slots:
+       void save();
+       void checkChange(int state);
+};
+
+#endif
diff --git a/stadiumtab.cc b/stadiumtab.cc
new file mode 100644 (file)
index 0000000..97f027b
--- /dev/null
@@ -0,0 +1,70 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "stadiumtab.h"
+
+StadiumTab::StadiumTab(QWidget *parent) : QWidget(parent) {
+       mainLayout = new QVBoxLayout;
+       setLayout(mainLayout);
+       init();
+}
+
+StadiumTab::~StadiumTab() {
+       delete label;
+       delete mainLayout;
+}
+
+void StadiumTab::init() {
+       int cap = stadium.cap_n.toInt() + stadium.cap_e.toInt() + stadium.cap_w.toInt() + stadium.cap_s.toInt();
+       QString text;
+       text = "<table cellspacing=\"3\">";
+       text += "<tr><td>" + tr("Stadium") + "</td><td><span style=\"color:red;\">" + stadium.name + "</span></td></tr>";
+       text += "<tr><td>" + tr("Field condition") + "</td><td>" + stadium.field_status + "%</td></tr>";
+       text += "<tr><td></td><td></td></tr>";
+       text += "<tr><td>" + tr("Fan base") + "</td><td>" + stadium.fans + "</td></tr>";
+       text += "<tr><td>" + tr("satisfaction") + "</td><td>" + stadium.fanSatis + "%</td></tr>";
+       text += "<tr><td>" + tr("Capacity") + "</td><td><span style=\"color:red;\">" + QString().setNum(cap) + "</span></td></tr>";
+       text += "<tr><td></td><td></td></tr>";
+       text += "<tr><td>" + tr("Parking") + "</td><td>" + stadium.parking + "</td><td>(" + tr("minimal") + " " + QString().setNum((int)((float)cap/3)) + ")";
+       if(stadium.park_fu) text += " <span style=\"color:red;\">" + tr("unhappy!!") + "</span>";
+       text += "</td></tr>";
+       text += "<tr><td>" + tr("Toilets") + "</td><td>" + stadium.wc + "</td><td>(" + tr("minimal") + " " + QString().setNum(cap*0.01) + ")";
+       if(stadium.wc_fu) text += " <span style=\"color:red;\">" + tr("unhappy!!") + "</span>";
+       text += "</td></tr>";
+       text += "<tr><td>" + tr("Buffets") + "</td><td>" + stadium.bar + "</td><td>(" + tr("minimal") + " " + QString().setNum((int)(cap*0.0044)) + ")";
+       if(stadium.bar_fu) text += " <span style=\"color:red;\">" + tr("unhappy!!") + "</span>";
+       text += "</td></tr></table><hr>";
+       text += "<table cellspacing=\"3\">";
+       text += "<tr><td>" + tr("Price league") + "</td><td>" + stadium.priceLeague + "&euro; (" + QString().setNum(cap) + " " + tr("attendance gives cca. ") + QString().setNum(stadium.priceLeague.toInt()*(0.9*cap)) + "&euro;)</td></tr>";
+       text += "<tr><td>" + tr("Price cup") + "</td><td>" + stadium.priceCup + "&euro; (" + QString().setNum(cap) + " " + tr("attendance gives cca. ") + QString().setNum(stadium.priceCup.toInt()*(0.9*cap)) + "&euro;)</td></tr>";
+       text += "<tr><td>" + tr("Price friendly") + "</td><td>" + stadium.priceFriendly + "&euro; (" + QString().setNum(cap/10) + " " + tr("attendance gives cca. ") + QString().setNum(stadium.priceFriendly.toInt()*(0.09*cap)) + "&euro;)</td></tr>";
+       text += "<tr><td>" + tr("Price friendly cup") + "</td><td>" + stadium.priceFriendlyCup + "&euro; (" + QString().setNum(cap/10) + " " + tr("attendance gives cca. ") + QString().setNum(stadium.priceFriendlyCup.toInt()*(0.09*cap)) + "&euro;)</td></tr>";
+       text += "</table><hr>";
+       text += tr("Increasing 1000 places on stadium (calculations)") + ":<br>";
+       if(stadium.parking.toInt() < ((cap+1000)/3)) {
+               text += tr("You need") + "  " + QString().setNum((int)((float)(cap+1000)/3)) + "  " + tr("Parking places") + "<br>";
+       }
+       if(stadium.wc.toInt() < ((cap+1000)*0.01)) {
+               text += tr("You need") + "  " + QString().setNum((cap+1000)*0.01) + "  " + tr("Toilets") + "<br>";
+       }
+       if(stadium.bar.toInt() < ((cap+1000)*0.0044)) {
+               text += tr("You need") + "  " + QString().setNum((cap+1000)*0.0044) + "  " + tr("Buffets") + "<br>";
+       }
+       label = new QLabel(text);
+       mainLayout->addWidget(label);
+       mainLayout->update();
+}
+
+void StadiumTab::dataChanged() {
+       rebuildUI();
+}
+
+void StadiumTab::rebuildUI() {
+       mainLayout->removeWidget(label);
+       delete label;
+       mainLayout->update();
+       init();
+}
diff --git a/stadiumtab.h b/stadiumtab.h
new file mode 100644 (file)
index 0000000..7db1513
--- /dev/null
@@ -0,0 +1,38 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef STADIUMTAB__H__
+#define STADIUMTAB__H__
+
+#include <QWidget>
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QLabel>
+
+struct StadiumStruct {
+       QString id, name, field_status, priceLeague, priceCup, priceFriendly, priceFriendlyCup, fans, fanSatis, cap_n, cap_e, cap_s, cap_w, lights_ne, lights_se, lights_nw, lights_sw, sb1, sb2, field, parking, wc, bar, youth_center, ds_s, ds_n, ds_e, ds_w, ds_lights_ne, ds_lights_se, ds_lights_nw, ds_lights_sw, ds_sb1, ds_sb2, ds_field, ds_park, ds_wc, ds_bar;
+       bool park_fu, wc_fu, bar_fu, sb_fu, lights_fu;
+};
+
+extern void parse(const QString &);
+extern StadiumStruct stadium;
+
+class StadiumTab: public QWidget {
+       Q_OBJECT
+       QVBoxLayout *mainLayout;
+       QLabel *label;
+public:
+       StadiumTab(QWidget *parent = 0);
+       ~StadiumTab();
+       
+       void rebuildUI();
+private:
+       void init();
+public slots:
+       void dataChanged();
+};
+
+#endif
diff --git a/staffmember.cc b/staffmember.cc
new file mode 100644 (file)
index 0000000..afb512b
--- /dev/null
@@ -0,0 +1,40 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "staffmember.h"
+
+StaffMember::StaffMember(int idx, QWidget *parent): QWidget(parent), i(idx) {
+       mainLayout = new QVBoxLayout;
+       QString info = "<table cellspacing=\"3\">";
+       info += "<tr><td>" + staff[i].name + "</td><td>[" + staff[i].age + "]</td></tr>";
+       info += "<tr><td>" + tr("Role") + "</td><td><span style=\"color:red;\">";
+       switch(staff[i].role.toInt()) {
+               case 0: info += tr("Trainer"); break;
+               case 1: info += tr("Scout"); break;
+               case 2: info += tr("Doctor"); break;
+               case 3: info += tr("Groundkeeper"); break;
+               case 4: info += tr("Assistent"); break;
+               case 5: info += tr("Physiotherapy"); break;
+               case 6: info += tr("Youth manager"); break;
+               default: info += staff[i].role;
+       }
+       info += "</span></td></tr>";
+       info += "<tr><td>" + tr("Wage") + "</td><td><span style=\"color:red;\">" + staff[i].wage + "&euro;</span></td></tr>";
+       info += "<tr><td>" + tr("Contract") + "</td><td><span style=\"color:red;\">" + staff[i].contr + " (" + tr("days left") + ")</span></td></tr>";
+       //info += tr("Birthday") + ": <span style=\"color:red;\">" + staff[i].birth + "</span><br>";
+       info += "<tr><td>" + tr("Course") + "</td><td><span style=\"color:red;\">" + staff[i].course + "</span></td></tr>";
+       info += "<tr><td>" + tr("Rating") + "</td><td><span style=\"color:red;\">" + staff[i].rating + "%</span></td></tr>";
+       info += "</table>";
+       
+       player = new QLabel(info);
+       mainLayout->addWidget(player);
+       setLayout(mainLayout);
+}
+
+StaffMember::~StaffMember() {
+       delete player;
+       delete mainLayout;
+}
diff --git a/staffmember.h b/staffmember.h
new file mode 100644 (file)
index 0000000..fbf3dc9
--- /dev/null
@@ -0,0 +1,42 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef STAFFMEMBER__H__
+#define STAFFMEMBER__H__
+
+#include <QWidget>
+#include <QTabWidget>
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QLabel>
+
+struct StaffMemberStruct {
+       QString id;
+       QString role;
+       QString name;
+       QString wage;
+       QString contr;
+       QString age;
+       QString birth;
+       QString inservice;
+       QString course;
+       QString rating;
+};
+
+extern StaffMemberStruct staff[];
+extern int staffCnt;
+
+class StaffMember: public QWidget {
+       Q_OBJECT
+       QVBoxLayout *mainLayout;
+       QLabel *player;
+       int i;
+public:
+       StaffMember(int idx, QWidget *parent = 0);
+       ~StaffMember();
+};
+
+#endif
diff --git a/stafftab.cc b/stafftab.cc
new file mode 100644 (file)
index 0000000..da5a965
--- /dev/null
@@ -0,0 +1,39 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#include "stafftab.h"
+
+StaffTab::StaffTab(QWidget *parent) : QWidget(parent) {
+       initTabs();
+}
+
+StaffTab::~StaffTab() {
+       delete tabWidget;
+       delete mainLayout;
+}
+
+void StaffTab::initTabs() {
+       tabWidget = new QTabWidget;
+       tabWidget->setTabPosition(QTabWidget::West);
+       for(int i=0; i<staffCnt; ++i) {
+               tabWidget->addTab(new StaffMember(i, this), staff[i].name);
+       }
+       
+       mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(tabWidget);
+       setLayout(mainLayout);
+}
+
+void StaffTab::dataChanged() {
+       rebuildUI();
+}
+
+void StaffTab::rebuildUI() {
+       delete tabWidget;
+       delete mainLayout;
+       
+       initTabs();
+}
diff --git a/stafftab.h b/stafftab.h
new file mode 100644 (file)
index 0000000..1818a57
--- /dev/null
@@ -0,0 +1,37 @@
+/*******************************************************************
+Jan Cermak | johniez | aspt.johniez.com
+Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
+http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
+*******************************************************************/
+
+#ifndef STAFFTAB__H__
+#define STAFFTAB__H__
+
+#include <QWidget>
+#include <QTabWidget>
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QLabel>
+
+#include "staffmember.h"
+
+extern void parse(const QString &);
+extern int staffCnt;
+extern StaffMemberStruct staff[];
+
+class StaffTab: public QWidget {
+       Q_OBJECT
+       QTabWidget *tabWidget;
+       QVBoxLayout *mainLayout;
+public:
+       StaffTab(QWidget *parent = 0);
+       ~StaffTab();
+       
+       void rebuildUI();
+private:
+       void initTabs();
+public slots:
+       void dataChanged();
+};
+
+#endif