krita
KisPreviewWidget Class Reference
#include <kis_previewwidget.h>
Inherits PreviewWidgetBase.
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 48 of file kis_previewwidget.h.
Public Slots | |
void | slotSetDevice (KisPaintDeviceSP dev) |
void | slotSetAutoUpdate (bool set) |
void | setPreviewDisplayed (bool v) |
void | needUpdate () |
Signals | |
void | updated () |
Public Member Functions | |
KisPreviewWidget (QWidget *parent=0, const char *name=0) | |
bool | getAutoUpdate () const |
void | wheelEvent (QWheelEvent *e) |
void | runFilter (KisFilter *filter, KisFilterConfiguration *config) |
Constructor & Destructor Documentation
KisPreviewWidget::KisPreviewWidget | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) |
Member Function Documentation
bool KisPreviewWidget::getAutoUpdate | ( | ) | const |
returns if the preview is automatically updated
Definition at line 228 of file kis_previewwidget.cc.
void KisPreviewWidget::runFilter | ( | KisFilter * | filter, | |
KisFilterConfiguration * | config | |||
) |
Instructs the KisPreviewWidget to eventually update the preview.
KisPreviewWidget delays the actual running of the filter for 500ms so if the user is changing a configuration setting, it won't run multiple time.
- Parameters:
-
filter to run on the image to use when filtering.
Definition at line 302 of file kis_previewwidget.cc.
void KisPreviewWidget::slotSetDevice | ( | KisPaintDeviceSP | dev | ) | [slot] |
Sets the preview to use the layer specified as argument.
Definition at line 135 of file kis_previewwidget.cc.
void KisPreviewWidget::slotSetAutoUpdate | ( | bool | set | ) | [slot] |
Enables or disables the automatically updating of the preview.
Definition at line 193 of file kis_previewwidget.cc.
void KisPreviewWidget::setPreviewDisplayed | ( | bool | v | ) | [slot] |
Toggle between display preview and display original.
Definition at line 207 of file kis_previewwidget.cc.
void KisPreviewWidget::needUpdate | ( | ) | [slot] |
use to indicate that the preview need to be updated.
Definition at line 222 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: