inline void bump() { MICROSCOPES_ASSERT(pos_ <= nfeatures()); cursor_ += curtype().size(); if (mask_) mask_cursor_ += curtype().n(); pos_++; }
void set(const row_accessor &acc) { MICROSCOPES_DCHECK(curshape() == acc.curshape(), "shapes do not match"); MICROSCOPES_ASSERT(cursor_); MICROSCOPES_ASSERT(acc.cursor()); const size_t s0 = curtype().psize(); const size_t s1 = acc.curtype().psize(); for (unsigned i = 0; i < curshape(); i++) runtime_cast::copy( cursor_ + i * s0, curtype().t(), acc.cursor() + i * s1, acc.curtype().t()); }
void nftdialog::setTNails() { if (categoryList->currentRow() == 0) { tnailGrid->clear(); for (uint i = 0; i < iconItems.size(); ++i) { QPixmap pm(iconItems[i]->first->tnail); if (pm.width() > 60) pm = pm.scaledToWidth(60, Qt::SmoothTransformation); if (pm.height() > 60) pm = pm.scaledToHeight(60, Qt::SmoothTransformation); QPixmap pmd(60, 60); pmd.fill(palette().color(QPalette::Base)); QPainter p; p.begin(&pmd); p.drawPixmap(30 - pm.width() / 2, 30 - pm.height() / 2, pm); p.end(); QListWidgetItem* tmpQIVI = new QListWidgetItem(pmd, iconItems[i]->first->name, tnailGrid); iconItems[i]->second = tmpQIVI; } tnailGrid->sortItems(); return; } QString curtype(categoryList->currentItem()->text()); if (curtype != QString::null) { tnailGrid->clear(); for (uint i = 0; i < iconItems.size(); ++i) { if (curtype.indexOf(iconItems[i]->first->templateCategory) != -1) { QPixmap pm(iconItems[i]->first->tnail); if (pm.width() > 60) pm = pm.scaledToWidth(60, Qt::SmoothTransformation); if (pm.height() > 60) pm = pm.scaledToHeight(60, Qt::SmoothTransformation); QPixmap pmd(60, 60); pmd.fill(palette().color(QPalette::Base)); QPainter p; p.begin(&pmd); p.drawPixmap(30 - pm.width() / 2, 30 - pm.height() / 2, pm); p.end(); QListWidgetItem* tmpQIVI = new QListWidgetItem(pmd, iconItems[i]->first->name, tnailGrid); iconItems[i]->second = tmpQIVI; } else iconItems[i]->second = NULL; } tnailGrid->sortItems(); } }
inline value_accessor get() const { return value_accessor(cursor_, mask_cursor_, curtype()); }
inline unsigned curshape() const { return curtype().n(); }
inline value_mutator set() const { return value_mutator(cursor_, curtype()); }