#include <Libs/Widgets/ctkScreenshotDialog.h>
|
QScopedPointer< ctkScreenshotDialogPrivate > | d_ptr |
|
ctkScreenshotDialog is simple dialog allowing to grab the content of any widget and save it into a PNG file. It can be used as a tool and can take screenshots without being opened nor executed.
void setWidgetToGrab(QWidget *newWidgetToGrab)
- See also
- ctkScreenshotDialog::setWidgetToGrab, QDialog
Definition at line 46 of file ctkScreenshotDialog.h.
◆ Superclass
◆ ctkScreenshotDialog()
ctkScreenshotDialog::ctkScreenshotDialog |
( |
QWidget * |
parent = 0 | ) |
|
◆ ~ctkScreenshotDialog()
virtual ctkScreenshotDialog::~ctkScreenshotDialog |
( |
| ) |
|
|
virtual |
◆ baseFileName()
QString ctkScreenshotDialog::baseFileName |
( |
| ) |
const |
◆ delay()
int ctkScreenshotDialog::delay |
( |
| ) |
const |
◆ directory()
QString ctkScreenshotDialog::directory |
( |
| ) |
const |
◆ enableTransparency()
void ctkScreenshotDialog::enableTransparency |
( |
bool |
enable = true | ) |
|
Allow/Disallow transparency in the output screenshot.
◆ enforceResolution() [1/2]
void ctkScreenshotDialog::enforceResolution |
( |
int |
width = 300 , |
|
|
int |
height = 300 |
|
) |
| |
Disable scaling or output resolution control and take a fixed resolution screenshot. Default output resolution is (300,300)
◆ enforceResolution() [2/2]
void ctkScreenshotDialog::enforceResolution |
( |
QSize |
size = QSize(300, 300) | ) |
|
◆ instantScreenshot
void ctkScreenshotDialog::instantScreenshot |
( |
| ) |
|
|
slot |
Instantanely grabs the content of widgetToGrag. Generates a png file into directory. It automatically increments the image name index suffix.
◆ saveScreenshot
void ctkScreenshotDialog::saveScreenshot |
( |
| ) |
|
|
slot |
◆ setBaseFileName()
void ctkScreenshotDialog::setBaseFileName |
( |
const QString & |
newImageName | ) |
|
Set screenshot base name used to generate unique file names to save the screenshot images. The base name doesn't contain the file extension (automatically set to ".png") "Untitled" by default
◆ setDelay()
void ctkScreenshotDialog::setDelay |
( |
int |
seconds | ) |
|
Set the delay in seconds before the screenshot is taken. 0 seconds by default.
◆ setDirectory()
void ctkScreenshotDialog::setDirectory |
( |
const QString & |
path | ) |
|
Set directory where screenshot files are saved. If path is empty, the program's working directory, ("."), is used. Current working directory by default.
◆ setWidgetToGrab()
void ctkScreenshotDialog::setWidgetToGrab |
( |
QWidget * |
newWidgetToGrab | ) |
|
Get widget to grab content from. If no widget is set, no screenshot will be taken. 0 by default. TODO: if widgetToGrab -> screenshot the entire application
◆ widgetSize()
QSize ctkScreenshotDialog::widgetSize |
( |
| ) |
|
Get the original widget size.
◆ widgetToGrab()
QWidget* ctkScreenshotDialog::widgetToGrab |
( |
| ) |
const |
◆ d_ptr
QScopedPointer<ctkScreenshotDialogPrivate> ctkScreenshotDialog::d_ptr |
|
protected |
◆ baseFileName
QString ctkScreenshotDialog::baseFileName |
|
readwrite |
◆ delay
int ctkScreenshotDialog::delay |
|
readwrite |
◆ directory
QString ctkScreenshotDialog::directory |
|
readwrite |
The documentation for this class was generated from the following file: