TITANIUM_FUNCTION(View, selectAnnotation) { TITANIUM_ASSERT(arguments.size() == 1); auto _0 = arguments.at(0); TITANIUM_ASSERT(_0.IsObject()); selectAnnotation(static_cast<JSObject>(_0).GetPrivate<Annotation>()); return get_context().CreateUndefined(); }
AnnWidget::AnnWidget (AnnManager *mgr, QWidget *parent) : QWidget { parent } , Mgr_ { mgr } { Ui_.setupUi (this); Ui_.AnnTree_->setItemDelegate (new AnnTreeDelegate { Ui_.AnnTree_, this }); Ui_.AnnTree_->setModel (Mgr_->GetModel ()); connect (Mgr_, SIGNAL (annotationSelected (QModelIndex)), this, SLOT (focusOnAnnotation (QModelIndex))); connect (Ui_.AnnTree_->selectionModel (), SIGNAL (currentChanged (QModelIndex, QModelIndex)), Mgr_, SLOT (selectAnnotation (QModelIndex))); }