void ParStore::setDispState(int ix, int selected) { int l2; int color; if (selected == 1) { for (l2 = 1; l2 <= list.count(); l2++) { color = 3 * (jumpToList.at(l2 - 1) > -2); setBGColorAt(l2, color); } setBGColorAt(ix + 1, 1); activeStore = ix; } else if (selected == 2) { setBGColorAt(ix + 1, 2); if (currentRequest != activeStore) { setBGColorAt(currentRequest + 1, 0); } currentRequest = ix; } }
void ParStore::updateRunOnce(int location, int choice) { if (choice == -2) { //stay here jumpToList.replace(location, -2); setBGColorAt(location + 1, 0); ((StorageButton *)(layout()->itemAt(0)->layout()->itemAt(location + 1) ->widget()))->setSecondText("", 0); } else if (choice == -1) { //jump back to last jumpToList.replace(location, -1); setBGColorAt(location + 1, 3); ((StorageButton *)(layout()->itemAt(0)->layout()->itemAt(location + 1) ->widget()))->setSecondText("<- ", 1); } else if (choice >= 0) { //jump to location jumpToList.replace(location, choice); ((StorageButton *)(layout()->itemAt(0)->layout()->itemAt(location + 1) ->widget()))->setSecondText("-> "+QString::number(choice + 1), 2); setBGColorAt(location + 1, 3); } }
void GlobStore::setDispState(int ix, int selected) { int start = 1; int end = timeModuleBox->count(); if (selected == 1) { for (int l1 = start; l1 <= end; l1++) { for (int l2 = 1; l2 < widgetList.count(); l2++) { setBGColorAt(l1, l2 , 0); } setBGColorAt(l1, ix + 1, 1); } activeStore = ix; } else if (selected == 2) { for (int l1 = start; l1 <= end; l1++) { setBGColorAt(l1, ix + 1, 2); if (currentRequest != activeStore) { setBGColorAt(l1, currentRequest + 1, 0); } } currentRequest = ix; } }