logplus/logPlus/formline.cpp
2026-01-16 09:04:49 +08:00

67 lines
1.9 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "formline.h"
#include "ui_formline.h"
#include <QPainter>
#include "DrawTvd.h"
//demo画线暂时不用
FormLine::FormLine(QWidget *parent, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName) :
QWidget(parent),
ui(new Ui::FormLine)
{
ui->setupUi(this);
m_strSlfName = strSlfName;
m_strWellName = strWellName;
m_strTrackName = strTrackName;
m_strLineName = strLineName;
}
void FormLine::DrawTvd()
{
// //
// QPainter painter(this);
// QRect rect = this->rect();
// //背景透明
// painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100)
// CDrawTvd *drawTvd = new CDrawTvd();
// drawTvd->sFilePath = m_strSlfName;
// drawTvd->DrawTvd(&painter, rect);
}
FormLine::~FormLine()
{
delete ui;
}
void FormLine::paintEvent(QPaintEvent*)
{
//
QPainter painter(this);
QRect rect = this->rect();
//背景透明
painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100)
CDrawTvd *drawTvd = new CDrawTvd();
drawTvd->sFilePath = m_strSlfName;
drawTvd->DrawTvd(&painter, rect);
// QPainter painter(this);
// QRect rect = this->rect();
// //背景透明
// painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100)
// painter.setPen(QPen(Qt::green,2,Qt::DashLine));
// //painter.setBrush(QBrush(Qt::red,Qt::SolidPattern));
// QFont font1("微软雅黑", 10, false, false); //fontSize 10
// painter.setFont(font1);
// painter.setPen(QColor(0, 0, 0)); // fontColor QColor(220, 220, 220)
// painter.drawText(rect.left() + 10, 10, ("画图")); // titleBarText QStringLiteral("动画")
// QRect rectRound(rect.left()+2,rect.top()+4, rect.width()-3, rect.height()-4);
// painter.drawRoundRect(rectRound);
}