00001 /* 00002 This file is part of the Opie Project 00003 =. 00004 .=l. Copyright (c) 2002-2004 The Opie Team <opie-devel@handhelds.org> 00005 .>+-= 00006 _;:, .> :=|. This file is free software; you can 00007 .> <`_, > . <= redistribute it and/or modify it under 00008 :`=1 )Y*s>-.-- : the terms of the GNU General Public 00009 .="- .-=="i, .._ License as published by the Free Software 00010 - . .-<_> .<> Foundation; either version 2 of the License, 00011 ._= =} : or (at your option) any later version. 00012 .%`+i> _;_. 00013 .i_,=:_. -<s. This file is distributed in the hope that 00014 + . -:. = it will be useful, but WITHOUT ANY WARRANTY; 00015 : .. .:, . . . without even the implied warranty of 00016 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A 00017 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General 00018 ..}^=.= = ; Public License for more details. 00019 ++= -. .` .: 00020 : = ...= . :.=- You should have received a copy of the GNU 00021 -. .:....=;==+<; General Public License along with this file; 00022 -_. . . )=. = see the file COPYING. If not, write to the 00023 -- :-=` Free Software Foundation, Inc., 00024 59 Temple Place - Suite 330, 00025 Boston, MA 02111-1307, USA. 00026 00027 */ 00028 00029 #ifndef WINDOW_H 00030 #define WINDOW_H 00031 00032 #include <qmainwindow.h> 00033 #include "backuprestorebase.h" 00034 #include <qmap.h> 00035 #include <qlist.h> 00036 00037 class QListViewItem; 00038 class QStringList; 00039 00040 class BackupAndRestore : public BackupAndRestoreBase 00041 { 00042 00043 Q_OBJECT 00044 00045 public: 00046 00047 BackupAndRestore( QWidget* parent = 0, const char* name = 0, WFlags fl = 0); 00048 ~BackupAndRestore(); 00049 00050 static QString appName() { return QString::fromLatin1("backup"); } 00051 00052 private slots: 00053 void backup(); 00054 void restore(); 00055 void selectItem(QListViewItem *currentItem); 00056 void sourceDirChanged(int); 00057 void rescanFolder(QString directory); 00058 void fileListUpdate(); 00059 00060 void addLocation(); 00061 void removeLocation(); 00062 void saveLocations(); 00063 void selectLocation(); 00064 00065 private: 00066 void scanForApplicationSettings(); 00067 int getBackupFiles(QString &backupFiles, QListViewItem *parent); 00068 QString getExcludeFile(); 00069 QMap<QString, QString> backupLocations; 00070 QList<QListViewItem> getAllItems(QListViewItem *item, QList<QListViewItem> &list); 00071 void refreshBackupLocations(); 00072 void refreshLocations(); 00073 00074 void backupUserData(); 00075 void backupRootFs(); 00076 00077 QListViewItem *systemSettings; 00078 QListViewItem *applicationSettings; 00079 QListViewItem *documents; 00080 }; 00081 00082 #endif 00083 00084 // backuprestore.h 00085
1.4.2