2017-03-07 06:48:17 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2017-03-08 05:25:32 -06:00
|
|
|
// Copyright (C) 2017- Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-03-07 06:48:17 -06:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-03-07 06:48:17 -06:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-03-07 06:48:17 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-06-20 02:41:01 -05:00
|
|
|
#include "RiaQDateTimeTools.h"
|
|
|
|
|
2017-03-07 06:48:17 -06:00
|
|
|
#include "cafCmdFeature.h"
|
|
|
|
|
|
|
|
class RimSummaryPlot;
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-03-07 06:48:17 -06:00
|
|
|
//==================================================================================================
|
|
|
|
class RicAsciiExportSummaryPlotFeature : public caf::CmdFeature
|
|
|
|
{
|
|
|
|
CAF_CMD_HEADER_INIT;
|
|
|
|
|
2018-07-02 07:29:46 -05:00
|
|
|
public:
|
|
|
|
static QString defaultExportDir();
|
2019-09-06 03:40:57 -05:00
|
|
|
static QString getFileNameFromUserDialog( const QString& fileNameCandidate, const QString& defaultDir );
|
|
|
|
static bool exportTextToFile( const QString& fileName, const QString& text );
|
2018-07-02 07:29:46 -05:00
|
|
|
|
2017-03-07 06:48:17 -06:00
|
|
|
protected:
|
2018-10-18 12:45:57 -05:00
|
|
|
bool isCommandEnabled() override;
|
|
|
|
void onActionTriggered( bool isChecked ) override;
|
2019-09-06 03:40:57 -05:00
|
|
|
void setupActionLook( QAction* actionToSetup ) override;
|
2017-03-07 06:48:17 -06:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
static bool exportAsciiForSummaryPlot( const QString& fileName,
|
|
|
|
const RimSummaryPlot* selectedSummaryPlots,
|
2019-10-19 08:05:59 -05:00
|
|
|
DateTimePeriod resamplingPeriod,
|
|
|
|
bool showTimeAsLongString );
|
2017-03-07 06:48:17 -06:00
|
|
|
};
|