#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.
- See also
- ctkScreenshotDialog::setWidgetToGrab, QDialog
Definition at line 46 of file ctkScreenshotDialog.h.
ctkScreenshotDialog::ctkScreenshotDialog |
( |
QWidget * |
parent = 0 | ) |
|
virtual ctkScreenshotDialog::~ctkScreenshotDialog |
( |
| ) |
|
|
virtual |
QString ctkScreenshotDialog::baseFileName |
( |
| ) |
const |
int ctkScreenshotDialog::delay |
( |
| ) |
const |
QString ctkScreenshotDialog::directory |
( |
| ) |
const |
void ctkScreenshotDialog::enableTransparency |
( |
bool |
enable = true | ) |
|
Allow/Disallow transparency in the output screenshot.
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)
void ctkScreenshotDialog::enforceResolution |
( |
QSize |
size = QSize(300, 300) | ) |
|
void ctkScreenshotDialog::instantScreenshot |
( |
| ) |
|
|
slot |
Instantanely grabs the content of widgetToGrag. Generates a png file into directory. It automatically increments the image name index suffix.
void ctkScreenshotDialog::saveScreenshot |
( |
| ) |
|
|
slot |
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
void ctkScreenshotDialog::setDelay |
( |
int |
seconds | ) |
|
Set the delay in seconds before the screenshot is taken. 0 seconds by default.
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.
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
QSize ctkScreenshotDialog::widgetSize |
( |
| ) |
|
Get the original widget size.
QWidget* ctkScreenshotDialog::widgetToGrab |
( |
| ) |
const |
QScopedPointer<ctkScreenshotDialogPrivate> ctkScreenshotDialog::d_ptr |
|
protected |
QString ctkScreenshotDialog::baseFileName |
|
readwrite |
int ctkScreenshotDialog::delay |
|
readwrite |
QString ctkScreenshotDialog::directory |
|
readwrite |
The documentation for this class was generated from the following file: