TQFileIconProvider Class

Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# TQFileIconProvider Class Reference

The TQFileIconProvider class provides icons for TQFileDialog to use. More...

`#include <ntqfiledialog.h>`

Inherits TQObject.

List of all member functions.

## Public Members

- TQFileIconProvider ( TQObject * parent = 0, const char * name = 0 )
- virtual const TQPixmap * pixmap ( const TQFileInfo & info )

## Detailed Description

The TQFileIconProvider class provides icons for TQFileDialog to use.

By default TQFileIconProvider is not used, but any application or library can subclass it, reimplement pixmap() to return a suitable icon, and make all TQFileDialog objects use it by calling the static function TQFileDialog::setIconProvider().

It is advisable to make all the icons that TQFileIconProvider returns be the same size or at least the same width. This makes the list view look much better.

See also TQFileDialog and Miscellaneous Classes.

## Member Function Documentation

### TQFileIconProvider::TQFileIconProvider ( TQObject * parent = 0, const char * name = 0 )

Constructs an empty file icon provider called name, with the parent parent.

### const TQPixmap * TQFileIconProvider::pixmap ( const TQFileInfo & info )`[virtual]`

Returns a pointer to a pixmap that should be used to signify the file with the information info.

If pixmap() returns 0, TQFileDialog draws the default pixmap.

The default implementation returns particular icons for files, directories, link-files and link-directories. It returns a blank "icon" for other types.

If you return a pixmap here, it should measure 16x16 pixels.

This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.