qdesigner_internal::UrlProperty Class Reference

#include <qpropertyeditor_items_p.h>

Inheritance diagram for qdesigner_internal::UrlProperty:

Inheritance graph
[legend]
Collaboration diagram for qdesigner_internal::UrlProperty:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 599 of file qpropertyeditor_items_p.h.

Public Member Functions

 UrlProperty (const QUrl &value, const QString &name)
QVariant value () const
void setValue (const QVariant &value)
QString toString () const
QWidgetcreateEditor (QWidget *parent, const QObject *target, const char *receiver) const
void updateEditorContents (QWidget *editor)
void updateValue (QWidget *editor)

Private Attributes

QUrl m_value


Constructor & Destructor Documentation

UrlProperty::UrlProperty ( const QUrl value,
const QString name 
)

Definition at line 1662 of file qpropertyeditor_items.cpp.

01663     : AbstractPropertyGroup(name),
01664       m_value(value)
01665 {
01666 }


Member Function Documentation

QVariant UrlProperty::value (  )  const [virtual]

Implements qdesigner_internal::IProperty.

Definition at line 1668 of file qpropertyeditor_items.cpp.

References m_value.

Referenced by setValue().

01669 {
01670     return m_value;
01671 }

void UrlProperty::setValue ( const QVariant value  )  [virtual]

Implements qdesigner_internal::IProperty.

Definition at line 1673 of file qpropertyeditor_items.cpp.

References m_value, QVariant::toUrl(), and value().

01674 {
01675     m_value = value.toUrl();
01676 }

Here is the call graph for this function:

QString UrlProperty::toString (  )  const [virtual]

Reimplemented from qdesigner_internal::AbstractPropertyGroup.

Definition at line 1678 of file qpropertyeditor_items.cpp.

References m_value, and QUrl::toString().

01679 {
01680     return m_value.toString();
01681 }

Here is the call graph for this function:

QWidget * UrlProperty::createEditor ( QWidget parent,
const QObject target,
const char *  receiver 
) const [virtual]

Reimplemented from qdesigner_internal::AbstractPropertyGroup.

Definition at line 1683 of file qpropertyeditor_items.cpp.

References QObject::connect(), qdesigner_internal::IProperty::parent(), QLineEdit::setFrame(), and SIGNAL.

01684 {
01685     QLineEdit *lineEdit = new QLineEdit(parent);
01686     lineEdit->setFrame(0);
01687 
01688     QObject::connect(lineEdit, SIGNAL(textChanged(QString)), target, receiver);
01689     return lineEdit;
01690 }

Here is the call graph for this function:

void UrlProperty::updateEditorContents ( QWidget editor  )  [virtual]

Reimplemented from qdesigner_internal::AbstractPropertyGroup.

Definition at line 1692 of file qpropertyeditor_items.cpp.

References m_value, and QUrl::toString().

01693 {
01694     if (QLineEdit *lineEdit = qobject_cast<QLineEdit*>(editor)) {
01695         if (QUrl(lineEdit->text()) != m_value)
01696             lineEdit->setText(m_value.toString());
01697     }
01698 }

Here is the call graph for this function:

void UrlProperty::updateValue ( QWidget editor  )  [virtual]

Reimplemented from qdesigner_internal::IProperty.

Definition at line 1700 of file qpropertyeditor_items.cpp.

References m_value, and qdesigner_internal::IProperty::setChanged().

01701 {
01702     if (QLineEdit *lineEdit = qobject_cast<QLineEdit*>(editor)) {
01703         QUrl newValue = QUrl(lineEdit->text());
01704 
01705         if (newValue != m_value) {
01706             m_value = newValue;
01707             setChanged(true);
01708         }
01709 
01710     }
01711 }

Here is the call graph for this function:


Member Data Documentation

QUrl qdesigner_internal::UrlProperty::m_value [private]

Definition at line 613 of file qpropertyeditor_items_p.h.

Referenced by setValue(), toString(), updateEditorContents(), updateValue(), and value().


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 20:33:03 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1