• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

  • sources
  • kde-4.12
  • kdelibs
  • kio
  • kfile
kpropertiesdialog.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3  Copyright (c) 1999, 2000 Preston Brown <pbrown@kde.org>
4  Copyright (c) 2000 Simon Hausmann <hausmann@kde.org>
5  Copyright (c) 2000 David Faure <faure@kde.org>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 
24 #ifndef KPROPERTIESDIALOG_H
25 #define KPROPERTIESDIALOG_H
26 
27 #include <QtCore/QString>
28 
29 #include <kdemacros.h>
30 #include <kurl.h>
31 #include <kfileitem.h>
32 #include <kpagedialog.h>
33 
34 class KPropertiesDialogPlugin;
35 
36 class KJob;
37 namespace KIO { class Job; }
38 
57 class KIO_EXPORT KPropertiesDialog : public KPageDialog
58 {
59  Q_OBJECT
60 
61 public:
62 
69  static bool canDisplay( const KFileItemList& _items );
70 
82  explicit KPropertiesDialog( const KFileItem& item,
83  QWidget* parent = 0 );
84 
97  explicit KPropertiesDialog( const KFileItemList& _items,
98  QWidget *parent = 0 );
99 
116  explicit KPropertiesDialog( const KUrl& _url,
117  QWidget* parent = 0 );
118 
131  KPropertiesDialog( const KUrl& _tempUrl, const KUrl& _currentDir,
132  const QString& _defaultName,
133  QWidget* parent = 0 );
134 
144  explicit KPropertiesDialog(const QString& title,
145  QWidget* parent = 0);
146 
152  virtual ~KPropertiesDialog();
153 
162  static bool showDialog(const KFileItem& item, QWidget* parent = 0,
163  bool modal = true);
164 
173  static bool showDialog(const KUrl& _url, QWidget* parent = 0,
174  bool modal = true);
175 
185  static bool showDialog(const KFileItemList& _items, QWidget* parent = 0,
186  bool modal = true);
187 
201  void insertPlugin (KPropertiesDialogPlugin *plugin);
202 
210  KUrl kurl() const;
211 
219  KFileItem& item();
220 
224  KFileItemList items() const;
225 
233  KUrl currentDir() const;
234 
241  QString defaultName() const;
242 
249  void updateUrl( const KUrl& _newUrl );
250 
257  void rename( const QString& _name );
258 
262  void abortApplying();
263 
270  void showFileSharingPage();
271 
279  void setFileSharingPage(QWidget* page);
280 
286  void setFileNameReadOnly( bool ro );
287 
288 public Q_SLOTS:
292  virtual void slotOk(); // Deletes the PropertiesDialog instance
296  virtual void slotCancel(); // Deletes the PropertiesDialog instance
297 
298 Q_SIGNALS:
303  void propertiesClosed();
304 
309  void applied();
310 
316  void canceled();
322  void saveAs(const KUrl &oldUrl, KUrl &newUrl);
323 
324 Q_SIGNALS:
325  void leaveModality();
326 private:
327  class KPropertiesDialogPrivate;
328  KPropertiesDialogPrivate* const d;
329 
330  Q_DISABLE_COPY(KPropertiesDialog)
331 };
332 
347 class KIO_EXPORT KPropertiesDialogPlugin : public QObject
348 {
349  Q_OBJECT
350 public:
356  KPropertiesDialogPlugin( KPropertiesDialog *_props );
357  virtual ~KPropertiesDialogPlugin();
358 
364  virtual void applyChanges();
365 
371 #ifndef KDE_NO_DEPRECATED
372  static KDE_DEPRECATED bool isDesktopFile( const KFileItem& _item );
373 #endif
374 
375  void setDirty( bool b );
376  bool isDirty() const;
377 
378 public Q_SLOTS:
379  void setDirty(); // same as setDirty( true ). TODO KDE5: void setDirty(bool dirty=true);
380 
381 Q_SIGNALS:
387  void changed();
388 
389 protected:
393  KPropertiesDialog *properties;
394 
398  int fontHeight() const;
399 
400 private:
401  class KPropertiesDialogPluginPrivate;
402  KPropertiesDialogPluginPrivate* const d;
403 };
404 
405 
406 #endif
407 
KPageDialog
kurl.h
saveAs
KAction * saveAs(const QObject *recvr, const char *slot, QObject *parent)
QWidget
rename
int rename(const QString &in, const QString &out)
QString
KPropertiesDialogPlugin::properties
KPropertiesDialog * properties
Pointer to the dialog.
Definition: kpropertiesdialog.h:393
QObject
KUrl
KPropertiesDialogPlugin
A Plugin in the Properties dialog This is an abstract class.
Definition: kpropertiesdialog.h:347
KFileItemList
List of KFileItems, which adds a few helper methods to QList.
Definition: kfileitem.h:674
KPropertiesDialog
The main properties dialog class.
Definition: kpropertiesdialog.h:57
kpagedialog.h
KJob
kfileitem.h
KFileItem
A KFileItem is a generic class to handle a file, local or remote.
Definition: kfileitem.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal