• Skip to content
  • Skip to link menu
KDE 4.1 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 
00010     This library is free software; you can redistribute it and/or
00011     modify it under the terms of the GNU Library General Public
00012     License as published by the Free Software Foundation; either
00013     version 2 of the License, or (at your option) any later version.
00014 
00015     This library is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018     Library General Public License for more details.
00019 
00020     You should have received a copy of the GNU Library General Public License
00021     along with this library; see the file COPYING.LIB.  If not, write to
00022     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00023     Boston, MA 02110-1301, USA.
00024 */
00025 
00026 
00027 #ifndef KFILEWIDGET_H
00028 #define KFILEWIDGET_H
00029 
00030 #include "kfile_export.h"
00031 #include "kabstractfilewidget.h"
00032 #include <QtGui/QWidget>
00033 
00034 class KJob;
00035 class KFileItem;
00036 
00037 class KFILE_EXPORT KFileWidget : public QWidget, public KAbstractFileWidget
00038 {
00039     Q_OBJECT
00040     Q_INTERFACES(KAbstractFileWidget)
00041 public:
00069     KFileWidget(const KUrl& startDir, QWidget *parent);
00070 
00074     virtual ~KFileWidget();
00075 
00079     virtual KUrl selectedUrl() const;
00080 
00084     virtual KUrl::List selectedUrls() const;
00085 
00089     virtual KUrl baseUrl() const;
00090 
00095     virtual QString selectedFile() const;
00096 
00100     virtual QStringList selectedFiles() const;
00101 
00109     virtual void setUrl(const KUrl &url, bool clearforward = true);
00110 
00116     virtual void setSelection(const QString& name);
00117 
00135     virtual void setOperationMode( OperationMode );
00136 
00144     virtual OperationMode operationMode() const;
00145 
00157     virtual void setKeepLocation( bool keep );
00158 
00163     virtual bool keepsLocation() const;
00164 
00199     virtual void setFilter(const QString& filter);
00200 
00208     virtual QString currentFilter() const;
00209 
00218     virtual KMimeType::Ptr currentFilterMimeType();
00219 
00231     virtual void setMimeFilter( const QStringList& types,
00232                         const QString& defaultType = QString() );
00233 
00242     virtual QString currentMimeFilter() const;
00243 
00247     virtual void clearFilter();
00248 
00260     virtual void setPreviewWidget(KPreviewWidgetBase *w);
00261 
00283     virtual void setMode( KFile::Modes m );
00284 
00289     virtual KFile::Modes mode() const;
00290 
00298     virtual void setLocationLabel(const QString& text);
00299 
00312     KToolBar *toolBar() const;
00313 
00319     KPushButton *okButton() const;
00320 
00326     KPushButton *cancelButton() const;
00327 
00331     KUrlComboBox *locationEdit() const;
00332 
00336     KFileFilterCombo *filterWidget() const;
00337 
00342     KActionCollection *actionCollection() const;
00343 
00356     static KUrl getStartUrl( const KUrl& startDir, QString& recentDirClass );
00357 
00362     static void setStartDir( const KUrl& directory );
00363 
00372     virtual void setCustomWidget(QWidget* widget);
00373 
00384     virtual void setCustomWidget(const QString& text, QWidget* widget);
00385 
00387     virtual void virtual_hook( int id, void* data );
00388 
00389 public Q_SLOTS:
00394     virtual void slotOk();
00395     virtual void accept();
00396     virtual void slotCancel();
00397 
00398 protected:
00399     virtual void resizeEvent(QResizeEvent* event);
00400     virtual void showEvent(QShowEvent* event);
00401 
00402 Q_SIGNALS:
00410     void fileSelected(const QString&);
00411 
00415     void fileHighlighted(const QString&);
00416 
00425     void selectionChanged();
00426 
00437     void filterChanged( const QString& filter );
00438 
00443     void accepted();
00444 
00445 private:
00446     friend class KFileWidgetPrivate;
00447     KFileWidgetPrivate* const d;
00448 
00449     Q_PRIVATE_SLOT( d, void _k_slotLocationChanged( const QString& ) )
00450     Q_PRIVATE_SLOT( d, void _k_urlEntered( const KUrl& ) )
00451     Q_PRIVATE_SLOT( d, void _k_enterUrl( const KUrl& ) )
00452     Q_PRIVATE_SLOT( d, void _k_enterUrl( const QString& ) )
00453     Q_PRIVATE_SLOT( d, void _k_locationAccepted( const QString& ) )
00454     Q_PRIVATE_SLOT( d, void _k_locationActivated( const QString& ) )
00455     Q_PRIVATE_SLOT( d, void _k_slotFilterChanged() )
00456     Q_PRIVATE_SLOT( d, void _k_fileHighlighted( const KFileItem& ) )
00457     Q_PRIVATE_SLOT( d, void _k_fileSelected( const KFileItem& ) )
00458     Q_PRIVATE_SLOT( d, void _k_slotStatResult( KJob* ) )
00459     Q_PRIVATE_SLOT( d, void _k_slotLoadingFinished() )
00460     Q_PRIVATE_SLOT( d, void _k_fileCompletion( const QString& ) )
00461     Q_PRIVATE_SLOT( d, void _k_toggleSpeedbar( bool ) )
00462     Q_PRIVATE_SLOT( d, void _k_toggleBookmarks( bool ) )
00463     Q_PRIVATE_SLOT( d, void _k_slotAutoSelectExtClicked() )
00464     Q_PRIVATE_SLOT( d, void _k_placesViewSplitterMoved() )
00465 };
00466 
00467 #endif /* KABSTRACTFILEWIDGET_H */
00468 

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
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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