QTfrontend/ui/page/pageoptions.cpp
author sheepluva
Thu, 26 Apr 2012 09:47:35 +0200
changeset 6932 005393616925
parent 6911 1cda333286e0
child 6952 7f70f37bbf08
permissions -rw-r--r--
make DLC trigger data reload
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
6700
e04da46ee43c the most important commit of the year
koda
parents: 6699
diff changeset
     3
 * Copyright (c) 2006-2012 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
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
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: 6024
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 <QCheckBox>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    25
#include <QLabel>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    26
#include <QLineEdit>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    27
#include <QSpinBox>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    28
#include <QTextBrowser>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    29
#include <QTableWidget>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    30
#include <QSlider>
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    31
5204
e1a5f4d5d86a split pages.h into several header files
koda
parents: 5078
diff changeset
    32
#include "pageoptions.h"
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    33
#include "hwconsts.h"
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    34
#include "fpsedit.h"
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    35
#include "igbox.h"
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    36
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: 6024
diff changeset
    37
// TODO cleanup
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: 6024
diff changeset
    38
QLayout * PageOptions::bodyLayoutDefinition()
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    39
{
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: 6024
diff changeset
    40
    QGridLayout * pageLayout = new QGridLayout();
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    41
    pageLayout->setColumnStretch(0, 100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    42
    pageLayout->setColumnStretch(1, 100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    43
    pageLayout->setColumnStretch(2, 100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    44
    pageLayout->setRowStretch(0, 0);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    45
    //pageLayout->setRowStretch(1, 100);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    46
    pageLayout->setRowStretch(2, 0);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    47
    pageLayout->setContentsMargins(7, 7, 7, 0);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    48
    pageLayout->setSpacing(0);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    49
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
    QGroupBox * gbTwoBoxes = new QGroupBox(this);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    52
    pageLayout->addWidget(gbTwoBoxes, 0, 0, 1, 3);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    53
    QGridLayout * gbTBLayout = new QGridLayout(gbTwoBoxes);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    54
    gbTBLayout->setMargin(0);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    55
    gbTBLayout->setSpacing(0);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    56
    gbTBLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    57
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    58
    QPixmap pmNew(":/res/new.png");
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    59
    QPixmap pmEdit(":/res/edit.png");
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    60
    QPixmap pmDelete(":/res/delete.png");
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    61
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    62
    {
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    63
        teamsBox = new IconedGroupBox(this);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    64
        //teamsBox->setContentTopPadding(0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    65
        //teamsBox->setAttribute(Qt::WA_PaintOnScreen, true);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    66
        teamsBox->setIcon(QIcon(":/res/teamicon.png"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    67
        teamsBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    68
        teamsBox->setTitle(QGroupBox::tr("Teams"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    69
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    70
        QGridLayout * GBTlayout = new QGridLayout(teamsBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    71
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    72
        CBTeamName = new QComboBox(teamsBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    73
        GBTlayout->addWidget(CBTeamName, 0, 0);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    74
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    75
        BtnNewTeam = new QPushButton(teamsBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    76
        BtnNewTeam->setToolTip(tr("New team"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    77
        BtnNewTeam->setIconSize(pmNew.size());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    78
        BtnNewTeam->setIcon(pmNew);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    79
        BtnNewTeam->setMaximumWidth(pmNew.width() + 6);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    80
        connect(BtnNewTeam, SIGNAL(clicked()), this, SIGNAL(newTeamRequested()));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    81
        GBTlayout->addWidget(BtnNewTeam, 0, 1);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    82
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    83
        BtnEditTeam = new QPushButton(teamsBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    84
        BtnEditTeam->setToolTip(tr("Edit team"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    85
        BtnEditTeam->setIconSize(pmEdit.size());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    86
        BtnEditTeam->setIcon(pmEdit);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    87
        BtnEditTeam->setMaximumWidth(pmEdit.width() + 6);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    88
        connect(BtnEditTeam, SIGNAL(clicked()), this, SLOT(requestEditSelectedTeam()));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    89
        GBTlayout->addWidget(BtnEditTeam, 0, 2);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    90
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    91
        BtnDeleteTeam = new QPushButton(teamsBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    92
        BtnDeleteTeam->setToolTip(tr("Delete team"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    93
        BtnDeleteTeam->setIconSize(pmDelete.size());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    94
        BtnDeleteTeam->setIcon(pmDelete);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    95
        BtnDeleteTeam->setMaximumWidth(pmDelete.width() + 6);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    96
        connect(BtnDeleteTeam, SIGNAL(clicked()), this, SLOT(requestDeleteSelectedTeam()));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    97
        GBTlayout->addWidget(BtnDeleteTeam, 0, 3);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
    98
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
    99
        LblNoEditTeam = new QLabel(teamsBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   100
        LblNoEditTeam->setText(tr("You can't edit teams from team selection. Go back to main menu to add, edit or delete teams."));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   101
        LblNoEditTeam->setWordWrap(true);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   102
        LblNoEditTeam->setVisible(false);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   103
        GBTlayout->addWidget(LblNoEditTeam, 0, 0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   104
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   105
        gbTBLayout->addWidget(teamsBox, 0, 0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   106
    }
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   107
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   108
    {
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   109
        IconedGroupBox* groupWeapons = new IconedGroupBox(this);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   110
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   111
        //groupWeapons->setContentTopPadding(0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   112
        //groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   113
        groupWeapons->setIcon(QIcon(":/res/weaponsicon.png"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   114
        groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   115
        groupWeapons->setTitle(QGroupBox::tr("Schemes and Weapons"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   116
        QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   117
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   118
        QLabel* SchemeLabel = new QLabel(groupWeapons);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   119
        SchemeLabel->setText(QLabel::tr("Game scheme"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   120
        WeaponsLayout->addWidget(SchemeLabel, 1, 0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   121
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   122
        SchemesName = new QComboBox(groupWeapons);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   123
        WeaponsLayout->addWidget(SchemesName, 1, 1);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   124
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   125
        SchemeNew = new QPushButton(groupWeapons);
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   126
        SchemeNew->setWhatsThis(tr("New scheme"));
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   127
        SchemeNew->setIconSize(pmNew.size());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   128
        SchemeNew->setIcon(pmNew);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   129
        SchemeNew->setMaximumWidth(pmNew.width() + 6);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   130
        WeaponsLayout->addWidget(SchemeNew, 1, 2);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   131
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   132
        SchemeEdit = new QPushButton(groupWeapons);
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   133
        SchemeEdit->setWhatsThis(tr("Edit scheme"));
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   134
        SchemeEdit->setIconSize(pmEdit.size());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   135
        SchemeEdit->setIcon(pmEdit);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   136
        SchemeEdit->setMaximumWidth(pmEdit.width() + 6);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   137
        WeaponsLayout->addWidget(SchemeEdit, 1, 3);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   138
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   139
        SchemeDelete = new QPushButton(groupWeapons);
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   140
        SchemeDelete->setWhatsThis(tr("Delete scheme"));
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   141
        SchemeDelete->setIconSize(pmDelete.size());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   142
        SchemeDelete->setIcon(pmDelete);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   143
        SchemeDelete->setMaximumWidth(pmDelete.width() + 6);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   144
        WeaponsLayout->addWidget(SchemeDelete, 1, 4);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   145
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   146
        QLabel* WeaponLabel = new QLabel(groupWeapons);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   147
        WeaponLabel->setText(QLabel::tr("Weapons"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   148
        WeaponsLayout->addWidget(WeaponLabel, 2, 0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   149
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   150
        WeaponsName = new QComboBox(groupWeapons);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   151
        WeaponsLayout->addWidget(WeaponsName, 2, 1);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   152
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   153
        WeaponNew = new QPushButton(groupWeapons);
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   154
        WeaponNew->setWhatsThis(tr("New weapon set"));
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   155
        WeaponNew->setIconSize(pmNew.size());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   156
        WeaponNew->setIcon(pmNew);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   157
        WeaponNew->setMaximumWidth(pmNew.width() + 6);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   158
        WeaponsLayout->addWidget(WeaponNew, 2, 2);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   159
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   160
        WeaponEdit = new QPushButton(groupWeapons);
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   161
        WeaponEdit->setWhatsThis(tr("Edit weapon set"));
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   162
        WeaponEdit->setIconSize(pmEdit.size());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   163
        WeaponEdit->setIcon(pmEdit);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   164
        WeaponEdit->setMaximumWidth(pmEdit.width() + 6);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   165
        WeaponsLayout->addWidget(WeaponEdit, 2, 3);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   166
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   167
        WeaponDelete = new QPushButton(groupWeapons);
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6616
diff changeset
   168
        WeaponDelete->setWhatsThis(tr("Delete weapon set"));
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   169
        WeaponDelete->setIconSize(pmDelete.size());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   170
        WeaponDelete->setIcon(pmDelete);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   171
        WeaponDelete->setMaximumWidth(pmDelete.width() + 6);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   172
        WeaponsLayout->addWidget(WeaponDelete, 2, 4);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   173
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   174
        WeaponTooltip = new QCheckBox(this);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   175
        WeaponTooltip->setText(QCheckBox::tr("Show ammo menu tooltips"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   176
        WeaponsLayout->addWidget(WeaponTooltip, 3, 0, 1, 4);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   177
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   178
        gbTBLayout->addWidget(groupWeapons, 1, 0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   179
    }
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   180
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   181
    {
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   182
        IconedGroupBox* groupMisc = new IconedGroupBox(this);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   183
        //groupMisc->setContentTopPadding(0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   184
        groupMisc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   185
        groupMisc->setIcon(QIcon(":/res/miscicon.png"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   186
        //groupMisc->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   187
        groupMisc->setTitle(QGroupBox::tr("Misc"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   188
        QGridLayout * MiscLayout = new QGridLayout(groupMisc);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   189
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   190
        // Label for "Language"
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   191
        QLabel *labelLanguage = new QLabel(groupMisc);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   192
        labelLanguage->setText(QLabel::tr("Locale") + " *");
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   193
        MiscLayout->addWidget(labelLanguage, 0, 0);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   194
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   195
        // List of installed languages
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   196
        CBLanguage = new QComboBox(groupMisc);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   197
        QDir tmpdir;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   198
        tmpdir.cd(cfgdir->absolutePath());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   199
        tmpdir.cd("Data/Locale");
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   200
        tmpdir.setFilter(QDir::Files);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   201
        QStringList locs = tmpdir.entryList(QStringList("hedgewars_*.qm"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   202
        CBLanguage->addItem(QComboBox::tr("(System default)"), QString(""));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   203
        for(int i = 0; i < locs.count(); i++)
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   204
        {
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   205
            QLocale loc(locs[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   206
            CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", loc.name());
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   207
        }
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   208
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   209
        tmpdir.cd(datadir->absolutePath());
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   210
        tmpdir.cd("Locale");
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   211
        tmpdir.setFilter(QDir::Files);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   212
        QStringList tmplist = tmpdir.entryList(QStringList("hedgewars_*.qm"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   213
        for(int i = 0; i < tmplist.count(); i++)
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   214
        {
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   215
            if (locs.contains(tmplist[i])) continue;
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   216
            QLocale loc(tmplist[i].replace(QRegExp("hedgewars_(.*)\\.qm"), "\\1"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   217
            CBLanguage->addItem(QLocale::languageToString(loc.language()) + " (" + QLocale::countryToString(loc.country()) + ")", loc.name());
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   218
        }
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   219
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   220
        MiscLayout->addWidget(CBLanguage, 0, 1);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   221
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   222
        // Label and field for net nick
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   223
        labelNN = new QLabel(groupMisc);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   224
        labelNN->setText(QLabel::tr("Nickname"));
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   225
        MiscLayout->addWidget(labelNN, 1, 0);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   226
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   227
        editNetNick = new QLineEdit(groupMisc);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   228
        editNetNick->setMaxLength(20);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   229
        editNetNick->setText(QLineEdit::tr("anonymous"));
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   230
        MiscLayout->addWidget(editNetNick, 1, 1);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   231
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   232
        // Label and field for password
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   233
        labelNetPassword = new QLabel(groupMisc);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   234
        labelNetPassword->setText(QLabel::tr("Password"));
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   235
        MiscLayout->addWidget(labelNetPassword, 2, 0);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   236
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   237
        editNetPassword = new QLineEdit(groupMisc);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   238
        editNetPassword->setEchoMode(QLineEdit::Password);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   239
        MiscLayout->addWidget(editNetPassword, 2, 1);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   240
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   241
        CBSavePassword = new QCheckBox(groupMisc);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   242
        CBSavePassword->setText(QCheckBox::tr("Save password"));
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   243
        MiscLayout->addWidget(CBSavePassword, 3, 0, 1, 2);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   244
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   245
        CBAltDamage = new QCheckBox(groupMisc);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   246
        CBAltDamage->setText(QCheckBox::tr("Alternative damage show"));
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   247
        MiscLayout->addWidget(CBAltDamage, 4, 0, 1, 2);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   248
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   249
        CBNameWithDate = new QCheckBox(groupMisc);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   250
        CBNameWithDate->setText(QCheckBox::tr("Append date and time to record file name"));
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   251
        MiscLayout->addWidget(CBNameWithDate, 5, 0, 1, 2);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   252
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   253
        BtnAssociateFiles = new QPushButton(groupMisc);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   254
        BtnAssociateFiles->setText(QPushButton::tr("Associate file extensions"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   255
        BtnAssociateFiles->setEnabled(!custom_data && !custom_config);
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   256
        MiscLayout->addWidget(BtnAssociateFiles, 6, 0, 1, 2);
5252
ded882439548 file association for mac!
koda
parents: 5238
diff changeset
   257
5257
0bbdd47522b9 passing by reference... my darkest enemy
koda
parents: 5252
diff changeset
   258
#ifdef __APPLE__
0bbdd47522b9 passing by reference... my darkest enemy
koda
parents: 5252
diff changeset
   259
#ifdef SPARKLE_ENABLED
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   260
        CBAutoUpdate = new QCheckBox(groupMisc);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   261
        CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup"));
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   262
        MiscLayout->addWidget(CBAutoUpdate, 7, 0, 1, 3);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   263
#endif
5257
0bbdd47522b9 passing by reference... my darkest enemy
koda
parents: 5252
diff changeset
   264
#endif
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   265
        gbTBLayout->addWidget(groupMisc, 2, 0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   266
    }
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   267
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   268
    {
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   269
        AGGroupBox = new IconedGroupBox(this);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   270
        //AGGroupBox->setContentTopPadding(0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   271
        AGGroupBox->setIcon(QIcon(":/res/graphicsicon.png"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   272
        //AGGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   273
        AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   274
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   275
        QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   276
        QHBoxLayout * GBAreslayout = new QHBoxLayout(0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   277
        QHBoxLayout * GBAstereolayout = new QHBoxLayout(0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   278
        QHBoxLayout * GBAqualayout = new QHBoxLayout(0);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   279
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   280
        CBFrontendFullscreen = new QCheckBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   281
        CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   282
        GBAlayout->addWidget(CBFrontendFullscreen);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   283
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   284
        CBFrontendEffects = new QCheckBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   285
        CBFrontendEffects->setText(QCheckBox::tr("Frontend effects"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   286
        GBAlayout->addWidget(CBFrontendEffects);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   287
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   288
        CBEnableFrontendSound = new QCheckBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   289
        CBEnableFrontendSound->setText(QCheckBox::tr("Enable frontend sounds"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   290
        GBAlayout->addWidget(CBEnableFrontendSound);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   291
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   292
        CBEnableFrontendMusic = new QCheckBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   293
        CBEnableFrontendMusic->setText(QCheckBox::tr("Enable frontend music"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   294
        GBAlayout->addWidget(CBEnableFrontendMusic);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   295
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   296
        QFrame * hr = new QFrame(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   297
        hr->setFrameStyle(QFrame::HLine);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   298
        hr->setLineWidth(3);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   299
        hr->setFixedHeight(10);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   300
        GBAlayout->addWidget(hr);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   301
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   302
        QLabel * resolution = new QLabel(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   303
        resolution->setText(QLabel::tr("Resolution"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   304
        GBAreslayout->addWidget(resolution);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   305
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   306
        CBResolution = new QComboBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   307
        GBAreslayout->addWidget(CBResolution);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   308
        GBAlayout->addLayout(GBAreslayout);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   309
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   310
        CBFullscreen = new QCheckBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   311
        CBFullscreen->setText(QCheckBox::tr("Fullscreen"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   312
        GBAlayout->addWidget(CBFullscreen);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   313
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   314
        QLabel * quality = new QLabel(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   315
        quality->setText(QLabel::tr("Quality"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   316
        quality->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   317
        GBAqualayout->addWidget(quality);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   318
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   319
        SLQuality = new QSlider(Qt::Horizontal, AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   320
        SLQuality->setTickPosition(QSlider::TicksBelow);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   321
        SLQuality->setMaximum(5);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   322
        SLQuality->setMinimum(0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   323
        SLQuality->setFixedWidth(150);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   324
        GBAqualayout->addWidget(SLQuality);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   325
        GBAlayout->addLayout(GBAqualayout);
5878
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   326
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   327
        QLabel * stereo = new QLabel(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   328
        stereo->setText(QLabel::tr("Stereo rendering"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   329
        GBAstereolayout->addWidget(stereo);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   330
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   331
        CBStereoMode = new QComboBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   332
        CBStereoMode->addItem(QComboBox::tr("Disabled"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   333
        CBStereoMode->addItem(QComboBox::tr("Red/Cyan"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   334
        CBStereoMode->addItem(QComboBox::tr("Cyan/Red"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   335
        CBStereoMode->addItem(QComboBox::tr("Red/Blue"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   336
        CBStereoMode->addItem(QComboBox::tr("Blue/Red"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   337
        CBStereoMode->addItem(QComboBox::tr("Red/Green"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   338
        CBStereoMode->addItem(QComboBox::tr("Green/Red"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   339
        CBStereoMode->addItem(QComboBox::tr("Side-by-side"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   340
        CBStereoMode->addItem(QComboBox::tr("Top-Bottom"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   341
        CBStereoMode->addItem(QComboBox::tr("Wiggle"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   342
        CBStereoMode->addItem(QComboBox::tr("Red/Cyan grayscale"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   343
        CBStereoMode->addItem(QComboBox::tr("Cyan/Red grayscale"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   344
        CBStereoMode->addItem(QComboBox::tr("Red/Blue grayscale"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   345
        CBStereoMode->addItem(QComboBox::tr("Blue/Red grayscale"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   346
        CBStereoMode->addItem(QComboBox::tr("Red/Green grayscale"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   347
        CBStereoMode->addItem(QComboBox::tr("Green/Red grayscale"));
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   348
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   349
        GBAstereolayout->addWidget(CBStereoMode);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   350
        GBAlayout->addLayout(GBAstereolayout);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   351
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   352
        hr = new QFrame(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   353
        hr->setFrameStyle(QFrame::HLine);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   354
        hr->setLineWidth(3);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   355
        hr->setFixedHeight(10);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   356
        GBAlayout->addWidget(hr);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   357
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   358
        QHBoxLayout * GBAvollayout = new QHBoxLayout(0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   359
        QLabel * vol = new QLabel(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   360
        vol->setText(QLabel::tr("Initial sound volume"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   361
        GBAvollayout->addWidget(vol);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   362
        GBAlayout->addLayout(GBAvollayout);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   363
        volumeBox = new QSpinBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   364
        volumeBox->setRange(0, 100);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   365
        volumeBox->setSingleStep(5);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   366
        GBAvollayout->addWidget(volumeBox);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   367
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   368
        CBEnableSound = new QCheckBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   369
        CBEnableSound->setText(QCheckBox::tr("Enable sound"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   370
        GBAlayout->addWidget(CBEnableSound);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   371
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   372
        CBEnableMusic = new QCheckBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   373
        CBEnableMusic->setText(QCheckBox::tr("Enable music"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   374
        GBAlayout->addWidget(CBEnableMusic);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   375
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   376
        hr = new QFrame(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   377
        hr->setFrameStyle(QFrame::HLine);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   378
        hr->setLineWidth(3);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   379
        hr->setFixedHeight(10);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   380
        GBAlayout->addWidget(hr);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   381
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   382
        QHBoxLayout * GBAfpslayout = new QHBoxLayout(0);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   383
        QLabel * maxfps = new QLabel(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   384
        maxfps->setText(QLabel::tr("FPS limit"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   385
        GBAfpslayout->addWidget(maxfps);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   386
        GBAlayout->addLayout(GBAfpslayout);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   387
        fpsedit = new FPSEdit(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   388
        GBAfpslayout->addWidget(fpsedit);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   389
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   390
        CBShowFPS = new QCheckBox(AGGroupBox);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   391
        CBShowFPS->setText(QCheckBox::tr("Show FPS"));
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   392
        GBAlayout->addWidget(CBShowFPS);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   393
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   394
        gbTBLayout->addWidget(AGGroupBox, 0, 1, 3, 1);
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   395
    }
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   396
5878
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   397
    previousQuality = this->SLQuality->value();
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   398
    previousResolutionIndex = this->CBResolution->currentIndex();
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   399
    previousFullscreenValue = this->CBFullscreen->isChecked();
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: 6024
diff changeset
   400
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: 6024
diff changeset
   401
    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: 6024
diff changeset
   402
}
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: 6024
diff changeset
   403
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: 6024
diff changeset
   404
QLayout * PageOptions::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: 6024
diff changeset
   405
{
6525
6c97379c584b [GCI] backz task: unify the back button functionality, avoid using the save button
m4tx
parents: 6218
diff changeset
   406
    return NULL;
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: 6024
diff changeset
   407
}
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: 6024
diff changeset
   408
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: 6024
diff changeset
   409
void PageOptions::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: 6024
diff changeset
   410
{
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   411
    connect(SLQuality, SIGNAL(valueChanged(int)), this, SLOT(setQuality(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: 6024
diff changeset
   412
    connect(CBResolution, SIGNAL(currentIndexChanged(int)), this, SLOT(setResolution(int)));
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: 6024
diff changeset
   413
    connect(CBFullscreen, SIGNAL(stateChanged(int)), this, SLOT(setFullscreen(int)));
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   414
    connect(CBStereoMode, SIGNAL(currentIndexChanged(int)), this, SLOT(forceFullscreen(int)));
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   415
    connect(editNetNick, SIGNAL(editingFinished()), this, SLOT(trimNetNick()));
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   416
    connect(CBSavePassword, SIGNAL(stateChanged(int)), this, SLOT(savePwdChanged(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: 6024
diff changeset
   417
}
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: 6024
diff changeset
   418
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: 6024
diff changeset
   419
PageOptions::PageOptions(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: 6024
diff changeset
   420
{
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: 6024
diff changeset
   421
    initPage();
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   422
}
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   423
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   424
void PageOptions::forceFullscreen(int index)
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   425
{
5878
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   426
    bool forced = (index == 7 || index == 8 || index == 9);
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   427
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   428
    if (index != 0)
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   429
    {
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   430
        this->SLQuality->setValue(this->SLQuality->maximum());
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   431
        this->SLQuality->setEnabled(false);
5878
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   432
        this->CBFullscreen->setEnabled(!forced);
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   433
        this->CBFullscreen->setChecked(forced ? true : previousFullscreenValue);
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   434
        this->CBResolution->setCurrentIndex(forced ? 0 : previousResolutionIndex);
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   435
    }
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   436
    else
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6575
diff changeset
   437
    {
5878
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   438
        this->SLQuality->setEnabled(true);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   439
        this->CBFullscreen->setEnabled(true);
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   440
        this->SLQuality->setValue(previousQuality);
5878
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   441
        this->CBFullscreen->setChecked(previousFullscreenValue);
5877
514b639c40da remove the forced fullscreen resolution since everyone is hating it; kept it around only for stereo rendering (where it's mandatory)
koda
parents: 5745
diff changeset
   442
        this->CBResolution->setCurrentIndex(previousResolutionIndex);
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   443
    }
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   444
}
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   445
5878
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   446
void PageOptions::setQuality(int value)
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   447
{
6218
999215ca87d7 actually the those if(...); weren't supposed to be if statements in the first place, since the result is always true at that point of code anyway.
sheepluva
parents: 6217
diff changeset
   448
    Q_UNUSED(value);
6217
ef53ba841791 - Remove some old unused code
unc0rr
parents: 6060
diff changeset
   449
5878
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   450
    int index = this->CBStereoMode->currentIndex();
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   451
    if (index == 0)
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   452
        previousQuality = this->SLQuality->value();
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   453
}
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   454
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   455
void PageOptions::setFullscreen(int state)
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   456
{
6218
999215ca87d7 actually the those if(...); weren't supposed to be if statements in the first place, since the result is always true at that point of code anyway.
sheepluva
parents: 6217
diff changeset
   457
    Q_UNUSED(state);
6217
ef53ba841791 - Remove some old unused code
unc0rr
parents: 6060
diff changeset
   458
5878
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   459
    int index = this->CBStereoMode->currentIndex();
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   460
    if (index != 7 && index != 8 && index != 9)
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   461
        previousFullscreenValue = this->CBFullscreen->isChecked();
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   462
}
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   463
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   464
void PageOptions::setResolution(int state)
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   465
{
6218
999215ca87d7 actually the those if(...); weren't supposed to be if statements in the first place, since the result is always true at that point of code anyway.
sheepluva
parents: 6217
diff changeset
   466
    Q_UNUSED(state);
6217
ef53ba841791 - Remove some old unused code
unc0rr
parents: 6060
diff changeset
   467
5878
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   468
    int index = this->CBStereoMode->currentIndex();
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   469
    if (index != 7 && index != 8 && index != 9)
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   470
        previousResolutionIndex = this->CBResolution->currentIndex();
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   471
}
404ca990793a I.Fight.For.The.Users
koda
parents: 5877
diff changeset
   472
5078
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   473
void PageOptions::trimNetNick()
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   474
{
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   475
    editNetNick->setText(editNetNick->text().trimmed());
3527f0e7bb21 Removing pages.cpp and splitting it up into various files.
Zorg <zorgiepoo@gmail.com>
parents:
diff changeset
   476
}
6024
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   477
6911
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   478
void PageOptions::savePwdChanged(int state) {
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   479
    if (state == 0) {
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   480
        editNetPassword->setEnabled(false);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   481
        editNetPassword->setText("");
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   482
    } else
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   483
        editNetPassword->setEnabled(true);
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   484
}
1cda333286e0 added savepassword checkbox to options page, which now reloads values at every acces
koda
parents: 6700
diff changeset
   485
6024
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   486
void PageOptions::requestEditSelectedTeam()
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   487
{
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   488
    emit editTeamRequested(CBTeamName->currentText());
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   489
}
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   490
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   491
void PageOptions::requestDeleteSelectedTeam()
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   492
{
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   493
    emit deleteTeamRequested(CBTeamName->currentText());
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   494
}
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   495
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   496
void PageOptions::setTeamOptionsEnabled(bool enabled)
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   497
{
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   498
    BtnNewTeam->setVisible(enabled);
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   499
    BtnEditTeam->setVisible(enabled);
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   500
    BtnDeleteTeam->setVisible(enabled);
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   501
    CBTeamName->setVisible(enabled);
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   502
    LblNoEditTeam->setVisible(!enabled);
d38da7c19e43 some more cleanups and refactoring.
sheepluva
parents: 6009
diff changeset
   503
}