ICS

QicsTable Documentation Set

QicsTableGrid.h

Go to the documentation of this file.
00001 /*********************************************************************
00002 **
00003 ** Copyright (C) 2002-2006 Integrated Computer Solutions, Inc
00004 ** All rights reserved.
00005 **
00006 ** This file is part of the QicsTable Product.
00007 **
00008 **********************************************************************/
00009 
00010 #ifndef _QicsTableGrid_H
00011 #define _QicsTableGrid_H
00012 
00013 #include <QicsScreenGrid.h>
00014 
00015 
00016 class QMouseEvent;
00017 class QFocusEvent;
00018 class QDragMoveEvent;
00019 class QEvent;
00020 class QDropEvent;
00021 class QTimer;
00023 
00046 
00047 
00050 
00051  
00052 class QICS_EXPORT QicsTableGrid: public QicsScreenGrid {
00053     Q_OBJECT
00054 
00055 public:
00063     QicsTableGrid(QWidget *w, 
00064           QicsGridInfo &info,
00065           int top_row = 0,
00066           int left_column = 0);
00067 
00071     virtual ~QicsTableGrid();
00072 
00077     virtual void reset(void);
00078 
00086     typedef QicsTableGrid *(*Foundry)(QWidget *w, QicsGridInfo &info,
00087                       int top_row, int left_column);
00088 
00097     typedef QicsTableGrid *(*FoundryWithKey)(QWidget *w, QicsGridInfo &info,
00098                          int top_row, int left_column,
00099                          void *key);
00100 
00107     static QicsTableGrid *createGrid(QWidget *w, QicsGridInfo &info,
00108                      int top_row = 0, int left_column = 0);
00109 
00110 public slots:
00111     virtual void handleGridPropertyChange(QicsGridStyle::QicsGridStyleProperty prop);
00112 
00113 signals:
00114     void    fillHandlePressed(QMouseEvent *m);
00115     void    fillHandleReleased(QMouseEvent *m);
00116     void    fillHandleDoubleClicked(QMouseEvent *m);
00117     void    fillHandleDragged(QMouseEvent *m);
00118 
00119 protected:
00120     virtual void dropEvent(QDropEvent *event);
00121 
00122     virtual void dragEnterEvent(QDragEnterEvent *event);
00123 
00130     virtual bool event( QEvent *e );
00131 
00132     virtual void handleMousePressEvent(const QicsICell &cell, QMouseEvent *m);
00133     virtual void handleMouseReleaseEvent(const QicsICell &cell, QMouseEvent *m);
00134     virtual void handleMouseDoubleClickEvent(const QicsICell &cell, QMouseEvent *m);
00135     virtual void handleMouseMoveEvent(const QicsICell &cell, QMouseEvent *m);
00136 
00137     virtual void focusInEvent(QFocusEvent *);
00138     virtual void focusOutEvent(QFocusEvent *);
00139 
00140     virtual void dragMoveEvent(QDragMoveEvent *event);
00141 
00142     virtual bool canDropAt(QDragMoveEvent *event, const QicsICell &cell) const;
00143     virtual void dropAt(QDropEvent *event, const QicsICell &cell);
00144 
00145     virtual void selectCell(int row, int col);
00146 
00147     //virtual QRect paintRegion(const QicsRegion &region, QPainter *painter);
00148 
00149     virtual QRect drawCell(int row, int col, int x, int y,
00150               bool look_for_overflower, QPainter *painter, bool drawBorderOnly);
00151 
00156     void setSelectionAnchorCell(QicsICell *cell);
00157 
00162     void setSelectionCurrentCell(QicsICell *cell);
00163 
00167     void beginSelection(int row, int col);
00171     void endSelection(int row, int col);
00175     void dragSelection(int row, int col);
00179     void extendSelection(int row, int col);
00183     void addSelection(int row, int col);
00187     void clearSelection(void);
00191     void reportSelection(int row, int col, QicsSelectionType stype);
00192 
00193     virtual void doScrollTraverse();
00194 
00201     QicsICell *mySelectionCurrentCell;
00202 
00209     QicsICell *mySelectionAnchorCell;
00210 
00216     bool myDoingSelectionFlag;
00217 
00218     bool myExclusiveMode, myExclusiveDrag;
00219     QRect myFillHandlePickRect, myUpdateRect;
00220 };
00221 
00222 #endif /* _QicsTableGrid_H --- Do not add anything past this line */
00223 

All trademarks and copyrights on this page are properties of their respective owners.
The rest is copyright 1999-2006 Integrated Computer Solutions, Inc.