You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
#include "nmWxSelectWellsDlg.h"
|
|
|
|
#include <QPushButton>
|
|
#include <QDebug>
|
|
#include <QVBoxLayout>
|
|
|
|
#include "nmData/nmDataLogFile.h"
|
|
#include "ZxResolutionHelper.h"
|
|
|
|
nmWxSelectWellsDlg::nmWxSelectWellsDlg(QWidget* parent): QDialog(parent)
|
|
{
|
|
m_mainLayout = NULL;
|
|
this->setWindowTitle(tr("Select Wells"));
|
|
this->initUI();
|
|
this->setMinimumSize(QSize(_resoSizeW(400), _resoSizeW(200)));
|
|
}
|
|
|
|
nmWxSelectWellsDlg::~nmWxSelectWellsDlg()
|
|
{
|
|
}
|
|
|
|
void nmWxSelectWellsDlg::setWidget(QWidget *widget)
|
|
{
|
|
m_mainLayout->insertWidget(0, widget);
|
|
}
|
|
|
|
void nmWxSelectWellsDlg::initUI()
|
|
{
|
|
// 创建自定义视图
|
|
QLabel *customView = new QLabel("This is a custom view.");
|
|
customView->setWordWrap(true);
|
|
// 创建布局
|
|
m_mainLayout = new QVBoxLayout;
|
|
this->setLayout(m_mainLayout);
|
|
// 创建按钮框,并添加确定和取消按钮
|
|
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
|
m_mainLayout->addWidget(buttonBox);
|
|
// 连接按钮的信号到对话框的槽
|
|
connect(buttonBox, SIGNAL(accepted()), this, SLOT(on_accepted()));
|
|
connect(buttonBox, SIGNAL(rejected()), this, SLOT(on_rejected()));
|
|
}
|
|
|
|
void nmWxSelectWellsDlg::on_accepted()
|
|
{
|
|
this->accept();
|
|
}
|
|
|
|
void nmWxSelectWellsDlg::on_rejected()
|
|
{
|
|
this->reject();
|
|
}
|
|
|
|
|