void TreeView::itemSelected(Q3ListViewItem *item) { TreeItem *_item = (TreeItem*)item; bool selected = false; bool dselected = false; if (_item) { selected = true; dselected = _item->isHidden(); } m_ac->action("edit_cut")->setEnabled(selected); m_ac->action("edit_copy")->setEnabled(selected); if (m_ac->action("delete")) m_ac->action("delete")->setEnabled(selected && !dselected); if(!item) { emit disableAction(); return; } if (_item->isDirectory()) emit entrySelected(_item->folderInfo()); else emit entrySelected(_item->entryInfo()); }
void ExtraAction::loadFromOverlay(Ogre::OverlayContainer *panel) { ASSERT(panel); ASSERT(!mCont); // ensure that we only initialize once // now configure the button configureAll(panel); disableAction(); }