void ColorCombo::insertItems(ColorList& list, ColorCombo::PixmapType pixType) { ColorListBox* clb = dynamic_cast<ColorListBox*>(view()); if ( clb ) { if ( pixType == ColorCombo::fancyPixmaps ) clb->insertItems(list, ColorListBox::fancyPixmap); else if ( pixType == ColorCombo::widePixmaps ) clb->insertItems(list, ColorListBox::widePixmap); else if ( pixType == ColorCombo::smallPixmaps ) clb->insertItems(list, ColorListBox::smallPixmap); } }
void ColorCombo::updateBox(ColorList& list, ColorCombo::PixmapType pixType , bool insertNone) { ColorListBox* clb = dynamic_cast<ColorListBox*>(view()); if ( clb ) { clb->clear(); if ( insertNone ) clb->addItem(CommonStrings::tr_NoneColor); if ( pixType == ColorCombo::fancyPixmaps ) clb->insertItems(list, ColorListBox::fancyPixmap); else if ( pixType == ColorCombo::widePixmaps ) clb->insertItems(list, ColorListBox::widePixmap); else if ( pixType == ColorCombo::smallPixmaps ) clb->insertItems(list, ColorListBox::smallPixmap); } }
void ColorCombo::insertItems(ColorList& list) { ColorListBox* clb = dynamic_cast<ColorListBox*>(view()); if (!clb) return; clb->insertItems(list); }
void ColorCombo::updateBox(ColorList& list, bool insertNone) { ColorListBox* clb = dynamic_cast<ColorListBox*>(view()); if (!clb) return; clb->clear(); if (insertNone) { clb->addItem(CommonStrings::tr_NoneColor); clb->item(0)->setData(Qt::UserRole, CommonStrings::None); } clb->insertItems(list); }