kexi

KexiFieldListView Class Reference

#include <kexifieldlistview.h>

Inheritance diagram for KexiFieldListView:

KexiRelationViewTable List of all members.

Detailed Description

This widget provides a list of fields from a table or query.

Definition at line 33 of file kexifieldlistview.h.


Public Types

enum  Options { ShowDataTypes = 1, ShowAsterisk = 2, AllowMultiSelection = 4 }

Signals

void fieldDoubleClicked (const QString &sourceMimeType, const QString &sourceName, const QString &fieldName)

Public Member Functions

 KexiFieldListView (QWidget *parent, const char *name=0, int options=ShowDataTypes|AllowMultiSelection)
virtual ~KexiFieldListView ()
void setSchema (KexiDB::TableOrQuerySchema *schema)
KexiDB::TableOrQuerySchemaschema () const
QStringList selectedFieldNames ()

Protected Slots

void slotDoubleClicked (QListViewItem *item)

Protected Member Functions

virtual QDragObject * dragObject ()

Protected Attributes

KexiDB::TableOrQuerySchemam_schema
QPixmap m_keyIcon
QPixmap m_noIcon
int m_options

Member Enumeration Documentation

Flags used to alter list's behaviour and appearance.

Enumerator:
ShowDataTypes  if set, 'data type' column is added
ShowAsterisk  if set, asterisk ('*') item is prepended to the list
AllowMultiSelection  if set, multiple selection is allowed

Definition at line 39 of file kexifieldlistview.h.


Member Function Documentation

void KexiFieldListView::setSchema ( KexiDB::TableOrQuerySchema schema  ) 

Sets table or query schema schema. The schema object will be owned by the KexiFieldListView object.

Definition at line 79 of file kexifieldlistview.cpp.

KexiDB::TableOrQuerySchema* KexiFieldListView::schema (  )  const [inline]

Returns:
table or query schema schema set for this widget.

Definition at line 54 of file kexifieldlistview.h.

QStringList KexiFieldListView::selectedFieldNames (  ) 

Returns:
list of selected field names.

Todo:
what about query fields/aliases? it.current()->text(0) can be not enough

Definition at line 158 of file kexifieldlistview.cpp.

void KexiFieldListView::fieldDoubleClicked ( const QString &  sourceMimeType,
const QString &  sourceName,
const QString &  fieldName 
) [signal]

Emitted when a field is double clicked

void KexiFieldListView::slotDoubleClicked ( QListViewItem *  item  )  [protected, slot]

Definition at line 172 of file kexifieldlistview.cpp.

QDragObject * KexiFieldListView::dragObject (  )  [protected, virtual]

Definition at line 140 of file kexifieldlistview.cpp.


Member Data Documentation

QPixmap KexiFieldListView::m_keyIcon [protected]

a small "primary key" icon for 0-th column

Definition at line 74 of file kexifieldlistview.h.

QPixmap KexiFieldListView::m_noIcon [protected]

blank icon of the same size as m_keyIcon

Definition at line 75 of file kexifieldlistview.h.


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