• 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 
00038 class KFILE_EXPORT KFileWidget : public QWidget, public KAbstractFileWidget
00039 {
00040     Q_OBJECT
00041     Q_INTERFACES(KAbstractFileWidget)
00042 public:
00070     KFileWidget(const KUrl& startDir, QWidget *parent);
00071 
00075     virtual ~KFileWidget();
00076 
00080     virtual KUrl selectedUrl() const;
00081 
00085     virtual KUrl::List selectedUrls() const;
00086 
00090     virtual KUrl baseUrl() const;
00091 
00096     virtual QString selectedFile() const;
00097 
00101     virtual QStringList selectedFiles() const;
00102 
00110     virtual void setUrl(const KUrl &url, bool clearforward = true);
00111 
00117     virtual void setSelection(const QString& name);
00118 
00136     virtual void setOperationMode( OperationMode );
00137 
00145     virtual OperationMode operationMode() const;
00146 
00158     virtual void setKeepLocation( bool keep );
00159 
00164     virtual bool keepsLocation() const;
00165 
00200     virtual void setFilter(const QString& filter);
00201 
00209     virtual QString currentFilter() const;
00210 
00219     virtual KMimeType::Ptr currentFilterMimeType();
00220 
00232     virtual void setMimeFilter( const QStringList& types,
00233                         const QString& defaultType = QString() );
00234 
00243     virtual QString currentMimeFilter() const;
00244 
00248     virtual void clearFilter();
00249 
00261     virtual void setPreviewWidget(KPreviewWidgetBase *w);
00262 
00284     virtual void setMode( KFile::Modes m );
00285 
00290     virtual KFile::Modes mode() const;
00291 
00299     virtual void setLocationLabel(const QString& text);
00300 
00313     KToolBar *toolBar() const;
00314 
00320     KPushButton *okButton() const;
00321 
00327     KPushButton *cancelButton() const;
00328 
00332     KUrlComboBox *locationEdit() const;
00333 
00337     KFileFilterCombo *filterWidget() const;
00338 
00343     KActionCollection *actionCollection() const;
00344 
00357     static KUrl getStartUrl( const KUrl& startDir, QString& recentDirClass );
00358 
00363     static void setStartDir( const KUrl& directory );
00364 
00373     virtual void setCustomWidget(QWidget* widget);
00374 
00385     virtual void setCustomWidget(const QString& text, QWidget* widget);
00386 
00388     virtual void virtual_hook( int id, void* data );
00389 
00390 public Q_SLOTS:
00395     virtual void slotOk();
00396     virtual void accept();
00397     virtual void slotCancel();
00398 
00399 protected:
00400     virtual void resizeEvent(QResizeEvent* event);
00401     virtual void showEvent(QShowEvent* event);
00402 
00403 Q_SIGNALS:
00411     void fileSelected(const QString&);
00412 
00416     void fileHighlighted(const QString&);
00417 
00426     void selectionChanged();
00427 
00438     void filterChanged( const QString& filter );
00439 
00444     void accepted();
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 };
00468 
00469 #endif /* KABSTRACTFILEWIDGET_H */
00470 

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
  • kformula
  • 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