KIO
kpropertiesdialog.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
00023
00024 #ifndef KPROPERTIESDIALOG_H
00025 #define KPROPERTIESDIALOG_H
00026
00027 #include <QtCore/QString>
00028
00029 #include <kdemacros.h>
00030 #include <kurl.h>
00031 #include <kfileitem.h>
00032 #include <kpagedialog.h>
00033
00034 class KPropertiesDialogPlugin;
00035
00036 class KJob;
00037 namespace KIO { class Job; }
00038
00057 class KIO_EXPORT KPropertiesDialog : public KPageDialog
00058 {
00059 Q_OBJECT
00060
00061 public:
00062
00069 static bool canDisplay( const KFileItemList& _items );
00070
00082 explicit KPropertiesDialog( const KFileItem& item,
00083 QWidget* parent = 0 );
00084
00097 explicit KPropertiesDialog( const KFileItemList& _items,
00098 QWidget *parent = 0 );
00099
00116 explicit KPropertiesDialog( const KUrl& _url,
00117 QWidget* parent = 0 );
00118
00131 KPropertiesDialog( const KUrl& _tempUrl, const KUrl& _currentDir,
00132 const QString& _defaultName,
00133 QWidget* parent = 0 );
00134
00144 explicit KPropertiesDialog(const QString& title,
00145 QWidget* parent = 0);
00146
00152 virtual ~KPropertiesDialog();
00153
00162 static bool showDialog(const KFileItem& item, QWidget* parent = 0,
00163 bool modal = true);
00164
00173 static bool showDialog(const KUrl& _url, QWidget* parent = 0,
00174 bool modal = true);
00175
00185 static bool showDialog(const KFileItemList& _items, QWidget* parent = 0,
00186 bool modal = true);
00187
00201 void insertPlugin (KPropertiesDialogPlugin *plugin);
00202
00210 KUrl kurl() const;
00211
00219 KFileItem& item();
00220
00224 KFileItemList items() const;
00225
00233 KUrl currentDir() const;
00234
00241 QString defaultName() const;
00242
00249 void updateUrl( const KUrl& _newUrl );
00250
00257 void rename( const QString& _name );
00258
00262 void abortApplying();
00263
00270 void showFileSharingPage();
00271
00279 void setFileSharingPage(QWidget* page);
00280
00286 void setFileNameReadOnly( bool ro );
00287
00288 public Q_SLOTS:
00292 virtual void slotOk();
00296 virtual void slotCancel();
00297
00298 Q_SIGNALS:
00303 void propertiesClosed();
00304
00309 void applied();
00310
00316 void canceled();
00322 void saveAs(const KUrl &oldUrl, KUrl &newUrl);
00323
00324 Q_SIGNALS:
00325 void leaveModality();
00326 private:
00327 class KPropertiesDialogPrivate;
00328 KPropertiesDialogPrivate* const d;
00329
00330 Q_DISABLE_COPY(KPropertiesDialog)
00331 };
00332
00347 class KIO_EXPORT KPropertiesDialogPlugin : public QObject
00348 {
00349 Q_OBJECT
00350 public:
00356 KPropertiesDialogPlugin( KPropertiesDialog *_props );
00357 virtual ~KPropertiesDialogPlugin();
00358
00364 virtual void applyChanges();
00365
00371 static KDE_DEPRECATED bool isDesktopFile( const KFileItem& _item );
00372
00373 void setDirty( bool b );
00374 bool isDirty() const;
00375
00376 public Q_SLOTS:
00377 void setDirty();
00378
00379 Q_SIGNALS:
00385 void changed();
00386
00387 protected:
00391 KPropertiesDialog *properties;
00392
00396 int fontHeight() const;
00397
00398 private:
00399 class KPropertiesDialogPluginPrivate;
00400 KPropertiesDialogPluginPrivate* const d;
00401 };
00402
00403
00404 #endif
00405