A dialog for grabbing a screen shot. More...
#include <screenshot_dialog.h>
Signals | |
void | savedInDirectory (const QString &directory) |
Emitted when the user saves a file. | |
Public Member Functions | |
ScreenshotDialog (QWidget *main_window, QWidget *render_window, VisualizationManager *vis_manager, const QString &default_save_dir=QString()) | |
virtual | ~ScreenshotDialog () |
Protected Slots | |
void | onButtonClicked (QAbstractButton *clicked) |
void | onTimeout () |
void | save () |
void | setSaveFullWindow (bool save_full_window) |
void | takeScreenshot () |
void | takeScreenshotNow () |
Protected Member Functions | |
virtual void | showEvent (QShowEvent *event) |
Private Attributes | |
QDialogButtonBox * | button_box_ |
QString | default_save_dir_ |
QTimer * | delay_timer_ |
bool | first_time_ |
ScaledImageWidget * | image_widget_ |
QWidget * | main_window_ |
QWidget * | render_window_ |
bool | save_full_window_ |
QSize | saved_size_ |
QPixmap | screenshot_ |
VisualizationManager * | vis_manager_ |
A dialog for grabbing a screen shot.
Takes the screenshot while in the constructor, then shows a half-size view of the screenshot in the dialog with buttons for save/try-again/cancel.
Definition at line 54 of file screenshot_dialog.h.
rviz::ScreenshotDialog::ScreenshotDialog | ( | QWidget * | main_window, |
QWidget * | render_window, | ||
VisualizationManager * | vis_manager, | ||
const QString & | default_save_dir = QString() |
||
) |
Definition at line 49 of file screenshot_dialog.cpp.
virtual rviz::ScreenshotDialog::~ScreenshotDialog | ( | ) | [inline, virtual] |
Definition at line 61 of file screenshot_dialog.h.
void rviz::ScreenshotDialog::onButtonClicked | ( | QAbstractButton * | clicked | ) | [protected, slot] |
Definition at line 130 of file screenshot_dialog.cpp.
void rviz::ScreenshotDialog::onTimeout | ( | ) | [protected, slot] |
Definition at line 109 of file screenshot_dialog.cpp.
void rviz::ScreenshotDialog::save | ( | ) | [protected, slot] |
Definition at line 146 of file screenshot_dialog.cpp.
void rviz::ScreenshotDialog::savedInDirectory | ( | const QString & | directory | ) | [signal] |
Emitted when the user saves a file.
void rviz::ScreenshotDialog::setSaveFullWindow | ( | bool | save_full_window | ) | [protected, slot] |
Definition at line 97 of file screenshot_dialog.cpp.
void rviz::ScreenshotDialog::showEvent | ( | QShowEvent * | event | ) | [protected, virtual] |
Definition at line 84 of file screenshot_dialog.cpp.
void rviz::ScreenshotDialog::takeScreenshot | ( | ) | [protected, slot] |
Definition at line 103 of file screenshot_dialog.cpp.
void rviz::ScreenshotDialog::takeScreenshotNow | ( | ) | [protected, slot] |
Definition at line 117 of file screenshot_dialog.cpp.
QDialogButtonBox* rviz::ScreenshotDialog::button_box_ [private] |
Definition at line 83 of file screenshot_dialog.h.
QString rviz::ScreenshotDialog::default_save_dir_ [private] |
Definition at line 88 of file screenshot_dialog.h.
QTimer* rviz::ScreenshotDialog::delay_timer_ [private] |
Definition at line 85 of file screenshot_dialog.h.
bool rviz::ScreenshotDialog::first_time_ [private] |
Definition at line 87 of file screenshot_dialog.h.
Definition at line 79 of file screenshot_dialog.h.
QWidget* rviz::ScreenshotDialog::main_window_ [private] |
Definition at line 80 of file screenshot_dialog.h.
QWidget* rviz::ScreenshotDialog::render_window_ [private] |
Definition at line 81 of file screenshot_dialog.h.
bool rviz::ScreenshotDialog::save_full_window_ [private] |
Definition at line 84 of file screenshot_dialog.h.
QSize rviz::ScreenshotDialog::saved_size_ [private] |
Definition at line 86 of file screenshot_dialog.h.
QPixmap rviz::ScreenshotDialog::screenshot_ [private] |
Definition at line 82 of file screenshot_dialog.h.
Definition at line 89 of file screenshot_dialog.h.