85 lines
2.8 KiB
C++
85 lines
2.8 KiB
C++
#ifndef FORMDRAW_H
|
|
#define FORMDRAW_H
|
|
|
|
#include <QWidget>
|
|
#include <QPainter>
|
|
#include <QPaintEvent>
|
|
#include "qmycustomplot.h"
|
|
#include "formtitle.h"
|
|
#include "formtrack.h"
|
|
#include "LogIO.h"
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
namespace Ui {
|
|
class FormDraw;
|
|
}
|
|
|
|
class FormDraw : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FormDraw(QWidget *parent = nullptr, QString m_strWellName="", QString strTrackName="");
|
|
~FormDraw();
|
|
|
|
private:
|
|
Ui::FormDraw *ui;
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *event);
|
|
|
|
public slots:
|
|
void dragEnterEvent(QDragEnterEvent* event);
|
|
void dragMoveEvent(QDragMoveEvent* event);
|
|
void dropEvent(QDropEvent* event);
|
|
//
|
|
void s_mouseWheel(QWheelEvent *event);
|
|
|
|
void setRowHeight(double dHight, QProgressBar *progressBar, int iSplit);
|
|
|
|
public:
|
|
QString m_strUuid;
|
|
QString m_strWellName;
|
|
QString m_strTrackName;
|
|
|
|
FormTrack *m_formTrack;
|
|
|
|
QStringList m_listLineName;
|
|
QStringList m_listWaveName;
|
|
|
|
//X坐标
|
|
float m_vmax;
|
|
float m_vmin;
|
|
|
|
public:
|
|
void initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
|
double newLeftScale=-9999, double newRightScale=-9999, QString strScaleType="线性", QColor lineColor=QColor(0,0,0), double width=1, Qt::PenStyle lineStyle=Qt::SolidLine);
|
|
void addRandomGraph(QMyCustomPlot *widget, QVector<double> x, QVector<double> y, QString strSlfName, QString strLineName, QString strAliasName, QString strUnit,
|
|
double newLeftScale=-9999, double newRightScale=-9999, QString strScaleType="线性", QColor lineColor=QColor(0,0,0), double width=1, Qt::PenStyle lineStyle=Qt::SolidLine);
|
|
void setupLineStyleDemo(QMyCustomPlot *customPlot);
|
|
void setupSelectionDemo(QMyCustomPlot *customPlot);
|
|
|
|
void initWave(QMyCustomPlot *widget, QString strSlfName, QString strWaveName);
|
|
|
|
|
|
signals:
|
|
//void sig_AddLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
|
|
|
|
|
public slots:
|
|
void s_addLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
|
void s_AddLine_Property(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
|
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle);//新建曲线,带属性
|
|
|
|
void s_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
|
void s_MouseMove(QString strUuid, QString strWellName, QString strTrackName, float dep);
|
|
void s_handleRectRangeChange(QCPRange newRange);
|
|
void s_selectionRectAccepted(const QRect &rect, QMouseEvent *event);
|
|
|
|
//
|
|
void s_addWave(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strWaveName);
|
|
};
|
|
|
|
#endif // FORMDRAW_H
|