Signals | Public Member Functions | Protected Slots | Protected Member Functions | Private Attributes | List of all members
rviz::ScreenshotDialog Class Reference

A dialog for grabbing a screen shot. More...

#include <screenshot_dialog.h>

Inheritance diagram for rviz::ScreenshotDialog:
Inheritance graph
[legend]

Signals

void savedInDirectory (const QString &directory)
 Emitted when the user saves a file. More...
 

Public Member Functions

 ScreenshotDialog (QWidget *main_window, QWidget *render_window, const QString &default_save_dir=QString())
 
 ~ScreenshotDialog () override
 

Protected Slots

void onButtonClicked (QAbstractButton *clicked)
 
void onTimeout ()
 
void save ()
 
void setSaveFullWindow (bool save_full_window)
 
void takeScreenshot ()
 
void takeScreenshotNow ()
 

Protected Member Functions

void showEvent (QShowEvent *event) override
 

Private Attributes

QDialogButtonBox * button_box_
 
QString default_save_dir_
 
QTimer * delay_timer_
 
bool first_time_
 
ScaledImageWidgetimage_widget_
 
QWidget * main_window_
 
QWidget * render_window_
 
bool save_full_window_
 
QSize saved_size_
 
QPixmap screenshot_
 

Detailed Description

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 52 of file screenshot_dialog.h.

Constructor & Destructor Documentation

◆ ScreenshotDialog()

rviz::ScreenshotDialog::ScreenshotDialog ( QWidget *  main_window,
QWidget *  render_window,
const QString &  default_save_dir = QString() 
)

Definition at line 49 of file screenshot_dialog.cpp.

◆ ~ScreenshotDialog()

rviz::ScreenshotDialog::~ScreenshotDialog ( )
inlineoverride

Definition at line 59 of file screenshot_dialog.h.

Member Function Documentation

◆ onButtonClicked

void rviz::ScreenshotDialog::onButtonClicked ( QAbstractButton *  clicked)
protectedslot

Definition at line 121 of file screenshot_dialog.cpp.

◆ onTimeout

void rviz::ScreenshotDialog::onTimeout ( )
protectedslot

Definition at line 106 of file screenshot_dialog.cpp.

◆ save

void rviz::ScreenshotDialog::save ( )
protectedslot

Definition at line 137 of file screenshot_dialog.cpp.

◆ savedInDirectory

void rviz::ScreenshotDialog::savedInDirectory ( const QString &  directory)
signal

Emitted when the user saves a file.

◆ setSaveFullWindow

void rviz::ScreenshotDialog::setSaveFullWindow ( bool  save_full_window)
protectedslot

Definition at line 94 of file screenshot_dialog.cpp.

◆ showEvent()

void rviz::ScreenshotDialog::showEvent ( QShowEvent *  event)
overrideprotected

Definition at line 82 of file screenshot_dialog.cpp.

◆ takeScreenshot

void rviz::ScreenshotDialog::takeScreenshot ( )
protectedslot

Definition at line 100 of file screenshot_dialog.cpp.

◆ takeScreenshotNow

void rviz::ScreenshotDialog::takeScreenshotNow ( )
protectedslot

Definition at line 114 of file screenshot_dialog.cpp.

Member Data Documentation

◆ button_box_

QDialogButtonBox* rviz::ScreenshotDialog::button_box_
private

Definition at line 83 of file screenshot_dialog.h.

◆ default_save_dir_

QString rviz::ScreenshotDialog::default_save_dir_
private

Definition at line 88 of file screenshot_dialog.h.

◆ delay_timer_

QTimer* rviz::ScreenshotDialog::delay_timer_
private

Definition at line 85 of file screenshot_dialog.h.

◆ first_time_

bool rviz::ScreenshotDialog::first_time_
private

Definition at line 87 of file screenshot_dialog.h.

◆ image_widget_

ScaledImageWidget* rviz::ScreenshotDialog::image_widget_
private

Definition at line 79 of file screenshot_dialog.h.

◆ main_window_

QWidget* rviz::ScreenshotDialog::main_window_
private

Definition at line 80 of file screenshot_dialog.h.

◆ render_window_

QWidget* rviz::ScreenshotDialog::render_window_
private

Definition at line 81 of file screenshot_dialog.h.

◆ save_full_window_

bool rviz::ScreenshotDialog::save_full_window_
private

Definition at line 84 of file screenshot_dialog.h.

◆ saved_size_

QSize rviz::ScreenshotDialog::saved_size_
private

Definition at line 86 of file screenshot_dialog.h.

◆ screenshot_

QPixmap rviz::ScreenshotDialog::screenshot_
private

Definition at line 82 of file screenshot_dialog.h.


The documentation for this class was generated from the following files:


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:11