Main Page   Class Hierarchy   Compound List   Compound Members   Examples   Search  


This is the verbatim text of the qdbttabular.h include file.

#include <qframe.h>
#include <qpixmap.h>
#include <qstring.h>
#include <qlist.h>
#include <qsize.h>
#include <qcursor.h>

// some internal classes used to implement this widget

class QdbtTableCell;
class QdbtSlideBar;
class QdbtHeader;
class QdbtTable;
class QdbtSection;
class QdbtCascade;

class QdbtTabular : public QFrame
  friend class QdbtHeader;
  friend class QdbtTable;
  friend class QdbtSection;


    enum HeaderMode { MODE_QDBTTABULAR=0x0000, MODE_QLISTVIEW = 0x0001 };

    QdbtTabular(QWidget *parent=0,const char *name=0,WFlags w=0);

    void setHeaderFont(const QFont &font);
    const QFont headerFont() const;
    void setCellFont(const QFont &font);
    const QFont cellFont() const;
    void setDimensions(int rows,int cols);
    void setColumnWidth(int col,int width); 
    void changeSection(QdbtSection *section,int col);
    QdbtSection *section(int col);
    void insertRow(int row=-1,bool selectable=TRUE);
    void removeRow(int row);
    void insertCol(int col=-1);
    void removeCol(int col);
    void clear() { setDimensions(0,0); }
    int  numRows() const;
    int  numCols() const;
    void changeCell(const QdbtTableCell *tc,int row,int col);
    void changeCell(const char *text,const QPixmap *p,int row,int col,
                    const QColor &color=Qt::black,
                    int align=Qt::AlignLeft,bool editable=FALSE);
    void changeCell(const char *text,int row,int col,
                    const QColor &color=Qt::black,
                    int align=Qt::AlignLeft,bool editable=FALSE);
    void changeCell(const QPixmap *pixmap,int row,int col,
                    int align=Qt::AlignLeft);
    void showHeader();
    void hideHeader();
    bool headerVisible() const;
    int  columnWidth(int col) const;
    int  rowHeight(int row) const;
    int  columnWidthHint(int col) const;
    const QdbtTableCell *cell(int row,int col);
    bool rowSelected(int row) const;
    void setRowSelected(int row,bool enable);
    void setAutoUpdate(bool state);
    bool autoUpdate() const;
    void update();
    QSize sizeHint() const;
    void enableTooltips();
    void disableTooltips();
    void selectByRow(bool enable);
    bool rowSelectable(int row) const;
    void setRowSelectable(int row,bool enable);
    void editCell(int row,int col,bool traverse=FALSE);
    void exposeCell(int row,int col);
    void fitAll();

    void showCascade();
    void hideCascade();

    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 redrawHeader();
    void redrawCascade();
    void setHeaderCursor(const QCursor newCursor);
    void setHeaderAppearance(int header_mode);
    int  headerAppearance();

    void sectionClicked(int col);
    void selected(int row,bool state);
    void activated(int row);
    void cellEdited(int row,int col);
    void cellSelected(int row,int col,bool state);
    void cellActivated(int row,int col);

    virtual void resizeEvent(QResizeEvent *);
    virtual void drawContents(QPainter *);
    virtual void enterTableEvent(QEvent *);
    virtual void leaveTableEvent(QEvent *);
    virtual void setPalette(const QPalette &);
    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;

    void           startSlideBar(int minx,int xpos);
    QdbtSlideBar  *slideBar;
    QdbtHeader    *header;
    QdbtTable     *table;
    QdbtCascade   *cascade;
    bool           headerActive, cascadeActive;
    int            _headerMode;

#endif // QTABULAR_H

Generated 11:09, 1999/10/02 for QdbtTabular by doxygen  written by Dimitri van Heesch, © 1997-1998