Reaction to save a screenshot.
More...
#include <pqSaveScreenshotReaction.h>
Reaction to save a screenshot.
pqSaveScreenshotReaction can be connected to a QAction to prompt user and save screenshots or captures from views using the ("misc", "SaveScreenshot")
proxy.
Definition at line 22 of file pqSaveScreenshotReaction.h.
◆ pqSaveScreenshotReaction()
pqSaveScreenshotReaction::pqSaveScreenshotReaction |
( |
QAction * |
parent, |
|
|
bool |
clipboardMode = false |
|
) |
| |
Constructor.
Parent cannot be nullptr.
◆ saveScreenshot() [1/2]
static bool pqSaveScreenshotReaction::saveScreenshot |
( |
bool |
clipboardMode = false | ) |
|
|
static |
Saves the screenshot.
Note that this method is static. Applications can simply use this without having to create a reaction instance. If clipboardMode is true, no advanced options are requested and the screenshot is copied to the clipboard
◆ saveScreenshot() [2/2]
static bool pqSaveScreenshotReaction::saveScreenshot |
( |
const QString & |
filename, |
|
|
const QSize & |
size, |
|
|
int |
quality, |
|
|
bool |
all_views = false |
|
) |
| |
|
static |
Save a screenshot given the filename and image properties.
This method is provided only for convenience. This doesn't expose any of the advanced options available to users when saving screenshots.
◆ copyScreenshotToClipboard()
static bool pqSaveScreenshotReaction::copyScreenshotToClipboard |
( |
const QSize & |
size, |
|
|
bool |
all_views = false |
|
) |
| |
|
static |
Copy a screenshot to the clipboard.
◆ takeScreenshot()
Take a screenshot of the active view or all the views at the given size and return it as a vtkImageData.
◆ promptFileName()
static QString pqSaveScreenshotReaction::promptFileName |
( |
vtkSMSaveScreenshotProxy * |
saveProxy, |
|
|
const QString & |
defaultExtension, |
|
|
vtkTypeUInt32 & |
location |
|
) |
| |
|
static |
Prompt user for filename using the various format proxies listed for the given proxy.
◆ updateEnableState
void pqSaveScreenshotReaction::updateEnableState |
( |
| ) |
|
|
overrideslot |
Updates the enabled state.
Applications need not explicitly call this.
◆ onTriggered()
void pqSaveScreenshotReaction::onTriggered |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ ClipboardMode
bool pqSaveScreenshotReaction::ClipboardMode |
|
protected |
The documentation for this class was generated from the following file: