2168e4c4bc807c482f1cfd94cad024474e5bd4eb
[impuzzle] / newgamedialog.cpp
1 /*
2   Image Puzzle - A set your pieces straight game
3   Copyright (C) 2009  Timo Härkönen
4
5   This program is free software: you can redistribute it and/or modify
6   it under the terms of the GNU General Public License as published by
7   the Free Software Foundation, either version 3 of the License, or
8   (at your option) any later version.
9
10   This program is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   GNU General Public License for more details.
14
15   You should have received a copy of the GNU General Public License
16   along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  */
18
19 #include "newgamedialog.h"
20
21 #include <QComboBox>
22 #include <QVBoxLayout>
23 #include <QHBoxLayout>
24 #include <QLabel>
25 #include <QPushButton>
26 #include <QStringList>
27
28 NewGameDialog::NewGameDialog(QWidget *parent) :
29         QDialog(parent)
30 {
31     imageLabel_ = new QLabel(tr("Select image"));
32     imageCombo_ = new QComboBox;
33
34     piecesLabel_ = new QLabel(tr("Set piece count"));
35     piecesCombo_ = new QComboBox;
36
37     QStringList pieceList;
38     pieceList << "12" << "20" << "30";
39     piecesCombo_->addItems(pieceList);
40
41     comboLayout_ = new QHBoxLayout;
42     comboLayout_->addWidget(imageLabel_);
43     comboLayout_->addWidget(imageCombo_);
44     comboLayout_->addStretch();
45
46     startButton_ = new QPushButton(tr("Start"));
47
48     buttonLayout_ = new QHBoxLayout;
49     buttonLayout_->addWidget(piecesLabel_);
50     buttonLayout_->addWidget(piecesCombo_);
51     buttonLayout_->addStretch();
52     buttonLayout_->addWidget(startButton_);
53
54     mainLayout_ = new QVBoxLayout;
55     mainLayout_->addLayout(comboLayout_);
56     mainLayout_->addLayout(buttonLayout_);
57
58     setLayout(mainLayout_);
59
60     //connect(startButton_, SIGNAL(clicked()))
61 }