Commit bb6055d7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add page

parent 4c9faac6
project(importwizard)
set(importwizard_SRCS
main.cpp
importwizard.cpp
pimimportabstract.cpp
thunderbirdimportdata.cpp
checkprogrampage.cpp
importaddressbookpage.cpp
importfilterpage.cpp
importmailpage.cpp
importsettingpage.cpp
importwizard.cpp
main.cpp
pimimportabstract.cpp
selectcomponentpage.cpp
thunderbirdimportdata.cpp
)
include_directories(${CMAKE_SOURCE_DIR}/mailimporter ${CMAKE_SOURCE_DIR}/mailcommon )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )
kde4_add_ui_files(importwizard_SRCS
checkprogrampage.ui
importaddressbookpage.ui
importfilterpage.ui
importmailpage.ui
importsettingpage.ui
selectcomponentpage.ui )
kde4_add_executable(importwizard ${importwizard_SRCS})
target_link_libraries(importwizard
......
/*
Copyright (c) 2012 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "checkprogrampage.h"
#include "ui_checkprogrampage.h"
CheckProgramPage::CheckProgramPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::CheckProgramPage)
{
ui->setupUi(this);
}
CheckProgramPage::~CheckProgramPage()
{
delete ui;
}
#include "checkprogrampage.moc"
/*
Copyright (c) 2012 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef CHECKPROGRAMPAGE_H
#define CHECKPROGRAMPAGE_H
#include <QWidget>
namespace Ui {
class CheckProgramPage;
}
class CheckProgramPage : public QWidget
{
Q_OBJECT
public:
explicit CheckProgramPage(QWidget *parent = 0);
~CheckProgramPage();
private:
Ui::CheckProgramPage *ui;
};
#endif // CHECKPROGRAMPAGE_H
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>CheckProgramPage</class>
<widget class="QWidget" name="CheckProgramPage">
<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>
</widget>
<pixmapfunction/>
<connections/>
</ui>
#include "importaddressbookpage.h"
#include "ui_importaddressbookpage.h"
ImportAddressbookPage::ImportAddressbookPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::ImportAddressbookPage)
{
ui->setupUi(this);
}
ImportAddressbookPage::~ImportAddressbookPage()
{
delete ui;
}
#include "importaddressbookpage.moc"
#ifndef IMPORTADDRESSBOOKPAGE_H
#define IMPORTADDRESSBOOKPAGE_H
#include <QWidget>
namespace Ui {
class ImportAddressbookPage;
}
class ImportAddressbookPage : public QWidget
{
Q_OBJECT
public:
explicit ImportAddressbookPage(QWidget *parent = 0);
~ImportAddressbookPage();
private:
Ui::ImportAddressbookPage *ui;
};
#endif // IMPORTADDRESSBOOKPAGE_H
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>ImportAddressbookPage</class>
<widget class="QWidget" name="ImportAddressbookPage">
<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>
</widget>
<pixmapfunction/>
<connections/>
</ui>
#include "importfilterpage.h"
#include "ui_importfilterpage.h"
ImportFilterPage::ImportFilterPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::ImportFilterPage)
{
ui->setupUi(this);
}
ImportFilterPage::~ImportFilterPage()
{
delete ui;
}
#include "importfilterpage.moc"
#ifndef IMPORTFILTERPAGE_H
#define IMPORTFILTERPAGE_H
#include <QWidget>
namespace Ui {
class ImportFilterPage;
}
class ImportFilterPage : public QWidget
{
Q_OBJECT
public:
explicit ImportFilterPage(QWidget *parent = 0);
~ImportFilterPage();
private:
Ui::ImportFilterPage *ui;
};
#endif // IMPORTFILTERPAGE_H
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>ImportFilterPage</class>
<widget class="QWidget" name="ImportFilterPage">
<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>
</widget>
<pixmapfunction/>
<connections/>
</ui>
#include "importmailpage.h"
#include "ui_importmailpage.h"
ImportMailPage::ImportMailPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::ImportMailPage)
{
ui->setupUi(this);
}
ImportMailPage::~ImportMailPage()
{
delete ui;
}
#include "importmailpage.moc"
#ifndef IMPORTMAILPAGE_H
#define IMPORTMAILPAGE_H
#include <QWidget>
namespace Ui {
class ImportMailPage;
}
class ImportMailPage : public QWidget
{
Q_OBJECT
public:
explicit ImportMailPage(QWidget *parent = 0);
~ImportMailPage();
private:
Ui::ImportMailPage *ui;
};
#endif // IMPORTMAILPAGE_H
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>ImportMailPage</class>
<widget class="QWidget" name="ImportMailPage">
<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>
</widget>
<pixmapfunction/>
<connections/>
</ui>
#include "importsettingpage.h"
#include "ui_importsettingpage.h"
ImportSettingPage::ImportSettingPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::ImportSettingPage)
{
ui->setupUi(this);
}
ImportSettingPage::~ImportSettingPage()
{
delete ui;
}
#include "importsettingpage.moc"
#ifndef IMPORTSETTINGPAGE_H
#define IMPORTSETTINGPAGE_H
#include <QWidget>
namespace Ui {
class ImportSettingPage;
}
class ImportSettingPage : public QWidget
{
Q_OBJECT
public:
explicit ImportSettingPage(QWidget *parent = 0);
~ImportSettingPage();
private:
Ui::ImportSettingPage *ui;
};
#endif // IMPORTSETTINGPAGE_H
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>ImportSettingPage</class>
<widget class="QWidget" name="ImportSettingPage">
<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>
</widget>
<pixmapfunction/>
<connections/>
</ui>
......@@ -16,6 +16,12 @@
*/
#include "importwizard.h"
#include "checkprogrampage.h"
#include "selectcomponentpage.h"
#include "importmailpage.h"
#include "importfilterpage.h"
#include "importsettingpage.h"
#include "importaddressbookpage.h"
#include <kaboutapplicationdialog.h>
#include <kglobal.h>
......@@ -28,7 +34,29 @@ ImportWizard::ImportWizard(QWidget *parent)
: KAssistantDialog(parent)
{
setModal(true);
setWindowTitle( i18n( "KMailCVT Import Tool" ) );
setWindowTitle( i18n( "PIM Import Tool" ) );
mCheckProgramPage = new CheckProgramPage(this);
mPage1 = new KPageWidgetItem( mCheckProgramPage, i18n( "Step 1: Detect pim" ) );
mSelectComponentPage = new SelectComponentPage(this);
mPage2 = new KPageWidgetItem( mSelectComponentPage, i18n( "Step 2: Select import components" ) );
mImportMailPage = new ImportMailPage(this);
mPage3 = new KPageWidgetItem( mImportMailPage, i18n( "Step 3: Import mails" ) );
mImportFilterPage = new ImportFilterPage(this);
mPage4 = new KPageWidgetItem( mImportFilterPage, i18n( "Step 4: Import filters" ) );
mImportSettingPage = new ImportSettingPage(this);
mPage5 = new KPageWidgetItem( mImportSettingPage, i18n( "Step 5: Import settings" ) );
mImportAddressbookPage = new ImportAddressbookPage(this);
mPage6 = new KPageWidgetItem( mImportAddressbookPage, i18n( "Step 6: Import addressbooks" ) );
// Disable the 'next button to begin with.
setValid( currentPage(), true );
connect(this,SIGNAL(helpClicked()),this,SLOT(help()));
Akonadi::Control::widgetNeedsAkonadi(this);
}
......
......@@ -21,6 +21,14 @@
#include <kapplication.h>
#include <KAssistantDialog>
class KPageWidgetItem;
class CheckProgramPage;
class SelectComponentPage;
class ImportMailPage;
class ImportFilterPage;
class ImportSettingPage;
class ImportAddressbookPage;
class ImportWizard : public KAssistantDialog {
Q_OBJECT
public:
......@@ -29,6 +37,21 @@ public:
public slots:
void help();
private:
KPageWidgetItem *mPage1;
KPageWidgetItem *mPage2;
KPageWidgetItem *mPage3;
KPageWidgetItem *mPage4;
KPageWidgetItem *mPage5;
KPageWidgetItem *mPage6;
CheckProgramPage *mCheckProgramPage;
SelectComponentPage *mSelectComponentPage;
ImportMailPage *mImportMailPage;
ImportFilterPage *mImportFilterPage;
ImportSettingPage *mImportSettingPage;
ImportAddressbookPage *mImportAddressbookPage;
};
#endif /* IMPORTWIZARD_H */
......
#include "selectcomponentpage.h"
#include "ui_selectcomponentpage.h"
SelectComponentPage::SelectComponentPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::SelectComponentPage)
{
ui->setupUi(this);
}
SelectComponentPage::~SelectComponentPage()
{
delete ui;
}
#include "selectcomponentpage.moc"
#ifndef SELECTCOMPONENTPAGE_H
#define SELECTCOMPONENTPAGE_H
#include <QWidget>
namespace Ui {
class SelectComponentPage;
}
class SelectComponentPage : public QWidget
{
Q_OBJECT
public:
explicit SelectComponentPage(QWidget *parent = 0);
~SelectComponentPage();
private:
Ui::SelectComponentPage *ui;
};
#endif // SELECTCOMPONENTPAGE_H
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>SelectComponentPage</class>
<widget class="QWidget" name="SelectComponentPage">
<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>
</widget>
<pixmapfunction/>
<connections/>
</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