Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages   Examples  

QdbtTabular Class Reference

The QdbtTabular class provides a source-code compatible API with previous releases of the QdbtTabular-Widget. More...

#include <qdbttabular.h>

Inheritance diagram for QdbtTabular:

Inheritance graph
[legend]
Collaboration diagram for QdbtTabular:

Collaboration graph
[legend]
List of all members.

Public Types

enum  TraverseMode { TRAV_ANY = 0, TRAV_LOCK_ROW = 1, TRAV_LOCK_COL = 2, TRAV_CELL_LOCK = TRAV_LOCK_ROW | TRAV_LOCK_COL }
enum  HeaderMode { MODE_QDBTTABULAR = 0x0000, MODE_QLISTVIEW = 0x0001 }
enum  EditResult { NotChanged = 0, Changed = 1, EditESCed = 2, LoseFocus = 3 }
enum  TraverseReasons { KeyPress, MouseClick, MouseDrag }
enum  ConfigureSwitches {
  SELECT_NONE = 0x00000000, SELECT_BY_ROW = 0x00000001, SELECT_MULTIPLE = 0x00000002, CLEAR_SELECTION_UNLESS_CTRL = 0x00000004,
  SHIFT_CLICK_MARKS_REGION = 0x00000008, ALLOW_DESELECT = 0x00000010, ENABLE_JUMP_SCROLL = 0x00000020, SHOW_HEADER = 0x00000100,
  SHOW_CASCADE = 0x00000200, SHOW_VERTICAL_SCROLLBAR = 0x00000400, SHOW_HORIZONTAL_SCROLLBAR = 0x00000800, ENABLE_TOOLTIPS = 0x00001000,
  SELECTION_FOLLOW_KEYBOARD_FOCUS = 0x00002000, TRAVERSE_ROW_ONLY = 0x00004000, TRAVERSE_COLUMN_ONLY = 0x00008000
}

Public Slots

void clear ()
void setYOffset (int offset)
void setXOffset (int offset)
void setHeaderVisible (bool visible)
void setCascadeVisible (bool visible)
void enableTooltips ()
void disableTooltips ()
void setColumnWidth (int col, int width)
void update ()
void redrawHeader ()
void redrawCascade ()
void setEnabled (bool state)
void fitAll ()
void editCell (int row, int col, bool traverse)
void editCell (int row, int col)
void stopEdit (bool accept)

Signals

void cellEdited (int, int)
void sectionClicked (int col)
void selected (int row, bool state)
void activated (int row)
void cellSelected (int row, int col, bool state)
void cellActivated (int row, int col)
void cellEditDone (int row, int col, int action, const QString &oldText)
void yOffsetChanged (int offset)
void xOffsetChanged (int offset)
void columnWidthChanged (int col, int width)
void rightButtonClicked (int col, int row)
void traceMessage (const QString &)

Public Methods

 QdbtTabular (QWidget *parent=0, const char *name=0, WFlags w=0)
 ~QdbtTabular ()
const QdbtTableCellcell (int row, int col)
void changeCell (const QdbtTableCell *tc, int row, int col)
void changeCell (QString text, const QPixmap *p, int row, int col, const QColor &color=QColor(), int align=Qt::AlignLeft, bool editable=FALSE)
void changeCell (QString text, int row, int col, const QColor &color=QColor(), int align=Qt::AlignLeft, bool editable=FALSE)
void changeCell (const QPixmap *pixmap, int row, int col, int align=Qt::AlignLeft)
void setHeaderAppearance (int header_mode)
void selectByRow (bool enable)
void setMultiSelect (bool enable)
bool multiSelect ()
void setAllowDeselect (bool deselect)
bool allowDeselect () const
void setFollowKeyboardFocus (bool follow)
bool followKeyboardFocus () const
bool headerVisible () const
bool cascadeVisible () const
void setColumnPattern (int col, QString pattern)
QString columnPattern (int col)
int columnIdentifier (int col)
void setColumnIdentifier (int col, int identifier)
int columnForIdentfier (int id)
virtual void setDimensions (int rows, int cols)
virtual void insertCol (int col=-1)
virtual void removeCol (int col)
virtual void exchangeCols (int col1, int col2)
void setTraverseMode (int mode)
TraverseMode traverseMode () const
void setScrollbarVisible (bool vertical, bool visible)
bool rowSelectable (int row) const
void setRowSelectable (int row, bool enable)
void setHeaderFont (const QFont &font)
const QFont headerFont () const
void setCellFont (const QFont &font)
const QFont cellFont () const
void changeSection (QdbtSection *section, int col)
QdbtSectionsection (int col) const
void insertRow (int row=-1, bool selectable=TRUE)
void removeRow (int row)
int numRows () const
int numCols () const
void changeCell (const QdbtBaseCell *const tc, int row, int col)
void setKeyboardFocus (int row, int col)
void exposeCell (int row, int col)
int columnWidth (int col) const
int columnWidthHint (int col) const
int rowHeight (int row) const
bool rowSelected (int row) const
void setRowSelected (int row, bool enable)
void setAutoUpdate (bool state)
bool autoUpdate () const
QSize sizeHint () const
const QFont cascadeFont () const
void setCascadeText (int col, const QString &text)
void setCascadeMode (int col, const int mode)
void setCascadeAlignment (int col, const int align)
void setCascadeFont (const QFont &font)
void setHeaderCursor (const QCursor &newCursor)
void setHeaderAppearance (HeaderMode headerMode)
HeaderMode headerAppearance ()
bool currentKeyboardFocus (int &row, int &col)
void clearSelection (bool set=FALSE)
void setColumnVisible (int column, bool visible)
bool columnVisible (int column) const
const QColornotEditableColor () const
void setNotEditableColor (const QColor &col)
void setJumpScrollTimeout (int mSeconds)
int jumpScrollTimeout () const
int configuration () const
void modifyConfiguration (ConfigureSwitches add=SELECT_NONE, ConfigureSwitches revoke=SELECT_NONE)
void setDefaultCell (const QdbtBaseCell &)
bool containsFocus () const
void performTrace (const QString &str)
 update (int x, int y, int w, int h)
 update (const QRect &)
 frameStyle () const
 setFrameStyle (int)
 frameWidth () const
 contentsRect () const
 Shape {NoFrame=0, Box=0x0001, Panel=0x0002, WinPanel=0x0003, HLine=0x0004, VLine=0x0005, StyledPanel=0x0006, PopupPanel=0x0007, MShape=0x000f}
 Shadow {Plain=0x0010, Raised=0x0020, Sunken=0x0030, MShadow=0x00f0}
 frameShape () const
 setFrameShape (Shape)
 frameShadow () const
 setFrameShadow (Shadow)
 lineWidth () const
 setLineWidth (int)
 margin () const
 setMargin (int)
 midLineWidth () const
 setMidLineWidth (int)
 frameRect () const
 setFrameRect (const QRect &)
 paintEvent (QPaintEvent *)
 resizeEvent (QResizeEvent *)
 drawFrame (QPainter *)
 drawContents (QPainter *)
 frameChanged ()
 updateMask ()
 drawFrameMask (QPainter *)
 drawContentsMask (QPainter *)
 QStyle ()
 QStyle ()
 winId () const
 style () const
 setStyle (QStyle *)
 isTopLevel () const
 isModal () const
 isPopup () const
 isDesktop () const
 isEnabled () const
 isEnabledTo (QWidget *) const
 frameGeometry () const
 geometry () const
 x () const
 y () const
 pos () const
 frameSize () const
 size () const
 width () const
 height () const
 rect () const
 childrenRect () const
 childrenRegion () const
 minimumSize () const
 maximumSize () const
 minimumWidth () const
 minimumHeight () const
 maximumWidth () const
 maximumHeight () const
 setMinimumSize (const QSize &)
 setMinimumSize (int minw, int minh)
 setMaximumSize (const QSize &)
 setMaximumSize (int maxw, int maxh)
 setMinimumWidth (int minw)
 setMinimumHeight (int minh)
 setMaximumWidth (int maxw)
 setMaximumHeight (int maxh)
 sizeIncrement () const
 setSizeIncrement (const QSize &)
 setSizeIncrement (int w, int h)
 baseSize () const
 setBaseSize (const QSize &)
 setBaseSize (int basew, int baseh)
 setFixedSize (const QSize &)
 setFixedSize (int w, int h)
 setFixedWidth (int w)
 setFixedHeight (int h)
 mapToGlobal (const QPoint &) const
 mapFromGlobal (const QPoint &) const
 mapToParent (const QPoint &) const
 mapFromParent (const QPoint &) const
 mapTo (QWidget *, const QPoint &) const
 mapFrom (QWidget *, const QPoint &) const
 topLevelWidget () const
 BackgroundMode {FixedColor, FixedPixmap, NoBackground, PaletteForeground, PaletteButton, PaletteLight, PaletteMidlight, PaletteDark, PaletteMid, PaletteText, PaletteBrightText, PaletteBase, PaletteBackground, PaletteShadow, PaletteHighlight, PaletteHighlightedText, PaletteButtonText, X11ParentRelative}
 backgroundMode () const
 setBackgroundMode (BackgroundMode)
 backgroundColor () const
 foregroundColor () const
 setBackgroundColor (const QColor &)
 backgroundPixmap () const
 setBackgroundPixmap (const QPixmap &)
 colorGroup () const
 palette () const
 ownPalette () const
 setPalette (const QPalette &)
 unsetPalette ()
 font () const
 ownFont () const
 setFont (const QFont &)
 unsetFont ()
 fontMetrics () const
 fontInfo () const
 PropagationMode {NoChildren, AllChildren, SameFont, SamePalette=SameFont}
 cursor () const
 ownCursor () const
 setCursor (const QCursor &)
 unsetCursor ()
 caption () const
 icon () const
 iconText () const
 hasMouseTracking () const
 setMask (const QBitmap &)
 setMask (const QRegion &)
 clearMask ()
 FocusPolicy {NoFocus=0, TabFocus=0x1, ClickFocus=0x2, StrongFocus=0x3, WheelFocus=0x7}
 isActiveWindow () const
 setActiveWindow ()
 isFocusEnabled () const
 focusPolicy () const
 setFocusPolicy (FocusPolicy)
 hasFocus () const
 setFocusProxy (QWidget *)
 focusProxy () const
 grabMouse ()
 grabMouse (const QCursor &)
 releaseMouse ()
 grabKeyboard ()
 releaseKeyboard ()
 isUpdatesEnabled () const
 close (bool alsoDelete)
 close ()
 isVisible () const
 isVisibleTo (QWidget *) const
 visibleRect () const
 isHidden () const
 isMinimized () const
 isMaximized () const
 minimumSizeHint () const
 sizePolicy () const
 setSizePolicy (QSizePolicy)
 heightForWidth (int) const
 adjustSize ()
 layout () const
 updateGeometry ()
 reparent (QWidget *parent, WFlags, const QPoint &, bool showIt=FALSE)
 reparent (QWidget *parent, const QPoint &, bool showIt=FALSE)
 erase ()
 erase (int x, int y, int w, int h)
 erase (const QRect &)
 erase (const QRegion &)
 scroll (int dx, int dy)
 scroll (int dx, int dy, const QRect &)
 drawText (int x, int y, const QString &)
 drawText (const QPoint &, const QString &)
 focusWidget () const
 microFocusHint () const
 acceptDrops () const
 setAcceptDrops (bool on)
 setAutoMask (bool)
 autoMask () const
 BackgroundOrigin {WidgetOrigin, ParentOrigin}
 setBackgroundOrigin (BackgroundOrigin)
 backgroundOrigin () const
 customWhatsThis () const
 parentWidget () const
 testWFlags (WFlags f) const
 setDisabled (bool)
 setCaption (const QString &)
 setIcon (const QPixmap &)
 setIconText (const QString &)
 setMouseTracking (bool enable)
 setFocus ()
 clearFocus ()
 setUpdatesEnabled (bool enable)
 repaint ()
 repaint (bool erase)
 repaint (int x, int y, int w, int h, bool erase=TRUE)
 repaint (const QRect &, bool erase=TRUE)
 repaint (const QRegion &, bool erase=TRUE)
 show ()
 hide ()
 showMinimized ()
 showMaximized ()
 showFullScreen ()
 showNormal ()
 polish ()
 constPolish () const
 raise ()
 lower ()
 stackUnder (QWidget *)
 move (int x, int y)
 move (const QPoint &)
 resize (int w, int h)
 resize (const QSize &)
 setGeometry (int x, int y, int w, int h)
 setGeometry (const QRect &)
 setTabOrder (QWidget *, QWidget *)
 mouseGrabber ()
 keyboardGrabber ()
 find (WId)
 event (QEvent *)
 mousePressEvent (QMouseEvent *)
 mouseReleaseEvent (QMouseEvent *)
 mouseDoubleClickEvent (QMouseEvent *)
 mouseMoveEvent (QMouseEvent *)
 wheelEvent (QWheelEvent *)
 keyPressEvent (QKeyEvent *)
 keyReleaseEvent (QKeyEvent *)
 focusInEvent (QFocusEvent *)
 focusOutEvent (QFocusEvent *)
 enterEvent (QEvent *)
 leaveEvent (QEvent *)
 moveEvent (QMoveEvent *)
 closeEvent (QCloseEvent *)
 dragEnterEvent (QDragEnterEvent *)
 dragMoveEvent (QDragMoveEvent *)
 dragLeaveEvent (QDragLeaveEvent *)
 dropEvent (QDropEvent *)
 showEvent (QShowEvent *)
 hideEvent (QHideEvent *)
 customEvent (QCustomEvent *)
 styleChange (QStyle &)
 enabledChange (bool)
 backgroundColorChange (const QColor &)
 backgroundPixmapChange (const QPixmap &)
 paletteChange (const QPalette &)
 fontChange (const QFont &)
 metric (int) const
 create (WId=0, bool initializeWindow=TRUE, bool destroyOldWindow=TRUE)
 destroy (bool destroyWindow=TRUE, bool destroySubWindows=TRUE)
 getWFlags () const
 setWFlags (WFlags)
 clearWFlags (WFlags n)
 focusNextPrevChild (bool next)
 focusData ()
 setKeyCompression (bool)
 setMicroFocusHint (int x, int y, int w, int h, bool text=TRUE)
 eventFilter (QObject *, QEvent *)
 metaObject () const
 className () const
 isA (const char *) const
 inherits (const char *) const
 name () const
 name (const char *defaultName) const
 setName (const char *name)
 isWidgetType () const
 highPriority () const
 signalsBlocked () const
 blockSignals (bool b)
 startTimer (int interval)
 killTimer (int id)
 killTimers ()
 child (const char *name, const char *type=0)
 children () const
 queryList (const char *inheritsClass=0, const char *objName=0, bool regexpMatch=TRUE, bool recursiveSearch=TRUE)
 insertChild (QObject *)
 removeChild (QObject *)
 installEventFilter (const QObject *)
 removeEventFilter (const QObject *)
 connect (const QObject *sender, const char *signal, const char *member) const
 connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 disconnect (const QObject *receiver, const char *member=0)
 disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 dumpObjectTree ()
 dumpObjectInfo ()
 setProperty (const char *name, const QVariant &value)
 property (const char *name) const
 parent () const
 destroyed ()
 tr (const char *)
 tr (const char *, const char *)
 objectTrees ()
 receivers (const char *signal) const
 activate_signal (const char *signal, short)
 activate_signal (const char *signal, int)
 activate_signal (const char *signal, long)
 activate_signal (const char *signal, const char *)
 activate_signal_bool (const char *signal, bool)
 activate_signal_string (const char *signal, QString)
 activate_signal_strref (const char *signal, const QString &)
 sender ()
 initMetaObject ()
 timerEvent (QTimerEvent *)
 childEvent (QChildEvent *)
 connectNotify (const char *signal)
 disconnectNotify (const char *signal)
 checkConnectArgs (const char *signal, const QObject *receiver, const char *member)
 staticMetaObject ()
 normalizeSignalSlot (const char *signalSlot)
 badSuperclassWarning (const char *className, const char *superclassName)
 qt_find_obj_child (QObject *parent, const char *type, const char *name)
 ButtonState {NoButton=0x0000, LeftButton=0x0001, RightButton=0x0002, MidButton=0x0004, MouseButtonMask=0x0007, ShiftButton=0x0008, ControlButton=0x0010, AltButton=0x0020, KeyButtonMask=0x0038, Keypad=0x4000}
 Orientation {Horizontal, Vertical}
 AlignmentFlags {AlignLeft=0x0001, AlignRight=0x0002, AlignHCenter=0x0004, AlignTop=0x0008, AlignBottom=0x0010, AlignVCenter=0x0020, AlignCenter=AlignVCenter|AlignHCenter, SingleLine=0x0040, DontClip=0x0080, ExpandTabs=0x0100, ShowPrefix=0x0200, WordBreak=0x0400, DontPrint=0x1000}
 WidgetFlags {WType_TopLevel=0x00000001, WType_Modal=0x00000002, WType_Popup=0x00000004, WType_Desktop=0x00000008, WType_Mask=0x0000000f, WStyle_Customize=0x00000010, WStyle_NormalBorder=0x00000020, WStyle_DialogBorder=0x00000040, WStyle_NoBorder=0x00000000, WStyle_Title=0x00000080, WStyle_SysMenu=0x00000100, WStyle_Minimize=0x00000200, WStyle_Maximize=0x00000400, WStyle_MinMax=WStyle_Minimize|WStyle_Maximize, WStyle_Tool=0x00000800, WStyle_StaysOnTop=0x00001000, WStyle_Dialog=0x00002000, WStyle_ContextHelp=0x00004000, WStyle_NoBorderEx=0x00008000, WStyle_Mask=0x0000fff0, WDestructiveClose=0x00010000, WPaintDesktop=0x00020000, WPaintUnclipped=0x00040000, WPaintClever=0x00080000, WResizeNoErase=0x00100000, WMouseNoMask=0x00200000, WNorthWestGravity=0x00400000, WRepaintNoErase=0x00800000, WX11BypassWM=0x01000000, WGroupLeader=0x02000000}
 RasterOp {CopyROP, OrROP, XorROP, NotAndROP, EraseROP=NotAndROP, NotCopyROP, NotOrROP, NotXorROP, AndROP, NotEraseROP=AndROP, NotROP, ClearROP, SetROP, NopROP, AndNotROP, OrNotROP, NandROP, NorROP, LastROP=NorROP}
 PenStyle {NoPen, SolidLine, DashLine, DotLine, DashDotLine, DashDotDotLine, MPenStyle=0x0f}
 PenCapStyle {FlatCap=0x00, SquareCap=0x10, RoundCap=0x20, MPenCapStyle=0x30}
 PenJoinStyle {MiterJoin=0x00, BevelJoin=0x40, RoundJoin=0x80, MPenJoinStyle=0xc0}
 TextFormat {PlainText, RichText, AutoText}
 QPainter ()
 QStyleSheet ().
 QStyleSheet () returns TRUE, otherwise as for
 devType () const
 isExtDev () const
 paintingActive () const
 cmd (int, QPainter *, QPDevCmdParam *)
 fontMet (QFont *, int, const char *=0, int=0) const
 fontInf (QFont *, int) const
 bitBlt (QPaintDevice *dst, const QPoint &dp, const QPaintDevice *src, const QRect &sr, RasterOp rop)
 bitBlt (QPaintDevice *dst, int dx, int dy, const QPaintDevice *src, int sx, int sy, int sw, int sh, Qt::RasterOp rop, bool ignoreMask)

Protected Methods

virtual void enterTableEvent (QEvent *)
virtual void leaveTableEvent (QEvent *)
QSize cellSize (int row, int col) const
QPoint cellOffset (int row, int col) const
int xOffset () const
int yOffset () const
int findRow (int yPos) const
int findCol (int xPos) const
int headerHeight () const
virtual bool keyboardFocusTraversal (const int reason, const int sourceRow, const int sourceCol, int &destRow, int &destCol)
virtual bool moveFocusForJumpScroll (const int row, const int col, int &newRow, int &newCol)
void generateRightButtonClicked (int row, int col)
const QdbtPImpl * pimpl () const

Detailed Description

The QdbtTabular class provides a source-code compatible API with previous releases of the QdbtTabular-Widget.

With Version 0.50 a new set of base classes has been introduced, which grant the tabular widget more flexibility. To be still able to build projects which have been coded before these API changes, QdbtTabular provides the API of the previous versions of this widget. This for example prevents the usage of customized tablar cells and uses by default the QdbtTableCell, which is capable of handling both pixmaps and texts simultaneously.

The tabular incorporates multiple selection modes. These selection modes may be set using the functions selectByRow(), setMultiSelect() and setAllowDeselect(). Since not all possible combinations make sence, the consequences of each switch will be described here.

For detailed and further documentation, please refer to the QdbtBaseTabular class.
Examples:

example1.cpp, example2.cpp, example3.cpp, example4.cpp, and example5.cpp.


Member Enumeration Documentation

enum QdbtBaseTabular::ConfigureSwitches [inherited]
 

This enum type stores the configuration flags for the tabular. Configuration flags may be considered to be properties of the tabular, that influence its behaviour at runtime.

Enumeration values:
SELECT_NONE  This flag is the neutral flag.
SELECT_BY_ROW  If this flag is set, the tabular is in row selection mode. If this flag is not set, the tabular is in cell selection mode, consequently
See also:
rowSelected(), QdbtBaseCell::isSelected()
SELECT_MULTIPLE  This flag enables selecting multiple entities at once (if it is not applied, the most recently selected entitiy is deselected as soon as a new one is about to be selected automatically)
CLEAR_SELECTION_UNLESS_CTRL  Using this property, the selection of the table is cleared at the begin of every selection session, unless the Control-Key is being pressed.

Together with QdbtBaseTabular::SELECT_MULTIPLE, QdbtBaseTabular::ALLOW_DESELECT and QdbtBaseTabular::SHIFT_CLICK_MARKS_REGION this form the mode that is comparable the the EXTENDED SELECTION mode, Qt offers for QListBox or QListView.

SHIFT_CLICK_MARKS_REGION  If this mode is enabled, clicking a cell marks the intermediate rows or cells between the current position of the keyboard focus and the cell that has been clicked. The keyboard focus is moved to the clicked cells (if allowed to)

Together with QdbtBaseTabular::SELECT_MULTIPLE, QdbtBaseTabular::ALLOW_DESELECT and QdbtBaseTabular::CLEAR_SELECTION_UNLESS_CTRL this form the mode that is comparable the the EXTENDED SELECTION mode, Qt offers for QListBox or QListView.

ALLOW_DESELECT  This flag enables the user to delesect an entity by selecting it once more. However, this option does only affect the user's interaction with the table, so that for example entities may be selected/deselected normally by means of the surrounding programm, even if the deselect option is not specified
ENABLE_JUMP_SCROLL  To enable the 'jump scroll' mode (pressing a key while not editing the tabular's content will then traverse the keyboard focus to next cells beginning with the keyed in text) set this configuration switch
See also:
setJumpScrollTimeout() and moveFocusForJumpScroll()
SHOW_HEADER  If set, the header of the tabular is being displayed
See also:
setHeaderAppearance() and setHeaderCursor()
SHOW_CASCADE  If set, the cascaded header of the tabular is being displayed
See also:
setCascadeText(), setCascadeMode(), setCascadeFont(), setCascadeAlignment()
SHOW_VERTICAL_SCROLLBAR  This switch can be used to configure the visibility of the individual scrollbars of the tabular component. By default, it is set, since the vertical scrollbar by default is visible. If removed, the vertical scrollbar becomes invisible.
SHOW_HORIZONTAL_SCROLLBAR  This switch can be used to configure the visibility of the individual scrollbars of the tabular component. By default, it is set, since the horizontal scrollbar by default is visible. If removed, the horizontal scrollbar becomes invisible.
ENABLE_TOOLTIPS  If set, tooltips will show up if the content of cell is not totally visible.
SELECTION_FOLLOW_KEYBOARD_FOCUS  This flag makes the selection of the tabular follow the keyboard focus if traversed using the arrow keys. More precisely, the entity where the keyboard focus is traversed to becomes selected (the mode of the tabular then is used to determine, how and if other cells/rows are affected.
TRAVERSE_ROW_ONLY  If this option is set, the keyboard focus may only traverse with the current row. If it is set together with QdbtBaseTabular::TRAVERSE_COLUMN_ONLY, the keyboard focus is locked to its current position.
TRAVERSE_COLUMN_ONLY  If this option is set, the keyboard focus may only traverse with the current column. If it is set together with QdbtBaseTabular::TRAVERSE_ROW_ONLY, the keyboard focus is locked to its current position.

enum QdbtBaseTabular::EditResult [inherited]
 

Along with the signal QdbtBaseTabular::cellEditDone() the result of an edit session is being transmitted to help the surrounding programm determin, how to react to his user interaction. The classification of the result of an edit session is subject to the implementation of each individual cell.

Enumeration values:
NotChanged  The content has not changed during the edit operation
Changed  The content of the cell has changed during this edit session
EditESCed  By request of the user (typically by pressing the escape key if a text edit field is considered) this edit session has been canceled
LoseFocus  The tabular lost the focus during the edit operation. The programm now may decide if this should result in cancelling or accepting the current edit session or if the edit operation shall remain until the user decides to finish it.

enum QdbtBaseTabular::HeaderMode [inherited]
 

This enumberation type lists the possible types, how a tabular's header may be visulized.

Enumeration values:
MODE_QDBTTABULAR  The tabular's header is displayed the normal way, with a beveled box at the end of the header if the area of the widget should exceed the needed width of the tabular.
MODE_QLISTVIEW  The above mentioned beveled box is not drawn. The space exceeding the necessary width is left blank.

enum QdbtTabular::TraverseMode
 

Modes for restriction the traversal of the keyboard focus

Enumeration values:
TRAV_ANY  The keyboard focus may traverse to any location within the tabular
TRAV_LOCK_ROW  The keyboard focus may only traverse within the current row (it may not leave this row)
TRAV_LOCK_COL  The keyboard focuus may not leave the column, it is currently place in.

enum QdbtBaseTabular::TraverseReasons [inherited]
 

Enumberation type for the possible reasons for a keyboard focus traverse. Such a value is passed to the virtual method keyboardFocusTraversal() as formal parameter reason ).

Enumeration values:
KeyPress  The keyboard focus traversal was caused by a key press.
MouseClick  The keyboard focus traversal was caused by clicking a cell with the mouse.
MouseDrag  The keyboard focus traversal was caused by clicking a cell and then dragging the mouse to a different cell.


Constructor & Destructor Documentation

QdbtTabular::QdbtTabular QWidget   parent = 0,
const char *    name = 0,
WFlags    f = 0
 

Constructs an empty tabular (dimension 0 x 0) with an empty header. The parent, name and f arguments are passed to the QdbtBaseTabular constructor, which passes them on to the QFrame constructor.

QdbtTabular::~QdbtTabular  
 

Destroys the table.


Member Function Documentation

void QdbtBaseTabular::activated int    row [signal, inherited]
 

This signal is emitted whenever the user double clicks on a row. The index of the row is passed as an argument.

Notice that this signal is only emitted if selection by row is enabled.

See also:
selectByRow() and cellActivated().

bool QdbtTabular::allowDeselect   const
 

Answers if cells may be deselected by mouse click.

bool QdbtBaseTabular::autoUpdate   const [inherited]
 

Returns TRUE if the view updates itself automatically whenever it is changed in some way.

See also:
setAutoUpdate().

const QFont QdbtBaseTabular::cascadeFont   const [inherited]
 

Returns the font which is currently set for the cascaded header.

bool QdbtTabular::cascadeVisible   const
 

This function determines if the cascaded header currently is visible.

const QdbtTableCell * QdbtTabular::cell int    row,
int    col
 

Returns a pointer to the cell-object at location (row, col) in the table.

See also:
changeCell().
Reimplemented with a different return type for source compatibility with older QdbtTabular-Versions.

Reimplemented from QdbtBaseTabular.

void QdbtBaseTabular::cellActivated int    row,
int    col
[signal, inherited]
 

This signal is emitted whenever the user double clicks on a cell. The location of the cell is passed as an argument.

Notice that this signal is only emitted if selection by row is disabled.

See also:
selectByRow() and activated().

void QdbtBaseTabular::cellEditDone int    row,
int    col,
int    action,
const QString   oldValue
[signal, inherited]
 

This signal is emitted when the user has finished editing a cell. The location (row, col) of the cell in the table is passed as an argument as well as the formed content of the tables's cell. Since this signal is emitted always when editing is finished, the reason that ended editing as encoded into the action argument. Possible results are

  • NotChanged: Editing finished and content did not change
  • Changed: Editing finished and content of cell did change
  • EditESCed: Editing was cancelled by pressing ESC. Since the content of the cell has automatically been reverted, it 'did' not change.
  • LoseFocus: If the focus is being removed from the tabular while being edited, this signal is emitted. Loss of focus can occure, if the focus is removed from the widget while editing or if another cell within the same table is selected for editing

void QdbtTabular::cellEdited int    row,
int    col
[signal]
 

This signal is emitted when the user has finished editing a cell and the contents of the cell has changed. The location (row, col) of the cell in the table is passed as an argument.

const QFont QdbtBaseTabular::cellFont   const [inherited]
 

Returns the font that is currently used for the header.

See also:
setHeaderFont().

QPoint QdbtBaseTabular::cellOffset int    row,
int    col
const [protected, inherited]
 

Returns the offset in pixels of the cell at location (row,\a col) in the table.

The offset is based on the scrollable part of the table (excluding the header). Therefore, it includes parts of the table that are not visible because of scrolling.

void QdbtBaseTabular::cellSelected int    row,
int    col,
bool    state
[signal, inherited]
 

This signal is emitted whenever the highlight status of a cell is changed. The location of the cell and the new state are passed as arguments. If the value of state is TRUE the cell is currently highlighted.

Notice that this signal is only emitted if selection by row is disabled.

See also:
selectByRow() and selected().

QSize QdbtBaseTabular::cellSize int    row,
int    col
const [protected, inherited]
 

Returns the current size of the cell at location (row,\a col) in the table. The cells themselves are not aware of their size.

void QdbtBaseTabular::changeCell const QdbtBaseCell *const    tc,
int    row,
int    col
[inherited]
 

Deletes the contents of the cell at row row and column col and replaces it with a deep copy of the cell tc. If tc is the null pointer, the cell will become empty.

See also:
cell().

void QdbtTabular::changeCell const QPixmap   pixmap,
int    row,
int    col,
int    align = Qt::AlignLeft
 

Deletes the contents of the cell at row row and column col and replaces it with a cell with pixmap pixmap and no text. The alignment of the pixmap is determined by align.

See also:
cell(), QdbtBaseTabular::changeCell(), QdbtBaseTabular::cell()

void QdbtTabular::changeCell QString    text,
int    row,
int    col,
const QColor   color = QColor(),
int    align = Qt::AlignLeft,
bool    edit = FALSE
 

Deletes the contents of the cell at row row and column col and replaces it with a cell with text text and no pixmap. The text color can be specified by color, the alignment of text is determined by align. The following three alignments are possible: AlignLeft, AlignCenter, and AlignRight.

If the boolean edit</em> is TRUE the cell is editable by the user. If edit is FALSE the cell cannot be altered by the user of the table (It can however still be altered from within the program).

See also:
cell(), QdbtBaseTabular::changeCell(), QdbtBaseTabular::cell()

void QdbtTabular::changeCell QString    text,
const QPixmap   pixmap,
int    row,
int    col,
const QColor   color = QColor(),
int    align = Qt::AlignLeft,
bool    edit = FALSE
 

Deletes the contents of the cell at row row and column col and replaces it with a cell with text text, pixmap pixmap. This pixmap is placed to the left of the text. The text color can be specified by color, the alignment of the text-pixmap pair is determined by align. The following three alignments are possible: AlignLeft, AlignCenter, and AlignRight.

If the boolean edit is TRUE the cell is editable by the user. If edit is FALSE the cell cannot be altered by the user of the table (It can still be altered from within the program).

See also:
cell(), QdbtBaseTabular::changeCell(), QdbtBaseTabular::cell()

void QdbtTabular::changeCell const QdbtTableCell   tc,
int    row,
int    col
 

Reimplemented for internal reasons; the API is not affected.

Examples:
example3.cpp, and example5.cpp.

void QdbtBaseTabular::changeSection QdbtSection   section,
int    col
[inherited]
 

Sets a user specified widget representing the section of the header above column col.

If you want to change the look and/or feel of the default section, you should inherit your own widget from QdbtSection and supply a dynamicly allocated object as the section argument:

Example:

Assume you have a widget MySection that inherits from QdbtSection, then you can change column col of a table widget tabular like this

  MySection *section=new MySection(tabular);
  tabular->changeSection(section,col);

Warning:
The QdbtBaseTabular widget assumes ownership of the section widgets, do not delete them manually.
See also:
section() and QdbtSection.
Examples:
example3.cpp, example5.cpp, and example6.cpp.

void QdbtTabular::clear   [slot]
 

Removes all cells from the table. This is equivalent to setDimensions(0,0).

void QdbtBaseTabular::clearSelection bool    state = FALSE [inherited]
 

This function clears (if state is FALSE ) or sets (if state is TRUE ) all selections within the tabular. Signals are emitted in the ususal way for each cell or raw, modified in this manner.

Warning:
This function is depending on the current mode of the tabular (cell/row).
Examples:
example5.cpp.

int QdbtTabular::columnForIdentfier int    id
 

Locate the column for one identifier.

See also:
columnIdentifier() setColumnIdentifier()

int QdbtTabular::columnIdentifier int    col
 

Read the identifier currently accompanying column col

See also:
setColumnIdentifier() columnForIdentifier()
Examples:
example5.cpp.

QString QdbtTabular::columnPattern int    col
 

Read the validator pattern set for a column.

bool QdbtBaseTabular::columnVisible int    column const [inherited]
 

This function examines, if a column is visible (by returning TRUE ) or if it is hidden ( FALSE ).

int QdbtBaseTabular::columnWidth int    col const [inherited]
 

Returns the width in pixels of the column at index col.

See also:
rowHeight() and columnWidthHint().

void QdbtBaseTabular::columnWidthChanged int    col,
int    width
[signal, inherited]
 

This signals is emitted, whenever the column with changes

int QdbtBaseTabular::columnWidthHint int    col const [inherited]
 

Returns the minimal width that is required to fully display all cells in the column at index col including the header.

See also:
fitAll().
Examples:
example5.cpp.

int QdbtBaseTabular::configuration   const [inherited]
 

Read the current configuration of the tabular. This configuration is composed out of the flags specified in QdbtBaseTabular::ConfigureSwitches .

bool QdbtBaseTabular::containsFocus   const [inherited]
 

Returns TRUE if any of the tabular's components (the table, the header or the cell editor or the current editing session) contains the focus.

bool QdbtBaseTabular::currentKeyboardFocus int &    row,
int &    col
[inherited]
 

Returns the position of the keyboard focus within the widget. The return value answers whether the keyboard focus is currently shown at all (or if the focus is currently within another widget), row and col are set to the position of the focus. The values assigned to row are between -1 and numRows()-1 (-1 if no row has the focus), those for col between -1 and numCols()-1.

Warning:
This function is read the input focus, not to set it.

void QdbtTabular::disableTooltips   [slot]
 

Disables tooltips for cells whose text is truncated.

See also:
enableTooltips().

void QdbtBaseTabular::editCell int    row,
int    col
[slot, inherited]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

QdbtBaseTabular::editCell( row, col, FALSE );

void QdbtBaseTabular::editCell int    row,
int    col,
bool    traverse
[slot, inherited]
 

Sets the edit focus on the cell at location (row, col) in the table. Normally, the user is allowed to edit cells by clicking the middle mouse button those cells that are enabled for editing (see QdbtTableCell::setEditable()). This function can force the editing of a certain cell regardless of the edit state of the cell.

If editing a cell, which has not been created previously, this is done 'on the fly'.

The traverse flag may be set to TRUE, if the hilighted cell shall be moved to this position, too.

Examples:
example5.cpp.

void QdbtTabular::enableTooltips   [slot]
 

Enables dynamic tooltips for cells whose text is truncated. The tooltip shows the complete text. Default this feature is enabled.

See also:
disableTooltips().

void QdbtBaseTabular::enterTableEvent QEvent   ev [protected, virtual, inherited]
 

A virtual function that handles the mouse enter events of the table excluding the header.

Does not do anything at the moment.

void QdbtTabular::exchangeCols int    col1,
int    col2
[virtual]
 

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QdbtBaseTabular.

Examples:
example5.cpp.

void QdbtBaseTabular::exposeCell int    row,
int    col
[inherited]
 

Scrolls the table so that the cell at (row, col), in such a way that the cell is visible for the largest part possible. The amount of scrolling is minimized. It is 0 if the cell is already completely visible.

int QdbtBaseTabular::findCol int    xPos const [protected, inherited]
 

Returns the index of the column at position xPos, where xPos is in widget coordinates. Returns -1 if xPos is outside the valid range.

See also:
findRow().

int QdbtBaseTabular::findRow int    yPos const [protected, inherited]
 

Returns the index of the row at position yPos, where yPos is in widget coordinates. Returns -1 if yPos is outside the valid range.

See also:
findCol() and headerHeight().

void QdbtBaseTabular::fitAll   [slot, inherited]
 

Resizes the table's columns so that all cells fit (are not truncated).

See also:
sizeHint() and columnWidthHint().
Examples:
example3.cpp.

bool QdbtTabular::followKeyboardFocus   const
 

Returns TRUE, if the follow keyboard mode is enabled.

QdbtBaseTabular::HeaderMode QdbtBaseTabular::headerAppearance   [inherited]
 

This function answers the mode, in which the tabular widget's header is currently being displayed (or would be displayed, if it is hidden). This mode may be one of the following:

  • MODE_QLISTVIEW
  • MODE_QDBTTABULAR

const QFont QdbtBaseTabular::headerFont   const [inherited]
 

Returns the font that is currently used for the header.

See also:
setHeaderFont().

int QdbtBaseTabular::headerHeight   const [protected, inherited]
 

Returns the height of the header in pixels. If the header is currently invisible 0 is returned.

bool QdbtTabular::headerVisible   const
 

Returns TRUE if the table's header is currently visible, and FALSE if the header is currently not visible.

See also:
setHeaderVisible()

void QdbtTabular::insertCol int    col = -1 [virtual]
 

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QdbtBaseTabular.

Examples:
example5.cpp.

void QdbtBaseTabular::insertRow int    row = -1,
bool    selectable = TRUE
[inherited]
 

Insert a new row at row-index row in the table. A value of row=-1 will append a row to the end of the table. Each cell in the new row is empty.

If selectable is set to TRUE (the default) the row may be selected by the user.

If selectable is set to FALSE the row is not selectable by the user.

Notice that the value of selectable only has effect if the selection of rows is enabled.

See also: removeRow(), selectByRow(), setDimensions(), changeCell(), numRows().

int QdbtBaseTabular::jumpScrollTimeout   const [inherited]
 

Returns the timeout in msec, after that the keyed in text for jump scroll mode is being cleared.

See also:
setJumpScrollTimeout(), moveFocusForJumpScroll()

bool QdbtBaseTabular::keyboardFocusTraversal const int    reason,
const int    sourceRow,
const int    sourceCol,
int &    destRow,
int &    destCol
[protected, virtual, inherited]
 

This function decides if a (requested) traversal of the keyboard focus is allowed or will be rejected. This traversal will cause the focus to move from sourceRow, sourceCol to destRow, destCol and is caused by a reason (namely KeyPress, MouseClick or MouseDrag from the enum type QdbtBaseTabular::TraverseReasons ). By returning TRUE, the focus movement is accepted, FALSE rejects the focus traversal.

Warning:
Please understand that the resulting Position destRow and destCol may be changed by this function. However this may result in strange behaviour of the widget and should hardly be necessary to use.
See also:
TraverseReasons

void QdbtBaseTabular::leaveTableEvent QEvent   ev [protected, virtual, inherited]
 

A virtual function that handles the mouse leave events of the table excluding the header.

Does not do anything at the moment.

Examples:
example2.cpp.

void QdbtBaseTabular::modifyConfiguration ConfigureSwitches    add = SELECT_NONE,
ConfigureSwitches    revoke = SELECT_NONE
[inherited]
 

Modify (set and/or revoke) the configuration for the tabular instance. When a switch is specified as add -parameter, this configuration is added to the current tabular configuration, revoke is used for removing a single configuration switch from the tabulars current configuration. Specifying QdbtBaseTabular::SELECT_NONE as parameter add or revoke may be used to add no switch to the tabular configuration or revoke no switch from the current configuration.

Examples:
example5.cpp.

bool QdbtBaseTabular::moveFocusForJumpScroll const int    row,
const int    col,
int &    newRow,
int &    newCol
[protected, virtual, inherited]
 

This function computes the next cell for the jump scroll mode. When pressing keys while not editing a cell, this mode is active. It searches for the next cell entity which has a text starting with the character sequence just keyed in (the sequence is automatically being cleared after a user defined timeout interval if no key is being pressed)

Parameters:
row  Current row of the jump scroll focus (not necessarily the keyboard focus)
col  Current column of the jump scroll focus (not necessarily the keyboard focus)
newRow  New row for the jump scroll focus
newCol  New column for the jump scoll focus
Returns:
TRUE, if the jump focus shall be placed at the new location, FALSE, if the jump scoll search should be canceled
See also:
setJumpScrollTimeout(), jumpScrollTimeout(), ENABLE_JUMP_SCROLL

bool QdbtTabular::multiSelect  
 

Check if the Tabular-Widget is in multi select mode (DEFAULT) or if it is in sinle select mode.

const QColor & QdbtBaseTabular::notEditableColor   const [inline, inherited]
 

Returns the baground color for cells that are not editable. If this color is not valid (QColor::isValid()), the default background color is used.

int QdbtBaseTabular::numCols   const [inherited]
 

Returns the number of columns in the table.

See also:
numRows().
Examples:
example5.cpp.

int QdbtBaseTabular::numRows   const [inherited]
 

Returns the number of rows in the table (not counting the header).

See also:
numCols().
Examples:
example5.cpp.

void QdbtBaseTabular::performTrace const QString   str [inline, inherited]
 

This member may be called from the tabular components (or the tabular itself) the record and send a traceable message using the signal QdbtBaseTabular::traceMessage().

const QdbtPImpl * QdbtBaseTabular::pimpl   const [inline, protected, inherited]
 

Returns a pointer to the private implementation member for subclasses (but be careful!)

void QdbtBaseTabular::redrawCascade   [slot, inherited]
 

This function draws the cascaded header. It should not be used unless absolutely necessary since redraws are normally done automatically.

void QdbtBaseTabular::redrawHeader   [slot, inherited]
 

This function draws the header. It should not be used unless absolutely necessary since redraws are normally done automatically.

void QdbtTabular::removeCol int    col [virtual]
 

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QdbtBaseTabular.

void QdbtBaseTabular::removeRow int    row [inherited]
 

Removes row at row from the table. All cells in the row will be deleted.

See also:
insertRow() and setDimensions().

void QdbtBaseTabular::rightButtonClicked int    row,
int    col
[signal, inherited]
 

This signal is used to inform the programm, that the right mousebutton has been pressed on top of the cell at row row and column col.

int QdbtBaseTabular::rowHeight int    row const [inherited]
 

Returns the height in pixels of the row at index row.

See also:
columnWidth().

bool QdbtTabular::rowSelectable int    row const
 

This function returns TRUE if the user is allowed to change the highlight of the row at index index in the table.

See also:
setRowSelectable().

bool QdbtBaseTabular::rowSelected int    row const [inherited]
 

Returns TRUE if the row at index index is currently selected. Notice that this function only returns useful values if selection by row is enabled.

See also:
setRowSelected() and selectByRow().

QdbtSection * QdbtBaseTabular::section int    col const [inherited]
 

Returns a pointer to the widget representing the section of the header above column col.

You can use this pointer to get or set the text and/or alignment of the section.

Warning:
The table widget assumes control over the resize and location of the section widget. Do not change these properties manually.
See also:
changeSection() and QdbtSection.
Examples:
example5.cpp.

void QdbtBaseTabular::sectionClicked int    index [signal, inherited]
 

This signal is emitted if the user clicks on a section button. A section represents the header above a column. The index of the column is passed as an argument.

void QdbtTabular::selectByRow bool    enable
 

This function determines how cells are selected. If enable is set to TRUE the user can select cells one row at a time. This is the default behavior. Only the rows that are selectable (see setRowSelectable()) can be selected by the user.

If enable is set to FALSE the user can select individual cells. Only cells that are set to be selectable (see QdbtTableCell::setSelectable()) can be selected by the user.

See also:
setRowSelectable().
Examples:
example3.cpp, and example5.cpp.

void QdbtBaseTabular::selected int    index,
bool    state
[signal, inherited]
 

This signal is emitted whenever the highlight status of a row is changed. The index of the row and the new state are passed as arguments. If the value of state is TRUE the row is currently highlighted.

Notice that this signal is only emitted if selection by row is enabled.

See also:
selectByRow() and cellSelected().

void QdbtTabular::setAllowDeselect bool    deselect
 

If a selected cells or row is clicked, this functions sets the deselect mode. If this mode is set to FALSE, the cells/row is not deselected, otherwise the cell/row is deselected.

Examples:
example5.cpp.

void QdbtBaseTabular::setAutoUpdate bool    state [inherited]
 

Sets the auto-update option of the table view to enable.

If enable is TRUE (this is the default) then the table updates it self automatically whenever it has changed in some way (for example when a flag is changed).

If enable is FALSE, the table does NOT repaint itself, or update its internal state variables itself when it is changed. This can be useful to avoid flicker during large changes, and is singularly useless otherwise: Disable auto-update, do the changes, re-enable auto-update, and call update().

Warning:
Do not leave the view in this state for a long time (i.e. between events ). If, for example, the user interacts with the table when auto-update is off, strange things can happen.
Setting auto-update to TRUE does not repaint the view, you must call update() to do this.

See also:
autoUpdate() and update().
Examples:
example5.cpp.

void QdbtBaseTabular::setCascadeAlignment int    col,
const int    align
[inherited]
 

Select the alignment (in terms of Qt, meaning e.g. Qt::AlignCenter) of an indivual cell. Useless unless cells is and End-Cell.

This function does not initiate an automatic redraw of the cascaded header.

void QdbtBaseTabular::setCascadeFont const QFont   font [inherited]
 

Select the font, in which the cascaded cells are displayed.

This function does not initiate an automatic redraw of the cascaded header.

void QdbtBaseTabular::setCascadeMode int    col,
const int    mode
[inherited]
 

Set the mode of a single cascade-cell. Currently only two modes are supported: End-Cell-Mode (0) or Continue-Cell-Mode (1).

In End-Cell-Mode a sequence of cascaded continue-mode cells 'ends' displaying the text set for the end-cell.

In Continue-Cell-Mode the cells is not displayed as an indivual cells. I adds its space to the following cells (which if it is another continue-cell adds this iteratively to its successor a.s.o.) A sequence of Continue-Cells is terminated by one End-Cell or the last column of the tabular.

This function does not initiate an automatic redraw of the cascaded header.

Examples:
example6.cpp.

void QdbtBaseTabular::setCascadeText int    col,
const QString   text
[inherited]
 

The text of a cascaed headed is set using this function. Please keep in mind that using this function may have no effect unless using the setCascadeMode() function to set the correct mode of the cell.

This function does not initiate an automatic redraw of the cascaded header.

Examples:
example6.cpp.

void QdbtTabular::setCascadeVisible bool    visible [slot]
 

This function either shows or hides the cascaded headers of the tabular widget.

void QdbtBaseTabular::setCellFont const QFont   font [inherited]
 

Sets the font that is used for the text of each cell to font.

See also:
cellFont() and setHeaderFont().
Examples:
example3.cpp.

void QdbtTabular::setColumnIdentifier int    col,
int    identifier
 

Set the identifier for a column. This identifier will stick to the column and be exchanged or moved when columns are being exchanged, inserted or removed.

See also:
columnIdentifier() columnForIdentifier()
Examples:
example5.cpp.

void QdbtTabular::setColumnPattern int    col,
QString    pattern
 

Sets a regular Expression for validating data inserted in cells of the specified column.

This pattern is matched using the QRegExp-Class. As specified within the QValidator-Class (see there), Acceptable is returned for the cells in the column col, if the pattern matched the string (you might want to consider using ^ and $ to enforce matching the entire string). Otherwise the Validator returns Valid . This results in declining Return to finish editing but accepting all user input until the outcome is Acceptable .

void QdbtBaseTabular::setColumnVisible int    column,
bool    visible
[inherited]
 

Make a column appear and disappear. This function may be used to hide a column entirely, so that the user cannot set it or resize it any more. This is achieved by passing the number of the column and a visible-state of FALSE . Consequently, setting the visiblity-state to TRUE shows the column again.

Examples:
example5.cpp.

void QdbtTabular::setColumnWidth int    col,
int    width
[slot]
 

This slot sets the width of one tabular column. This feature may be used to synchronize two tables while scolling.

Reimplemented within the public space for convenience reasons.

See also:
QdbtBaseTabular::setColumnWidth()

Reimplemented from QdbtBaseTabular.

Examples:
example5.cpp.

void QdbtBaseTabular::setDefaultCell const QdbtBaseCell   defCell [inherited]
 

Sets a copy of a cell as the table's default cell. This cell is used, whenever a cell is not explicitely set within the table's cell matrix.

Using this mechanism it should be easy to implement a tabular acting like in model-view-controller approch.

void QdbtTabular::setDimensions int    rows,
int    cols
[virtual]
 

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QdbtBaseTabular.

Examples:
example3.cpp.

void QdbtBaseTabular::setEnabled bool    state [slot, inherited]
 

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QWidget.

Examples:
example5.cpp.

void QdbtTabular::setFollowKeyboardFocus bool    follow
 

If follow is set to TRUE, a traversal of the keyboard-focus causes the cell or the row where it is move to to be selected.

Examples:
example5.cpp.

void QdbtBaseTabular::setHeaderAppearance HeaderMode    header_mode [inherited]
 

The tabular widget by default fills the remaining space in the header bar with a beveled box. The header_mode may be one of the following modes:

  • MODE_QLISTVIEW: Display header as the QListView-Widget does (without a beveled box at the end)
  • MODE_QDBTTABULAR: Show the header as normally done by the QdbtBaseTabular-Widget (includeing the beveled box at the end of the header)

void QdbtTabular::setHeaderAppearance int    header_mode
 

This function set the appearance of the header lines for a tabular. Currently two modes are provides: QListView-compatibilty or the former QdbtTabular style.

See also:
QdbtBaseTabular::setHeaderAppearance()

void QdbtBaseTabular::setHeaderCursor const QCursor   newCursor [inherited]
 

In order to acompish a consistend look-and-feel with the other Qt-Widgets (which may change) it may be necessary to override the cursor shape when resizing the header or the tabular widget.

void QdbtBaseTabular::setHeaderFont const QFont   font [inherited]
 

Sets the font that is used for the text in the table's sections to font

See also:
headerFont() and setCellFont().
Examples:
example3.cpp.

void QdbtTabular::setHeaderVisible bool    visible [slot]
 

Shows or hides the table's header. Showing the header is the default behavior. The header consists of a number of sections, one for each column. Each section is a button with a text. Pressing the button will emit a signal. Each section is separated by a divider. If the column is resizable the user can click the left mouse button and drag the divider to resize the column. Pressing the middle mouse button on a divider will resize the column so all cells fit in the column.

If the header is not visible the columns are no longer resizable by the user.

See also:
setHeaderVisible(), headerVisible(), sectionClicked() and changeSection().

void QdbtBaseTabular::setJumpScrollTimeout int    mSeconds [inherited]
 

When entering text in the jump scroll mode, the timout ( mSeconds ) describes the time, after which the input is being cleared.

Setting this amount of time to 0 will resolve is no strings being accumulated. This, the used can traverse through all beginning with e.g. 'f' by keping the 'f' Key pressed down.

See also:
moveFocusForJumpScroll(), jumpScrollTimeout()

void QdbtBaseTabular::setKeyboardFocus int    row,
int    col
[inherited]
 

This function explicitly sets the keyboard focus to a cell within the tabular.

void QdbtTabular::setMultiSelect bool    enable
 

Set the selection mode of the tabular widget.

Previously multiple selected cells will not be treated in any way.

Examples:
example5.cpp.

void QdbtBaseTabular::setNotEditableColor const QColor   col [inherited]
 

All Cells, that are not editable, may be displayed using a different background color. This colors can be set using this function. If no or an invalid color is set, the default background color is used.

void QdbtTabular::setRowSelectable int    row,
bool    enable
 

Sets whether or not the row at index index may be selected by the user.

If enable is TRUE selection is allowed. This is the default.

If enable is FALSE selection is denied. This function only has effect when selection by row is enabled.

See also:
selectByRow() and rowSelectable().

void QdbtBaseTabular::setRowSelected int    row,
bool    status
[inherited]
 

Sets the select state of the row at index index to status. If status is TRUE the row will be highlighted (selected). If status is FALSE the row will not be highlighted (unselected).

See also:
rowSelected().

void QdbtTabular::setScrollbarVisible bool    vertical,
bool    visible
 

This function enables to hide or show scrollbars of a tabular widget. The first parameter used to indicate which scrollbar is being affected (use TRUE for the vertical scrollbar, FALSE for the horizontal scrollbar), the second parameter determines if the scrollbar is visible if necessary ( TRUE ) or if it is hidden ( FALSE )

Examples:
example5.cpp.

void QdbtTabular::setTraverseMode int    mode
 

Set a mode for traversal of the keyboard focus. This mode may be composed (or'ed together) from TRAV_LOCK_ROW and TRAV_LOCK_COL (for keeping the keyboard focus within a row or a column). If none of these modes is specified, any new position will be valid for the keyboard focus (TRAV_ANY )

See also:
traverseMode(), keyboardFocusTraversal()
Examples:
example5.cpp.

void QdbtTabular::setXOffset int    offset [slot]
 

This slot sets the horizontal offset of the tabular. This feature may be used to synchronize two tables while scolling. If the offset did not change, the table is not scrolled either.

Reimplemented within the public space for convenience reasons.

See also:
QdbtBaseTabular::setXOffset()

Reimplemented from QdbtBaseTabular.

void QdbtTabular::setYOffset int    offset [slot]
 

This slot sets the vertical offset of the tabular. This feature may be used to synchronize two tables while scolling. If the offset did not change, the table is not scrolled either.

Reimplemented within the public space for source compatibility with older QdbtTabular-Versions.

See also:
QdbtBaseTabular::setYOffset()

Reimplemented from QdbtBaseTabular.

Examples:
example5.cpp.

QSize QdbtBaseTabular::sizeHint   const [inherited]
 

Returns the preferred size of the table. The size is chosen so that all cells fit without the need for scrollbars.

Notice, that if there are many or large cells in the table, the returned size may be very large.

See also:
fitAll().

Reimplemented from QWidget.

void QdbtBaseTabular::stopEdit bool    accept [slot, inherited]
 

Stops editing in progress. Is accept is TRUE, the result is accepted as if the user had pressed return, if accept is FALSE the changes are being discarded.

void QdbtBaseTabular::traceMessage const QString   [signal, inherited]
 

You may connect to this signal to trace internal messages, the tabular may generate (depending on the trace-support being compiled into the tabular or not)

QdbtTabular::TraverseMode QdbtTabular::traverseMode   const
 

Returns the current traverse restrictions for the keyboard focus. This is a composed out of TRAV_LOCK_ROW and TRAV_LOCK_COL (or'ed together)

See also:
setTraverseMode(), keyboardFocusTraversal()
Examples:
example5.cpp.

void QdbtBaseTabular::update   [slot, inherited]
 

Updates the widget unless updates are disabled or the widget is hidden.

Updating the widget will redraw each cell that is exposed. Cells erase themselves when they are redrawn, thus minimizing the amount of flickering.

Notice, that this function repaints the table correctly in all cases, whereas repaint() does not.

Reimplemented from QWidget.

Examples:
example5.cpp.

int QdbtBaseTabular::xOffset   const [protected, inherited]
 

Returns the x coordinate in table coordinates of the pixel which is currently on the left edge of the view.

See also:
yOffset().

void QdbtBaseTabular::xOffsetChanged int    offset [signal, inherited]
 

This signal is sent, of the horizontal scrollbar value changed or if this scrollbar has been moved.

int QdbtBaseTabular::yOffset   const [protected, inherited]
 

Returns the y coordinate in table coordinates of the pixel which is currently on the top edge of the view.

See also:
xOffset().

void QdbtBaseTabular::yOffsetChanged int    offset [signal, inherited]
 

This signal is sent, of the vertical scrollbar value changed or if this scrollbar has been moved.


The documentation for this class was generated from the following files:
Generated on Mon Apr 22 12:22:03 2002 for QdbtTabular by doxygen1.2.15-20020421