Exemplo n.º 1
0
void ColorPaletteWidget::clickColorListItem(QListWidgetItem* currentItem)
{
    int colorIndex = ui->colorListWidget->row( currentItem );
    //m_pEditor->selectAndApplyColour( colorIndex );

    emit colorNumberChanged( colorIndex );
}
Exemplo n.º 2
0
void ColorPaletteWidget::colorListCurrentItemChanged(QListWidgetItem* current, QListWidgetItem* previous)
{
    if (!current)
    {
        current = previous;
    }
    emit colorNumberChanged( ui->colorListWidget->row(current) );
}
Exemplo n.º 3
0
void ColorManager::setColorNumber(int n)
{
    Q_ASSERT(n >= 0);

    mCurrentColorIndex = n;

    QColor currentColor = object()->getColour(mCurrentColorIndex).colour;

    emit colorNumberChanged(mCurrentColorIndex);
    emit colorChanged(currentColor, mCurrentColorIndex);
}
Exemplo n.º 4
0
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);
    }
}
Exemplo n.º 5
0
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);
    }
}