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

KIO

  • 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
34class KPropertiesDialogPlugin;
35
36class KJob;
37namespace KIO { class Job; }
38
57class KIO_EXPORT KPropertiesDialog : public KPageDialog
58{
59 Q_OBJECT
60
61public:
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
288public Q_SLOTS:
292 virtual void slotOk(); // Deletes the PropertiesDialog instance
296 virtual void slotCancel(); // Deletes the PropertiesDialog instance
297
298Q_SIGNALS:
303 void propertiesClosed();
304
309 void applied();
310
316 void canceled();
322 void saveAs(const KUrl &oldUrl, KUrl &newUrl);
323
324Q_SIGNALS:
325 void leaveModality();
326private:
327 class KPropertiesDialogPrivate;
328 KPropertiesDialogPrivate* const d;
329
330 Q_DISABLE_COPY(KPropertiesDialog)
331};
332
347class KIO_EXPORT KPropertiesDialogPlugin : public QObject
348{
349 Q_OBJECT
350public:
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
378public Q_SLOTS:
379 void setDirty(); // same as setDirty( true ). TODO KDE5: void setDirty(bool dirty=true);
380
381Q_SIGNALS:
387 void changed();
388
389protected:
393 KPropertiesDialog *properties;
394
398 int fontHeight() const;
399
400private:
401 class KPropertiesDialogPluginPrivate;
402 KPropertiesDialogPluginPrivate* const d;
403};
404
405
406#endif
407
KFileItemList
List of KFileItems, which adds a few helper methods to QList<KFileItem>.
Definition: kfileitem.h:675
KFileItem
A KFileItem is a generic class to handle a file, local or remote.
Definition: kfileitem.h:46
KJob
KPageDialog
KPropertiesDialogPlugin
A Plugin in the Properties dialog This is an abstract class.
Definition: kpropertiesdialog.h:348
KPropertiesDialogPlugin::properties
KPropertiesDialog * properties
Pointer to the dialog.
Definition: kpropertiesdialog.h:393
KPropertiesDialogPlugin::changed
void changed()
Emit this signal when the user changed anything in the plugin's tabs.
KPropertiesDialog
The main properties dialog class.
Definition: kpropertiesdialog.h:58
KPropertiesDialog::applied
void applied()
This signal is emitted when the properties changes are applied (for example, with the OK button)
KPropertiesDialog::leaveModality
void leaveModality()
KPropertiesDialog::propertiesClosed
void propertiesClosed()
This signal is emitted when the Properties Dialog is closed (for example, with OK or Cancel buttons)
KPropertiesDialog::canceled
void canceled()
This signal is emitted when the properties changes are aborted (for example, with the Cancel button)
KPropertiesDialog::saveAs
void saveAs(const KUrl &oldUrl, KUrl &newUrl)
Emitted before changes to oldUrl are saved as newUrl.
KUrl
QObject
QWidget
kfileitem.h
kpagedialog.h
kurl.h
rename
int rename(const QString &in, const QString &out)
KIO
A namespace for KIO globals.
Definition: kbookmarkmenu.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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