CheckHeaderView.h 588 B

1234567891011121314151617181920212223242526272829
  1. #ifndef CHECKHEADERVIEW_H
  2. #define CHECKHEADERVIEW_H
  3. #include <QHeaderView>
  4. #include <QCheckBox>
  5. #include <QPainter>
  6. class CheckHeaderView : public QHeaderView
  7. {
  8. Q_OBJECT
  9. public:
  10. CheckHeaderView(int checkColumnIndex,
  11. Qt::Orientation orientation,
  12. QWidget * parent = 0);
  13. signals:
  14. void checkboxStateChanged(int);
  15. private slots:
  16. void stateChanged(int state);
  17. protected:
  18. void paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const;
  19. private:
  20. QCheckBox * m_checkBox;
  21. int m_CheckIdex;
  22. };
  23. #endif // CHECKHEADERVIEW_H