ICS

QicsTable Documentation Set

QicsGridCommon.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 _QICSGRIDCOMMON_H
00011 #define _QICSGRIDCOMMON_H
00012 
00013 #include <QicsCellCommon.h>
00014 #include <QicsGridStyle.h>
00015 #include <QicsSpan.h>
00016 
00017 #include <QPixmap>
00018 
00020 
00031 
00032 
00035 
00036 
00037 class QICS_EXPORT QicsGridCommon: public QicsCellCommon {
00038 Q_OBJECT
00039 
00040 public:
00041     
00042     
00043 
00054     int frameLineWidth;
00055 
00062     int frameStyle;
00063 
00069     bool horizontalGridLinesVisible;
00070 
00076     bool verticalGridLinesVisible;
00077 
00083     int horizontalGridLineWidth;
00084 
00090     int verticalGridLineWidth;
00091 
00098     QicsLineStyle horizontalGridLineStyle;
00099 
00106     QicsLineStyle verticalGridLineStyle;
00107 
00114     QicsCellOverflowBehavior cellOverflowBehavior;
00115 
00122     int maxOverflowCells;
00123 
00129     bool drawPartialCells;
00130 
00141     QicsGridCellClipping gridCellClipping;
00142 
00150     QicsCurrentCellStyle currentCellStyle;
00151 
00158     int currentCellBorderWidth;
00159 
00168     bool clickToEdit;
00169 
00180     bool autoSelectCellContents;
00181 
00191     QicsTraversalKeyEditBehavior traversalKeyEditBehavior;
00192 
00203     Qt::Orientation enterTraversalDirection;
00204 
00215     Qt::Orientation tabTraversalDirection;
00216 
00221     bool tabTraverseToBegin;
00222 
00228     bool enterTraverseToBegin;
00229 
00236     QPixmap moreTextPixmap;
00237 
00243     QPalette gridPalette;
00244 
00251     bool dragEnabled;
00252 
00258     Qt::LayoutDirection layoutDirection;
00260 
00261 public:
00266     QicsGridCommon(QObject *parent = 0, bool forward_signals = false);
00267 
00272     QicsGridCommon(QicsGridInfo *info, QObject *parent = 0,
00273            bool forward_signals = false);
00274 
00278     virtual ~QicsGridCommon();
00279 
00280     virtual void setInfo(QicsGridInfo *info);
00281 
00288     virtual QicsRegion viewport(void) const;
00289 
00300     bool addCellSpan(QicsSpan span);
00301 
00311     QicsSpanList *cellSpanList(void);
00312 
00319     bool horizontalGridLinesVisible(void) const;
00320 
00327     bool verticalGridLinesVisible(void) const;
00328 
00335     int horizontalGridLineWidth(void) const;
00336 
00343     int verticalGridLineWidth(void) const;
00344 
00351     QicsLineStyle horizontalGridLineStyle(void) const;
00352 
00359     QicsLineStyle verticalGridLineStyle(void) const;
00360 
00367     QPen horizontalGridLinePen(void) const;
00368 
00375     QPen verticalGridLinePen(void) const;
00376 
00383     bool drawPartialCells() const;
00384 
00391     QicsGridCellClipping gridCellClipping() const;
00392 
00399     QicsCellOverflowBehavior cellOverflowBehavior(void) const;
00400 
00407     int maxOverflowCells(void) const;
00408 
00415     int frameLineWidth(void) const;
00416 
00422     int frameStyle(void) const;
00423 
00430     QicsCurrentCellStyle currentCellStyle(void) const;
00431 
00439     int currentCellBorderWidth(void) const;
00440 
00448     bool clickToEdit(void) const;
00449 
00457     bool autoSelectCellContents(void) const;
00458 
00466     QicsTraversalKeyEditBehavior traversalKeyEditBehavior(void) const;
00467 
00475     Qt::Orientation enterTraversalDirection(void) const;
00476 
00484     Qt::Orientation tabTraversalDirection(void) const;
00485 
00491     bool tabTraverseToBegin() const;
00492 
00498     bool enterTraverseToBegin() const;
00499 
00507     QPixmap moreTextPixmap(void) const;
00508 
00515     QPalette gridPalette(void) const;
00516 
00523     bool dragEnabled(void) const;
00524 
00531     Qt::LayoutDirection layoutDirection(void) const;
00532 
00533 public slots:
00540     virtual void setViewport(const QicsRegion &vp);
00541 
00549     void removeCellSpan(int start_row, int start_col);
00550 
00557     void setHorizontalGridLinesVisible(bool b);
00558 
00565     void setVerticalGridLinesVisible(bool b);
00566 
00573     void setHorizontalGridLineWidth(int w);
00574 
00581     void setVerticalGridLineWidth(int w);
00582 
00589     void setHorizontalGridLineStyle(QicsLineStyle style);
00590 
00597     void setVerticalGridLineStyle(QicsLineStyle style);
00598 
00605     void setHorizontalGridLinePen(const QPen &pen);
00606 
00613     void setVerticalGridLinePen(const QPen &pen);
00614 
00621     void setDrawPartialCells(bool b);
00622 
00629     void setGridCellClipping(QicsGridCellClipping c);
00630 
00637     void setCellOverflowBehavior(QicsCellOverflowBehavior b);
00638 
00645     void setMaxOverflowCells(int num);
00646 
00652     void setFrameStyle(int style);
00653 
00660     void setFrameLineWidth(int lw);
00661 
00668     void setCurrentCellStyle(QicsCurrentCellStyle s);
00669 
00677     void setCurrentCellBorderWidth(int w);
00678 
00686     void setClickToEdit(bool b);
00687 
00695     void setAutoSelectCellContents(bool b);
00696 
00704     void setTraversalKeyEditBehavior(QicsTraversalKeyEditBehavior beh);
00705 
00713     void setEnterTraversalDirection(Qt::Orientation dir);
00714 
00722     void setTabTraversalDirection(Qt::Orientation dir);
00723 
00729     void setTabTraverseToBegin(bool traverse);
00730 
00736     void setEnterTraverseToBegin(bool traverse);
00737 
00745     void setMoreTextPixmap(const QPixmap &pix);
00746 
00753     void setGridPalette(const QPalette &pal);
00754 
00761     void setDragEnabled(bool b);
00762 
00769     void setLayoutDirection(Qt::LayoutDirection layoutDirection);
00770 
00771 signals:
00779     void pressed(int row, int col, int button, const QPoint &pos);
00780 
00788     void clicked(int row, int col, int button, const QPoint &pos);
00789 
00796     void doubleClicked(int row, int col, int button, const QPoint &pos);
00797 
00802     void valueChanged(int row, int col);
00803 
00804 protected:
00805     virtual void setAttr(QicsCellStyle::QicsCellStyleProperty attr, const void *val);
00806     virtual void *getAttr(QicsCellStyle::QicsCellStyleProperty attr) const;
00807     virtual void clearAttr(QicsCellStyle::QicsCellStyleProperty attr);
00808 
00813     virtual void setGridAttr(QicsGridStyle::QicsGridStyleProperty attr,
00814                  const void *val);
00819     virtual void *getGridAttr(QicsGridStyle::QicsGridStyleProperty attr) const;
00824     virtual void clearGridAttr(QicsGridStyle::QicsGridStyleProperty attr);
00825 
00826     virtual void setDMMargin(int margin);
00827     virtual void setDMFont(const QFont &font);
00828     virtual void setDMBorderWidth(int bw);
00829 
00834     void initSignals(void);
00835 
00840     bool myForwardSignals;
00841 
00842 protected slots:
00847     virtual void connectGrid(QicsScreenGrid *grid);
00848 
00853     virtual void disconnectGrid(QicsScreenGrid *grid);
00854 
00859     void handleGridPress(int row, int col, int button, const QPoint &pos);
00860 
00866     void handleGridClick(int row, int col, int button, const QPoint &pos);
00867 
00872     void handleGridDoubleClick(int row, int col, int button, const QPoint &pos);
00873 
00878     void gridDeleted();
00879 
00880 private:
00881 #ifdef Q_DISABLE_COPY
00882     QicsGridCommon(const QicsGridCommon& gc);
00883     QicsGridCommon &operator=(const QicsGridCommon& gc);
00884 #endif
00885 };
00886 
00887 #endif /* _QICSGRIDCOMMON_H */

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