Changeset View
Changeset View
Standalone View
Standalone View
libs/widgets/KoColorPopupAction.cpp
Context not available. | |||||
113 | 113 | | |||
---|---|---|---|---|---|
114 | connect(this, SIGNAL(triggered()), this, SLOT(emitColorChanged())); | 114 | connect(this, SIGNAL(triggered()), this, SLOT(emitColorChanged())); | ||
115 | 115 | | |||
116 | connect(d->colorSetWidget, SIGNAL(colorChanged(const KoColor &, bool)), this, SLOT(colorWasSelected(const KoColor &, bool))); | 116 | connect(d->colorSetWidget, SIGNAL(colorChanged(const KoColor &, bool)), | ||
117 | 117 | this, SLOT(colorWasSelected(const KoColor &, bool))); | |||
118 | connect( d->colorChooser, SIGNAL( colorChanged( const QColor &) ), | 118 | connect(d->colorChooser, SIGNAL(colorChanged(const QColor &)), | ||
119 | this, SLOT( colorWasEdited( const QColor &) ) ); | 119 | this, SLOT(colorWasEdited( const QColor &))); | ||
120 | connect( d->opacitySlider, SIGNAL(valueChanged(int)), | 120 | connect(d->opacitySlider, SIGNAL(valueChanged(int)), | ||
121 | this, SLOT(opacityWasChanged(int))); | 121 | this, SLOT(opacityWasChanged(int))); | ||
122 | } | 122 | } | ||
123 | 123 | | |||
124 | KoColorPopupAction::~KoColorPopupAction() | 124 | KoColorPopupAction::~KoColorPopupAction() | ||
Context not available. | |||||
245 | 245 | | |||
246 | emitColorChanged(); | 246 | emitColorChanged(); | ||
247 | } | 247 | } | ||
248 | | ||||
249 | void KoColorPopupAction::slotTriggered(bool) | | |||
250 | { | | |||
251 | if (d->firstTime) { | | |||
252 | KoResourceServer<KoColorSet>* srv = KoResourceServerProvider::instance()->paletteServer(); | | |||
253 | QList<KoColorSet*> palettes = srv->resources(); | | |||
254 | if (!palettes.empty()) { | | |||
255 | d->colorSetWidget->setColorSet(palettes.first()); | | |||
256 | } | | |||
257 | d->firstTime = false; | | |||
258 | } | | |||
259 | } | | |||
Context not available. |