Continue to implement refreshsettingsassistant

wilder
Laurent Montel 7 years ago
parent ba830ed0fc
commit f077b76e10
  1. 1
      kmail-refresh-settings/CMakeLists.txt
  2. 16
      kmail-refresh-settings/refreshsettingsassistant.cpp
  3. 9
      kmail-refresh-settings/refreshsettingsassistant.h
  4. 31
      kmail-refresh-settings/refreshsettingsfirstpage.cpp
  5. 33
      kmail-refresh-settings/refreshsettingsfirstpage.h

@ -3,6 +3,7 @@ set(kmail-refresh-settings_SRCS
refreshsettingsassistant.cpp
refreshsettringsfinishpage.cpp
refreshsettingscleanuppage.cpp
refreshsettingsfirstpage.cpp
)
ecm_qt_declare_logging_category(kmail-refresh-settings_SRCS HEADER kmail-refresh-settings_debug.h IDENTIFIER KMAIL_REFRESH_SETTINGS_LOG CATEGORY_NAME org.kde.pim.kmail_refresh_settings)

@ -20,12 +20,12 @@
#include "refreshsettingsassistant.h"
#include "refreshsettingscleanuppage.h"
#include "refreshsettingsfirstpage.h"
#include "refreshsettringsfinishpage.h"
#include <AkonadiWidgets/controlgui.h>
#include <KHelpMenu>
#include <KLocalizedString>
#include <KAboutData>
#include <KMessageBox>
#include <QMenu>
#include <QPushButton>
@ -38,7 +38,6 @@ RefreshSettingsAssistant::RefreshSettingsAssistant(QWidget *parent)
resize(640, 480);
Akonadi::ControlGui::widgetNeedsAkonadi(this);
initializePages();
KMessageBox::information(this, i18n("Close KMail before cleaning settings."));
KHelpMenu *helpMenu = new KHelpMenu(this, KAboutData::applicationData(), true);
//Initialize menu
QMenu *menu = helpMenu->menu();
@ -53,8 +52,17 @@ RefreshSettingsAssistant::~RefreshSettingsAssistant()
void RefreshSettingsAssistant::initializePages()
{
mCleanUpPage = new RefreshSettingsCleanupPage(this);
mCleanUpPageItem = new KPageWidgetItem(mCleanUpPage, i18n("Step 1: Clean up Settings"));
mFirstPage = new RefreshSettingsFirstPage(this);
mFirstPageItem = new KPageWidgetItem(mFirstPage, i18n("Warning"));
addPage(mFirstPageItem);
mCleanUpPage = new RefreshSettingsCleanupPage(this);
mCleanUpPageItem = new KPageWidgetItem(mCleanUpPage, i18n("Clean up Settings"));
addPage(mCleanUpPageItem);
mFinishPage = new RefreshSettringsFinishPage(this);
mFinishPageItem = new KPageWidgetItem(mFinishPage, i18n("Finish"));
addPage(mFinishPageItem);
}

@ -22,16 +22,25 @@
#include <KAssistantDialog>
class RefreshSettingsCleanupPage;
class RefreshSettingsFirstPage;
class RefreshSettringsFinishPage;
class RefreshSettingsAssistant : public KAssistantDialog
{
Q_OBJECT
public:
explicit RefreshSettingsAssistant(QWidget *parent = nullptr);
~RefreshSettingsAssistant();
private:
void initializePages();
KPageWidgetItem *mCleanUpPageItem = nullptr;
RefreshSettingsCleanupPage *mCleanUpPage = nullptr;
KPageWidgetItem *mFirstPageItem = nullptr;
RefreshSettingsFirstPage *mFirstPage = nullptr;
KPageWidgetItem *mFinishPageItem = nullptr;
RefreshSettringsFinishPage *mFinishPage = nullptr;
};
#endif // REFRESHSETTINGSASSISTANT_H

@ -0,0 +1,31 @@
/*
Copyright (C) 2019 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 as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "refreshsettingsfirstpage.h"
RefreshSettingsFirstPage::RefreshSettingsFirstPage(QWidget *parent)
: QWidget(parent)
{
}
RefreshSettingsFirstPage::~RefreshSettingsFirstPage()
{
}

@ -0,0 +1,33 @@
/*
Copyright (C) 2019 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 as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef REFRESHSETTINGSFIRSTPAGE_H
#define REFRESHSETTINGSFIRSTPAGE_H
#include <QWidget>
class RefreshSettingsFirstPage : public QWidget
{
Q_OBJECT
public:
explicit RefreshSettingsFirstPage(QWidget *parent = nullptr);
~RefreshSettingsFirstPage();
};
#endif // REFRESHSETTINGSFIRSTPAGE_H
Loading…
Cancel
Save