The Q3FileIconProvider class provides icons for Q3FileDialog to use. 更多...
| 头: | #include <Q3FileIconProvider> |
| 继承: | QObject |
| Q3FileIconProvider (QObject * parent = 0, const char * name = 0) | |
| virtual const QPixmap * | pixmap (const QFileInfo & info ) |
The Q3FileIconProvider class provides icons for Q3FileDialog to use.
默认情况下 Q3FileIconProvider is not used, but any application or library can subclass it, reimplement pixmap () to return a suitable icon, and make all Q3FileDialog objects use it by calling the static function Q3FileDialog::setIconProvider ().
It is advisable to make all the icons that Q3FileIconProvider returns be the same size or at least the same width. This makes the list view look much better.
另请参阅 Q3FileDialog .
Constructs an empty file icon provider called name , with the parent parent .
[虚拟]
const
QPixmap
* Q3FileIconProvider::
pixmap
(const
QFileInfo
&
info
)
Returns a pointer to a pixmap that should be used to signify the file with the information info .
If pixmap() returns 0, Q3FileDialog 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.