void CXmlPropertyList::itemPressed( QListViewItem *i, const QPoint &p, int c ) { if ( !i ) return; PropertyItem *pi = (PropertyItem*)i; if ( !pi->hasSubItems() ) return; if ( c == 0 && viewport()->mapFromGlobal( p ).x() < 20 ) toggleOpen( i ); }
// ???Replaces pressed() (via new connect()) void QmvList::itemPressed( QListViewItem *item, const QPoint &p, int c ) { if ( !item ) return; QmvItem *pi = (QmvItem*)item; // Attributes cannot be pressed - TODO: change this if implementing subattributes. if ( pi->shuttletupleAttribute() ) return; // This is a tuple press, update the persistent storage if (!dataisPersistent() && pi->isOpen()) { // Save via class to emit signal if ( !pi->shuttleClass()->save( pi->shuttleTuple() ) ) { setPersistent(FALSE); QMessageBox::warning(0, "QmvList:Warning_save", tr("The data-save failed.\n\n %1") .arg(pi->shuttleTuple()->lastError()), "OK", 0 ); } else { setPersistent(TRUE); for (int i = 0; i < pi->childCount(); ++i ) { QmvItem *ci = pi->child(i); ci->refreshValue(); ci->setChanged(FALSE); } } pi->setText( 0, pi->shuttleTuple()->userkeyValue()); pi->setText( 1, pi->shuttleTuple()->userlabelValue()); } // if first column (0) and in left margin (ie +/- icon) if ( c == 0 && viewport()->mapFromGlobal( p ).x() < 20 ) toggleOpen( item ); }
void UIPopupBox::mouseDoubleClickEvent(QMouseEvent * /* pEvent */) { /* Toggle popup-box: */ toggleOpen(); }
void UIPopupBox::mouseDoubleClickEvent(QMouseEvent * /* pEvent */) { toggleOpen(); }