CTetrisObject_D( long x, long y ) : CTetrisObject::CTetrisObject( x, y ) { matrix->m[2][1] = new CMovingTile( x - 1, y ); matrix->m[2][2] = new CMovingTile( x, y ); matrix->m[3][1] = new CMovingTile( x - 1, y + 1 ); matrix->m[3][2] = new CMovingTile( x, y + 1 ); typeChange( TILE_MOVABLE ); }
void dEditJournal::setData( aListViewItem *o ) { item = o; md = o->md; obj = o->obj; aCfgItem cobj, doc, docs; int i, j, n; aAliasEditor *a = new aAliasEditor( md, obj, tAliases ); al = a; al->setData(); aRoleEditor *r = new aRoleEditor( md, obj, tRoles, md_journal ); re = r; re->setData(); setCaption( tr("Journal:") + md->attr( obj, mda_name ) ); eName->setText( md->attr( obj, mda_name ) ); eDescription->setText( md->sText( obj, md_description ) ); i = md->attr ( obj, mda_type ).toInt(); cbType-> setCurrentItem(i); journalDocs = new ananasTreeView( tabWidget18->page(2), md ); journalDocs->setSorting( -1 ); // TODO Fix me!!! //--layout28->addWidget( journalDocs, 0, 0 ); n = md->count( obj, md_used_doc ); for ( j = 0; j < n; j++ ) { cobj = md->find( obj, md_used_doc, j ); if ( cobj.isNull() ) continue; // did = md->text(cobj).toLong(); doc = md->find(md->text(cobj).toLong()); if ( doc.isNull() ) md->remove(cobj); else new ananasListViewItem( journalDocs, journalDocs->lastItem(), md, doc ); } allDocs = new ananasTreeView( tabWidget18->page(2), md ); allDocs->setSorting( -1 ); // TODO Fix me!!! //--layout29->add( allDocs ); docs = md->find(md->find(mdc_metadata),md_documents,0); n = md->count( docs, md_document ); for ( j = 0; j < n; j++ ) { cobj = md->find( docs, md_document, j ); if ( cobj.isNull() ) return; // did = md->id(cobj); doc = md->find(md->id(cobj)); new ananasListViewItem( allDocs, allDocs->lastItem(), md, doc ); } docPage = tabWidget18->page(2); if ( cbType->currentItem() != 1 ) typeChange(); }
CTetrisObject_B( long x, long y ) : CTetrisObject::CTetrisObject( x, y ) { matrix->m[2][0] = new CMovingTile( x - 2, y ); matrix->m[2][1] = new CMovingTile( x - 1, y ); matrix->m[2][2] = new CMovingTile( x, y ); matrix->m[2][3] = new CMovingTile( x + 1, y ); matrix->m[2][4] = new CMovingTile( x + 2, y ); typeChange( TILE_MOVABLE ); }
/** Emits the type of the newly selected button */ void DrawingToolbar::changeType(DrawingToolButton* b) { if(b != NULL && QToolBar::children().indexOf(b) != QToolBar::children().indexOf(this->currentlyClicked)) { this->currentlyClicked->setChecked(false); this->currentlyClicked = b; emit typeChange(this->currentlyClicked->getType()); } else { b->setChecked(false); this->currentlyClicked->setChecked(true); } }