118 lines
2.9 KiB
C
118 lines
2.9 KiB
C
|
|
#ifndef FormTrackTop_H
|
|||
|
|
#define FormTrackTop_H
|
|||
|
|
|
|||
|
|
#include <QWidget>
|
|||
|
|
#include <QPainter>
|
|||
|
|
#include <QPaintEvent>
|
|||
|
|
//
|
|||
|
|
#include <QJsonDocument>
|
|||
|
|
#include <QJsonObject>
|
|||
|
|
#include <QJsonArray>
|
|||
|
|
|
|||
|
|
#pragma execution_character_set("utf-8")
|
|||
|
|
|
|||
|
|
namespace Ui {
|
|||
|
|
class FormTrackTop;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
class FormTrackTop : public QWidget
|
|||
|
|
{
|
|||
|
|
Q_OBJECT
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
explicit FormTrackTop(QWidget *parent = nullptr, QString strSlfName="", QString strWellName="", QString strTrackName="", QString strLineName="", QColor lineColor=QColor(255,0,0));
|
|||
|
|
~FormTrackTop();
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
Ui::FormTrackTop *ui;
|
|||
|
|
|
|||
|
|
protected:
|
|||
|
|
void paintEvent(QPaintEvent *event);
|
|||
|
|
|
|||
|
|
public slots:
|
|||
|
|
void dragEnterEvent(QDragEnterEvent* event);
|
|||
|
|
void dragMoveEvent(QDragMoveEvent* event);
|
|||
|
|
void dropEvent(QDropEvent* event);
|
|||
|
|
//属性
|
|||
|
|
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
QString m_strUuid;
|
|||
|
|
QString m_strSlfName;
|
|||
|
|
QString m_strWellName;
|
|||
|
|
QString m_strTrackName;
|
|||
|
|
QString m_strLineName;
|
|||
|
|
QString m_strAliasName;//显示名称
|
|||
|
|
QString m_strUnit;//单位
|
|||
|
|
|
|||
|
|
QFont m_font;
|
|||
|
|
QColor m_fontColor;//颜色
|
|||
|
|
|
|||
|
|
int m_iSelect=0; //iSelect=0未知,1标准曲线,2主曲线,3从曲线
|
|||
|
|
QString m_strType;//类型:curve, wave
|
|||
|
|
//
|
|||
|
|
double m_dWidth;//线宽
|
|||
|
|
QColor m_lineColor;//颜色
|
|||
|
|
Qt::PenStyle m_lineStyle;//线形
|
|||
|
|
//X坐标
|
|||
|
|
float m_vmin;//左刻度
|
|||
|
|
float m_vmax;//右刻度
|
|||
|
|
QString m_strScaleType;//刻度类型(线性,对数)
|
|||
|
|
|
|||
|
|
//岩性填充
|
|||
|
|
QString m_newHeadFill;//头部图例
|
|||
|
|
QString m_newTargetLine;//目标曲线
|
|||
|
|
QString m_newFillType;//填充类型
|
|||
|
|
QString m_newFillMode;//填充模式
|
|||
|
|
QColor m_newColor;//填充颜色
|
|||
|
|
QString m_newLithosImage = "";//岩性图片
|
|||
|
|
float m_new_vMin;//其他目标曲线
|
|||
|
|
float m_new_vMax;//其他目标曲线
|
|||
|
|
QString m_strOtherScaleType;//其他目标曲线,刻度类型(线性,对数)
|
|||
|
|
QColor m_frontColor;//岩性前景色
|
|||
|
|
QColor m_backColor;//岩性背景色
|
|||
|
|
|
|||
|
|
int m_nJg;
|
|||
|
|
|
|||
|
|
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 // FormTrackTop_H
|