krita
KisPreviewWidget Class Reference
#include <kis_previewwidget.h>
Detailed Description
A widget that can be used by plugins to show a preview of the effect of the plugin to the user.This is a convenience class thand handily packs a source and a preview view together with a zoom button. It would be nice if every plugin that needs to show a preview (maybe not those that create a new image) would use this. This can prevent the distracting effect the GIMP has with a different preview for almost every filter.
Definition at line 42 of file kis_previewwidget.h.
Public Slots | |
void | slotSetDevice (KisPaintDeviceSP dev) |
void | slotUpdate () |
void | slotSetAutoUpdate (bool set) |
void | setPreviewDisplayed (bool v) |
void | needUpdate () |
Signals | |
void | updated () |
Public Member Functions | |
KisPreviewWidget (QWidget *parent=0, const char *name=0) | |
KisPaintDeviceSP | getDevice () |
bool | getAutoUpdate () const |
void | wheelEvent (QWheelEvent *e) |
Constructor & Destructor Documentation
KisPreviewWidget::KisPreviewWidget | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) |
Member Function Documentation
KisPaintDeviceSP KisPreviewWidget::getDevice | ( | ) |
- Returns:
- the scaled down copy of the layer, so the dialog can apply its effect on it.
Definition at line 124 of file kis_previewwidget.cc.
bool KisPreviewWidget::getAutoUpdate | ( | ) | const |
returns if the preview is automatically updated
Definition at line 182 of file kis_previewwidget.cc.
void KisPreviewWidget::slotSetDevice | ( | KisPaintDeviceSP | dev | ) | [slot] |
Sets the preview to use the layer specified as argument.
Definition at line 102 of file kis_previewwidget.cc.
void KisPreviewWidget::slotUpdate | ( | ) | [slot] |
Call this when the effect has finished updating the layer.
Makes the preview repaint itself.
Definition at line 129 of file kis_previewwidget.cc.
void KisPreviewWidget::slotSetAutoUpdate | ( | bool | set | ) | [slot] |
Enables or disables the automatically updating of the preview.
Definition at line 146 of file kis_previewwidget.cc.
void KisPreviewWidget::setPreviewDisplayed | ( | bool | v | ) | [slot] |
Toggle between display preview and display original.
Definition at line 159 of file kis_previewwidget.cc.
void KisPreviewWidget::needUpdate | ( | ) | [slot] |
use to indicate that the preview need to be updated.
Definition at line 176 of file kis_previewwidget.cc.
void KisPreviewWidget::updated | ( | ) | [signal] |
This is emitted when the position or zoom factor of the widget has changed.
The documentation for this class was generated from the following files: