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

KIO

  • sources
  • kde-4.14
  • kdelibs
  • kio
  • kfile
kabstractfilewidget.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 /* This file is part of the KDE libraries
3  Copyright (C) 1997, 1998 Richard Moore <rich@kde.org>
4  1998 Stephan Kulow <coolo@kde.org>
5  1998 Daniel Grana <grana@ie.iwi.unibe.ch>
6  2000,2001 Carsten Pfeiffer <pfeiffer@kde.org>
7  2001 Frerich Raabe <raabe@kde.org>
8  2007 David Faure <faure@kde.org>
9 
10  This library is free software; you can redistribute it and/or
11  modify it under the terms of the GNU Library General Public
12  License as published by the Free Software Foundation; either
13  version 2 of the License, or (at your option) any later version.
14 
15  This library is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Library General Public License for more details.
19 
20  You should have received a copy of the GNU Library General Public License
21  along with this library; see the file COPYING.LIB. If not, write to
22  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23  Boston, MA 02110-1301, USA.
24 */
25 #ifndef KABSTRACTFILEWIDGET_H
26 #define KABSTRACTFILEWIDGET_H
27 
28 class KPreviewWidgetBase;
29 
30 #include "kurl.h"
31 #include "kfile.h"
32 #include <kmimetype.h>
33 
34 class KPushButton;
35 class KActionCollection;
36 class KToolBar;
37 class KFileWidgetPrivate;
38 class KUrlComboBox;
39 class KFileFilterCombo;
40 
57 class KIO_EXPORT KAbstractFileWidget
58 {
59 public:
60  virtual ~KAbstractFileWidget() {}
61 
73  enum OperationMode { Other = 0, Opening, Saving };
74 
78  virtual KUrl selectedUrl() const = 0;
79 
83  virtual KUrl::List selectedUrls() const = 0;
84 
88  virtual KUrl baseUrl() const = 0;
89 
94  virtual QString selectedFile() const = 0;
95 
99  virtual QStringList selectedFiles() const = 0;
100 
108  virtual void setUrl(const KUrl &url, bool clearforward = true) = 0;
109 
115  virtual void setSelection(const QString& name) = 0;
116 
134  virtual void setOperationMode( OperationMode ) = 0;
135 
143  virtual OperationMode operationMode() const = 0;
144 
156  virtual void setKeepLocation( bool keep ) = 0;
157 
162  virtual bool keepsLocation() const = 0;
163 
198  virtual void setFilter(const QString& filter) = 0;
199 
207  virtual QString currentFilter() const = 0;
208 
217  virtual KMimeType::Ptr currentFilterMimeType() = 0;
218 
230  virtual void setMimeFilter( const QStringList& types,
231  const QString& defaultType = QString() ) = 0;
232 
241  virtual QString currentMimeFilter() const = 0;
242 
246  virtual void clearFilter() = 0;
247 
259  virtual void setPreviewWidget(KPreviewWidgetBase *w) = 0;
260 
282  virtual void setMode( KFile::Modes m ) = 0;
283 
288  virtual KFile::Modes mode() const = 0;
289 
297  virtual void setLocationLabel(const QString& text) = 0;
298 
311  virtual KToolBar *toolBar() const = 0;
312 
318  virtual KPushButton *okButton() const = 0;
319 
325  virtual KPushButton *cancelButton() const = 0;
326 
330  virtual KUrlComboBox *locationEdit() const = 0;
331 
335  virtual KFileFilterCombo *filterWidget() const = 0;
336 
341  virtual KActionCollection *actionCollection() const = 0;
342 
351  virtual void setCustomWidget(QWidget* widget) = 0;
352 
363  virtual void setCustomWidget(const QString& text, QWidget* widget) = 0;
364 
369  virtual void slotOk() = 0;
370  virtual void accept() = 0;
371  virtual void slotCancel() = 0;
372 
374  virtual void virtual_hook( int id, void* data ) = 0;
375 
383  void setConfirmOverwrite(bool enable){ // KDE5 TODO: make this virtual
384  virtual_hook(0, static_cast<void*>(&enable));
385  }
386 
393  void setInlinePreviewShown(bool show) { // KDE5 TODO: make this virtual
394  virtual_hook(1, static_cast<void*>(&show));
395  }
396 };
397 
398 Q_DECLARE_INTERFACE(KAbstractFileWidget, "org.kde.KAbstractFileWidget")
399 
400 #endif /* KABSTRACTFILEWIDGET_H */
401 
KPushButton
QWidget
KActionCollection
kmimetype.h
kurl.h
kfile.h
KAbstractFileWidget::setConfirmOverwrite
void setConfirmOverwrite(bool enable)
Sets whether the user should be asked for confirmation when an overwrite might occurr.
Definition: kabstractfilewidget.h:383
KAbstractFileWidget::~KAbstractFileWidget
virtual ~KAbstractFileWidget()
Definition: kabstractfilewidget.h:60
KUrl
KUrlComboBox
This combobox shows a number of recent URLs/directories, as well as some default directories.
Definition: kurlcombobox.h:47
KAbstractFileWidget
Base class for KFileWidget.
Definition: kabstractfilewidget.h:57
QString
KAbstractFileWidget::setInlinePreviewShown
void setInlinePreviewShown(bool show)
Forces the inline previews to be shown or hidden, depending on show.
Definition: kabstractfilewidget.h:393
QStringList
KImageIO::types
QStringList types(Mode mode=Writing)
Returns a list of all KImageIO supported formats.
Definition: kimageio.cpp:82
Other
KUrl::List
KToolBar
KPreviewWidgetBase
Abstract baseclass for all preview widgets which shall be used via KFileDialog::setPreviewWidget(cons...
Definition: kpreviewwidgetbase.h:43
KAbstractFileWidget::OperationMode
OperationMode
Defines some default behavior of the filedialog.
Definition: kabstractfilewidget.h:73
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:52 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • 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