mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add RiuTools with function for default window flags
This commit is contained in:
@@ -63,6 +63,7 @@ ${CEE_CURRENT_LIST_DIR}RiuSummaryVectorDescriptionMap.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuExpressionContextMenuManager.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuCalculationsContextMenuManager.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuGridStatisticsHistogramWidget.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuTools.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
@@ -122,6 +123,7 @@ ${CEE_CURRENT_LIST_DIR}RiuSummaryVectorDescriptionMap.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiuExpressionContextMenuManager.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiuCalculationsContextMenuManager.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiuGridStatisticsHistogramWidget.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiuTools.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "RimPerforationCollection.h"
|
||||
|
||||
#include "RiuTools.h"
|
||||
|
||||
#include "cafCmdFeatureManager.h"
|
||||
#include "cafPdmUiTableView.h"
|
||||
#include "cafSelectionManager.h"
|
||||
@@ -37,7 +39,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuEditPerforationCollectionWidget::RiuEditPerforationCollectionWidget(QWidget* parent, RimPerforationCollection* perforationCollection)
|
||||
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
: QDialog(parent, RiuTools::defaultDialogFlags()),
|
||||
m_perforationCollection(perforationCollection)
|
||||
{
|
||||
setWindowTitle("Edit Perforation Intervals");
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "RimProject.h"
|
||||
#include "RimView.h"
|
||||
|
||||
#include "RiuTools.h"
|
||||
|
||||
#include "cafCmdFeatureManager.h"
|
||||
#include "cafPdmUiTableView.h"
|
||||
#include "cafSelectionManager.h"
|
||||
@@ -51,7 +53,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuExportMultipleSnapshotsWidget::RiuExportMultipleSnapshotsWidget(QWidget* parent, RimProject* project)
|
||||
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
: QDialog(parent, RiuTools::defaultDialogFlags()),
|
||||
m_rimProject(project)
|
||||
{
|
||||
setWindowTitle("Export Multiple Snapshots");
|
||||
|
||||
@@ -17,13 +17,18 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiuMultiCaseImportDialog.h"
|
||||
#include "ui_RiuMultiCaseImportDialog.h"
|
||||
#include <QFileSystemModel>
|
||||
#include <QFileDialog>
|
||||
#include <QStringListModel>
|
||||
#include <QFileIconProvider>
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RiuTools.h"
|
||||
|
||||
#include "ui_RiuMultiCaseImportDialog.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QFileIconProvider>
|
||||
#include <QFileSystemModel>
|
||||
#include <QStringListModel>
|
||||
|
||||
class FileListModel: public QStringListModel
|
||||
{
|
||||
public:
|
||||
@@ -76,7 +81,7 @@ private:
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuMultiCaseImportDialog::RiuMultiCaseImportDialog(QWidget *parent /*= 0*/)
|
||||
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
|
||||
: QDialog(parent, RiuTools::defaultDialogFlags())
|
||||
{
|
||||
ui = new Ui::RiuMultiCaseImportDialog;
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "RiuSummaryCurveDefSelection.h"
|
||||
#include "RiuSummaryCurveDefSelectionEditor.h"
|
||||
#include "RiuTools.h"
|
||||
|
||||
#include <QBoxLayout>
|
||||
#include <QDialogButtonBox>
|
||||
@@ -32,7 +33,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuSummaryCurveDefSelectionDialog::RiuSummaryCurveDefSelectionDialog(QWidget* parent)
|
||||
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
|
||||
: QDialog(parent, RiuTools::defaultDialogFlags())
|
||||
{
|
||||
m_addrSelWidget = std::unique_ptr<RiuSummaryCurveDefSelectionEditor>(new RiuSummaryCurveDefSelectionEditor());
|
||||
QWidget* addrWidget = m_addrSelWidget->getOrCreateWidget(this);
|
||||
|
||||
29
ApplicationCode/UserInterface/RiuTools.cpp
Normal file
29
ApplicationCode/UserInterface/RiuTools.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiuTools.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Qt::WindowFlags RiuTools::defaultDialogFlags()
|
||||
{
|
||||
Qt::WindowFlags f = Qt::WindowTitleHint | Qt::WindowSystemMenuHint;
|
||||
|
||||
return f;
|
||||
}
|
||||
26
ApplicationCode/UserInterface/RiuTools.h
Normal file
26
ApplicationCode/UserInterface/RiuTools.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017- Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "qnamespace.h"
|
||||
|
||||
namespace RiuTools
|
||||
{
|
||||
Qt::WindowFlags defaultDialogFlags();
|
||||
} // end namespace RiuTools
|
||||
Reference in New Issue
Block a user