• Skip to content
  • Skip to link menu
KDE 4.2 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:
00062     KFileWidget(const KUrl& startDir, QWidget *parent);
00063 
00067     virtual ~KFileWidget();
00068 
00072     virtual KUrl selectedUrl() const;
00073 
00077     virtual KUrl::List selectedUrls() const;
00078 
00082     virtual KUrl baseUrl() const;
00083 
00088     virtual QString selectedFile() const;
00089 
00093     virtual QStringList selectedFiles() const;
00094 
00102     virtual void setUrl(const KUrl &url, bool clearforward = true);
00103 
00109     virtual void setSelection(const QString& name);
00110 
00128     virtual void setOperationMode( OperationMode );
00129 
00137     virtual OperationMode operationMode() const;
00138 
00150     virtual void setKeepLocation( bool keep );
00151 
00156     virtual bool keepsLocation() const;
00157 
00192     virtual void setFilter(const QString& filter);
00193 
00201     virtual QString currentFilter() const;
00202 
00211     virtual KMimeType::Ptr currentFilterMimeType();
00212 
00224     virtual void setMimeFilter( const QStringList& types,
00225                         const QString& defaultType = QString() );
00226 
00235     virtual QString currentMimeFilter() const;
00236 
00240     virtual void clearFilter();
00241 
00253     virtual void setPreviewWidget(KPreviewWidgetBase *w);
00254 
00276     virtual void setMode( KFile::Modes m );
00277 
00282     virtual KFile::Modes mode() const;
00283 
00291     virtual void setLocationLabel(const QString& text);
00292 
00305     KToolBar *toolBar() const;
00306 
00312     KPushButton *okButton() const;
00313 
00319     KPushButton *cancelButton() const;
00320 
00324     KUrlComboBox *locationEdit() const;
00325 
00329     KFileFilterCombo *filterWidget() const;
00330 
00335     KActionCollection *actionCollection() const;
00336 
00349     static KUrl getStartUrl( const KUrl& startDir, QString& recentDirClass );
00350 
00355     static void setStartDir( const KUrl& directory );
00356 
00365     virtual void setCustomWidget(QWidget* widget);
00366 
00377     virtual void setCustomWidget(const QString& text, QWidget* widget);
00378 
00380     virtual void virtual_hook( int id, void* data );
00381 
00382 public Q_SLOTS:
00387     virtual void slotOk();
00388     virtual void accept();
00389     virtual void slotCancel();
00390 
00391 protected:
00392     virtual void resizeEvent(QResizeEvent* event);
00393     virtual void showEvent(QShowEvent* event);
00394     virtual bool eventFilter(QObject* watched, QEvent* event);
00395 
00396 Q_SIGNALS:
00404     void fileSelected(const QString&);
00405 
00409     void fileHighlighted(const QString&);
00410 
00419     void selectionChanged();
00420 
00431     void filterChanged( const QString& filter );
00432 
00437     void accepted();
00438 
00439 public:
00444     KDirOperator* dirOperator();
00445 
00446 private:
00447     friend class KFileWidgetPrivate;
00448     KFileWidgetPrivate* const d;
00449 
00450     Q_PRIVATE_SLOT(d, void _k_slotLocationChanged(const QString&))
00451     Q_PRIVATE_SLOT(d, void _k_urlEntered(const KUrl&))
00452     Q_PRIVATE_SLOT(d, void _k_enterUrl(const KUrl&))
00453     Q_PRIVATE_SLOT(d, void _k_enterUrl(const QString&))
00454     Q_PRIVATE_SLOT(d, void _k_locationAccepted(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_slotLoadingFinished())
00459     Q_PRIVATE_SLOT(d, void _k_fileCompletion(const QString&))
00460     Q_PRIVATE_SLOT(d, void _k_toggleSpeedbar(bool))
00461     Q_PRIVATE_SLOT(d, void _k_toggleBookmarks(bool))
00462     Q_PRIVATE_SLOT(d, void _k_slotAutoSelectExtClicked())
00463     Q_PRIVATE_SLOT(d, void _k_placesViewSplitterMoved(int, int))
00464     Q_PRIVATE_SLOT(d, void _k_activateUrlNavigator())
00465     Q_PRIVATE_SLOT(d, void _k_zoomOutIconsSize())
00466     Q_PRIVATE_SLOT(d, void _k_zoomInIconsSize())
00467     Q_PRIVATE_SLOT(d, void _k_slotIconSizeSliderMoved(int))
00468     Q_PRIVATE_SLOT(d, void _k_slotViewDoubleClicked(const QModelIndex&))
00469 };
00470 
00471 #endif /* KABSTRACTFILEWIDGET_H */
00472 

KFile

Skip menu "KFile"
  • Main Page
  • Namespace List
  • 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
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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