ColorInfoVisualAnalogous::ColorInfoVisualAnalogous(QWidget * parent) : ColorInfoVisual(parent) { m_analogous1ColorWidget = new ColorWidget(this); m_analogous2ColorWidget = new ColorWidget(this); setWindowTitle(i18n("Analogous")); layout()->addWidget(m_analogous1ColorWidget); layout()->addWidget(m_analogous2ColorWidget); connect(m_analogous1ColorWidget, SIGNAL( colorAdded(QColor) ), this, SLOT( addColor(QColor) )); connect(m_analogous2ColorWidget, SIGNAL( colorAdded(QColor) ), this, SLOT( addColor(QColor) )); }
ColorInfoVisualTriadic::ColorInfoVisualTriadic(QWidget * parent) : ColorInfoVisual(parent) { m_triad1ColorWidget = new ColorWidget(this); m_triad2ColorWidget = new ColorWidget(this); setWindowTitle(i18n("Triadic")); layout()->addWidget(m_triad1ColorWidget); layout()->addWidget(m_triad2ColorWidget); connect(m_triad1ColorWidget, SIGNAL( colorAdded(QColor) ), this, SLOT( addColor(QColor) )); connect(m_triad2ColorWidget, SIGNAL( colorAdded(QColor) ), this, SLOT( addColor(QColor) )); }
void ColorPalette::appendColor(const QColor& color, const QString& name) { p->colors.push_back(qMakePair(color,name)); setDirty(true); colorAdded(p->colors.size()-1); colorsUpdated(p->colors); }
void ColorPalette::insertColor(int index, const QColor& color, const QString& name) { if ( index < 0 || index > p->colors.size() ) return; p->colors.insert(index, qMakePair(color, name)); setDirty(true); colorAdded(index); colorsUpdated(p->colors); }
ColorInfoVisualComplement::ColorInfoVisualComplement(QWidget * parent) : ColorInfoVisual(parent) { setWindowTitle(i18n("Complement")); m_complementColorWidget = new ColorWidget(this); layout()->addWidget(m_complementColorWidget); connect(m_complementColorWidget, SIGNAL( colorAdded(QColor) ), this, SLOT( addColor(QColor) )); }
void ColorInfoVisual::addColor(const QColor color) { emit colorAdded(color); }