void DesktopList::setIndex(int x) { if (x < 0) return; if (x < items.size()) { index = x; updateinterface(); emit IndexChanged(index); } }
nsresult nsDeckFrame::AttributeChanged(int32_t aNameSpaceID, nsIAtom* aAttribute, int32_t aModType) { nsresult rv = nsBoxFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType); // if the index changed hide the old element and make the new element visible if (aAttribute == nsGkAtoms::selectedIndex) { IndexChanged(); } return rv; }
NS_IMETHODIMP nsDeckFrame::AttributeChanged(PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { nsresult rv = nsBoxFrame::AttributeChanged(aNameSpaceID, aAttribute, aModType); // if the index changed hide the old element and make the new element visible if (aAttribute == nsGkAtoms::selectedIndex) { IndexChanged(PresContext()); } return rv; }
void DesktopList::shout() { emit IndexChanged(index); }