qt:mainwindow-buildicon
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
qt:mainwindow-buildicon [2011/05/12 12:36] – mithat | qt:mainwindow-buildicon [2011/05/13 12:32] (current) – mithat | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <code cpp-qt> | + | Something like this: |
- | void MainWindow:: | + | |
+ | <code cpp-qt | ||
+ | /** | ||
+ | * @brief Append a regularly defined set of sized icon images to a QIcon. | ||
+ | * | ||
+ | * The following usage example assumes the resources ": | ||
+ | * ": | ||
+ | * that we want to bundle them together into exitIcon. | ||
+ | * | ||
+ | * \code | ||
+ | | ||
+ | | ||
+ | | ||
+ | * \endcode | ||
+ | * | ||
+ | * Does NOT check whether the referenced resources actually exist. | ||
+ | * | ||
+ | * @param theIcon Pointer to the icon that will be built/ | ||
+ | * @param iconRscTemplate A tag-based template string for the icon resource. | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | * @param sizeList A list of single-dimension sizes to be added to the icon. | ||
+ | * | ||
+ | * @return void | ||
+ | */ | ||
+ | void MainWindow:: | ||
+ | QString const &iconRscTemplate, | ||
+ | QList< | ||
{ | { | ||
- | | + | foreach (const int iconSize, sizeList) |
- | | + | |
{ | { | ||
- | | + | |
- | // TODO | + | QString dim; dim.setNum(iconSize); |
- | theIcon-> | + | theResource.replace(QString(" |
+ | theResource.replace(QString(" | ||
+ | |||
+ | theIcon-> | ||
} | } | ||
}</ | }</ |
qt/mainwindow-buildicon.txt · Last modified: 2011/05/13 12:32 by mithat