QTfrontend/ui/page/AbstractPage.cpp
author dag10
Mon, 14 Jan 2013 13:28:03 +0100
changeset 8384 a6e7a95f3b2e
parent 8377 869f80966a77
child 8385 9e8924ff9813
permissions -rw-r--r--
GCI2012: Abstract Page Load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
     1
/*
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
     2
 * Hedgewars, a free turn based strategy game
6952
7f70f37bbf08 license header year range adjustments
sheepluva
parents: 6700
diff changeset
     3
 * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com>
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
     4
 *
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
     8
 *
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    12
 * GNU General Public License for more details.
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    13
 *
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    17
 */
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    18
6200
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6175
diff changeset
    19
/**
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6175
diff changeset
    20
 * @file
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6175
diff changeset
    21
 * @brief AbstractPage class implementation
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6175
diff changeset
    22
 */
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6175
diff changeset
    23
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    24
#include "AbstractPage.h"
6477
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    25
#include <QLabel>
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    26
#include <QSize>
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    27
#include <QFontMetricsF>
8384
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
    28
#include <qDebug>
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    29
7779
0c5f822916a7 Fix include
unc0rr
parents: 6952
diff changeset
    30
#include "qpushbuttonwithsound.h"
0c5f822916a7 Fix include
unc0rr
parents: 6952
diff changeset
    31
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    32
AbstractPage::AbstractPage(QWidget* parent)
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    33
{
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    34
    Q_UNUSED(parent);
6477
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    35
    defautDesc = new QString();
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    36
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    37
    font14 = new QFont("MS Shell Dlg", 14);
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    38
}
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
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: 6038
diff changeset
    40
void AbstractPage::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: 6038
diff changeset
    41
{
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: 6038
diff changeset
    42
    QGridLayout * pageLayout = new QGridLayout(this);
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: 6038
diff changeset
    43
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: 6038
diff changeset
    44
    // stretch grid space for body and footer
8377
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    45
    pageLayout->setColumnStretch(0,0);
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    46
    pageLayout->setColumnStretch(1,0);
8149
237802cf4610 Google Code-in: Center help text field
Mitchell Kember <mk12360@gmail.com>
parents: 7794
diff changeset
    47
    pageLayout->setColumnStretch(2,1);
8377
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    48
    pageLayout->setColumnStretch(3,0);
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: 6038
diff changeset
    49
    pageLayout->setRowStretch(0,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: 6038
diff changeset
    50
    pageLayout->setRowStretch(1,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: 6038
diff changeset
    51
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: 6038
diff changeset
    52
    // add back/exit button
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: 6038
diff changeset
    53
    btnBack = formattedButton(":/res/Exit.png", true);
6699
83dd3447a212 exploit the new setWhatsThis feature in our desktop frontend
koda
parents: 6577
diff changeset
    54
    btnBack->setWhatsThis(tr("Go back"));
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: 6038
diff changeset
    55
    pageLayout->addWidget(btnBack, 1, 0, 1, 1, Qt::AlignLeft | Qt::AlignBottom);
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: 6038
diff changeset
    56
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: 6038
diff changeset
    57
    // add body layout as defined by the subclass
8377
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    58
    pageLayout->addLayout(bodyLayoutDefinition(), 0, 0, 1, 4);
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    59
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    60
    // add left footer layout
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    61
    QLayout * flld = footerLayoutLeftDefinition();
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    62
    if (flld != NULL)
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    63
        pageLayout->addLayout(flld, 1, 1);
6477
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    64
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    65
    descLabel = new QLabel();
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    66
    descLabel->setAlignment(Qt::AlignCenter);
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    67
    descLabel->setWordWrap(true);
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    68
    descLabel->setOpenExternalLinks(true);
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    69
    descLabel->setFixedHeight(50);
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
    70
    descLabel->setStyleSheet("font-size: 16px");
8377
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    71
    pageLayout->addWidget(descLabel, 1, 2);
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: 6038
diff changeset
    72
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: 6038
diff changeset
    73
    // add footer layout
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: 6038
diff changeset
    74
    QLayout * fld = 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: 6038
diff changeset
    75
    if (fld != NULL)
8377
869f80966a77 GCI2012: Improve Game Configuration Widget
dag10
parents: 8149
diff changeset
    76
        pageLayout->addLayout(fld, 1, 3);
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: 6038
diff changeset
    77
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: 6038
diff changeset
    78
    // connect signals
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: 6038
diff changeset
    79
    connect(btnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
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: 6038
diff changeset
    80
    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: 6038
diff changeset
    81
}
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: 6038
diff changeset
    82
6577
9e49e6a8585b disable the glitchy exit sound
bovi
parents: 6572
diff changeset
    83
QPushButtonWithSound * AbstractPage::formattedButton(const QString & name, bool hasIcon)
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    84
{
6572
0d0af531c1c7 GCI task: ping
bovi
parents: 6477
diff changeset
    85
    QPushButtonWithSound * btn = new QPushButtonWithSound(this);
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    86
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    87
    if (hasIcon)
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    88
    {
6200
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6175
diff changeset
    89
        const QIcon& lp=QIcon(name);
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    90
        QSize sz = lp.actualSize(QSize(65535, 65535));
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    91
        btn->setIcon(lp);
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    92
        btn->setFixedSize(sz);
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    93
        btn->setIconSize(sz);
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    94
        btn->setFlat(true);
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    95
        btn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    96
    }
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    97
    else
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    98
    {
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
    99
        btn->setFont(*font14);
6200
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6175
diff changeset
   100
        btn->setText(name);
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   101
    }
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   102
    return btn;
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   103
}
7781
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   104
QPushButton* AbstractPage::formattedSoundlessButton(const QString & name, bool hasIcon)
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   105
{
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   106
    QPushButton* btn = new QPushButton(this);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   107
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   108
    if (hasIcon)
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   109
    {
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   110
        const QIcon& lp=QIcon(name);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   111
        QSize sz = lp.actualSize(QSize(65535, 65535));
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   112
        btn->setIcon(lp);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   113
        btn->setFixedSize(sz);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   114
        btn->setIconSize(sz);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   115
        btn->setFlat(true);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   116
        btn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   117
    }
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   118
    else
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   119
    {
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   120
        btn->setFont(*font14);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   121
        btn->setText(name);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   122
    }
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   123
    return btn;
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   124
}
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   125
6577
9e49e6a8585b disable the glitchy exit sound
bovi
parents: 6572
diff changeset
   126
QPushButtonWithSound * AbstractPage::addButton(const QString & name, QGridLayout * grid, int row, int column, int rowSpan, int columnSpan, bool hasIcon)
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   127
{
6577
9e49e6a8585b disable the glitchy exit sound
bovi
parents: 6572
diff changeset
   128
    QPushButtonWithSound * btn = formattedButton(name, hasIcon);
6200
6a4ace88d85a tweak and document abstract page
sheepluva
parents: 6175
diff changeset
   129
    grid->addWidget(btn, row, column, rowSpan, columnSpan);
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   130
    return btn;
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   131
}
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   132
6577
9e49e6a8585b disable the glitchy exit sound
bovi
parents: 6572
diff changeset
   133
QPushButtonWithSound * AbstractPage::addButton(const QString & name, QBoxLayout * box, int where, bool hasIcon)
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   134
{
6577
9e49e6a8585b disable the glitchy exit sound
bovi
parents: 6572
diff changeset
   135
    QPushButtonWithSound * btn = formattedButton(name, hasIcon);
6038
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   136
    box->addWidget(btn, where);
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   137
    return btn;
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   138
}
58d9badf3e7f wow, somebody was smoking some reaaally good sh!t right there, man!
sheepluva
parents:
diff changeset
   139
7781
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   140
QPushButton* AbstractPage::addSoundlessButton(const QString & name, QBoxLayout * box, int where, bool hasIcon)
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   141
{
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   142
    QPushButton* btn = formattedSoundlessButton(name, hasIcon);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   143
    box->addWidget(btn, where);
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   144
    return btn;
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   145
}
6505805e7f98 crude workaround for problem inu reported with sound button
nemo
parents: 7779
diff changeset
   146
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: 6038
diff changeset
   147
void AbstractPage::setBackButtonVisible(bool visible)
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: 6038
diff changeset
   148
{
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: 6038
diff changeset
   149
    btnBack->setVisible(visible);
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: 6038
diff changeset
   150
}
6477
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   151
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   152
void AbstractPage::setButtonDescription(QString desc)
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   153
{
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   154
    descLabel->setText(desc);
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   155
}
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   156
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   157
void AbstractPage::setDefautDescription(QString text)
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   158
{
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   159
    *defautDesc = text;
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   160
    descLabel->setText(text);
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   161
}
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   162
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   163
QString * AbstractPage::getDefautDescription()
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   164
{
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   165
    return defautDesc;
ad5741c252b9 GCI task: describez
Oranger
parents: 6200
diff changeset
   166
}
8384
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
   167
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
   168
void AbstractPage::triggerPageEnter()
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
   169
{
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
   170
    emit pageEnter();
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
   171
}
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
   172
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
   173
void AbstractPage::triggerPageLeave()
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
   174
{
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
   175
    emit pageLeave();
a6e7a95f3b2e GCI2012: Abstract Page Load
dag10
parents: 8377
diff changeset
   176
}