lib

KoProperty::Widget Class Reference

#include <widget.h>

Inheritance diagram for KoProperty::Widget:

KoProperty::BoolEdit KoProperty::ColorButton KoProperty::ComboBox KoProperty::DateEdit KoProperty::DateTimeEdit KoProperty::DoubleEdit KoProperty::DummyWidget KoProperty::FontEdit KoProperty::IntEdit KoProperty::LineStyleEdit KoProperty::PixmapEdit KoProperty::PointEdit KoProperty::RectEdit KoProperty::SizeEdit KoProperty::SizePolicyEdit KoProperty::StringEdit KoProperty::StringListEdit KoProperty::SymbolCombo KoProperty::TimeEdit KoProperty::URLEdit List of all members.

Detailed Description

The base class for all item editors used in Editor.

Author:
Cedric Pasteur <cedric.pasteur@free.fr>

Alexander Dymo <cloudtemple@mskat.net>

Definition at line 36 of file widget.h.


Signals

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

Public Member Functions

 Widget (Property *property, QWidget *parent, const char *name="property_editor")
virtual ~Widget ()
virtual QVariant value () const=0
virtual void setValue (const QVariant &value, bool emitChange=true)=0
virtual Propertyproperty () const
virtual void setProperty (Property *property)
virtual void drawViewer (QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
virtual void undo ()
void setFocusWidget (QWidget *focusProxy)
bool leavesTheSpaceForRevertButton () const
bool hasBorders () const
bool isReadOnly () const
void setReadOnly (bool readOnly)
bool visibleFlag () const

Protected Member Functions

void setEditor (QWidget *editor)
virtual bool eventFilter (QObject *watched, QEvent *e)
virtual void resizeEvent (QResizeEvent *e)
void setLeavesTheSpaceForRevertButton (bool set)
void setHasBorders (bool set)
virtual void setReadOnlyInternal (bool readOnly)=0
void setVisibleFlag (bool visible)

Protected Attributes

WidgetPrivate * d

Member Function Documentation

Property * Widget::property (  )  const [virtual]

Returns:
edited property.

Definition at line 72 of file widget.cpp.

void Widget::setProperty ( Property property  )  [virtual]

Sets the name of edited property.

Reimplemented in KoProperty::ThreeStateBoolEdit, KoProperty::ComboBox, KoProperty::CursorEdit, and KoProperty::URLEdit.

Definition at line 78 of file widget.cpp.

void Widget::undo (  )  [virtual]

Reverts the property value to previous setting.

Definition at line 101 of file widget.cpp.

void Widget::setFocusWidget ( QWidget *  focusProxy  ) 

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

Definition at line 152 of file widget.cpp.

bool Widget::leavesTheSpaceForRevertButton (  )  const

See also:
d->leaveTheSpaceForRevertButton description

Definition at line 166 of file widget.cpp.

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.

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.

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.

bool Widget::eventFilter ( QObject *  watched,
QEvent *  e 
) [protected, virtual]

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

Reimplemented in KoProperty::BoolEdit, KoProperty::ColorButton, KoProperty::FontEdit, and KoProperty::PixmapEdit.

Definition at line 108 of file widget.cpp.

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.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys