Drawing my custom icon in a standard situation? Do you mean:
for (int i = 0; i < NumModes; ++i){
if (i == 0) {
} else if (i == 1) {
} else if (i == 2) {
}
else if(i == 3){
}
pixmap
= icon.
pixmap(size, mode,
QIcon::Off);
icon.
addPixmap(onIcon,
QIcon::Active);
icon.
addPixmap(offIcon,
QIcon::Disabled);
pixmapLabels[i]->setPixmap(pixmap);
pixmapLabels[i]->setEnabled(true);
}
for (int i = 0; i < NumModes; ++i){
QIcon::Mode mode;
if (i == 0) {
mode = QIcon::Active;
} else if (i == 1) {
mode = QIcon::Selected;
} else if (i == 2) {
mode = QIcon::Disabled;
}
else if(i == 3){
mode = QIcon::Active;
}
pixmap = icon.pixmap(size, mode, QIcon::Off);
QPixmap onIcon("on.png");
QPixmap offIcon("off.png");
icon.addPixmap(onIcon, QIcon::Active);
icon.addPixmap(offIcon, QIcon::Disabled);
pixmapLabels[i]->setPixmap(pixmap);
pixmapLabels[i]->setEnabled(true);
}
To copy to clipboard, switch view to plain text mode
For example, i have 30 differents "ON" icons which looks like MaximumActive.png
In this way i must create 30 differents "OFF" icons which looks like MaximumAverage.jpg? It's not good.
I intend to increase saturation of current icon (Active mode) and other icons (in MyDisable mode) must be with low saturation like MaximumAverage.jpg but not gray like this:
screen.jpg
Thank you.
Bookmarks