1 // KDat - a tar-based DAT archiver
2 // Copyright (C) 1998-2000 Sean Vyain, svyain@mail.tds.net
3 // Copyright (C) 2001-2002 Lawrence Widman, kdat@cardiothink.com
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef _BackupProfileWidget_h_
20 #define _BackupProfileWidget_h_
23 #include <q3strlist.h>
36 * @short Display/edit the parameters for a backup operation.
38 class BackupProfileWidget
: public KTabCtl
{
40 QLineEdit
* _archiveName
;
41 QComboBox
* _workingDir
;
43 QCheckBox
* _oneFilesystem
;
44 QCheckBox
* _incremental
;
45 QLabel
* _snapshotLabel
;
46 QLineEdit
* _snapshotFile
;
47 QCheckBox
* _removeSnapshot
;
48 QStringList _absoluteFiles
;
49 QStringList _relativeFiles
;
51 void slotTextChanged( const QString
& text
);
52 void slotIncrementalToggled( bool set
);
53 void slotToggled( bool set
);
54 void slotWorkingDirActivated( const QString
& text
);
57 * Create a backup profile widget.
59 * @param archiveName The default name for the new archive.
60 * @param files The list of files to be archived.
61 * @param parent The parent widget of this dialog.
62 * @param name The widget name of this dialog.
64 BackupProfileWidget( QWidget
* parent
=0, const char* name
=0 );
67 * Destroy the backup profile widget.
69 ~BackupProfileWidget();
72 * Set the parameters for the backup profile.
74 * @param backupProfile The backup profile to display/edit.
76 void setBackupProfile( BackupProfile
* backupProfile
);
79 * Set the list of files for the backup profile, with full paths.
81 * @param files The list.
83 void setAbsoluteFiles( const QStringList
& files
);
86 * Query the name of the archive.
88 * @return The name of the new archive.
90 QString
getArchiveName();
93 * Query the working directory for the tar command.
95 * @return The working directory.
97 QString
getWorkingDirectory();
100 * Query the list of files to backup, relative to the working directory.
102 * @return The file list.
104 const QStringList
& getRelativeFiles();
107 * Query the list of files to backup, with full paths.
109 * @return The file list.
111 const QStringList
& getAbsoluteFiles();
114 * Query whether or not to cross filesystem boundaries when performing the
117 * @return TRUE if the backup is restricted to a single filesystem, FALSE
118 * if the backup can cross filesystem boundaries.
120 bool isOneFilesystem();
123 * Query whether this is to be a GNU incremental backup.
125 * @return TRUE if incremental, otherwise FALSE.
127 bool isIncremental();
130 * Query the name of the snapshot file to use for an incremental backup.
132 * @return The name of the snapshot file.
134 QString
getSnapshotFile();
137 * Query whether to remove the snapshot file before beginning an
138 * incremental backup. This has the effect of performing a full backup.
140 * @return TRUE if the snapshot file should be removed, otherwise FALSE.
142 bool getRemoveSnapshot();
145 * Emitted whenever the user changes anything.
147 void sigSomethingChanged();