summaryrefslogtreecommitdiff
path: root/noncore/settings/backup/backuprestore.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/backup/backuprestore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/backup/backuprestore.cpp62
1 files changed, 51 insertions, 11 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp
index 1748e8d..c944c6d 100644
--- a/noncore/settings/backup/backuprestore.cpp
+++ b/noncore/settings/backup/backuprestore.cpp
@@ -1,20 +1,45 @@
+/*
+                This file is part of the Opie Project
+ =.
+             .=l. Copyright (c) 2002-2004 The Opie Team <opie-devel@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This file is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This file 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 file;
+  -_. . .   )=.  = see the file COPYING. If not, write to the
+    --        :-=` Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
#include "backuprestore.h"
#include "errordialog.h"
-
/* OPIE */
+#include <qpe/qpeapplication.h>
+#include <qpe/resource.h>
+#include <qpe/config.h>
#include <opie2/odebug.h>
#include <opie2/ostorageinfo.h>
-using namespace Opie::Core;
-
#include <opie2/ofiledialog.h>
#include <opie2/owait.h>
+using namespace Opie::Core;
using namespace Opie::Ui;
-#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
-#include <qpe/config.h>
-
/* QT */
#include <qapplication.h>
#include <qmultilineedit.h>
@@ -23,6 +48,7 @@ using namespace Opie::Ui;
#include <qfileinfo.h>
#include <qlistview.h>
#include <qpushbutton.h>
+#include <qradiobutton.h>
#include <qheader.h>
#include <qmessagebox.h>
#include <qcombobox.h>
@@ -244,6 +270,20 @@ void BackupAndRestore::scanForApplicationSettings()
*/
void BackupAndRestore::backup()
{
+ if ( cb_type_userdata->isChecked() )
+ backupUserData();
+ else
+ backupRootFs();
+}
+
+
+void BackupAndRestore::backupRootFs()
+{
+ QMessageBox::critical(this, "Message", "Not Yet Implemented", "Ok" );
+}
+
+void BackupAndRestore::backupUserData()
+{
QString backupFiles;
if(getBackupFiles(backupFiles, NULL) == 0)
{
@@ -256,7 +296,7 @@ void BackupAndRestore::backup()
Global::statusMessage( tr( "Backing up..." ) );
owait->show();
qApp->processEvents();
-
+
QString outputFile = backupLocations[storeToLocation->currentText()];
QDateTime datetime = QDateTime::currentDateTime();
@@ -291,7 +331,7 @@ void BackupAndRestore::backup()
owait->hide();
delete owait;
-
+
//Error-Handling
if(r != 0)
{
@@ -443,7 +483,7 @@ void BackupAndRestore::restore()
tr( "Please select something to restore." ),QString( tr( "Ok") ) );
return;
}
-
+
OWait *owait = new OWait();
Global::statusMessage( tr( "Restore Backup..." ) );
owait->show();
@@ -482,7 +522,7 @@ void BackupAndRestore::restore()
owait->hide();
delete owait;
-
+
//error handling
if(r != 0)
{