122 lines
3.8 KiB
C++
122 lines
3.8 KiB
C++
#ifndef FORMINFO_H
|
|
#define FORMINFO_H
|
|
|
|
#include <QWidget>
|
|
#include <QPainter>
|
|
#include <QPaintEvent>
|
|
//
|
|
#include <QJsonDocument>
|
|
#include <QJsonObject>
|
|
#include <QJsonArray>
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
namespace Ui {
|
|
class FormInfo;
|
|
}
|
|
|
|
class FormInfo : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FormInfo(QWidget *parent = nullptr, QString strSlfName="", QString strWellName="", QString strTrackName="", QString strLineName="", QColor lineColor=QColor(255,0,0));
|
|
~FormInfo();
|
|
|
|
private:
|
|
Ui::FormInfo *ui;
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *event);
|
|
|
|
public slots:
|
|
void dragEnterEvent(QDragEnterEvent* event);
|
|
void dragMoveEvent(QDragMoveEvent* event);
|
|
void dropEvent(QDropEvent* event);
|
|
//属性
|
|
//左刻度
|
|
void s_ChangeLeftScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale);
|
|
//右刻度
|
|
void s_ChangeRightScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale);
|
|
//刻度类型
|
|
void s_ChangeScaleType(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType);
|
|
|
|
//线颜色
|
|
void s_ChangeLineColor(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor);
|
|
//线宽
|
|
void s_ChangeLineWidth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width);
|
|
//线型
|
|
void s_ChangeLineStyle(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle);
|
|
//岩性填充-不填充
|
|
void s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
|
//岩性填充-填充
|
|
void s_ChangeFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
|
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
|
float vMin, float vMax, QString strOtherScaleType, QColor frontColor, QColor backColor, QString newFillMode);
|
|
|
|
public:
|
|
QString m_strUuid;
|
|
QString m_strSlfName;
|
|
QString m_strWellName;
|
|
QString m_strTrackName;
|
|
QString m_strLineName;
|
|
QColor m_lineColor;
|
|
//
|
|
double m_dWidth;
|
|
Qt::PenStyle m_lineStyle;
|
|
//X坐标
|
|
float m_vmax;
|
|
float m_vmin;
|
|
QString m_strScaleType;//刻度类型(线性,对数)
|
|
|
|
//岩性填充
|
|
QString m_newFillMode;
|
|
QString m_newHeadFill;
|
|
QString m_newFillType;
|
|
QColor m_newColor;//填充颜色
|
|
QString m_newLithosImage = "";//岩性图片
|
|
QColor m_frontColor;//岩性前景色
|
|
QColor m_backColor;//岩性背景色
|
|
|
|
public:
|
|
void setLineWidth(double dWidth);
|
|
double getLineWidth();
|
|
|
|
void setLineStyle(Qt::PenStyle lineStyle);
|
|
Qt::PenStyle getLineStyle();
|
|
|
|
void setVMax(float vmax);
|
|
float getVMax();
|
|
|
|
void setVMin(float vmin);
|
|
float getVMin();
|
|
|
|
void setFrontColor(QColor frontColor);
|
|
QColor getFrontColor();
|
|
|
|
void setBackColor(QColor backColor);
|
|
QColor getBackColor();
|
|
|
|
QJsonObject makeJson();
|
|
|
|
//public:
|
|
// void mousePressEvent(QMouseEvent *event) override {
|
|
// if (event->button() == Qt::LeftButton) {
|
|
// startPosition = event->globalPos() - frameGeometry().topLeft();
|
|
// event->accept();
|
|
// }
|
|
// }
|
|
|
|
// void mouseMoveEvent(QMouseEvent *event) override {
|
|
// if (event->buttons() & Qt::LeftButton) {
|
|
// move(event->globalPos() - startPosition);
|
|
// event->accept();
|
|
// }
|
|
// }
|
|
|
|
private:
|
|
QPoint startPosition;
|
|
};
|
|
|
|
#endif // FORMINFO_H
|