src/gui/image/qiconengine.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   180     \value AvailableSizesHook Allows to query the sizes of the
   180     \value AvailableSizesHook Allows to query the sizes of the
   181     contained pixmaps for pixmap-based engines. The \a data argument
   181     contained pixmaps for pixmap-based engines. The \a data argument
   182     of the virtual_hook() function is a AvailableSizesArgument pointer
   182     of the virtual_hook() function is a AvailableSizesArgument pointer
   183     that should be filled with icon sizes. Engines that work in terms
   183     that should be filled with icon sizes. Engines that work in terms
   184     of a scalable, vectorial format normally return an empty list.
   184     of a scalable, vectorial format normally return an empty list.
       
   185 
       
   186     \value IconNameHook Allows to query the name used to create the
       
   187     icon, for example when instantiating an icon using
       
   188     QIcon::fromTheme().
   185 
   189 
   186     \sa virtual_hook()
   190     \sa virtual_hook()
   187  */
   191  */
   188 
   192 
   189 /*!
   193 /*!
   299     arg.state = state;
   303     arg.state = state;
   300     virtual_hook(QIconEngineV2::AvailableSizesHook, reinterpret_cast<void*>(&arg));
   304     virtual_hook(QIconEngineV2::AvailableSizesHook, reinterpret_cast<void*>(&arg));
   301     return arg.sizes;
   305     return arg.sizes;
   302 }
   306 }
   303 
   307 
       
   308 /*!
       
   309     \since 4.7
       
   310 
       
   311     Returns the name used to create the engine, if available.
       
   312 
       
   313     \note This is a helper method and the actual work is done by
       
   314     virtual_hook() method, hence this method depends on icon engine support
       
   315     and may not work with all icon engines.
       
   316  */
       
   317 QString QIconEngineV2::iconName()
       
   318 {
       
   319     QString name;
       
   320     virtual_hook(QIconEngineV2::IconNameHook, reinterpret_cast<void*>(&name));
       
   321     return name;
       
   322 }
       
   323 
   304 QT_END_NAMESPACE
   324 QT_END_NAMESPACE