source/MainGUI.cpp
/**
 * Slot: Executed when the a usercolor has changed.
 *
 * @param colorDialog The color dialog for the user color.
 */
Executed when the a usercolor has changed.
@param colorDialog The color dialog for the user color.
Executed when the a usercolor has changed . @param colorDialog The color dialog for the user color .
void MainGUI::userColorChanged(MColorDialog* colorDialog)
{
    QString username = colorDialog->objectName().left(colorDialog->objectName().length() - 11);
    QColor color = colorDialog->currentColor();
    QListWidgetItem* item = VariantUtil<QListWidgetItem>::toPointer(colorDialog->property("listItem"));
    if (!colorDialog->isVisible())
    {
        color = gproxy->getConfig()->getUserColor(username);
    }
    item->setData(ChannellistDelegate::COLOR_USER, color);
    widget.outputTextArea->repaint("usercolor", color, username);
}
void MainGUI :: userColorChanged ( MColorDialog * colorDialog ) { QString username = colorDialog -> objectName ( ) . left ( colorDialog -> objectName ( ) . length ( ) - 11 ) ; QColor color = colorDialog -> currentColor ( ) ; QListWidgetItem * item = VariantUtil < QListWidgetItem > :: toPointer ( colorDialog -> property ( " " ) ) ; if ( ! colorDialog -> isVisible ( ) ) { color = gproxy -> getConfig ( ) -> getUserColor ( username ) ; } item -> setData ( ChannellistDelegate :: COLOR_USER , color ) ; widget . outputTextArea -> repaint ( " " , color , username ) ; }
Slot: Executed when the a usercolor has changed.
Slot : Executed when the a usercolor has changed .
// Example name is "ManufactoringColorDialog". Expected username is "Manufactoring". // Removing "ColorDialog".