void ColorPaletteWidget::clickColorListItem(QListWidgetItem* currentItem) { int colorIndex = ui->colorListWidget->row( currentItem ); //m_pEditor->selectAndApplyColour( colorIndex ); emit colorNumberChanged( colorIndex ); }
void ColorPaletteWidget::colorListCurrentItemChanged(QListWidgetItem* current, QListWidgetItem* previous) { if (!current) { current = previous; } emit colorNumberChanged( ui->colorListWidget->row(current) ); }
void ColorManager::setColorNumber(int n) { Q_ASSERT(n >= 0); mCurrentColorIndex = n; QColor currentColor = object()->getColour(mCurrentColorIndex).colour; emit colorNumberChanged(mCurrentColorIndex); emit colorChanged(currentColor, mCurrentColorIndex); }
void ColorManager::pickColorNumber( int n ) { Q_ASSERT( n >= 0 ); if ( m_frontColorIndex != n ) { m_frontColorIndex = n; QColor currentColor = m_editor->getObject()->getColour( m_frontColorIndex ).colour; //emit colorChanged(currentColor); emit colorNumberChanged(m_frontColorIndex); } }
void ColorManager::setColorNumber( int n ) { Q_ASSERT( n >= 0 ); if ( mCurrentColorIndex != n ) { mCurrentColorIndex = n; QColor currentColor = editor()->object()->getColour( mCurrentColorIndex ).colour; emit colorNumberChanged(mCurrentColorIndex); emit colorChanged(currentColor); } }