QTfrontend/ui/page/pagescheme.cpp
author unC0Rr
Wed, 20 Nov 2024 21:37:47 +0100
branchtransitional_engine
changeset 16067 d903f8d2395a
parent 15704 842385b5e0f6
permissions -rw-r--r--
- Update corrosion - Implement installation of targets imported with corrosion
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
     1
/*
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
     2
 * Hedgewars, a free turn based strategy game
11046
47a8c19ecb60 more copyright fixes
sheepluva
parents: 10822
diff changeset
     3
 * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
     4
 *
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
     8
 *
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    12
 * GNU General Public License for more details.
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    13
 *
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
10108
c68cf030eded update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents: 9998
diff changeset
    16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    17
 */
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    18
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    19
#include <QGridLayout>
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
    20
#include <QHBoxLayout>
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    21
#include <QPushButton>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    22
#include <QGroupBox>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    23
#include <QComboBox>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    24
#include <QLabel>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    25
#include <QLineEdit>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    26
#include <QMessageBox>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    27
#include <QDataWidgetMapper>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    28
#include <QSpinBox>
14860
e239378a9400 Prevent entering “/”, “\” and “:” in team and scheme names.
Wuzzy <Wuzzy2@mail.ru>
parents: 14857
diff changeset
    29
#include <QRegExp>
e239378a9400 Prevent entering “/”, “\” and “:” in team and scheme names.
Wuzzy <Wuzzy2@mail.ru>
parents: 14857
diff changeset
    30
#include <QRegExpValidator>
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    31
14860
e239378a9400 Prevent entering “/”, “\” and “:” in team and scheme names.
Wuzzy <Wuzzy2@mail.ru>
parents: 14857
diff changeset
    32
#include "hwconsts.h"
13197
0bc5f618ca7c Rename the misleadingly-named AmmoSchemeModel to GameSchemeModel
Wuzzy <Wuzzy2@mail.ru>
parents: 12254
diff changeset
    33
#include "gameSchemeModel.h"
5204
e1a5f4d5d86a split pages.h into several header files
koda
parents: 5180
diff changeset
    34
#include "pagescheme.h"
6062
2827ded8a5ef rename misc.{h,cpp} to the name of the class they contain (FreqSpinBox)
sheepluva
parents: 6060
diff changeset
    35
#include "FreqSpinBox.h"
13840
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
    36
#include "SDTimeoutSpinBox.h"
11815
68bc5ebce319 Fix mines time displaying "1 seconds" in frontend
Wuzzy <almikes@aol.com>
parents: 11813
diff changeset
    37
#include "MinesTimeSpinBox.h"
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    38
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
    39
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
    40
QLayout * PageScheme::bodyLayoutDefinition()
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    41
{
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
    42
    QGridLayout * pageLayout = new QGridLayout();
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    43
    QGroupBox * gb = new QGroupBox(this);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    44
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    45
    QGridLayout * gl = new QGridLayout();
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    46
    gb->setLayout(gl);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    47
    QSizePolicy sp;
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    48
    sp.setVerticalPolicy(QSizePolicy::MinimumExpanding);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    49
    sp.setHorizontalPolicy(QSizePolicy::Expanding);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    50
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    51
    pageLayout->addWidget(gb, 1,0,13,5);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    52
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    53
    gbGameModes = new QGroupBox(QGroupBox::tr("Game Modifiers"), gb);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    54
    gbBasicSettings = new QGroupBox(QGroupBox::tr("Basic Settings"), gb);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    55
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
    56
    // TODO name stuff and put CSS into main style sheet
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    57
    gbGameModes->setStyleSheet(".QGroupBox {"
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6089
diff changeset
    58
                               "background-color: #130f2c; background-image:url();"
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6089
diff changeset
    59
                               "}");
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    60
    gbBasicSettings->setStyleSheet(".QGroupBox {"
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6089
diff changeset
    61
                                   "background-color: #130f2c; background-image:url();"
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6089
diff changeset
    62
                                   "}");
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    63
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    64
    gbGameModes->setSizePolicy(sp);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    65
    gbBasicSettings->setSizePolicy(sp);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    66
    gl->addWidget(gbGameModes,0,0,1,3,Qt::AlignTop);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    67
    gl->addWidget(gbBasicSettings,0,3,1,3,Qt::AlignTop);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    68
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    69
    QGridLayout * glGMLayout = new QGridLayout(gbGameModes);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    70
    QGridLayout * glBSLayout = new QGridLayout(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    71
    gbGameModes->setLayout(glGMLayout);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    72
    gbBasicSettings->setLayout(glBSLayout);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    73
    // Left
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    74
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    75
    TBW_disablegirders = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableGirders@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    76
    TBW_disablegirders->setWhatsThis(tr("Disable girders when generating random maps."));
11881
34ede05e4d4f Remove old Fort Mode from frontend
Wuzzy <almikes@aol.com>
parents: 11816
diff changeset
    77
    glGMLayout->addWidget(TBW_disablegirders,0,0,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    78
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    79
    TBW_disablelandobjects = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableLandObjects@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    80
    TBW_disablelandobjects->setWhatsThis(tr("Disable land objects when generating random maps."));
11881
34ede05e4d4f Remove old Fort Mode from frontend
Wuzzy <almikes@aol.com>
parents: 11816
diff changeset
    81
    glGMLayout->addWidget(TBW_disablelandobjects,0,1,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    82
6089
adc69bbb24e5 (a lot of) ooops
koda
parents: 6062
diff changeset
    83
    TBW_border = new ToggleButtonWidget(gbGameModes, ":/res/btnBorder@2x.png");
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
    84
    TBW_border->setWhatsThis(tr("Add an indestructible border around the terrain"));
11881
34ede05e4d4f Remove old Fort Mode from frontend
Wuzzy <almikes@aol.com>
parents: 11816
diff changeset
    85
    glGMLayout->addWidget(TBW_border,0,2,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    86
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    87
    TBW_bottomborder = new ToggleButtonWidget(gbGameModes, ":/res/btnBottomBorder@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    88
    TBW_bottomborder->setWhatsThis(tr("Add an indestructible border along the bottom"));
11881
34ede05e4d4f Remove old Fort Mode from frontend
Wuzzy <almikes@aol.com>
parents: 11816
diff changeset
    89
    glGMLayout->addWidget(TBW_bottomborder,0,3,1,1);
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    90
13272
5984e8c6cbeb Add new game flag gfSwitchHog, enable hog switching at turn start
Wuzzy <Wuzzy2@mail.ru>
parents: 13228
diff changeset
    91
    TBW_switchhog = new ToggleButtonWidget(gbGameModes, ":/res/btnSwitchHog@2x.png");
5984e8c6cbeb Add new game flag gfSwitchHog, enable hog switching at turn start
Wuzzy <Wuzzy2@mail.ru>
parents: 13228
diff changeset
    92
    TBW_switchhog->setWhatsThis(tr("Select a hedgehog at the beginning of a turn"));
5984e8c6cbeb Add new game flag gfSwitchHog, enable hog switching at turn start
Wuzzy <Wuzzy2@mail.ru>
parents: 13228
diff changeset
    93
    glGMLayout->addWidget(TBW_switchhog,0,4,1,1);
5984e8c6cbeb Add new game flag gfSwitchHog, enable hog switching at turn start
Wuzzy <Wuzzy2@mail.ru>
parents: 13228
diff changeset
    94
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    95
    TBW_solid = new ToggleButtonWidget(gbGameModes, ":/res/btnSolid@2x.png");
13612
7b4a56157bc5 Fix description of gfSolidLand in scheme editor
Wuzzy <Wuzzy2@mail.ru>
parents: 13554
diff changeset
    96
    TBW_solid->setWhatsThis(tr("Land can not be destroyed by most weapons."));
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    97
    glGMLayout->addWidget(TBW_solid,1,0,1,1);
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
    98
6089
adc69bbb24e5 (a lot of) ooops
koda
parents: 6062
diff changeset
    99
    TBW_lowGravity = new ToggleButtonWidget(gbGameModes, ":/res/btnLowGravity@2x.png");
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   100
    TBW_lowGravity->setWhatsThis(tr("Lower gravity"));
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   101
    glGMLayout->addWidget(TBW_lowGravity,1,1,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   102
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   103
    TBW_nowind = new ToggleButtonWidget(gbGameModes, ":/res/btnNoWind@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   104
    TBW_nowind->setWhatsThis(tr("You will not have to worry about wind anymore."));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   105
    glGMLayout->addWidget(TBW_nowind,1,2,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   106
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   107
    TBW_morewind = new ToggleButtonWidget(gbGameModes, ":/res/btnMoreWind@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   108
    TBW_morewind->setWhatsThis(tr("Wind will affect almost everything."));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   109
    glGMLayout->addWidget(TBW_morewind,1,3,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   110
6089
adc69bbb24e5 (a lot of) ooops
koda
parents: 6062
diff changeset
   111
    TBW_artillery = new ToggleButtonWidget(gbGameModes, ":/res/btnArtillery@2x.png");
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   112
    TBW_artillery->setWhatsThis(tr("Your hogs are unable to move, put your artillery skills to the test"));
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   113
    glGMLayout->addWidget(TBW_artillery,1,4,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   114
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   115
    TBW_vampiric = new ToggleButtonWidget(gbGameModes, ":/res/btnVampiric@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   116
    TBW_vampiric->setWhatsThis(tr("Gain 80% of the damage you do back in health"));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   117
    glGMLayout->addWidget(TBW_vampiric,2,0,1,1);
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   118
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   119
    TBW_karma = new ToggleButtonWidget(gbGameModes, ":/res/btnKarma@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   120
    TBW_karma->setWhatsThis(tr("Share your opponents pain, share their damage"));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   121
    glGMLayout->addWidget(TBW_karma,2,1,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   122
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   123
    TBW_resethealth = new ToggleButtonWidget(gbGameModes, ":/res/btnResetHealth@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   124
    TBW_resethealth->setWhatsThis(tr("All (living) hedgehogs are fully restored at the end of turn"));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   125
    glGMLayout->addWidget(TBW_resethealth,2,2,1,1);
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   126
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   127
    TBW_aisurvival = new ToggleButtonWidget(gbGameModes, ":/res/btnAISurvival@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   128
    TBW_aisurvival->setWhatsThis(tr("AI respawns on death."));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   129
    glGMLayout->addWidget(TBW_aisurvival,2,3,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   130
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   131
    TBW_invulnerable = new ToggleButtonWidget(gbGameModes, ":/res/btnInvulnerable@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   132
    TBW_invulnerable->setWhatsThis(tr("All hogs have a personal forcefield"));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   133
    glGMLayout->addWidget(TBW_invulnerable,2,4,1,1);
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   134
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   135
    TBW_perhogammo = new ToggleButtonWidget(gbGameModes, ":/res/btnPerHogAmmo@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   136
    TBW_perhogammo->setWhatsThis(tr("Each hedgehog has its own ammo. It does not share with the team."));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   137
    glGMLayout->addWidget(TBW_perhogammo,3,0,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   138
6089
adc69bbb24e5 (a lot of) ooops
koda
parents: 6062
diff changeset
   139
    TBW_sharedammo = new ToggleButtonWidget(gbGameModes, ":/res/btnSharedAmmo@2x.png");
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   140
    TBW_sharedammo->setWhatsThis(tr("Ammo is shared between all teams that share a colour."));
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   141
    glGMLayout->addWidget(TBW_sharedammo,3,1,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   142
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   143
    TBW_resetweps = new ToggleButtonWidget(gbGameModes, ":/res/btnResetWeps@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   144
    TBW_resetweps->setWhatsThis(tr("Weapons are reset to starting values each turn."));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   145
    glGMLayout->addWidget(TBW_resetweps,3,2,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   146
6089
adc69bbb24e5 (a lot of) ooops
koda
parents: 6062
diff changeset
   147
    TBW_infattack = new ToggleButtonWidget(gbGameModes, ":/res/btnInfAttack@2x.png");
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   148
    TBW_infattack->setWhatsThis(tr("Attacking does not end your turn."));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   149
    glGMLayout->addWidget(TBW_infattack,3,3,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   150
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   151
    TBW_laserSight = new ToggleButtonWidget(gbGameModes, ":/res/btnLaserSight@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   152
    TBW_laserSight->setWhatsThis(tr("Assisted aiming with laser sight"));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   153
    glGMLayout->addWidget(TBW_laserSight,3,4,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   154
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   155
    TBW_randomorder = new ToggleButtonWidget(gbGameModes, ":/res/btnRandomOrder@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   156
    TBW_randomorder->setWhatsThis(tr("Order of play is random instead of in room order."));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   157
    glGMLayout->addWidget(TBW_randomorder,4,0,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   158
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   159
    TBW_placehog = new ToggleButtonWidget(gbGameModes, ":/res/btnPlaceHog@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   160
    TBW_placehog->setWhatsThis(tr("Take turns placing your hedgehogs before the start of play."));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   161
    glGMLayout->addWidget(TBW_placehog,4,1,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   162
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   163
    TBW_teamsDivide = new ToggleButtonWidget(gbGameModes, ":/res/btnTeamsDivide@2x.png");
11755
ae881363fc64 fix for bug 117: Incorrect description of modifier “divide teams”
Wuzzy
parents: 11695
diff changeset
   164
    TBW_teamsDivide->setWhatsThis(tr("Each clan starts in its own part of the terrain."));
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   165
    glGMLayout->addWidget(TBW_teamsDivide,4,2,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   166
6089
adc69bbb24e5 (a lot of) ooops
koda
parents: 6062
diff changeset
   167
    TBW_tagteam = new ToggleButtonWidget(gbGameModes, ":/res/btnTagTeam@2x.png");
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   168
    TBW_tagteam->setWhatsThis(tr("Teams in each clan take successive turns sharing their turn time."));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   169
    glGMLayout->addWidget(TBW_tagteam,4,3,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   170
11690
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   171
    TBW_king = new ToggleButtonWidget(gbGameModes, ":/res/btnKing@2x.png");
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   172
    TBW_king->setWhatsThis(tr("Play with a King. If he dies, your side dies."));
910faf570268 Reorder game flag buttons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   173
    glGMLayout->addWidget(TBW_king,4,4,1,1);
5717
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   174
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   175
    // Right
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   176
    QLabel * l;
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   177
14300
20b08e59730d Add a few translator comments to some not-so-obvious strings
Wuzzy <Wuzzy2@mail.ru>
parents: 14283
diff changeset
   178
//: Description of the game scheme setting “Damage Modifier”. “Knockback” means how much hedgehogs and objects get pushed by explosions and other forces
11816
f73a299c7884 Tweak damage modifier help
Wuzzy <almikes@aol.com>
parents: 11815
diff changeset
   179
    QString wtDamageModifier = tr("Overall damage and knockback in percent");
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   180
    QString wtTurnTime = tr("Turn time in seconds");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   181
    QString wtInitHealth = tr("Initial health of hedgehogs");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   182
    QString wtSuddenDeath = tr("How many rounds have to be played before Sudden Death begins");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   183
    QString wtWaterRise = tr("How much the water rises per turn while in Sudden Death. Set to 0 along with Sudden Death Health Decrease to disable Sudden Death.");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   184
    QString wtHealthDecrease = tr("How much health hedgehogs lose per turn while in Sudden Death, down to 1 health. Set to 0 along with Sudden Death Water Rise to disable Sudden Death.");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   185
    QString wtRopeModifier = tr("Maximum rope length in percent");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   186
    QString wtHealthCrates = tr("Likelihood of a dropped crate being a health crate. All other crates will be weapon or utility crates.");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   187
    QString wtCaseProb = tr("Likelihood of a crate dropping before a turn");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   188
    QString wtCrateHealth= tr("Health bonus for collecting a health crate");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   189
    QString wtMinesTime = tr("Detonation timer of mines. The random timer lies between 0 and 5 seconds. The timer of air mines will be a quarter of the mines timer.");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   190
    QString wtMines = tr("Average number of mines to be placed a medium-sized island map. This number will be scaled for other maps.");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   191
    QString wtMineDuds = tr("Likelihood of a mine being a dud. Does not affect mines placed by hedgehogs.");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   192
    QString wtExplosives = tr("Average number of barrels to be placed a medium-sized island map. This number will be scaled for other maps.");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   193
    QString wtAirMines = tr("Average number of air mines to be placed a medium-sized island map. This number will be scaled for other maps.");
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   194
    QString wtSentries = tr("Average number of sentry bots to be placed on a medium-sized island map. This number will be scaled for other maps.");
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   195
    QString wtWorldEdge = tr("Affects the left and right boundaries of the map");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   196
    QString wtGetAwayTime = tr("Time you get after an attack");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   197
    QString wtScriptParam = tr("Additional parameter to configure game styles. The meaning depends on the used style, refer to the documentation. When in doubt, leave it empty.");
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   198
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   199
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   200
    l->setText(QLabel::tr("Damage Modifier"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   201
    l->setWhatsThis(wtDamageModifier);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   202
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   203
    glBSLayout->addWidget(l,0,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   204
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   205
    l->setWhatsThis(wtDamageModifier);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   206
    l->setFixedSize(32,32);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   207
    l->setPixmap(QPixmap(":/res/iconDamage.png"));
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   208
    glBSLayout->addWidget(l,0,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   209
    SB_DamageModifier = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   210
    SB_DamageModifier->setWhatsThis(wtDamageModifier);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   211
    SB_DamageModifier->setRange(10, 300);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   212
    SB_DamageModifier->setValue(100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   213
    SB_DamageModifier->setSingleStep(25);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   214
    glBSLayout->addWidget(SB_DamageModifier,0,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   215
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   216
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   217
    l->setText(QLabel::tr("Turn Time"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   218
    l->setWhatsThis(wtTurnTime);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   219
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   220
    glBSLayout->addWidget(l,1,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   221
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   222
    l->setWhatsThis(wtTurnTime);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   223
    l->setFixedSize(32,32);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   224
    l->setPixmap(QPixmap(":/res/iconTime.png"));
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   225
    glBSLayout->addWidget(l,1,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   226
    SB_TurnTime = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   227
    SB_TurnTime->setWhatsThis(wtTurnTime);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   228
    SB_TurnTime->setRange(1, 9999);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   229
    SB_TurnTime->setValue(45);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   230
    SB_TurnTime->setSingleStep(15);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   231
    glBSLayout->addWidget(SB_TurnTime,1,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   232
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   233
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   234
    l->setText(QLabel::tr("Initial Health"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   235
    l->setWhatsThis(wtInitHealth);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   236
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   237
    glBSLayout->addWidget(l,2,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   238
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   239
    l->setWhatsThis(wtInitHealth);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   240
    l->setFixedSize(32,32);
12254
9d501bd1169c Replace initial health icon in game scheme editor
Wuzzy <almikes@aol.com>
parents: 12123
diff changeset
   241
    l->setPixmap(QPixmap(":/res/iconInitHealth.png"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   242
    glBSLayout->addWidget(l,2,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   243
    SB_InitHealth = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   244
    SB_InitHealth->setWhatsThis(wtInitHealth);
11886
b27d2351ec16 Relax some health bounds in game scheme editor
Wuzzy <almikes@aol.com>
parents: 11881
diff changeset
   245
    SB_InitHealth->setRange(1, 1000);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   246
    SB_InitHealth->setValue(100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   247
    SB_InitHealth->setSingleStep(25);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   248
    glBSLayout->addWidget(SB_InitHealth,2,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   249
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   250
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   251
    l->setText(QLabel::tr("Sudden Death Timeout"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   252
    l->setWhatsThis(wtSuddenDeath);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   253
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   254
    glBSLayout->addWidget(l,3,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   255
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   256
    l->setFixedSize(32,32);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   257
    l->setWhatsThis(wtSuddenDeath);
11694
d448b304bc70 Update scheme editor icons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   258
    l->setPixmap(QPixmap(":/res/iconSuddenDeathTime.png"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   259
    glBSLayout->addWidget(l,3,1,1,1);
13840
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   260
    /* NOTE:
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   261
       The internally stored value for Sudden Death Timeout
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   262
       is defined as
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   263
       "number of full rounds to play till Sudden Death, minus one"
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   264
       i.e. value 0 means Sudden Death starts in 2nd round.
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   265
       The lowest possible internal value is 0.
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   266
       The user-facing value is different, it's defined as
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   267
       "number of full rounds to play till Sudden Death"
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   268
       i.e. the user-facing value 1 is equivalent to internal value 0.
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   269
       We use SDTimeoutSpinBox for the magic to happen. */
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   270
    SB_SuddenDeath = new SDTimeoutSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   271
    SB_SuddenDeath->setWhatsThis(wtSuddenDeath);
13840
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   272
    // Will display as 1-52
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   273
    SB_SuddenDeath->setRange(0, 51);
419de2dea82b Fix frontend displayed value of Sudden Death timeout being off-by-one
Wuzzy <Wuzzy2@mail.ru>
parents: 13612
diff changeset
   274
    // Will display as 16
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   275
    SB_SuddenDeath->setValue(15);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   276
    SB_SuddenDeath->setSingleStep(3);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   277
    glBSLayout->addWidget(SB_SuddenDeath,3,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   278
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   279
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   280
    l->setText(QLabel::tr("Sudden Death Water Rise"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   281
    l->setWhatsThis(wtWaterRise);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   282
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   283
    glBSLayout->addWidget(l,4,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   284
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   285
    l->setWhatsThis(wtWaterRise);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   286
    l->setFixedSize(32,32);
11694
d448b304bc70 Update scheme editor icons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   287
    l->setPixmap(QPixmap(":/res/iconSuddenDeathWater.png"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   288
    glBSLayout->addWidget(l,4,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   289
    SB_WaterRise = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   290
    SB_WaterRise->setWhatsThis(wtWaterRise);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   291
    SB_WaterRise->setRange(0, 100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   292
    SB_WaterRise->setValue(47);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   293
    SB_WaterRise->setSingleStep(5);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   294
    glBSLayout->addWidget(SB_WaterRise,4,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   295
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   296
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   297
    l->setText(QLabel::tr("Sudden Death Health Decrease"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   298
    l->setWhatsThis(wtHealthDecrease);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   299
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   300
    glBSLayout->addWidget(l,5,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   301
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   302
    l->setWhatsThis(wtHealthDecrease);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   303
    l->setFixedSize(32,32);
11694
d448b304bc70 Update scheme editor icons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   304
    l->setPixmap(QPixmap(":/res/iconSuddenDeath.png"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   305
    glBSLayout->addWidget(l,5,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   306
    SB_HealthDecrease = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   307
    SB_HealthDecrease->setWhatsThis(wtHealthDecrease);
11886
b27d2351ec16 Relax some health bounds in game scheme editor
Wuzzy <almikes@aol.com>
parents: 11881
diff changeset
   308
    SB_HealthDecrease->setRange(0, 1000);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   309
    SB_HealthDecrease->setValue(5);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   310
    SB_HealthDecrease->setSingleStep(1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   311
    glBSLayout->addWidget(SB_HealthDecrease,5,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   312
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   313
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   314
    l->setText(QLabel::tr("% Rope Length"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   315
    l->setWhatsThis(wtRopeModifier);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   316
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   317
    glBSLayout->addWidget(l,6,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   318
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   319
    l->setWhatsThis(wtRopeModifier);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   320
    l->setFixedSize(32,32);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   321
    l->setPixmap(QPixmap(":/res/iconRope.png"));
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   322
    glBSLayout->addWidget(l,6,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   323
    SB_RopeModifier = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   324
    SB_RopeModifier->setWhatsThis(wtRopeModifier);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   325
    SB_RopeModifier->setRange(25, 999);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   326
    SB_RopeModifier->setValue(100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   327
    SB_RopeModifier->setSingleStep(25);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   328
    glBSLayout->addWidget(SB_RopeModifier,6,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   329
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   330
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   331
    l->setText(QLabel::tr("Crate Drops"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   332
    l->setWhatsThis(wtCaseProb);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   333
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   334
    glBSLayout->addWidget(l,7,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   335
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   336
    l->setFixedSize(32,32);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   337
    l->setWhatsThis(wtCaseProb);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   338
    l->setPixmap(QPixmap(":/res/iconBox.png"));
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   339
    glBSLayout->addWidget(l,7,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   340
    SB_CaseProb = new FreqSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   341
    SB_CaseProb->setWhatsThis(wtCaseProb);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   342
    SB_CaseProb->setRange(0, 9);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   343
    SB_CaseProb->setValue(5);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   344
    glBSLayout->addWidget(SB_CaseProb,7,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   345
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   346
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   347
    l->setText(QLabel::tr("% Health Crates"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   348
    l->setWhatsThis(wtHealthCrates);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   349
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   350
    glBSLayout->addWidget(l,8,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   351
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   352
    l->setFixedSize(32,32);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   353
    l->setWhatsThis(wtHealthCrates);
11694
d448b304bc70 Update scheme editor icons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   354
    l->setPixmap(QPixmap(":/res/iconHealthPercent.png"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   355
    glBSLayout->addWidget(l,8,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   356
    SB_HealthCrates = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   357
    SB_HealthCrates->setWhatsThis(wtHealthCrates);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   358
    SB_HealthCrates->setRange(0, 100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   359
    SB_HealthCrates->setValue(35);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   360
    SB_HealthCrates->setSingleStep(5);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   361
    glBSLayout->addWidget(SB_HealthCrates,8,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   362
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   363
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   364
    l->setText(QLabel::tr("Health in Crates"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   365
    l->setWhatsThis(wtCrateHealth);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   366
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   367
    glBSLayout->addWidget(l,9,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   368
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   369
    l->setFixedSize(32,32);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   370
    l->setWhatsThis(wtCrateHealth);
11694
d448b304bc70 Update scheme editor icons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   371
    l->setPixmap(QPixmap(":/res/iconHealth.png"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   372
    glBSLayout->addWidget(l,9,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   373
    SB_CrateHealth = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   374
    SB_CrateHealth->setWhatsThis(wtCrateHealth);
11886
b27d2351ec16 Relax some health bounds in game scheme editor
Wuzzy <almikes@aol.com>
parents: 11881
diff changeset
   375
    SB_CrateHealth->setRange(0, 1000);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   376
    SB_CrateHealth->setValue(25);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   377
    SB_CrateHealth->setSingleStep(5);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   378
    glBSLayout->addWidget(SB_CrateHealth,9,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   379
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   380
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   381
    l->setText(QLabel::tr("Mines Time"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   382
    l->setWhatsThis(wtMinesTime);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   383
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   384
    glBSLayout->addWidget(l,10,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   385
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   386
    l->setWhatsThis(wtMinesTime);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   387
    l->setFixedSize(32,32);
11694
d448b304bc70 Update scheme editor icons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   388
    l->setPixmap(QPixmap(":/res/iconMineTime.png"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   389
    glBSLayout->addWidget(l,10,1,1,1);
11815
68bc5ebce319 Fix mines time displaying "1 seconds" in frontend
Wuzzy <almikes@aol.com>
parents: 11813
diff changeset
   390
    SB_MinesTime = new MinesTimeSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   391
    SB_MinesTime->setWhatsThis(wtMinesTime);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   392
    SB_MinesTime->setRange(-1, 5);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   393
    SB_MinesTime->setValue(3);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   394
    SB_MinesTime->setSingleStep(1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   395
    glBSLayout->addWidget(SB_MinesTime,10,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   396
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   397
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   398
    l->setText(QLabel::tr("Mines"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   399
    l->setWhatsThis(wtMines);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   400
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   401
    glBSLayout->addWidget(l,11,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   402
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   403
    l->setWhatsThis(wtMines);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   404
    l->setFixedSize(32,32);
11694
d448b304bc70 Update scheme editor icons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   405
    l->setPixmap(QPixmap(":/res/iconMine.png"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   406
    glBSLayout->addWidget(l,11,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   407
    SB_Mines = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   408
    SB_Mines->setWhatsThis(wtMines);
10236
8fa1ccfba752 - Increase limits on number of mines and explosives in game scheme
unc0rr
parents: 10108
diff changeset
   409
    SB_Mines->setRange(0, 200);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   410
    SB_Mines->setValue(0);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   411
    SB_Mines->setSingleStep(5);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   412
    glBSLayout->addWidget(SB_Mines,11,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   413
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   414
    l = new QLabel(gbBasicSettings);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   415
    l->setText(QLabel::tr("% Dud Mines"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   416
    l->setWhatsThis(wtMineDuds);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   417
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   418
    glBSLayout->addWidget(l,12,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   419
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   420
    l->setWhatsThis(wtMineDuds);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   421
    l->setFixedSize(32,32);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   422
    l->setPixmap(QPixmap(":/res/iconDud.png"));
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   423
    glBSLayout->addWidget(l,12,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   424
    SB_MineDuds = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   425
    SB_MineDuds->setWhatsThis(wtMineDuds);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   426
    SB_MineDuds->setRange(0, 100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   427
    SB_MineDuds->setValue(0);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   428
    SB_MineDuds->setSingleStep(5);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   429
    glBSLayout->addWidget(SB_MineDuds,12,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   430
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   431
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   432
    l->setText(QLabel::tr("Barrels"));
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   433
    l->setWhatsThis(wtExplosives);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   434
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   435
    glBSLayout->addWidget(l,13,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   436
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   437
    l->setWhatsThis(wtExplosives);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   438
    l->setFixedSize(32,32);
11694
d448b304bc70 Update scheme editor icons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   439
    l->setPixmap(QPixmap(":/res/iconExplosive.png"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   440
    glBSLayout->addWidget(l,13,1,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   441
    SB_Explosives = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   442
    SB_Explosives->setWhatsThis(wtExplosives);
10236
8fa1ccfba752 - Increase limits on number of mines and explosives in game scheme
unc0rr
parents: 10108
diff changeset
   443
    SB_Explosives->setRange(0, 200);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   444
    SB_Explosives->setValue(0);
10236
8fa1ccfba752 - Increase limits on number of mines and explosives in game scheme
unc0rr
parents: 10108
diff changeset
   445
    SB_Explosives->setSingleStep(3);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   446
    glBSLayout->addWidget(SB_Explosives,13,2,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   447
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   448
    l = new QLabel(gbBasicSettings);
10822
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   449
    l->setText(QLabel::tr("Air Mines"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   450
    l->setWhatsThis(wtAirMines);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   451
    l->setWordWrap(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   452
    glBSLayout->addWidget(l,14,0,1,1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   453
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   454
    l->setWhatsThis(wtAirMines);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   455
    l->setFixedSize(32,32);
11694
d448b304bc70 Update scheme editor icons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   456
    l->setPixmap(QPixmap(":/res/iconAirMine.png"));
10822
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   457
    glBSLayout->addWidget(l,14,1,1,1);
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   458
    SB_AirMines = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   459
    SB_AirMines->setWhatsThis(wtAirMines);
10822
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   460
    SB_AirMines->setRange(0, 200);
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   461
    SB_AirMines->setValue(0);
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   462
    SB_AirMines->setSingleStep(5);
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   463
    glBSLayout->addWidget(SB_AirMines,14,2,1,1);
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   464
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   465
    l = new QLabel(gbBasicSettings);
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   466
    l->setText(QLabel::tr("Sentry Bots"));
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   467
    l->setWhatsThis(wtSentries);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   468
    l->setWordWrap(true);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   469
    glBSLayout->addWidget(l,15,0,1,1);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   470
    l = new QLabel(gbBasicSettings);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   471
    l->setWhatsThis(wtSentries);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   472
    l->setFixedSize(32,32);
15704
842385b5e0f6 Add placeholder icon and text for sentry bot
Wuzzy <Wuzzy2@mail.ru>
parents: 15666
diff changeset
   473
    l->setPixmap(QPixmap(":/res/iconSentry.png"));
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   474
    glBSLayout->addWidget(l,15,1,1,1);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   475
    SB_Sentries = new QSpinBox(gbBasicSettings);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   476
    SB_Sentries->setWhatsThis(wtSentries);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   477
    SB_Sentries->setRange(0, 200);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   478
    SB_Sentries->setValue(0);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   479
    SB_Sentries->setSingleStep(5);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   480
    glBSLayout->addWidget(SB_Sentries,15,2,1,1);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   481
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   482
    l = new QLabel(gbBasicSettings);
14300
20b08e59730d Add a few translator comments to some not-so-obvious strings
Wuzzy <Wuzzy2@mail.ru>
parents: 14283
diff changeset
   483
//: Label of game scheme setting for the time you get after an attack
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   484
    l->setText(QLabel::tr("% Retreat Time"));
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   485
    l->setWhatsThis(wtGetAwayTime);
10822
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   486
    l->setWordWrap(true);
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   487
    glBSLayout->addWidget(l,16,0,1,1);
10822
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   488
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   489
    l->setWhatsThis(wtGetAwayTime);
10822
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   490
    l->setFixedSize(32,32);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   491
    l->setPixmap(QPixmap(":/res/iconTime.png"));
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   492
    glBSLayout->addWidget(l,16,1,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   493
    SB_GetAwayTime = new QSpinBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   494
    SB_GetAwayTime->setWhatsThis(wtGetAwayTime);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   495
    SB_GetAwayTime->setRange(0, 999);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   496
    SB_GetAwayTime->setValue(100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   497
    SB_GetAwayTime->setSingleStep(25);
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   498
    glBSLayout->addWidget(SB_GetAwayTime,16,2,1,1);
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6089
diff changeset
   499
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   500
    l = new QLabel(gbBasicSettings);
9489
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   501
    l->setText(QLabel::tr("World Edge"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   502
    l->setWhatsThis(wtWorldEdge);
9489
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   503
    l->setWordWrap(true);
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   504
    glBSLayout->addWidget(l,17,0,1,1);
9489
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   505
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   506
    l->setWhatsThis(wtWorldEdge);
9489
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   507
    l->setFixedSize(32,32);
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   508
    l->setPixmap(QPixmap(":/res/iconEarth.png"));
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   509
    glBSLayout->addWidget(l,17,1,1,1);
9902
eb8e8b09b2f0 Special script parameter variable in game scheme
unc0rr
parents: 9491
diff changeset
   510
9489
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   511
    CB_WorldEdge = new QComboBox(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   512
    CB_WorldEdge->setWhatsThis(wtWorldEdge);
9489
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   513
    CB_WorldEdge->insertItem(0, tr("None (Default)"));
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   514
    CB_WorldEdge->insertItem(1, tr("Wrap (World wraps)"));
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   515
    CB_WorldEdge->insertItem(2, tr("Bounce (Edges reflect)"));
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   516
    CB_WorldEdge->insertItem(3, tr("Sea (Edges connect to sea)"));
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   517
    /* CB_WorldEdge->insertItem(4, tr("Skybox")); */
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   518
    glBSLayout->addWidget(CB_WorldEdge,17,2,1,1);
9489
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   519
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   520
0818d14e90be add world edges to config
nemo
parents: 9080
diff changeset
   521
    l = new QLabel(gbBasicSettings);
9902
eb8e8b09b2f0 Special script parameter variable in game scheme
unc0rr
parents: 9491
diff changeset
   522
    l->setText(QLabel::tr("Script parameter"));
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   523
    l->setWhatsThis(wtScriptParam);
9902
eb8e8b09b2f0 Special script parameter variable in game scheme
unc0rr
parents: 9491
diff changeset
   524
    l->setWordWrap(true);
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   525
    glBSLayout->addWidget(l,18,0,1,1);
9902
eb8e8b09b2f0 Special script parameter variable in game scheme
unc0rr
parents: 9491
diff changeset
   526
    l = new QLabel(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   527
    l->setWhatsThis(wtScriptParam);
9902
eb8e8b09b2f0 Special script parameter variable in game scheme
unc0rr
parents: 9491
diff changeset
   528
    l->setFixedSize(32,32);
11694
d448b304bc70 Update scheme editor icons
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   529
    l->setPixmap(QPixmap(":/res/iconScript.png"));
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   530
    glBSLayout->addWidget(l,18,1,1,1);
9902
eb8e8b09b2f0 Special script parameter variable in game scheme
unc0rr
parents: 9491
diff changeset
   531
eb8e8b09b2f0 Special script parameter variable in game scheme
unc0rr
parents: 9491
diff changeset
   532
    LE_ScriptParam = new QLineEdit(gbBasicSettings);
11813
5bda5af6a9c7 Add help texts for game scheme's basic settings (initial health, etc.)
Wuzzy <almikes@aol.com>
parents: 11755
diff changeset
   533
    LE_ScriptParam->setWhatsThis(wtScriptParam);
9902
eb8e8b09b2f0 Special script parameter variable in game scheme
unc0rr
parents: 9491
diff changeset
   534
    LE_ScriptParam->setMaxLength(240);
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   535
    glBSLayout->addWidget(LE_ScriptParam,18,2,1,1);
9902
eb8e8b09b2f0 Special script parameter variable in game scheme
unc0rr
parents: 9491
diff changeset
   536
13228
d23742ccf92b Frontend: Properly “gray out” most disabled widgets (a lot of them weren't)
Wuzzy <Wuzzy2@mail.ru>
parents: 13197
diff changeset
   537
    L_name = new QLabel(gbBasicSettings);
d23742ccf92b Frontend: Properly “gray out” most disabled widgets (a lot of them weren't)
Wuzzy <Wuzzy2@mail.ru>
parents: 13197
diff changeset
   538
    L_name->setText(QLabel::tr("Scheme Name:"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   539
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   540
    LE_name = new QLineEdit(this);
14860
e239378a9400 Prevent entering “/”, “\” and “:” in team and scheme names.
Wuzzy <Wuzzy2@mail.ru>
parents: 14857
diff changeset
   541
    QRegExp rx(*cSafeFileNameRegExp);
e239378a9400 Prevent entering “/”, “\” and “:” in team and scheme names.
Wuzzy <Wuzzy2@mail.ru>
parents: 14857
diff changeset
   542
    QRegExpValidator * val = new QRegExpValidator(rx, LE_name);
e239378a9400 Prevent entering “/”, “\” and “:” in team and scheme names.
Wuzzy <Wuzzy2@mail.ru>
parents: 14857
diff changeset
   543
    LE_name->setValidator(val);
12123
4027903ff3e7 updates to polish translation by alzen, also add two unlocalised string he found in the gui
nemo
parents: 11886
diff changeset
   544
    LE_name->setWhatsThis(tr("Name of this scheme"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   545
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   546
    gl->addWidget(LE_name,15,1,1,5);
13228
d23742ccf92b Frontend: Properly “gray out” most disabled widgets (a lot of them weren't)
Wuzzy <Wuzzy2@mail.ru>
parents: 13197
diff changeset
   547
    gl->addWidget(L_name,15,0,1,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   548
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   549
    return pageLayout;
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   550
}
6009
14f6fc9869f2 code cleanup/etc
sheepluva
parents: 5719
diff changeset
   551
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   552
QLayout * PageScheme::footerLayoutDefinition()
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   553
{
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   554
    QHBoxLayout * bottomLayout = new QHBoxLayout();
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   555
    selectScheme = new QComboBox(this);
11674
d59b6f289e30 Increase size of many drop-down lists
Wuzzy <almikes@aol.com>
parents: 11046
diff changeset
   556
    selectScheme->setMaxVisibleItems(50);
6009
14f6fc9869f2 code cleanup/etc
sheepluva
parents: 5719
diff changeset
   557
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   558
    bottomLayout->addWidget(selectScheme, 0);
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   559
    BtnCopy = addButton(tr("Copy"), bottomLayout, 1);
14580
da2094316dd7 Frontend: More button padding tweaking
Wuzzy <Wuzzy2@mail.ru>
parents: 14300
diff changeset
   560
    BtnCopy->setStyleSheet("padding: 5px;");
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   561
    BtnNew = addButton(tr("New"), bottomLayout, 2);
14580
da2094316dd7 Frontend: More button padding tweaking
Wuzzy <Wuzzy2@mail.ru>
parents: 14300
diff changeset
   562
    BtnNew->setStyleSheet("padding: 5px;");
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   563
    BtnDelete = addButton(tr("Delete"), bottomLayout, 3);
14580
da2094316dd7 Frontend: More button padding tweaking
Wuzzy <Wuzzy2@mail.ru>
parents: 14300
diff changeset
   564
    BtnDelete->setStyleSheet("padding: 5px;");
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   565
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   566
    bottomLayout->setStretch(1,1);
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   567
    bottomLayout->setStretch(2,1);
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   568
    bottomLayout->setStretch(3,1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   569
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   570
    return bottomLayout;
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   571
}
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   572
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   573
void PageScheme::connectSignals()
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   574
{
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   575
    connect(BtnCopy, SIGNAL(clicked()), this, SLOT(copyRow()));
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   576
    connect(BtnNew, SIGNAL(clicked()), this, SLOT(newRow()));
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   577
    connect(BtnDelete, SIGNAL(clicked()), this, SLOT(deleteRow()));
15650
e63748a3aa52 workaround for world edge selector on MacOS
alfadur
parents: 14860
diff changeset
   578
    connect(CB_WorldEdge, SIGNAL(currentIndexChanged(int)), this, SLOT(worldEdgeChanged(int)));
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   579
    mapper = new QDataWidgetMapper(this);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   580
    connect(selectScheme, SIGNAL(currentIndexChanged(int)), mapper, SLOT(setCurrentIndex(int)));
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   581
    connect(selectScheme, SIGNAL(currentIndexChanged(int)), this, SLOT(schemeSelected(int)));
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   582
}
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   583
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   584
PageScheme::PageScheme(QWidget* parent) : AbstractPage(parent)
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   585
{
14283
72e9d69a5e4d silence warning
nemo
parents: 13840
diff changeset
   586
    changingSchemes = false;
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   587
    initPage();
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   588
}
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   589
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   590
void PageScheme::setModel(QAbstractItemModel * model)
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   591
{
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   592
    mapper->setModel(model);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   593
    selectScheme->setModel(model);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   594
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   595
    mapper->addMapping(LE_name, 0);
13272
5984e8c6cbeb Add new game flag gfSwitchHog, enable hog switching at turn start
Wuzzy <Wuzzy2@mail.ru>
parents: 13228
diff changeset
   596
    mapper->addMapping(TBW_switchhog, 1);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   597
    mapper->addMapping(TBW_teamsDivide, 2);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   598
    mapper->addMapping(TBW_solid, 3);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   599
    mapper->addMapping(TBW_border, 4);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   600
    mapper->addMapping(TBW_lowGravity, 5);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   601
    mapper->addMapping(TBW_laserSight, 6);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   602
    mapper->addMapping(TBW_invulnerable, 7);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   603
    mapper->addMapping(TBW_resethealth, 8);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   604
    mapper->addMapping(TBW_vampiric, 9);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   605
    mapper->addMapping(TBW_karma, 10);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   606
    mapper->addMapping(TBW_artillery, 11);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   607
    mapper->addMapping(TBW_randomorder, 12);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   608
    mapper->addMapping(TBW_king, 13);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   609
    mapper->addMapping(TBW_placehog, 14);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   610
    mapper->addMapping(TBW_sharedammo, 15);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   611
    mapper->addMapping(TBW_disablegirders, 16);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   612
    mapper->addMapping(TBW_disablelandobjects, 17);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   613
    mapper->addMapping(TBW_aisurvival, 18);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   614
    mapper->addMapping(TBW_infattack, 19);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   615
    mapper->addMapping(TBW_resetweps, 20);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   616
    mapper->addMapping(TBW_perhogammo, 21);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   617
    mapper->addMapping(TBW_nowind, 22);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   618
    mapper->addMapping(TBW_morewind, 23);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   619
    mapper->addMapping(TBW_tagteam, 24);
5717
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   620
    mapper->addMapping(TBW_bottomborder, 25);
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   621
    mapper->addMapping(SB_DamageModifier, 26);
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   622
    mapper->addMapping(SB_TurnTime, 27);
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   623
    mapper->addMapping(SB_InitHealth, 28);
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   624
    mapper->addMapping(SB_SuddenDeath, 29);
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   625
    mapper->addMapping(SB_CaseProb, 30);
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   626
    mapper->addMapping(SB_MinesTime, 31);
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   627
    mapper->addMapping(SB_Mines, 32);
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   628
    mapper->addMapping(SB_MineDuds, 33);
6d513913b7a9 Add option for a bottom border. Needs testing.
nemo
parents: 5204
diff changeset
   629
    mapper->addMapping(SB_Explosives, 34);
10822
def423815f24 hook up to frontend
nemo
parents: 10236
diff changeset
   630
    mapper->addMapping(SB_AirMines, 35);
15666
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   631
    mapper->addMapping(SB_Sentries, 36);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   632
    mapper->addMapping(SB_HealthCrates, 37);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   633
    mapper->addMapping(SB_CrateHealth, 38);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   634
    mapper->addMapping(SB_WaterRise, 39);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   635
    mapper->addMapping(SB_HealthDecrease, 40);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   636
    mapper->addMapping(SB_RopeModifier, 41);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   637
    mapper->addMapping(SB_GetAwayTime, 42);
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   638
    mapper->addMapping(CB_WorldEdge, 43, "currentIndex");
3997d85b3d2e add sentries count to game config
alfadur
parents: 15650
diff changeset
   639
    mapper->addMapping(LE_ScriptParam, 44);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   640
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   641
    mapper->toFirst();
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   642
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   643
    connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(dataChanged(QModelIndex, QModelIndex)));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   644
}
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   645
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   646
void PageScheme::newRow()
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   647
{
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   648
    changingSchemes = true;
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   649
    QAbstractItemModel * model = mapper->model();
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   650
    model->insertRow(-1);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   651
    selectScheme->setCurrentIndex(model->rowCount() - 1);
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   652
    changingSchemes = false;
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   653
    checkDupe();
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   654
}
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   655
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   656
void PageScheme::copyRow()
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   657
{
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   658
    changingSchemes = true;
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   659
    QAbstractItemModel * model = mapper->model();
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   660
    model->insertRow(selectScheme->currentIndex());
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   661
    selectScheme->setCurrentIndex(model->rowCount() - 1);
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   662
    changingSchemes = false;
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   663
    checkDupe();
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   664
}
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   665
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   666
void PageScheme::deleteRow()
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   667
{
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   668
    changingSchemes = true;
13197
0bc5f618ca7c Rename the misleadingly-named AmmoSchemeModel to GameSchemeModel
Wuzzy <Wuzzy2@mail.ru>
parents: 12254
diff changeset
   669
    int numberOfDefaultSchemes = ((GameSchemeModel*)mapper->model())->numberOfDefaultSchemes;
7792
5e7bdcc8cff3 don't try to delete a default scheme
koda
parents: 6952
diff changeset
   670
    if (selectScheme->currentIndex() < numberOfDefaultSchemes)
5e7bdcc8cff3 don't try to delete a default scheme
koda
parents: 6952
diff changeset
   671
    {
7794
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   672
        QMessageBox deniedMsg(this);
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   673
        deniedMsg.setIcon(QMessageBox::Warning);
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   674
        deniedMsg.setWindowTitle(QMessageBox::tr("Schemes - Warning"));
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   675
        deniedMsg.setText(QMessageBox::tr("Cannot delete default scheme '%1'!").arg(selectScheme->currentText()));
14857
b9437746bffb Frontend: Force plain text mode for many message windows
Wuzzy <Wuzzy2@mail.ru>
parents: 14580
diff changeset
   676
        deniedMsg.setTextFormat(Qt::PlainText);
7794
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   677
        deniedMsg.setWindowModality(Qt::WindowModal);
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   678
        deniedMsg.exec();
7792
5e7bdcc8cff3 don't try to delete a default scheme
koda
parents: 6952
diff changeset
   679
    }
5e7bdcc8cff3 don't try to delete a default scheme
koda
parents: 6952
diff changeset
   680
    else
5e7bdcc8cff3 don't try to delete a default scheme
koda
parents: 6952
diff changeset
   681
    {
7794
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   682
        QMessageBox reallyDeleteMsg(this);
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   683
        reallyDeleteMsg.setIcon(QMessageBox::Question);
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   684
        reallyDeleteMsg.setWindowTitle(QMessageBox::tr("Schemes - Are you sure?"));
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   685
        reallyDeleteMsg.setText(QMessageBox::tr("Do you really want to delete the game scheme '%1'?").arg(selectScheme->currentText()));
14857
b9437746bffb Frontend: Force plain text mode for many message windows
Wuzzy <Wuzzy2@mail.ru>
parents: 14580
diff changeset
   686
        reallyDeleteMsg.setTextFormat(Qt::PlainText);
7794
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   687
        reallyDeleteMsg.setWindowModality(Qt::WindowModal);
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   688
        reallyDeleteMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   689
7794
ab7b94c03bc9 QMessageBox overhaul: unify buttons, style and appearance of info dialogs, fixing a few typos and return values along the way
koda
parents: 7792
diff changeset
   690
        if (reallyDeleteMsg.exec() == QMessageBox::Ok)
7792
5e7bdcc8cff3 don't try to delete a default scheme
koda
parents: 6952
diff changeset
   691
        {
5e7bdcc8cff3 don't try to delete a default scheme
koda
parents: 6952
diff changeset
   692
            QAbstractItemModel * model = mapper->model();
5e7bdcc8cff3 don't try to delete a default scheme
koda
parents: 6952
diff changeset
   693
            model->removeRow(selectScheme->currentIndex());
5e7bdcc8cff3 don't try to delete a default scheme
koda
parents: 6952
diff changeset
   694
        }
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   695
    }
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   696
    changingSchemes = false;
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   697
}
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   698
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   699
void PageScheme::dataChanged(QModelIndex topLeft, QModelIndex bottomRight)
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   700
{
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   701
    Q_UNUSED(bottomRight)
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   702
    if(topLeft.column() == 0) {
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   703
        checkDupe();
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   704
    };
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   705
}
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   706
15650
e63748a3aa52 workaround for world edge selector on MacOS
alfadur
parents: 14860
diff changeset
   707
void PageScheme::worldEdgeChanged(int n)
e63748a3aa52 workaround for world edge selector on MacOS
alfadur
parents: 14860
diff changeset
   708
{
e63748a3aa52 workaround for world edge selector on MacOS
alfadur
parents: 14860
diff changeset
   709
    if (mapper->itemDelegate()) 
e63748a3aa52 workaround for world edge selector on MacOS
alfadur
parents: 14860
diff changeset
   710
    {
e63748a3aa52 workaround for world edge selector on MacOS
alfadur
parents: 14860
diff changeset
   711
        mapper->itemDelegate()->commitData(CB_WorldEdge);
e63748a3aa52 workaround for world edge selector on MacOS
alfadur
parents: 14860
diff changeset
   712
    }    
e63748a3aa52 workaround for world edge selector on MacOS
alfadur
parents: 14860
diff changeset
   713
}
e63748a3aa52 workaround for world edge selector on MacOS
alfadur
parents: 14860
diff changeset
   714
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   715
void PageScheme::schemeSelected(int n)
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   716
{
13197
0bc5f618ca7c Rename the misleadingly-named AmmoSchemeModel to GameSchemeModel
Wuzzy <Wuzzy2@mail.ru>
parents: 12254
diff changeset
   717
    int c = ((GameSchemeModel*)mapper->model())->numberOfDefaultSchemes;
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   718
    gbGameModes->setEnabled(n >= c);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   719
    gbBasicSettings->setEnabled(n >= c);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   720
    LE_name->setEnabled(n >= c);
13228
d23742ccf92b Frontend: Properly “gray out” most disabled widgets (a lot of them weren't)
Wuzzy <Wuzzy2@mail.ru>
parents: 13197
diff changeset
   721
    L_name->setEnabled(n >= c);
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   722
    checkDupe();
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   723
}
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   724
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   725
// Check for duplicates and rename scheme if duplicate found
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   726
void PageScheme::checkDupe()
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   727
{
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   728
    if (changingSchemes)
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   729
    {
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   730
        return;
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   731
    }
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   732
    int except = selectScheme->currentIndex();
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   733
    QString name = selectScheme->currentText();
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   734
    GameSchemeModel* model = (GameSchemeModel*)mapper->model();
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   735
    bool dupe = model->hasScheme(name, except);
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   736
    if (dupe)
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   737
    {
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   738
        QString newName;
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   739
        //name already used -> look for an appropriate name
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   740
        int i=2;
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   741
        while(model->hasScheme(newName = tr("%1 (%2)").arg(name).arg(i++), except))
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   742
        {
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   743
            if(i > 1000)
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   744
            {
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   745
                return;
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   746
            }
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   747
        }
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   748
        LE_name->setText(newName);
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   749
        selectScheme->setCurrentText(newName);
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   750
        model->renameScheme(except, newName);
6042
8b5345758f62 some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents: 6009
diff changeset
   751
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   752
        QMessageBox dupeMsg(this);
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   753
        dupeMsg.setIcon(QMessageBox::Warning);
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   754
        dupeMsg.setWindowTitle(QMessageBox::tr("Schemes - Name already taken"));
14857
b9437746bffb Frontend: Force plain text mode for many message windows
Wuzzy <Wuzzy2@mail.ru>
parents: 14580
diff changeset
   755
        dupeMsg.setTextFormat(Qt::PlainText);
13554
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   756
        dupeMsg.setText(QMessageBox::tr("A scheme with the name '%1' already exists. Your scheme has been renamed to '%2'.").arg(name).arg(newName));
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   757
        dupeMsg.setWindowModality(Qt::WindowModal);
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   758
        dupeMsg.exec();
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   759
    }
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   760
}
a5a8488e2485 Prevent saving game schemes if name was already been taken
Wuzzy <Wuzzy2@mail.ru>
parents: 13272
diff changeset
   761