kio
renamedlg.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __kio_rename_dlg__
00023 #define __kio_rename_dlg__
00024
00025 #include <kurl.h>
00026 #include <qdialog.h>
00027 #include <qstring.h>
00028 #include <sys/types.h>
00029
00030 #include <kio/global.h>
00031
00032 namespace KIO {
00033
00034
00035 enum RenameDlg_Mode { M_OVERWRITE = 1, M_OVERWRITE_ITSELF = 2, M_SKIP = 4, M_SINGLE = 8, M_MULTI = 16, M_RESUME = 32, M_NORENAME = 64 };
00036
00040 enum RenameDlg_Result { R_RESUME = 6, R_RESUME_ALL = 7, R_OVERWRITE = 4, R_OVERWRITE_ALL = 5, R_SKIP = 2, R_AUTO_SKIP = 3, R_RENAME = 1, R_CANCEL = 0 };
00041
00042
00048 class KIO_EXPORT RenameDlg : public QDialog
00049 {
00050 Q_OBJECT
00051 public:
00068 RenameDlg( QWidget *parent, const QString & caption,
00069
00070 const QString & src, const QString & dest,
00071 RenameDlg_Mode mode,
00072 KIO::filesize_t sizeSrc = (KIO::filesize_t) -1,
00073 KIO::filesize_t sizeDest = (KIO::filesize_t) -1,
00074 time_t ctimeSrc = (time_t) -1,
00075 time_t ctimeDest = (time_t) -1,
00076 time_t mtimeSrc = (time_t) -1,
00077 time_t mtimeDest = (time_t) -1,
00078 bool modal = false );
00079 ~RenameDlg();
00080
00085 KURL newDestURL();
00086
00094 static QString suggestName(const KURL& baseURL, const QString& oldName);
00095
00096 public slots:
00098 void b0Pressed();
00099 void b1Pressed();
00100 void b2Pressed();
00101 void b3Pressed();
00102 void b4Pressed();
00103 void b5Pressed();
00104 void b6Pressed();
00105 void b7Pressed();
00106 void b8Pressed();
00107
00108 protected slots:
00109 void enableRenameButton(const QString &);
00110 private:
00111 class RenameDlgPrivate;
00112 RenameDlgPrivate *d;
00113 void pluginHandling( );
00114 };
00115
00138 KIO_EXPORT RenameDlg_Result open_RenameDlg( const QString & caption,
00139
00140 const QString& src, const QString & dest,
00141 RenameDlg_Mode mode, QString& newDestPath,
00142 KIO::filesize_t sizeSrc = (KIO::filesize_t) -1,
00143 KIO::filesize_t sizeDest = (KIO::filesize_t) -1,
00144 time_t ctimeSrc = (time_t) -1,
00145 time_t ctimeDest = (time_t) -1,
00146 time_t mtimeSrc = (time_t) -1,
00147 time_t mtimeDest = (time_t) -1
00148 );
00149
00152 }
00153 #endif