• 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
315
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
KIO::Job
The base class for all jobs.
Definition jobclasses.h:94
KJob
KPageDialog::KPageDialog
KPageDialog(QWidget *parent=0, Qt::WindowFlags flags=0)
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::applyChanges
virtual void applyChanges()
Applies all changes to the file.
Definition kpropertiesdialog.cpp:648
KPropertiesDialogPlugin::KPropertiesDialogPlugin
KPropertiesDialogPlugin(KPropertiesDialog *_props)
Constructor To insert tabs into the properties dialog, use the add methods provided by KPageDialog (t...
Definition kpropertiesdialog.cpp:613
KPropertiesDialogPlugin::isDirty
bool isDirty() const
Definition kpropertiesdialog.cpp:643
KPropertiesDialogPlugin::fontHeight
int fontHeight() const
Returns the font height.
Definition kpropertiesdialog.cpp:653
KPropertiesDialogPlugin::isDesktopFile
static bool isDesktopFile(const KFileItem &_item)
Convenience method for most ::supports methods.
Definition kpropertiesdialog.cpp:627
KPropertiesDialogPlugin::setDirty
void setDirty(bool b)
Definition kpropertiesdialog.cpp:633
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::insertPlugin
void insertPlugin(KPropertiesDialogPlugin *plugin)
Adds a "3rd party" properties plugin to the dialog.
Definition kpropertiesdialog.cpp:386
KPropertiesDialog::canDisplay
static bool canDisplay(const KFileItemList &_items)
Determine whether there are any property pages available for the given file items.
Definition kpropertiesdialog.cpp:419
KPropertiesDialog::setFileNameReadOnly
void setFileNameReadOnly(bool ro)
Call this to make the filename lineedit readonly, to prevent the user from renaming the file.
Definition kpropertiesdialog.cpp:366
KPropertiesDialog::updateUrl
void updateUrl(const KUrl &_newUrl)
Updates the item URL (either called by rename or because a global apps/mimelnk desktop file is being ...
Definition kpropertiesdialog.cpp:548
KPropertiesDialog::kurl
KUrl kurl() const
The URL of the file that has its properties being displayed.
Definition kpropertiesdialog.cpp:394
KPropertiesDialog::KPropertiesDialog
KPropertiesDialog(const KFileItem &item, QWidget *parent=0)
Brings up a Properties dialog, as shown above.
Definition kpropertiesdialog.cpp:207
KPropertiesDialog::item
KFileItem & item()
Definition kpropertiesdialog.cpp:399
KPropertiesDialog::slotCancel
virtual void slotCancel()
Called when the user presses 'Cancel'.
Definition kpropertiesdialog.cpp:476
KPropertiesDialog::showFileSharingPage
void showFileSharingPage()
Shows the page that was previously set by setFileSharingPage(), or does nothing if no page was set ye...
Definition kpropertiesdialog.cpp:353
KPropertiesDialog::items
KFileItemList items() const
Definition kpropertiesdialog.cpp:404
KPropertiesDialog::leaveModality
void leaveModality()
KPropertiesDialog::setFileSharingPage
void setFileSharingPage(QWidget *page)
Sets the file sharing page.
Definition kpropertiesdialog.cpp:361
KPropertiesDialog::abortApplying
void abortApplying()
To abort applying changes.
Definition kpropertiesdialog.cpp:594
KPropertiesDialog::showDialog
static bool showDialog(const KFileItem &item, QWidget *parent=0, bool modal=true)
Immediately displays a Properties dialog using constructor with the same parameters.
Definition kpropertiesdialog.cpp:281
KPropertiesDialog::propertiesClosed
void propertiesClosed()
This signal is emitted when the Properties Dialog is closed (for example, with OK or Cancel buttons)
KPropertiesDialog::currentDir
KUrl currentDir() const
If the dialog is being built from a template, this method returns the current directory.
Definition kpropertiesdialog.cpp:409
KPropertiesDialog::slotOk
virtual void slotOk()
Called when the user presses 'Ok'.
Definition kpropertiesdialog.cpp:430
KPropertiesDialog::defaultName
QString defaultName() const
If the dialog is being built from a template, this method returns the default name.
Definition kpropertiesdialog.cpp:414
KPropertiesDialog::rename
void rename(const QString &_name)
Renames the item to the specified name.
Definition kpropertiesdialog.cpp:572
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
KIO
A namespace for KIO globals.
Definition kbookmarkmenu.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 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