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

KFile

KFileFilterCombo Class Reference

#include <kfilefiltercombo.h>

Inheritance diagram for KFileFilterCombo:
KComboBox QComboBox KCompletionBase

List of all members.

Signals

void filterChanged ()

Public Member Functions

QString currentFilter () const
QString defaultFilter () const
QStringList filters () const
 KFileFilterCombo (QWidget *parent=0)
void setCurrentFilter (const QString &filter)
void setDefaultFilter (const QString &filter)
void setFilter (const QString &filter)
void setMimeFilter (const QStringList &types, const QString &defaultType)
bool showsAllTypes () const
 ~KFileFilterCombo ()

Protected Member Functions

virtual bool eventFilter (QObject *, QEvent *)

Detailed Description

Definition at line 29 of file kfilefiltercombo.h.


Constructor & Destructor Documentation

KFileFilterCombo::KFileFilterCombo ( QWidget *  parent = 0  ) 

Creates a new filter combo box.

Parameters:
parent The parent widget.

Definition at line 57 of file kfilefiltercombo.cpp.

KFileFilterCombo::~KFileFilterCombo (  ) 

Destroys the filter combo box.

Definition at line 68 of file kfilefiltercombo.cpp.


Member Function Documentation

QString KFileFilterCombo::currentFilter (  )  const
Returns:
the current filter, either something like "*.cpp *.h" or the current mimetype, like "text/html", or a list of those, like " "text/html text/plain image/png, all separated with one space.

Definition at line 104 of file kfilefiltercombo.cpp.

QString KFileFilterCombo::defaultFilter (  )  const
Returns:
the default filter, used when an empty filter is set.
See also:
setDefaultFilter

Definition at line 212 of file kfilefiltercombo.cpp.

bool KFileFilterCombo::eventFilter ( QObject *  o,
QEvent *  e 
) [protected, virtual]

Reimplemented from KComboBox.

Definition at line 197 of file kfilefiltercombo.cpp.

void KFileFilterCombo::filterChanged (  )  [signal]

This signal is emitted whenever the filter has been changed.

QStringList KFileFilterCombo::filters (  )  const
Returns:
all filters (this can be a list of patterns or a list of mimetypes)

Definition at line 126 of file kfilefiltercombo.cpp.

void KFileFilterCombo::setCurrentFilter ( const QString &  filter  ) 

Sets the current filter.

Filter must match one of the filter items passed before to this widget.

Definition at line 131 of file kfilefiltercombo.cpp.

void KFileFilterCombo::setDefaultFilter ( const QString &  filter  ) 

This method allows you to set a default-filter, that is used when an empty filter is set.

Make sure you call this before calling setFilter().

By default, this is set to i18n("*|All Files")

See also:
defaultFilter

Definition at line 207 of file kfilefiltercombo.cpp.

void KFileFilterCombo::setFilter ( const QString &  filter  ) 

Sets the filter string.

Definition at line 73 of file kfilefiltercombo.cpp.

void KFileFilterCombo::setMimeFilter ( const QStringList &  types,
const QString &  defaultType 
)

Sets a list of mimetypes.

If defaultType is set, it will be set as the current item. Otherwise, a first item showing all the mimetypes will be created.

Definition at line 137 of file kfilefiltercombo.cpp.

bool KFileFilterCombo::showsAllTypes (  )  const
Returns:
true if the filter's first item is the list of all mimetypes

Definition at line 121 of file kfilefiltercombo.cpp.


The documentation for this class was generated from the following files:
  • kfilefiltercombo.h
  • kfilefiltercombo.cpp

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