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

KFile

kfilewidget.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 /* This file is part of the KDE libraries
00003     Copyright (C) 1997, 1998 Richard Moore <rich@kde.org>
00004                   1998 Stephan Kulow <coolo@kde.org>
00005                   1998 Daniel Grana <grana@ie.iwi.unibe.ch>
00006                   2000,2001 Carsten Pfeiffer <pfeiffer@kde.org>
00007                   2001 Frerich Raabe <raabe@kde.org>
00008                   2007 David Faure <faure@kde.org>
00009                   2008 Rafael Fernández López <ereslibre@kde.org>
00010 
00011     This library is free software; you can redistribute it and/or
00012     modify it under the terms of the GNU Library General Public
00013     License as published by the Free Software Foundation; either
00014     version 2 of the License, or (at your option) any later version.
00015 
00016     This library is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019     Library General Public License for more details.
00020 
00021     You should have received a copy of the GNU Library General Public License
00022     along with this library; see the file COPYING.LIB.  If not, write to
00023     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00024     Boston, MA 02110-1301, USA.
00025 */
00026 
00027 
00028 #ifndef KFILEWIDGET_H
00029 #define KFILEWIDGET_H
00030 
00031 #include "kfile_export.h"
00032 #include "kabstractfilewidget.h"
00033 #include <QtGui/QWidget>
00034 
00035 class KJob;
00036 class KFileItem;
00037 class KDirOperator;
00038 
00039 class KFILE_EXPORT KFileWidget : public QWidget, public KAbstractFileWidget
00040 {
00041     Q_OBJECT
00042     Q_INTERFACES(KAbstractFileWidget)
00043 public:
00074     KFileWidget(const KUrl& startDir, QWidget *parent);
00075 
00079     virtual ~KFileWidget();
00080 
00084     virtual KUrl selectedUrl() const;
00085 
00089     virtual KUrl::List selectedUrls() const;
00090 
00094     virtual KUrl baseUrl() const;
00095 
00100     virtual QString selectedFile() const;
00101 
00105     virtual QStringList selectedFiles() const;
00106 
00114     virtual void setUrl(const KUrl &url, bool clearforward = true);
00115 
00121     virtual void setSelection(const QString& name);
00122 
00140     virtual void setOperationMode( OperationMode );
00141 
00149     virtual OperationMode operationMode() const;
00150 
00162     virtual void setKeepLocation( bool keep );
00163 
00168     virtual bool keepsLocation() const;
00169 
00204     virtual void setFilter(const QString& filter);
00205 
00213     virtual QString currentFilter() const;
00214 
00223     virtual KMimeType::Ptr currentFilterMimeType();
00224 
00236     virtual void setMimeFilter( const QStringList& types,
00237                         const QString& defaultType = QString() );
00238 
00247     virtual QString currentMimeFilter() const;
00248 
00252     virtual void clearFilter();
00253 
00265     virtual void setPreviewWidget(KPreviewWidgetBase *w);
00266 
00288     virtual void setMode( KFile::Modes m );
00289 
00294     virtual KFile::Modes mode() const;
00295 
00303     virtual void setLocationLabel(const QString& text);
00304 
00317     KToolBar *toolBar() const;
00318 
00324     KPushButton *okButton() const;
00325 
00331     KPushButton *cancelButton() const;
00332 
00336     KUrlComboBox *locationEdit() const;
00337 
00341     KFileFilterCombo *filterWidget() const;
00342 
00347     KActionCollection *actionCollection() const;
00348 
00365     static KUrl getStartUrl( const KUrl& startDir, QString& recentDirClass );
00366 
00387     static KUrl getStartUrl( const KUrl& startDir, QString& recentDirClass, QString& fileName );
00388 
00393     static void setStartDir( const KUrl& directory );
00394 
00403     virtual void setCustomWidget(QWidget* widget);
00404 
00415     virtual void setCustomWidget(const QString& text, QWidget* widget);
00416 
00418     virtual void virtual_hook( int id, void* data );
00419 
00420 public Q_SLOTS:
00425     virtual void slotOk();
00426     virtual void accept();
00427     virtual void slotCancel();
00428 
00429 protected:
00430     virtual void resizeEvent(QResizeEvent* event);
00431     virtual void showEvent(QShowEvent* event);
00432     virtual bool eventFilter(QObject* watched, QEvent* event);
00433 
00434 Q_SIGNALS:
00442     void fileSelected(const QString&);
00443 
00447     void fileHighlighted(const QString&);
00448 
00457     void selectionChanged();
00458 
00469     void filterChanged( const QString& filter );
00470 
00475     void accepted();
00476 
00477 public:
00482     KDirOperator* dirOperator();
00483 
00484 private:
00485     friend class KFileWidgetPrivate;
00486     KFileWidgetPrivate* const d;
00487 
00488     Q_PRIVATE_SLOT(d, void _k_slotLocationChanged(const QString&))
00489     Q_PRIVATE_SLOT(d, void _k_urlEntered(const KUrl&))
00490     Q_PRIVATE_SLOT(d, void _k_enterUrl(const KUrl&))
00491     Q_PRIVATE_SLOT(d, void _k_enterUrl(const QString&))
00492     Q_PRIVATE_SLOT(d, void _k_locationAccepted(const QString&))
00493     Q_PRIVATE_SLOT(d, void _k_slotFilterChanged())
00494     Q_PRIVATE_SLOT(d, void _k_fileHighlighted(const KFileItem&))
00495     Q_PRIVATE_SLOT(d, void _k_fileSelected(const KFileItem&))
00496     Q_PRIVATE_SLOT(d, void _k_slotLoadingFinished())
00497     Q_PRIVATE_SLOT(d, void _k_fileCompletion(const QString&))
00498     Q_PRIVATE_SLOT(d, void _k_toggleSpeedbar(bool))
00499     Q_PRIVATE_SLOT(d, void _k_toggleBookmarks(bool))
00500     Q_PRIVATE_SLOT(d, void _k_slotAutoSelectExtClicked())
00501     Q_PRIVATE_SLOT(d, void _k_placesViewSplitterMoved(int, int))
00502     Q_PRIVATE_SLOT(d, void _k_activateUrlNavigator())
00503     Q_PRIVATE_SLOT(d, void _k_zoomOutIconsSize())
00504     Q_PRIVATE_SLOT(d, void _k_zoomInIconsSize())
00505     Q_PRIVATE_SLOT(d, void _k_slotIconSizeSliderMoved(int))
00506     Q_PRIVATE_SLOT(d, void _k_slotIconSizeChanged(int))
00507     Q_PRIVATE_SLOT(d, void _k_slotViewDoubleClicked(const QModelIndex&))
00508 };
00509 
00510 #endif /* KABSTRACTFILEWIDGET_H */
00511 

KFile

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal