• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • services
  • storage
  • backup
  • gui
backupwizard.cpp
Go to the documentation of this file.
1 /*
2  This file is part of the Nepomuk KDE project.
3  Copyright (C) 2010 Vishesh Handa <handa.vish@gmail.com>
4  Copyright (C) 2010 Sebastian Trueg <trueg@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library 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 GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #include "backupwizard.h"
24 #include "backupwizardpages.h"
25 
26 #include <kglobal.h>
27 #include <kcomponentdata.h>
28 #include <kaboutdata.h>
29 
30 // TODO: 1. "Cancel" just closes the dialog without any feedback on the backup
31 // 2. If the service crashes the dialog does not notice
32 
33 Nepomuk2::BackupWizard::BackupWizard(QWidget* parent, Qt::WindowFlags flags)
34  : QWizard(parent, flags)
35 {
36  setPixmap(LogoPixmap, KIcon(QLatin1String("nepomuk")).pixmap(32, 32));
37  setWindowIcon( KIcon(QLatin1String("nepomuk")) );
38  setWindowTitle( KGlobal::activeComponent().aboutData()->shortDescription() );
39 
40  setPage( Id_IntroPage, new IntroPage(this) );
41  setPage( Id_BackupPage, new BackupPage(this) );
42  setPage( Id_BackupSettingsPage, new BackupSettingsPage(this) );
43  setPage( Id_RestoreSelectionPage, new RestoreSelectionPage(this) );
44  setPage( Id_RestorePage, new RestorePage(this) );
45  setPage( Id_FileConflictPage, new FileConflictPage(this) );
46  setPage( Id_RestoreEndPage, new RestoreEndPage(this) );
47  setPage( Id_ErrorPage, new ErrorPage( this ) );
48  setStartId( Id_IntroPage );
49 
50  setOption( HaveFinishButtonOnEarlyPages, false );
51  setOption( HaveNextButtonOnLastPage, false );
52  setOption( DisabledBackButtonOnLastPage, true );
53 }
54 
55 void Nepomuk2::BackupWizard::startBackup()
56 {
57  setStartId(Id_BackupSettingsPage);
58 }
59 
60 void Nepomuk2::BackupWizard::startRestore()
61 {
62  setStartId(Id_RestoreSelectionPage);
63 }
64 
65 void Nepomuk2::BackupWizard::startConflictResolution()
66 {
67  setStartId(Id_FileConflictPage);
68 }
69 
70 
71 void Nepomuk2::BackupWizard::showError(const QString &error)
72 {
73  setField(QLatin1String("errorMessage"), error);
74  setStartId(Id_ErrorPage);
75 }
76 
77 #include "backupwizard.moc"
backupwizardpages.h
Nepomuk2::BackupWizard::Id_BackupSettingsPage
Definition: backupwizard.h:40
Nepomuk2::BackupWizard::startRestore
void startRestore()
Definition: backupwizard.cpp:60
Nepomuk2::BackupWizard::startBackup
void startBackup()
Definition: backupwizard.cpp:55
Nepomuk2::FileConflictPage
File Conflict Page.
Definition: backupwizardpages.h:154
QWidget
Nepomuk2::BackupWizard::Id_FileConflictPage
Definition: backupwizard.h:44
Nepomuk2::BackupWizard::BackupWizard
BackupWizard(QWidget *parent=0, Qt::WindowFlags flags=0)
Definition: backupwizard.cpp:33
Nepomuk2::BackupSettingsPage
Definition: backupwizardpages.h:55
backupwizard.h
Nepomuk2::BackupWizard::Id_RestoreEndPage
Definition: backupwizard.h:45
Nepomuk2::BackupPage
Definition: backupwizardpages.h:68
Nepomuk2::ErrorPage
Definition: backupwizardpages.h:136
Nepomuk2::RestorePage
This is the Page that is shown when a restore is being performed.
Definition: backupwizardpages.h:116
Nepomuk2::BackupWizard::Id_RestorePage
Definition: backupwizard.h:42
Nepomuk2::BackupWizard::Id_IntroPage
Definition: backupwizard.h:39
Nepomuk2::BackupWizard::Id_ErrorPage
Definition: backupwizard.h:46
Nepomuk2::RestoreEndPage
Final ending page.
Definition: backupwizardpages.h:170
Nepomuk2::RestoreSelectionPage
Definition: backupwizardpages.h:89
Nepomuk2::BackupWizard::showError
void showError(const QString &error)
Definition: backupwizard.cpp:71
Nepomuk2::BackupWizard::startConflictResolution
void startConflictResolution()
Definition: backupwizard.cpp:65
Nepomuk2::BackupWizard::Id_BackupPage
Definition: backupwizard.h:41
Nepomuk2::IntroPage
Definition: backupwizardpages.h:46
QWizard
Nepomuk2::BackupWizard::Id_RestoreSelectionPage
Definition: backupwizard.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal