|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
#include "ui_DieCharLayoutUI.h"
|
|
|
|
|
|
#include <cmath>
|
|
|
|
|
|
#include <QMouseEvent>
|
|
|
|
|
|
#include <QRectF>
|
|
|
|
|
|
#include <QStringListModel>
|
|
|
|
|
|
#include <QMessageBox>
|
|
|
|
|
|
#include <QRegExpValidator>
|
|
|
|
|
|
#include <QRegExp>
|
|
|
|
|
|
#include <QGraphicsScene>
|
|
|
|
|
|
#include "global.h"
|
|
|
|
|
|
#include "MyQGraphicsLineItem.h"
|
|
|
|
|
|
#include "MyQGraphicsRectItem.h"
|
|
|
|
|
|
#include "MyDieRectItem.h"
|
|
|
|
|
|
#include "MyDrawRectItem.h"
|
|
|
|
|
|
#include "MyQGraphicsEllipseItem.h"
|
|
|
|
|
|
#include "MyQGraphicsTextItem.h"
|
|
|
|
|
|
#include "RecipeAttrObj.h"
|
|
|
|
|
|
#include "mappingchart_global.h"
|
|
|
|
|
|
|
|
|
|
|
|
class MAPPINGCHART_EXPORT DieCharLayoutUI : public QWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
DieCharLayoutUI(QWidget *parent = Q_NULLPTR);
|
|
|
|
|
|
~DieCharLayoutUI();
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
void ShowDieCharLayoutUIUseRecipe(RecipeAttrObj& curUseRecipe, QString replaceStr);
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
void slot_closeDieCharLayout();
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
Ui::DieCharLayoutUI ui;
|
|
|
|
|
|
|
|
|
|
|
|
QGraphicsScene m_scene;
|
|
|
|
|
|
|
|
|
|
|
|
std::shared_ptr<MyDieRectItem> m_dieObj;
|
|
|
|
|
|
|
|
|
|
|
|
std::shared_ptr<MyQGraphicsLineItem> m_XCoordAxis; //<2F><><EFBFBD><EFBFBD>ϵX<CFB5><58>
|
|
|
|
|
|
std::shared_ptr<MyQGraphicsLineItem> m_YCoordAxis; //<2F><><EFBFBD><EFBFBD>ϵY<CFB5><59>
|
|
|
|
|
|
|
|
|
|
|
|
QPen m_pen;
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
QPointF m_startPos;
|
|
|
|
|
|
|
|
|
|
|
|
int m_curSelectId = -1; //<2F><>ǰѡ<C7B0>е<EFBFBD>item
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
//die<69><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
double m_dieWidth = 3;
|
|
|
|
|
|
double m_dieHeight = 4;
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<std::shared_ptr<MyQGraphicsLineItem>> m_lineItemVec;
|
|
|
|
|
|
std::vector<std::shared_ptr<MyDrawRectItem>> m_rectItemVec;
|
|
|
|
|
|
std::vector<std::shared_ptr<MyQGraphicsEllipseItem>> m_circleItemVec;
|
|
|
|
|
|
std::vector<std::shared_ptr<MyQGraphicsTextItem>> m_textItemVec;
|
|
|
|
|
|
};
|