mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
Work in progress: Support capturing snapshots with a given size.
This commit is contained in:
1 parent
c2811b1db8
commit
361b4bc3db
9 files changed
+96
-1
No files matched your search
@@ -35,6 +35,7 @@
|
||||
#include "cafPdmUiToolButtonEditor.h"
|
||||
|
||||
#include <QPaintDevice>
|
||||
#include <QPainter>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include <cvfAssert.h>
|
||||
@@ -639,6 +640,25 @@ QImage RimMultiPlot::snapshotWindowContent()
|
||||
return image;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QImage RimMultiPlot::captureSnapshot( int width, int height )
|
||||
{
|
||||
QImage image;
|
||||
|
||||
if ( m_viewer.isNull() ) return image;
|
||||
|
||||
QSize orgViewSize = m_viewer->size();
|
||||
|
||||
image = captureImage( m_viewer->bookWidget(), width, height );
|
||||
|
||||
m_viewer->resize( orgViewSize );
|
||||
doUpdateLayout();
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user