lib/widgets/propeditor/pcolorcombo.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#include "pcolorcombo.h"
00021
#include "propertyeditor.h"
00022
00023 PColorCombo::PColorCombo(
const PropertyEditor *editor,
const QString pname,
const QVariant value,
QWidget *parent,
const char *name):
00024
KColorCombo(parent, name)
00025 {
00026
setValue(value);
00027 setPName(pname);
00028 connect(
this, SIGNAL(activated(
int)),
this, SLOT(
updateProperty(
int)));
00029 connect(
this, SIGNAL(
propertyChanged(
QString,
QVariant)), editor, SLOT(emitPropertyChange(
QString,
QVariant)));
00030 }
00031
00032 QVariant PColorCombo::value()
const
00033
{
00034
00035
return QVariant(
color());
00036 }
00037
00038 void PColorCombo::setValue(
const QVariant value,
bool emitChange)
00039 {
00040
00041
00042
00043 setColor(value.toColor());
00044
if (emitChange)
00045 emit
propertyChanged(
pname(), value);
00046 }
00047
00048 void PColorCombo::updateProperty(
int )
00049 {
00050 emit
propertyChanged(
pname(),
value());
00051 }
00052
00053
#ifndef PURE_QT
00054
#include "pcolorcombo.moc"
00055
#endif
This file is part of the documentation for KDevelop Version 3.0.4.