mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -06:00
#2088 Curve Calculator : Use Close button instead of Ok and Cancel
This commit is contained in:
parent
2c8658c5c2
commit
2e6c37c266
@ -75,6 +75,7 @@ list(APPEND QT_MOC_HEADERS
|
||||
${CEE_CURRENT_LIST_DIR}RicSummaryCurveCreatorSplitterUi.h
|
||||
${CEE_CURRENT_LIST_DIR}RicSummaryCurveCreatorDialog.h
|
||||
${CEE_CURRENT_LIST_DIR}RicSummaryCurveCalculatorEditor.h
|
||||
${CEE_CURRENT_LIST_DIR}RicSummaryCurveCalculatorDialog.h
|
||||
)
|
||||
|
||||
|
||||
|
@ -53,6 +53,16 @@ void RicSummaryCurveCalculatorDialog::setCalculationAndUpdateUi(RimSummaryCalcul
|
||||
m_summaryCalcEditor->updateUi();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSummaryCurveCalculatorDialog::slotTryCloseDialog()
|
||||
{
|
||||
// Test for dirty
|
||||
|
||||
accept();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -64,9 +74,8 @@ void RicSummaryCurveCalculatorDialog::setUp()
|
||||
m_summaryCalcEditor = std::unique_ptr<RicSummaryCurveCalculatorEditor>(new RicSummaryCurveCalculatorEditor());
|
||||
mainLayout->addWidget(m_summaryCalcEditor->getOrCreateWidget(this));
|
||||
|
||||
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
|
||||
connect(buttonBox, SIGNAL(rejected()), this, SLOT(slotTryCloseDialog()));
|
||||
|
||||
mainLayout->addWidget(buttonBox);
|
||||
|
||||
|
@ -30,12 +30,17 @@ class RimSummaryCalculation;
|
||||
//==================================================================================================
|
||||
class RicSummaryCurveCalculatorDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RicSummaryCurveCalculatorDialog(QWidget* parent);
|
||||
~RicSummaryCurveCalculatorDialog();
|
||||
|
||||
void setCalculationAndUpdateUi(RimSummaryCalculation* calculation);
|
||||
|
||||
private slots:
|
||||
void slotTryCloseDialog();
|
||||
|
||||
private:
|
||||
void setUp();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user