#include <qdbttabular.h>
Inheritance diagram for QdbtTabular:
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 QdbtTableCell * | cell (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) |
QdbtSection * | section (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 QColor & | notEditableColor () 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 |
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.
selectByRow()
: If set to TRUE
, the tabular content is treated as rows. This means only rows may be selected or deselected.FALSE
, the table consists out of cells which may be selected and deselected individually.TRUE
setMultiSelect()
: This modes allows multiple entries (either cells or rows, depending on the previous described mode) to be selected or deselected if set to TRUE
.FALSE
) selecting an entry will result in deselecting the previous entry. This method is runtime-efficient but results in funny patterns when switching the mode.TRUE
setAllowDeselect()
: Normally (if set to TRUE
) a mouse click on a selected cell will result in deselecting a cell. This behaviour can be switched off when setting this mode to FALSE
. A selected entry cannot be deselected with the mouse then anymore. This mode is useful in combination with the single-selection mode described above.TRUE
setFollowKeyboardFocus()
: If this mode is set to TRUE
, the travesal of the keyboard focus causes a cell or row (depending on the row-selection mode, see above) to be selected.example1.cpp, example2.cpp, example3.cpp, example4.cpp, and example5.cpp.
|
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.
|
|
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.
|
|
|
Modes for restriction the traversal of the keyboard focus |
|
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 ). |
|
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. |
|
Destroys the table. |
|
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.
|
|
Answers if cells may be deselected by mouse click. |
|
Returns TRUE if the view updates itself automatically whenever it is changed in some way.
|
|
Returns the font which is currently set for the cascaded header. |
|
This function determines if the cascaded header currently is visible. |
|
Returns a pointer to the cell-object at location (row, col) in the table.
Reimplemented from QdbtBaseTabular. |
|
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.
|
|
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
|
|
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. |
|
Returns the font that is currently used for the header.
|
|
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. |
|
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 Notice that this signal is only emitted if selection by row is disabled.
|
|
Returns the current size of the cell at location (row,\a col) in the table. The cells themselves are not aware of their size. |
|
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.
|
|
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.
|
|
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:
If the boolean edit</em> is
|
|
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:
If the boolean edit is
|
|
Reimplemented for internal reasons; the API is not affected.
|
|
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
|
|
Removes all cells from the table. This is equivalent to setDimensions(0,0). |
|
This function clears (if state is
|
|
Locate the column for one identifier.
|
|
Read the identifier currently accompanying column col
|
|
Read the validator pattern set for a column. |
|
This function examines, if a column is visible (by returning |
|
Returns the width in pixels of the column at index col.
|
|
This signals is emitted, whenever the column with changes |
|
Returns the minimal width that is required to fully display all cells in the column at index col including the header.
|
|
Read the current configuration of the tabular. This configuration is composed out of the flags specified in QdbtBaseTabular::ConfigureSwitches . |
|
Returns |
|
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.
|
|
Disables tooltips for cells whose text is truncated.
|
|
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 ); |
|
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.
|
|
Enables dynamic tooltips for cells whose text is truncated. The tooltip shows the complete text. Default this feature is enabled.
|
|
A virtual function that handles the mouse enter events of the table excluding the header. Does not do anything at the moment. |
|
Reimplemented for internal reasons; the API is not affected. Reimplemented from QdbtBaseTabular.
|
|
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. |
|
Returns the index of the column at position xPos, where xPos is in widget coordinates. Returns -1 if xPos is outside the valid range.
|
|
Returns the index of the row at position yPos, where yPos is in widget coordinates. Returns -1 if yPos is outside the valid range.
|
|
Resizes the table's columns so that all cells fit (are not truncated).
|
|
Returns |
|
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:
|
|
Returns the font that is currently used for the header.
|
|
Returns the height of the header in pixels. If the header is currently invisible 0 is returned. |
|
Returns
|
|
Reimplemented for internal reasons; the API is not affected. Reimplemented from QdbtBaseTabular.
|
|
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
If selectable is set to Notice that the value of selectable only has effect if the selection of rows is enabled. See also: removeRow(), selectByRow(), setDimensions(), changeCell(), numRows(). |
|
Returns the timeout in msec, after that the keyed in text for jump scroll mode is being cleared.
|
|
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
|
|
A virtual function that handles the mouse leave events of the table excluding the header. Does not do anything at the moment.
|
|
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.
|
|
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)
|
|
Check if the Tabular-Widget is in multi select mode (DEFAULT) or if it is in sinle select mode. |
|
Returns the baground color for cells that are not editable. If this color is not valid (QColor::isValid()), the default background color is used. |
|
Returns the number of columns in the table.
|
|
Returns the number of rows in the table (not counting the header).
|
|
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(). |
|
Returns a pointer to the private implementation member for subclasses (but be careful!) |
|
This function draws the cascaded header. It should not be used unless absolutely necessary since redraws are normally done automatically. |
|
This function draws the header. It should not be used unless absolutely necessary since redraws are normally done automatically. |
|
Reimplemented for internal reasons; the API is not affected. Reimplemented from QdbtBaseTabular. |
|
Removes row at row from the table. All cells in the row will be deleted.
|
|
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. |
|
Returns the height in pixels of the row at index row.
|
|
This function returns
|
|
Returns
|
|
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.
|
|
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. |
|
This function determines how cells are selected. If enable is set to
If enable is set to
|
|
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 Notice that this signal is only emitted if selection by row is enabled.
|
|
If a selected cells or row is clicked, this functions sets the deselect mode. If this mode is set to
|
|
Sets the auto-update option of the table view to enable.
If enable is
If enable is
TRUE does not repaint the view, you must call update() to do this.
|
|
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. |
|
Select the font, in which the cascaded cells are displayed. This function does not initiate an automatic redraw of the cascaded header. |
|
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.
|
|
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.
|
|
This function either shows or hides the cascaded headers of the tabular widget. |
|
Sets the font that is used for the text of each cell to font.
|
|
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.
|
|
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), |
|
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
|
|
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.
Reimplemented from QdbtBaseTabular.
|
|
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. |
|
Reimplemented for internal reasons; the API is not affected. Reimplemented from QdbtBaseTabular.
|
|
Reimplemented for internal reasons; the API is not affected. Reimplemented from QWidget.
|
|
If follow is set to
|
|
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:
|
|
This function set the appearance of the header lines for a tabular. Currently two modes are provides: QListView-compatibilty or the former QdbtTabular style.
|
|
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. |
|
Sets the font that is used for the text in the table's sections to font
|
|
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.
|
|
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.
|
|
This function explicitly sets the keyboard focus to a cell within the tabular. |
|
Set the selection mode of the tabular widget. Previously multiple selected cells will not be treated in any way.
|
|
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. |
|
Sets whether or not the row at index index may be selected by the user.
If enable is
If enable is
|
|
Sets the select state of the row at index index to status. If status is
|
|
This function enables to hide or show scrollbars of a tabular widget. The first parameter used to indicate which scrollbar is being affected (use
|
|
Set a mode for traversal of the keyboard focus. This mode may be composed (or'ed together) from
|
|
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.
Reimplemented from QdbtBaseTabular. |
|
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.
Reimplemented from QdbtBaseTabular.
|
|
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.
Reimplemented from QWidget. |
|
Stops editing in progress. Is accept is |
|
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) |
|
Returns the current traverse restrictions for the keyboard focus. This is a composed out of TRAV_LOCK_ROW and
|
|
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.
|
|
Returns the x coordinate in table coordinates of the pixel which is currently on the left edge of the view.
|
|
This signal is sent, of the horizontal scrollbar value changed or if this scrollbar has been moved. |
|
Returns the y coordinate in table coordinates of the pixel which is currently on the top edge of the view.
|
|
This signal is sent, of the vertical scrollbar value changed or if this scrollbar has been moved. |