39 lines
836 B
C++
39 lines
836 B
C++
#ifndef YXZPDIALOG_H
|
|
#define YXZPDIALOG_H
|
|
// 岩心照片 自定义 dialog
|
|
#include <QDialog>
|
|
#include <QLineEdit>
|
|
#include <QPushButton>
|
|
#include <QLabel>
|
|
#include <QHBoxLayout>
|
|
#include <QVBoxLayout>
|
|
#include <QFileDialog>
|
|
#include <QPixmap>
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
class YxzpDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit YxzpDialog(QWidget *parent = nullptr);
|
|
|
|
// 获取最终选择的图片路径
|
|
QString getImagePath() const;
|
|
|
|
private slots:
|
|
// 选择图片按钮点击
|
|
void onSelectImage();
|
|
// 确认按钮点击
|
|
void onAccept();
|
|
// 取消按钮点击
|
|
void onReject();
|
|
|
|
private:
|
|
QLineEdit *m_editPath; // 图片路径输入框
|
|
QLabel *m_labelPreview; // 预览图片
|
|
QString m_imagePath; // 存储最终路径
|
|
};
|
|
|
|
#endif // YXZPCUSDIALOG_H
|