00001 #ifndef _QDBT_PIMPL_H
00002 #define _QDBT_PIMPL_H
00003
00004 class QdbtBaseCell;
00005 class QdbtBaseTabular;
00006 class QdbtCascade;
00007 class QdbtHeader;
00008 class QdbtSelection;
00009 class QdbtSlideBar;
00010 class QdbtTable;
00011
00012 #ifdef INTERNAL_DOCUMENTATION
00013
00025 #endif
00026
00027 class QdbtPImpl
00028 {
00030 QdbtBaseTabular *_base_tabular;
00032 QdbtSlideBar *_slide_bar;
00034 QdbtHeader *_header;
00036 QdbtTable *_table;
00038 QdbtCascade *_cascade;
00040 QdbtSelection *_selection;
00043 QdbtBaseCell *_defaultCell;
00047 int _focusRow;
00051 int _focusCol;
00053 int _numRows;
00055 int _numCols;
00056
00057 public:
00059 QdbtPImpl() :
00060 _base_tabular( 0 ),
00061 _slide_bar( 0 ),
00062 _header( 0 ),
00063 _table( 0 ),
00064 _cascade( 0 ),
00065 _selection( 0 ),
00066 _defaultCell( 0 ),
00067 _focusRow( -1 ),
00068 _focusCol( -1 ),
00069 _numRows( 0 ),
00070 _numCols( 0 )
00071 { }
00075 bool check()
00076 {
00077 ASSERT( _base_tabular );
00078 ASSERT( _slide_bar );
00079 ASSERT( _header );
00080 ASSERT( _table );
00081 ASSERT( _cascade );
00082 ASSERT( _selection );
00083
00084 return !( ( !_base_tabular ) || ( !_slide_bar ) || ( !_header ) ||
00085 ( !_table ) || ( !_cascade ) ||
00086 ( !_selection ) );
00087 }
00088
00090 inline QdbtBaseTabular * tabular() const { return _base_tabular; }
00092 inline QdbtSlideBar * slidebar() const { return _slide_bar; }
00094 inline QdbtHeader * header() const { return _header; }
00096 inline QdbtTable * table() const { return _table; }
00098 inline QdbtCascade * cascade() const { return _cascade; }
00100 inline QdbtSelection * selection() const { return _selection; }
00102 inline QdbtBaseCell * defaultCell() const { return _defaultCell; }
00104 inline int focusRow() const { return _focusRow; }
00106 inline int focusCol() const { return _focusCol; }
00108 inline int numRows() const { return _numRows; }
00110 inline int numCols() const { return _numCols; }
00111
00113 void setTabular( QdbtBaseTabular * ptr ) { _base_tabular = ptr; }
00115 void setSlidebar( QdbtSlideBar * ptr ) { _slide_bar = ptr; }
00117 void setHeader( QdbtHeader * ptr ) { _header = ptr; }
00119 void setTable( QdbtTable * ptr ) { _table = ptr; }
00121 void setCascade( QdbtCascade * ptr ) { _cascade = ptr; }
00123 void setSelection( QdbtSelection * ptr ) { _selection = ptr; }
00125 void setDefaultCell( QdbtBaseCell * ptr ) { _defaultCell = ptr; }
00127 void setFocus( int row, int col ) { _focusRow = row; _focusCol = col; }
00129 void clearFocus() { setFocus( -1, -1 ); }
00131 void setNumRows( int num ) { _numRows = num; }
00133 void setNumCols( int num ) { _numCols = num; }
00134 };
00135
00136 #endif