4 Star 36 Fork 14

ITVENTI科技/WorkXP

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rulebar.h 958 Bytes
一键复制 编辑 原始数据 按行查看 历史
huanglingzhi 提交于 2020-06-29 18:07 +08:00 . Let's roll
#ifndef RULEBAR
#define RULEBAR
#include <QtWidgets>
QT_BEGIN_NAMESPACE
class QFrame;
class QPaintEvent;
class QPainter;
class QGraphicsView;
QT_END_NAMESPACE
#define RULER_SIZE 28
class QtCornerBox : public QWidget
{
Q_OBJECT
public:
explicit QtCornerBox(QWidget * parent );
protected:
void paintEvent(QPaintEvent *);
};
class QtRuleBar : public QWidget
{
Q_OBJECT
public:
explicit QtRuleBar(Qt::Orientation direction, QGraphicsView * view, QWidget * parent = 0 );
void setRange( double lower , double upper , double max_size );
void updatePosition( const QPoint & pos );
protected:
void paintEvent(QPaintEvent *event);
void drawTicker(QPainter * painter);
void drawPos(QPainter * painter) ;
Qt::Orientation m_direction;
QPoint m_lastPos;
QGraphicsView * m_view;
double m_lower;
double m_upper;
double m_maxsize;
};
#endif // RULEBAR
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/itventi/workxp.git
git@gitee.com:itventi/workxp.git
itventi
workxp
WorkXP
master

搜索帮助