lib

#include <editor.h>

Inheritance diagram for KoProperty::Editor:
TDEListView

Public Slots

void changeSet (Set *set, bool preservePrevSelection=false)
void changeSet (Set *set, const TQCString &propertyToSelect)
void clear (bool editorOnly=false)
void acceptInput ()
Public Slots inherited from TDEListView
virtual void rename (TQListViewItem *item, int c)
void setRenameable (int column, bool yesno=true)
virtual void setItemsMovable (bool b)
virtual void setItemsRenameable (bool b)
virtual void setDragEnabled (bool b)
virtual void setAutoOpen (bool b)
virtual void setDropVisualizer (bool b)
void setDropVisualizerWidth (int w)
virtual void setTooltipColumn (int column)
virtual void setDropHighlighter (bool b)
virtual void setCreateChildren (bool b) TDE_DEPRECATED
void setSelectionModeExt (SelectionModeExt mode)
void setTabOrderedRenaming (bool b)
bool tabOrderedRenaming () const
virtual void selectAll (bool select)

Signals

void propertySetChanged (KoProperty::Set *set)
Signals inherited from TDEListView
void executed (TQListViewItem *item)
void executed (TQListViewItem *item, const TQPoint &pos, int c)
void dropped (TQDropEvent *e, TQListViewItem *after)
void dropped (TDEListView *list, TQDropEvent *e, TQListViewItem *after)
void dropped (TDEListView *list, TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after)
void dropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after)
void moved ()
void aboutToMove ()
void moved (TQListViewItem *item, TQListViewItem *afterFirst, TQListViewItem *afterNow)
void moved (TQPtrList< TQListViewItem > &items, TQPtrList< TQListViewItem > &afterFirst, TQPtrList< TQListViewItem > &afterNow)
void itemRenamed (TQListViewItem *item, const TQString &str, int col)
void itemRenamed (TQListViewItem *item)
void menuShortCutPressed (TDEListView *list, TQListViewItem *item)
void contextMenu (TDEListView *l, TQListViewItem *i, const TQPoint &p)
void renameNext (TQListViewItem *item, int col)
void renamePrev (TQListViewItem *item, int col)

Public Member Functions

 Editor (TQWidget *parent=0, bool autoSync=true, const char *name=0)
virtual TQSize sizeHint () const
virtual void setFocus ()
virtual void setSorting (int column, bool ascending=true)
Public Member Functions inherited from TDEListView
 TDEListView (TQWidget *parent=0, const char *name=0)
virtual void setAcceptDrops (bool)
virtual bool isExecuteArea (const TQPoint &point)
bool isExecuteArea (int x)
TQPtrList< TQListViewItem > selectedItems () const
TQPtrList< TQListViewItem > selectedItems (bool includeHiddenItems) const
void moveItem (TQListViewItem *item, TQListViewItem *parent, TQListViewItem *after)
TQListViewItem * lastItem () const
TQListViewItem * lastChild () const
KLineEdit * renameLineEdit () const
bool itemsMovable () const
bool itemsRenameable () const
bool dragEnabled () const
bool autoOpen () const
bool isRenameable (int column) const
bool dropVisualizer () const
int tooltipColumn () const
bool createChildren () const TDE_DEPRECATED
bool dropHighlighter () const
int dropVisualizerWidth () const
SelectionModeExt selectionModeExt () const
int itemIndex (const TQListViewItem *item) const
TQListViewItem * itemAtIndex (int index)
void setFullWidth () TDE_DEPRECATED
void setFullWidth (bool fullWidth)
bool fullWidth () const
virtual int addColumn (const TQString &label, int width=-1)
virtual int addColumn (const TQIconSet &iconset, const TQString &label, int width=-1)
virtual void removeColumn (int index)
void setAlternateBackground (const TQColor &c)
const TQColor & alternateBackground () const
void saveLayout (TDEConfig *config, const TQString &group) const
void restoreLayout (TDEConfig *config, const TQString &group)
int columnSorted (void) const
bool ascendingSort (void) const
virtual void takeItem (TQListViewItem *i)
void setShadeSortColumn (bool shadeSortColumn)
bool shadeSortColumn (void) const
void setUseSmallExecuteArea (bool enable)
bool useSmallExecuteArea () const
void setRenameSettings (const TDEListViewRenameSettings &renSett)

Protected Slots

void slotPropertyChanged (KoProperty::Set &set, KoProperty::Property &property)
void slotPropertyReset (KoProperty::Set &set, KoProperty::Property &property)
void slotWidgetValueChanged (Widget *widget)
void slotWidgetAcceptInput (Widget *widget)
void slotWidgetRejectInput (Widget *widget)
void slotSetWillBeCleared ()
void slotSetWillBeDeleted ()
void slotClicked (TQListViewItem *item)
void undo ()
void updateEditorGeometry (bool forceUndoButtonSettings=false, bool undoButtonVisible=false)
void updateEditorGeometry (EditorItem *item, Widget *widget, bool forceUndoButtonSettings=false, bool undoButtonVisible=false)
void updateGroupLabelsPosition ()
void hideEditor ()
void slotCollapsed (TQListViewItem *item)
void slotExpanded (TQListViewItem *item)
void slotColumnSizeChanged (int section)
void slotColumnSizeChanged (int section, int oldSize, int newSize)
void slotCurrentChanged (TQListViewItem *item)
void changeSetLater ()
void selectItemLater ()
Protected Slots inherited from TDEListView
void slotSettingsChanged (int)
void cleanDropVisualizer ()
void cleanItemHighlighter ()
void emitContextMenu (TQListViewItem *, const TQPoint &, int)
void emitContextMenu (TDEListView *, TQListViewItem *)
void slotOnItem (TQListViewItem *item)
void slotOnViewport ()
void slotAutoSelect ()
void slotHeaderChanged ()

Protected Member Functions

Widget * createWidgetForProperty (Property *property, bool changeWidgetProperty=true)
void clearWidgetCache ()
void fill ()
void addItem (const TQCString &name, EditorItem *parent)
void showUndoButton (bool show)
virtual void resizeEvent (TQResizeEvent *ev)
virtual bool eventFilter (TQObject *watched, TQEvent *e)
bool handleKeyPress (TQKeyEvent *ev)
virtual bool event (TQEvent *e)
void updateFont ()
virtual void contentsMousePressEvent (TQMouseEvent *e)
void changeSetInternal (Set *set, bool preservePrevSelection, const TQCString &propertyToSelect)
Protected Member Functions inherited from TDEListView
bool below (const TQRect &rect, const TQPoint &p)
bool below (TQListViewItem *i, const TQPoint &p)
void emitExecute (TQListViewItem *item, const TQPoint &pos, int c)
virtual void focusInEvent (TQFocusEvent *fe)
virtual void focusOutEvent (TQFocusEvent *fe)
virtual void leaveEvent (TQEvent *e)
virtual TQString tooltip (TQListViewItem *item, int column) const
virtual bool showTooltip (TQListViewItem *item, const TQPoint &pos, int column) const
virtual void contentsDragMoveEvent (TQDragMoveEvent *event)
virtual void contentsMouseMoveEvent (TQMouseEvent *e)
virtual void contentsMouseDoubleClickEvent (TQMouseEvent *e)
virtual void contentsDragLeaveEvent (TQDragLeaveEvent *event)
virtual void contentsMouseReleaseEvent (TQMouseEvent *)
virtual void contentsDropEvent (TQDropEvent *)
virtual void contentsDragEnterEvent (TQDragEnterEvent *)
virtual TQDragObject * dragObject ()
virtual bool acceptDrag (TQDropEvent *event) const
virtual TQRect drawDropVisualizer (TQPainter *p, TQListViewItem *parent, TQListViewItem *after)
virtual TQRect drawItemHighlighter (TQPainter *painter, TQListViewItem *item)
virtual void startDrag ()
virtual void keyPressEvent (TQKeyEvent *)
virtual void viewportPaintEvent (TQPaintEvent *)
void activateAutomaticSelection ()
void deactivateAutomaticSelection ()
bool automaticSelection () const
virtual void viewportResizeEvent (TQResizeEvent *e)
void disableAutoSelection ()
void resetAutoSelection ()
void resetKeyboardSelectionOperation ()
void setActiveMultiSelectItem (TQListViewItem *item)
void doubleClicked (TQListViewItem *item, const TQPoint &pos, int c)
virtual void movableDropEvent (TQListViewItem *parent, TQListViewItem *afterme)
virtual void findDrop (const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after)
void fileManagerKeyPressEvent (TQKeyEvent *)
int depthToPixels (int depth)

Friends

class EditorItem
class Widget

Additional Inherited Members

Public Types inherited from TDEListView
enum  SelectionModeExt

Detailed Description

A listview to edit properties Editor widgets use property options using Property::option(const char *) to override default behaviour of editor items. Currently supported options are:

  • min: integer setting for minimum value of IntEdit and DoubleEdit item. Default is 0. Set "min" to -1, if you want this special value to be allowed.
  • minValueText: i18n'd TQString used in IntEdit to set "specialValueText" widget's property
  • max: integer setting for minimum value of IntEdit item. Default is 0xffff.
  • precision: The number of decimals after the decimal point. (for DoubleEdit)
  • step : the size of the step that is taken when the user hits the up or down buttons (for DoubleEdit)
  • 3rdState: i18n'd TQString used in BoolEdit. If not empty, the the editor's button accept third "null" state with name equal to this string. When this value is selected, Widget::value() returns null TQVariant. This option is used for example in the "defaultValue" property for a field of type boolean (in Kexi Table Designer). Third, "null" value of the property means there is no "defaultValue" specified.
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
Jaroslaw Staniek js@ii.nosp@m.dea..nosp@m.pl

Definition at line 63 of file editor.h.

Constructor & Destructor Documentation

◆ Editor()

Editor::Editor ( TQWidget * parent = 0,
bool autoSync = true,
const char * name = 0 )

Creates an empty Editor with parent as parent widget. If autoSync == true, properties values are automatically synced as soon as editor contents change (eg the user types text, etc.) and the values are written in the property set. Otherwise, property set is updated only when selected item changes or user presses Enter key. Each property can overwrite this if its autoSync() == 0 or 1.

Definition at line 121 of file editor.cpp.

◆ ~Editor()

Editor::~Editor ( )
virtual

Definition at line 175 of file editor.cpp.

Member Function Documentation

◆ acceptInput

void Editor::acceptInput ( )
slot

Accept the changes mae to the current editor (as if the user had pressed Enter key)

Definition at line 542 of file editor.cpp.

◆ addItem()

void Editor::addItem ( const TQCString & name,
EditorItem * parent )
protected
Todo
allow to have child prop with child items too

Definition at line 248 of file editor.cpp.

◆ changeSet [1/2]

void Editor::changeSet ( Set * set,
bool preservePrevSelection = false )
slot

Populates the editor with an item for each property in the List. Also creates child items for composed properties. If preservePrevSelection is true, previously selected editor item will be kept selected, if present.

Definition at line 284 of file editor.cpp.

◆ changeSet [2/2]

void Editor::changeSet ( Set * set,
const TQCString & propertyToSelect )
slot

Populates the editor with an item for each property in the List. Also creates child items for composed properties. If propertyToSelect is not empty, editor item for this property name will be selected, if present.

Definition at line 290 of file editor.cpp.

◆ changeSetInternal()

void Editor::changeSetInternal ( Set * set,
bool preservePrevSelection,
const TQCString & propertyToSelect )
protected

Used for changeSet().

Definition at line 296 of file editor.cpp.

◆ changeSetLater

void Editor::changeSetLater ( )
protectedslot

Definition at line 387 of file editor.cpp.

◆ clear

void Editor::clear ( bool editorOnly = false)
slot

Clears all items in the list. if editorOnly is true, then only the current editor will be cleared, not the whole list.

Definition at line 406 of file editor.cpp.

◆ clearWidgetCache()

void Editor::clearWidgetCache ( )
protected

Deletes cached machines.

Definition at line 667 of file editor.cpp.

◆ contentsMousePressEvent()

void Editor::contentsMousePressEvent ( TQMouseEvent * e)
protectedvirtual

Reimplemented from TDEListView.

Definition at line 1002 of file editor.cpp.

◆ createWidgetForProperty()

Widget * Editor::createWidgetForProperty ( Property * property,
bool changeWidgetProperty = true )
protected
Returns
Widget for given property. Uses cache to store created widgets. Cache will be cleared only with clearWidgetCache().

Definition at line 631 of file editor.cpp.

◆ event()

bool Editor::event ( TQEvent * e)
protectedvirtual

Reimplemented from TDEListView.

Definition at line 993 of file editor.cpp.

◆ eventFilter()

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

Definition at line 913 of file editor.cpp.

◆ fill()

void Editor::fill ( )
protected

Definition at line 183 of file editor.cpp.

◆ handleKeyPress()

bool Editor::handleKeyPress ( TQKeyEvent * ev)
protected

Definition at line 923 of file editor.cpp.

◆ hideEditor

void Editor::hideEditor ( )
protectedslot

Definition at line 730 of file editor.cpp.

◆ propertySetChanged

void KoProperty::Editor::propertySetChanged ( KoProperty::Set * set)
signal

Emitted when current property set has been changed. May be 0.

◆ resizeEvent()

void Editor::resizeEvent ( TQResizeEvent * ev)
protectedvirtual

Definition at line 903 of file editor.cpp.

◆ selectItemLater

void Editor::selectItemLater ( )
protectedslot

Definition at line 375 of file editor.cpp.

◆ setFocus()

void Editor::setFocus ( )
virtual

Definition at line 876 of file editor.cpp.

◆ setSorting()

void Editor::setSorting ( int column,
bool ascending = true )
virtual

Reimplemented from TDEListView.

Definition at line 1013 of file editor.cpp.

◆ showUndoButton()

void Editor::showUndoButton ( bool show)
protected

Definition at line 742 of file editor.cpp.

◆ sizeHint()

TQSize Editor::sizeHint ( ) const
virtual

Definition at line 869 of file editor.cpp.

◆ slotClicked

void Editor::slotClicked ( TQListViewItem * item)
protectedslot

This slot is called when the user clicks the list view. It takes care of deleting current editor and creating a new editor for the newly selected item.

Definition at line 566 of file editor.cpp.

◆ slotCollapsed

void Editor::slotCollapsed ( TQListViewItem * item)
protectedslot

Definition at line 795 of file editor.cpp.

◆ slotColumnSizeChanged [1/2]

void Editor::slotColumnSizeChanged ( int section)
protectedslot

Definition at line 849 of file editor.cpp.

◆ slotColumnSizeChanged [2/2]

void Editor::slotColumnSizeChanged ( int section,
int oldSize,
int newSize )
protectedslot

Definition at line 819 of file editor.cpp.

◆ slotCurrentChanged

void Editor::slotCurrentChanged ( TQListViewItem * item)
protectedslot

Definition at line 599 of file editor.cpp.

◆ slotExpanded

void Editor::slotExpanded ( TQListViewItem * item)
protectedslot

Definition at line 776 of file editor.cpp.

◆ slotPropertyChanged

void Editor::slotPropertyChanged ( KoProperty::Set & set,
KoProperty::Property & property )
protectedslot

Updates property widget in the editor.

Todo
should we move this somewhere?

Definition at line 441 of file editor.cpp.

◆ slotPropertyReset

void Editor::slotPropertyReset ( KoProperty::Set & set,
KoProperty::Property & property )
protectedslot

Definition at line 491 of file editor.cpp.

◆ slotSetWillBeCleared

void Editor::slotSetWillBeCleared ( )
protectedslot

Called when current property set is about to be cleared.

Definition at line 613 of file editor.cpp.

◆ slotSetWillBeDeleted

void Editor::slotSetWillBeDeleted ( )
protectedslot

Called when current property set is about to be destroyed.

Definition at line 624 of file editor.cpp.

◆ slotWidgetAcceptInput

void Editor::slotWidgetAcceptInput ( Widget * widget)
protectedslot

Called when the user presses Enter to accet the input (only applies when autoSync() == false).

Definition at line 548 of file editor.cpp.

◆ slotWidgetRejectInput

void Editor::slotWidgetRejectInput ( Widget * widget)
protectedslot

Called when the user presses Esc. Calls undo().

Definition at line 557 of file editor.cpp.

◆ slotWidgetValueChanged

void Editor::slotWidgetValueChanged ( Widget * widget)
protectedslot

Updates property in the list when new value is selected in the editor.

Definition at line 517 of file editor.cpp.

◆ undo

void Editor::undo ( )
protectedslot

Undoes the last change in property editor.

Definition at line 423 of file editor.cpp.

◆ updateEditorGeometry [1/2]

void Editor::updateEditorGeometry ( bool forceUndoButtonSettings = false,
bool undoButtonVisible = false )
protectedslot

Definition at line 676 of file editor.cpp.

◆ updateEditorGeometry [2/2]

void Editor::updateEditorGeometry ( EditorItem * item,
Widget * widget,
bool forceUndoButtonSettings = false,
bool undoButtonVisible = false )
protectedslot

Definition at line 683 of file editor.cpp.

◆ updateFont()

void Editor::updateFont ( )
protected

Definition at line 979 of file editor.cpp.

◆ updateGroupLabelsPosition

void Editor::updateGroupLabelsPosition ( )
protectedslot

Definition at line 713 of file editor.cpp.

◆ EditorItem

friend class EditorItem
friend

Definition at line 183 of file editor.h.

◆ Widget

friend class Widget
friend

Definition at line 184 of file editor.h.


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