QTfrontend/ui/page/pagefeedback.cpp
author sheepluva
Wed, 02 May 2012 12:24:44 +0200
changeset 6991 1ec44dde5eb9
parent 6952 7f70f37bbf08
child 8250 ebaec8186e4a
permissions -rw-r--r--
make search filter field have a useable size on low frontend resolution
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6700
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
     1
/*
e04da46ee43c the most important commit of the year
koda
parents: 6616
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>
6700
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
     4
 *
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
     8
 *
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    12
 * GNU General Public License for more details.
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    13
 *
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    14
 * You should have received a copy of the GNU General Public License
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    15
 * along with this program; if not, write to the Free Software
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    17
 */
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    18
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    19
#include <QHBoxLayout>
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    20
#include <QLineEdit>
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    21
#include <QTextBrowser>
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    22
#include <QLabel>
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    23
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    24
#include "pagefeedback.h"
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    25
#include "hwconsts.h"
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    26
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    27
QLayout * PageFeedback::bodyLayoutDefinition()
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    28
{
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    29
    QVBoxLayout * pageLayout = new QVBoxLayout();
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    30
    QHBoxLayout * summaryLayout = new QHBoxLayout();
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    31
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    32
    info = new QLabel();
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    33
    info->setText(
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    34
        "<style type=\"text/css\">"
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    35
        "a { color: #ffcc00; }"
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    36
        "</style>"
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    37
        "<div align=\"center\"><h1>Please give us a feedback!</h1>"
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    38
        "<h3>We are always happy about suggestions, ideas or bug reports.<h3>"
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    39
        "<h4>The feedback will be posted as a new issue on our Google Code page.<h4>"
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    40
        "</div>"
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    41
    );
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    42
    pageLayout->addWidget(info);
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    43
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    44
    label_summary = new QLabel();
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    45
    label_summary->setText(QLabel::tr("Summary   "));
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    46
    summaryLayout->addWidget(label_summary);
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    47
    summary = new QLineEdit();
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    48
    summaryLayout->addWidget(summary);
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    49
    pageLayout->addLayout(summaryLayout);
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    50
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    51
    label_description = new QLabel();
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    52
    label_description->setText(QLabel::tr("Description"));
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    53
    pageLayout->addWidget(label_description, 0, Qt::AlignHCenter);
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    54
    description = new QTextBrowser();
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    55
    description->setReadOnly(false);
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    56
    pageLayout->addWidget(description);
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    57
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    58
    return pageLayout;
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    59
}
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    60
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    61
QLayout * PageFeedback::footerLayoutDefinition()
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    62
{
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    63
    QHBoxLayout * bottomLayout = new QHBoxLayout();
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    64
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    65
    bottomLayout->setStretch(0,1);
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    66
    //TODO: create logo for send button
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    67
    BtnSend = addButton("Send", bottomLayout, 0, false);
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    68
    bottomLayout->insertStretch(0);
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    69
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    70
    return bottomLayout;
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    71
}
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    72
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    73
void PageFeedback::connectSignals()
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    74
{
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    75
    //TODO
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    76
}
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    77
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    78
PageFeedback::PageFeedback(QWidget* parent) : AbstractPage(parent)
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    79
{
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    80
    initPage();
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    81
e04da46ee43c the most important commit of the year
koda
parents: 6616
diff changeset
    82
}