lib

#include <widget.h>

Signals

void valueChanged (Widget *widget)
void acceptInput (Widget *widget)
void rejectInput (Widget *widget)

Public Member Functions

 Widget (Property *property, TQWidget *parent, const char *name="property_editor")
virtual TQVariant value () const =0
virtual void setValue (const TQVariant &value, bool emitChange=true)=0
virtual Property * property () const
virtual void setProperty (Property *property)
virtual void drawViewer (TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
virtual void undo ()
void setFocusWidget (TQWidget *focusProxy)
bool leavesTheSpaceForRevertButton () const
bool hasBorders () const
bool isReadOnly () const
void setReadOnly (bool readOnly)
bool visibleFlag () const

Protected Member Functions

void setEditor (TQWidget *editor)
virtual bool eventFilter (TQObject *watched, TQEvent *e)
virtual void resizeEvent (TQResizeEvent *e)
void setLeavesTheSpaceForRevertButton (bool set)
void setHasBorders (bool set)
virtual void setReadOnlyInternal (bool readOnly)=0
void setVisibleFlag (bool visible)

Protected Attributes

WidgetPrivate * d

Detailed Description

The base class for all item editors used in Editor.

Author
Cedric Pasteur cedri.nosp@m.c.pa.nosp@m.steur.nosp@m.@fre.nosp@m.e.fr
Alexander Dymo cloud.nosp@m.temp.nosp@m.le@ms.nosp@m.kat..nosp@m.net

Definition at line 36 of file widget.h.

Constructor & Destructor Documentation

◆ Widget()

Widget::Widget ( Property * property,
TQWidget * parent,
const char * name = "property_editor" )

Definition at line 58 of file widget.cpp.

◆ ~Widget()

Widget::~Widget ( )
virtual

Definition at line 65 of file widget.cpp.

Member Function Documentation

◆ drawViewer()

void Widget::drawViewer ( TQPainter * p,
const TQColorGroup & cg,
const TQRect & r,
const TQVariant & value )
virtual

Function to draw a property viewer when the item editor isn't shown.

Definition at line 88 of file widget.cpp.

◆ eventFilter()

bool Widget::eventFilter ( TQObject * watched,
TQEvent * e )
protectedvirtual

Filters some event for main widget, eg Enter or Esc key presses.

Definition at line 108 of file widget.cpp.

◆ hasBorders()

bool Widget::hasBorders ( ) const
Returns
true if this editor has borders. Editors with borders have slightly larger height and width set by property editor widget.

Definition at line 184 of file widget.cpp.

◆ isReadOnly()

bool Widget::isReadOnly ( ) const
Returns
true if the widget is read-only. Read-only property widget does not allow to change its property value. The flag is inherited from the underlying property and property set. Editor::setValue() method will still work, however.
See also
Set::isReadOnly().

Definition at line 208 of file widget.cpp.

◆ leavesTheSpaceForRevertButton()

bool Widget::leavesTheSpaceForRevertButton ( ) const
See also
d->leaveTheSpaceForRevertButton description

Definition at line 166 of file widget.cpp.

◆ property()

Property * Widget::property ( ) const
virtual
Returns
edited property.

Definition at line 72 of file widget.cpp.

◆ resizeEvent()

void Widget::resizeEvent ( TQResizeEvent * e)
protectedvirtual

Definition at line 200 of file widget.cpp.

◆ setEditor()

void Widget::setEditor ( TQWidget * editor)
protected

Definition at line 190 of file widget.cpp.

◆ setFocusWidget()

void Widget::setFocusWidget ( TQWidget * focusProxy)

Sets the widget that will receive focus when the Widget is selected.

Definition at line 152 of file widget.cpp.

◆ setHasBorders()

void Widget::setHasBorders ( bool set)
protected

Definition at line 178 of file widget.cpp.

◆ setLeavesTheSpaceForRevertButton()

void Widget::setLeavesTheSpaceForRevertButton ( bool set)
protected

Definition at line 172 of file widget.cpp.

◆ setProperty()

void Widget::setProperty ( Property * property)
virtual

Sets the name of edited property.

Definition at line 78 of file widget.cpp.

◆ setReadOnly()

void Widget::setReadOnly ( bool readOnly)

Sets this widget to be read-only. Disables or enables editing in the appropriate widget(s).

See also
isReadOnly()

Definition at line 214 of file widget.cpp.

◆ setReadOnlyInternal()

virtual void KoProperty::Widget::setReadOnlyInternal ( bool readOnly)
protectedpure virtual

Called by setReadOnly(bool). For implementation: for read-only you should disable editing in the appropriate widget(s).

◆ setValue()

virtual void KoProperty::Widget::setValue ( const TQVariant & value,
bool emitChange = true )
pure virtual

Sets the value shown in the item editor widget. Set emitChange to false if you don't want to emit propertyChanged signal.

◆ setVisibleFlag()

void Widget::setVisibleFlag ( bool visible)
protected

Used only in setReadOnlyInternal() to make the widget visible or invisible. This flag is checked by Editor when the widget is about to show. By default widgets are visible.

Definition at line 227 of file widget.cpp.

◆ undo()

void Widget::undo ( )
virtual

Reverts the property value to previous setting.

Definition at line 101 of file widget.cpp.

◆ value()

virtual TQVariant KoProperty::Widget::value ( ) const
pure virtual
Returns
the value currently entered in the item editor widget.

◆ visibleFlag()

bool Widget::visibleFlag ( ) const

Definition at line 221 of file widget.cpp.

Member Data Documentation

◆ d

WidgetPrivate* KoProperty::Widget::d
protected

Definition at line 116 of file widget.h.


The documentation for this class was generated from the following files: