Debian Codegraph @

getstartedwidget.cpp

raw symbols SCIP
1 /****************************************************************************
2 ** SASM - simple IDE for assembler development
3 ** Copyright (C) 2013 Dmitriy Manushin
4 ** Contact: site: http://dman95.github.io/SASM/
5 ** e-mail: [email protected]
6 **
7 ** This file is part of SASM.
8 **
9 ** SASM is free software: you can redistribute it and/or modify
10 ** it under the terms of the GNU General Public License as published by
11 ** the Free Software Foundation, either version 3 of the License, or
12 ** (at your option) any later version.
13 **
14 ** SASM is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ** GNU General Public License for more details.
18 **
19 ** You should have received a copy of the GNU General Public License
20 ** along with SASM. If not, see <http://www.gnu.org/licenses/>.
21 **
22 ** Этот файл — часть SASM.
23 **
24 ** SASM - свободная программа: вы можете перераспространять ее и/или
25 ** изменять ее на условиях Стандартной общественной лицензии GNU в том виде,
26 ** в каком она была опубликована Фондом свободного программного обеспечения;
27 ** либо версии 3 лицензии, либо (по вашему выбору) любой более поздней
28 ** версии.
29 **
30 ** SASM распространяется в надежде, что она будет полезной,
31 ** но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА
32 ** или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробнее см. в Стандартной
33 ** общественной лицензии GNU.
34 **
35 ** Вы должны были получить копию Стандартной общественной лицензии GNU
36 ** вместе с этой программой. Если это не так, см.
37 ** <http://www.gnu.org/licenses/>.)
38 **
39 ****************************************************************************/
40
41 #include "getstartedwidget.h"
42 /**
43
44 * @file getstartedwidget.cpp
45 * Implements the opening window.
46 */
47
48 GetStartedWidget::GetStartedWidget(QWidget *parent) :
49 QWidget(parent)
50 {
51 layout = new QVBoxLayout;
52
53 //header
54 labelLayout = new QHBoxLayout;
55
56 imgLabel = new QLabel;
57 imgLabel->setPixmap(QPixmap(":images/smallIcon.png"));
58 imgLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
59 labelLayout->addWidget(imgLabel);
60 labelLayout->addSpacing(20);
61
62 welcomeLabel = new QLabel;
63 QFont font("Arial", 24);
64 welcomeLabel->setFont(font);
65 welcomeLabel->setText(tr("Welcome to the SASM!"));
66 welcomeLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
67 labelLayout->addWidget(welcomeLabel);
68
69 leftSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed);
70 labelLayout->addSpacerItem(leftSpacer);
71
72 layout->addLayout(labelLayout);
73
74
75 //buttons
76 spacer = new QSpacerItem(0, 50, QSizePolicy::Fixed, QSizePolicy::Fixed);
77 layout->addSpacerItem(spacer);
78
79 newButton = new QCommandLinkButton(tr("Create new project"));
80 newButton->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
81 layout->addWidget(newButton);
82 layout->addSpacing(10);
83
84 openButton = new QCommandLinkButton(tr("Open project"));
85 openButton->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
86 layout->addWidget(openButton);
87 layout->addSpacing(10);
88
89 prevSessionButton = new QCommandLinkButton(tr("Restore last session"));
90 prevSessionButton->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
91 layout->addWidget(prevSessionButton);
92 layout->addSpacing(10);
93
94 bottomSpacer = new QSpacerItem(10, 100, QSizePolicy::Expanding, QSizePolicy::Expanding);
95 layout->addSpacerItem(bottomSpacer);
96
97
98 setLayout(layout);
99 }
100
101 GetStartedWidget::~GetStartedWidget()
102 {
103 delete welcomeLabel;
104 delete imgLabel;
105 delete labelLayout;
106 delete newButton;
107 delete openButton;
108 delete prevSessionButton;
109 delete layout;
110 }