lib/widgets/propeditor/plineedit.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 "plineedit.h"
00021
#include "propertyeditor.h"
00022
00023 PLineEdit::PLineEdit (
const PropertyEditor *editor,
const QString pname,
const QVariant value,
QWidget * parent,
const char * name ):
00024
QLineEdit(parent, name)
00025 {
00026
setValue(value,
false);
00027 setPName(pname);
00028 connect(
this, SIGNAL(textChanged(
const QString&)),
this, SLOT(
updateProperty(
const QString&)));
00029 connect(
this, SIGNAL(
propertyChanged(
QString,
QVariant)), editor, SLOT(emitPropertyChange(
QString,
QVariant)));
00030 }
00031
00032 QVariant PLineEdit::value()
const
00033
{
00034
return QVariant(
text());
00035 }
00036
00037 void PLineEdit::setValue(
const QVariant value,
bool emitChange)
00038 {
00039 setText(value.toString());
00040
if (emitChange)
00041 emit
propertyChanged(
pname(), value);
00042 }
00043
00044 void PLineEdit::updateProperty(
const QString& val)
00045 {
00046 emit
propertyChanged(
pname(),
QVariant(val));
00047 }
00048
00049
#ifndef PURE_QT
00050
#include "plineedit.moc"
00051
#endif
This file is part of the documentation for KDevelop Version 3.0.4.