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 15:57] – mithat | qt:mainwindow-buildicon [2011/05/13 12:32] (current) – mithat | ||
---|---|---|---|
Line 3: | Line 3: | ||
<code cpp-qt MainWindow:: | <code cpp-qt MainWindow:: | ||
/** | /** | ||
- | * Append a regularly defined set of different | + | |
* | * | ||
* The following usage example assumes the resources ": | * The following usage example assumes the resources ": | ||
* ": | * ": | ||
* that we want to bundle them together into exitIcon. | * that we want to bundle them together into exitIcon. | ||
+ | * | ||
* \code | * \code | ||
- | * QList< | + | |
- | * QIcon exitIcon; | + | |
- | * buildIcon(& | + | |
* \endcode | * \endcode | ||
+ | * | ||
* Does NOT check whether the referenced resources actually exist. | * 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 | * @return void | ||
*/ | */ | ||
- | void MainWindow:: | + | void MainWindow:: |
- | | + | |
- | QList const & | + | QList< |
- | | + | |
{ | { | ||
- | foreach (const int iconSize | + | foreach (const int iconSize, sizeList) |
{ | { | ||
QString theResource = iconRscTemplate; | QString theResource = iconRscTemplate; | ||
- | theResource.replace(QString(" | + | |
- | theResource.replace(QString(" | + | |
+ | theResource.replace(QString(" | ||
- | theIcon-> | + | theIcon-> |
} | } | ||
}</ | }</ |
qt/mainwindow-buildicon.1305215826.txt.gz · Last modified: 2011/05/12 15:57 by mithat