4 Star 36 Fork 14

ITVENTI科技/WorkXP

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
workspace.h 2.03 KB
一键复制 编辑 原始数据 按行查看 历史
huanglingzhi 提交于 2020-06-29 18:07 +08:00 . Let's roll
#ifndef WORKSPACE_H
#define WORKSPACE_H
#include "basespace.h"
#include "graphicsitemtype.h"
#include <QGraphicsItem>
QT_BEGIN_NAMESPACE
class QWebEngineView;
QT_END_NAMESPACE
class RectElement;
class BaseElement;
class Document;
class Page;
class BaseNode;
class QtRuleBar;
class QtCornerBox;
//class WorkSheet : public QGraphicsItem
//{
// QRectF m_geometry;
// QBrush m_background;
// Outline * m_outline;
//public:
// enum { Type = UserType+ GRAPHICSITEM_TYPE_WORKSHEET };
// int type() const
// {
// // Enable the use of qgraphicsitem_cast with this item.
// return Type;
// }
//public:
// WorkSheet(QGraphicsItem * parent= Q_NULLPTR);
// QRectF boundingRect() const override;
// void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
// QWidget *widget) override;
// void setSize(const QSizeF & value);
// inline QSizeF size() const {return m_geometry.size();}
// void setGeometry(qreal x,qreal y,qreal w,qreal h);
// void setGeometry(const QRectF & value);
// inline QRectF geometry() const {return m_geometry;}
// inline void setBackground(const QBrush & value) {m_background = value;}
// inline QBrush Background() const { return m_background;}
// void clear();
//};
class Workspace: public BaseSpace
{
Q_OBJECT
Document * m_document;
//WorkSheet * m_currentSheet;
QtRuleBar * m_hruler;
QtRuleBar * m_vruler;
QtCornerBox * box;
public:
Workspace(QWidget *parent = Q_NULLPTR);
~Workspace();
virtual void init() override;
private:
QPixmap getTileRect();
public slots:
void setDocument(Document * const &document);
protected:
void mouseMoveEvent(QMouseEvent * event) Q_DECL_OVERRIDE;
void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
void scrollContentsBy(int dx, int dy) Q_DECL_OVERRIDE;
private slots:
void changePageSize(QSize pageSize);
void updateRuler();
};
#endif // WORKSPACE_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/itventi/workxp.git
git@gitee.com:itventi/workxp.git
itventi
workxp
WorkXP
master

搜索帮助