Eneboo - Documentación para desarrolladores
|
PropertyList is a QListView derived class which is used for editing widget properties. Más...
#include <propertyeditor.h>
Tipos públicos | |
enum | LastEventType { KeyEvent, MouseEvent } |
Slots públicos | |
void | updateEditorSize () |
void | resetProperty () |
void | toggleSort () |
Métodos públicos | |
PropertyList (PropertyEditor *e) | |
virtual void | setupProperties () |
virtual void | setCurrentItem (QListViewItem *i) |
virtual void | valueChanged (PropertyItem *i) |
virtual void | refetchData () |
virtual void | setPropertyValue (PropertyItem *i) |
virtual void | setCurrentProperty (const QString &n) |
void | layoutInitValue (PropertyItem *i, bool changed=FALSE) |
PropertyEditor * | propertyEditor () const |
QString | whatsThisAt (const QPoint &p) |
void | showCurrentWhatsThis () |
LastEventType | lastEvent () |
Métodos protegidos | |
void | resizeEvent (QResizeEvent *e) |
void | paintEmptyArea (QPainter *p, const QRect &r) |
bool | addPropertyItem (PropertyItem *&item, const QCString &name, QVariant::Type t) |
void | viewportDragEnterEvent (QDragEnterEvent *) |
void | viewportDragMoveEvent (QDragMoveEvent *) |
void | viewportDropEvent (QDropEvent *) |
Atributos protegidos | |
PropertyEditor * | editor |
PropertyList is a QListView derived class which is used for editing widget properties.
This class is used for widget properties. It has to be child of a PropertyEditor.
To initialize it for editing a widget call setupProperties() which iterates through the properties of the current widget (see PropertyEditor::widget()) and builds the list.
To update the item values, refetchData() can be called.
If the value of an item has been changed by the user, and this change should be applied to the widget's property, valueChanged() has to be called.
To set the value of an item, setPropertyValue() has to be called.
PropertyList::PropertyList | ( | PropertyEditor * | e | ) |
bool PropertyList::addPropertyItem | ( | PropertyItem *& | item, |
const QCString & | name, | ||
QVariant::Type | t | ||
) | [protected] |
PropertyList::LastEventType PropertyList::lastEvent | ( | ) |
void PropertyList::layoutInitValue | ( | PropertyItem * | i, |
bool | changed = FALSE |
||
) |
Paints rect so that it looks like empty background using painter p. rect is in widget coordinates, ready to be fed to p.
The default function fills rect with the viewport()->backgroundBrush().
Reimplementado de QListView.
PropertyEditor * PropertyList::propertyEditor | ( | ) | const |
void PropertyList::refetchData | ( | ) | [virtual] |
This method re-initializes each item of the property list.
void PropertyList::resetProperty | ( | ) | [slot] |
void PropertyList::resizeEvent | ( | QResizeEvent * | e | ) | [protected, virtual] |
Ensures that the header is correctly sized and positioned when the resize event e occurs.
Reimplementado de QListView.
void PropertyList::setCurrentItem | ( | QListViewItem * | i | ) | [virtual] |
Sets item i to be the current item and repaints appropriately (i.e. highlights the item). The current item is used for keyboard navigation and focus indication; it is independent of any selected items, although a selected item can also be the current item.
This function does not set the selection anchor. Use setSelectionAnchor() instead.
Reimplementado de QListView.
void PropertyList::setCurrentProperty | ( | const QString & | n | ) | [virtual] |
void PropertyList::setPropertyValue | ( | PropertyItem * | i | ) | [virtual] |
This method initializes the value of the item i to the value of the corresponding property.
void PropertyList::setupProperties | ( | ) | [virtual] |
Sets up the property list by adding an item for each designable property of the widget which is just edited.
void PropertyList::showCurrentWhatsThis | ( | ) |
void PropertyList::toggleSort | ( | ) | [slot] |
void PropertyList::updateEditorSize | ( | ) | [slot] |
void PropertyList::valueChanged | ( | PropertyItem * | i | ) | [virtual] |
This has to be called if the value if i should be set as property to the currently edited widget.
void PropertyList::viewportDragEnterEvent | ( | QDragEnterEvent * | e | ) | [protected, virtual] |
Reimplementado de QScrollView.
void PropertyList::viewportDragMoveEvent | ( | QDragMoveEvent * | e | ) | [protected, virtual] |
Reimplementado de QScrollView.
void PropertyList::viewportDropEvent | ( | QDropEvent * | e | ) | [protected, virtual] |
Reimplementado de QScrollView.
PropertyEditor* PropertyList::editor [protected] |