SVN_SILENT made messages (.desktop file)
[kdeadmin.git] / kdat / BackupProfileWidget.h
blob6f58ee7812b92f1fdd8d6dd8c8fbd12144d966e2
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
4 //
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.
9 //
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_
22 #include <ktabctl.h>
23 #include <q3strlist.h>
24 //Added by qt3to4:
25 #include <QLabel>
27 class QCheckBox;
28 class QComboBox;
29 class QLabel;
30 class QLineEdit;
31 class Q3ListBox;
33 class BackupProfile;
35 /**
36 * @short Display/edit the parameters for a backup operation.
38 class BackupProfileWidget : public KTabCtl {
39 Q_OBJECT
40 QLineEdit* _archiveName;
41 QComboBox* _workingDir;
42 Q3ListBox* _files;
43 QCheckBox* _oneFilesystem;
44 QCheckBox* _incremental;
45 QLabel* _snapshotLabel;
46 QLineEdit* _snapshotFile;
47 QCheckBox* _removeSnapshot;
48 QStringList _absoluteFiles;
49 QStringList _relativeFiles;
50 private slots:
51 void slotTextChanged( const QString & text );
52 void slotIncrementalToggled( bool set );
53 void slotToggled( bool set );
54 void slotWorkingDirActivated( const QString & text );
55 public:
56 /**
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 );
66 /**
67 * Destroy the backup profile widget.
69 ~BackupProfileWidget();
71 /**
72 * Set the parameters for the backup profile.
74 * @param backupProfile The backup profile to display/edit.
76 void setBackupProfile( BackupProfile* backupProfile );
78 /**
79 * Set the list of files for the backup profile, with full paths.
81 * @param files The list.
83 void setAbsoluteFiles( const QStringList& files );
85 /**
86 * Query the name of the archive.
88 * @return The name of the new archive.
90 QString getArchiveName();
92 /**
93 * Query the working directory for the tar command.
95 * @return The working directory.
97 QString getWorkingDirectory();
99 /**
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
115 * backup.
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();
143 signals:
145 * Emitted whenever the user changes anything.
147 void sigSomethingChanged();
150 #endif