Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
cat committed Feb 17, 2022
1 parent da52d79 commit 6611a43
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GrayCatQt/Src/CatControl/CatControl.pri
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ HEADERS += \
$$PWD/CatDoubleSlider.h \
$$PWD/CatDoubleValidator.h \
$$PWD/CatFlowLayout.h \
$$PWD/CatHeaderViewBasic.h \
$$PWD/CatIntValidator.h \
$$PWD/CatPagingNavigation.h \
$$PWD/CatShadowWidget.h \
Expand All @@ -14,6 +15,7 @@ SOURCES += \
$$PWD/CatDoubleSlider.cpp \
$$PWD/CatDoubleValidator.cpp \
$$PWD/CatFlowLayout.cpp \
$$PWD/CatHeaderViewBasic.cpp \
$$PWD/CatIntValidator.cpp \
$$PWD/CatPagingNavigation.cpp \
$$PWD/CatShadowWidget.cpp \
Expand Down
52 changes: 52 additions & 0 deletions GrayCatQt/Src/CatControl/CatHeaderViewBasic.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#include "CatHeaderViewBasic.h"

CatHeaderViewBasic::CatHeaderViewBasic(Qt::Orientation orientation, QWidget *parent)
: QHeaderView(orientation, parent)
{

}

CatHeaderViewBasic::~CatHeaderViewBasic()
{

}

bool CatHeaderViewBasic::eventFilter(QObject *object, QEvent *event)
{

}

void CatHeaderViewBasic::mousePressEvent(QMouseEvent *event)
{

}

void CatHeaderViewBasic::mouseMoveEvent(QMouseEvent *event)
{

}

void CatHeaderViewBasic::paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const
{

}

QRect CatHeaderViewBasic::sectionRect(int logicalIndex) const
{

}

QRect CatHeaderViewBasic::buttonMenuRect(int logicalIndex) const
{

}

QRect CatHeaderViewBasic::prevRect(int logicalIndex) const
{

}

QRect CatHeaderViewBasic::nextRect(int logicalIndex) const
{

}
32 changes: 32 additions & 0 deletions GrayCatQt/Src/CatControl/CatHeaderViewBasic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#ifndef CATHEADERVIEWBASIC_H
#define CATHEADERVIEWBASIC_H

#include <QHeaderView>

class CatHeaderViewBasic : public QHeaderView
{
Q_OBJECT
public:
enum VIEWSTATE {
CHECKBOX,
};
explicit CatHeaderViewBasic(Qt::Orientation orientation, QWidget * parent = 0);
~CatHeaderViewBasic();

protected:
bool eventFilter(QObject *object, QEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const override;

QRect sectionRect(int logicalIndex) const;
QRect buttonMenuRect(int logicalIndex) const;
QRect prevRect(int logicalIndex) const;
QRect nextRect(int logicalIndex) const;

private:


};

#endif // CATHEADERVIEWBASIC_H

0 comments on commit 6611a43

Please sign in to comment.