Commit acca36a6 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Wizard: clean the welcome page

parent bb0b68f6
......@@ -6,45 +6,9 @@
LoadPage::LoadPage( QWidget* parent )
: QWizardPage( parent )
{
build();
if ( parent != 0 )
{
QObject::connect( this,
SIGNAL( projectButtonClicked() ),
parent,
SLOT( loadProject() ) );
}
}
LoadPage::~LoadPage() {}
void LoadPage::build()
{
QLabel* label = new QLabel( this );
QPushButton* butt = new QPushButton( this );
QVBoxLayout* lay = new QVBoxLayout( this );
QObject::connect( butt,
SIGNAL( clicked() ),
this,
SLOT( loadProjectClicked() ) );
m_ui.setupUi( this );
label->setText( tr( "Welcome to the project Wizard.\n"
"This wizard will allow you to create"
"a new project, or to open an existing project.\n"
"To open an existing project, click on the button below,"
"or click next to create a new project" ) );
butt->setText( tr( "Open Existing Project" ) );
lay->addWidget( label );
lay->addWidget( butt );
setLayout( lay );
return ;
setTitle( tr( "Project wizard" ) );
setSubTitle( tr( "Open or create a project" ) );
}
void LoadPage::loadProjectClicked()
{
emit projectButtonClicked();
return ;
}
......@@ -2,6 +2,7 @@
#define LOADPAGE_H
#include <QWizardPage>
#include "ui_LoadPage.h"
class QWizard;
......@@ -10,15 +11,10 @@ class LoadPage : public QWizardPage
Q_OBJECT
public:
LoadPage( QWidget* parent = 0 );
~LoadPage();
private:
void build();
private slots:
void loadProjectClicked();
~LoadPage() { }
signals:
void projectButtonClicked();
private:
Ui::LoadPage m_ui;
};
#endif
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LoadPage</class>
<widget class="QWidget" name="LoadPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Welcome to the project Wizard.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This wizard will help you to create a new project, or open an already existing one.&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Please select your preferred action below then press next.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="createRadioButton">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Create a new project</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="openRadioButton">
<property name="text">
<string>Open an existing project</string>
</property>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
HEADERS += CustomWizardPage.h \
LoadPage.h \
PageFactory.h \
ProjectWizard.h
SOURCES += CustomWizardPage.cpp \
LoadPage.cpp \
ProjectWizard.cpp
HEADERS += CustomWizardPage.h \
LoadPage.h \
PageFactory.h \
ProjectWizard.h
SOURCES += CustomWizardPage.cpp \
LoadPage.cpp \
ProjectWizard.cpp
FORMS += ui/LoadPage.ui
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment