krita
kis_previewwidget.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __kis_previewwidget_h__
00023 #define __kis_previewwidget_h__
00024
00025 #include <qimage.h>
00026 #include <qevent.h>
00027
00028 #include "kis_types.h"
00029
00030 #include "kis_previewwidgetbase.h"
00031
00032 class QWidget;
00033 class KisProfile;
00042 class KisPreviewWidget : public PreviewWidgetBase
00043 {
00044 Q_OBJECT
00045
00046 public:
00048 KisPreviewWidget( QWidget* parent = 0, const char* name = 0 );
00049
00051 KisPaintDeviceSP getDevice();
00052
00054 bool getAutoUpdate() const;
00055
00056 void wheelEvent(QWheelEvent * e);
00057
00058 public slots:
00059
00061 void slotSetDevice(KisPaintDeviceSP dev);
00062
00066 void slotUpdate();
00067
00069 void slotSetAutoUpdate(bool set);
00070
00072 void setPreviewDisplayed(bool v);
00073
00075 void needUpdate();
00076
00077 signals:
00079 void updated();
00080
00081 private slots:
00082
00083 void zoomIn();
00084 void zoomOut();
00085
00086 void forceUpdate();
00087
00088 private:
00089
00090 bool zoomChanged();
00091
00092 bool m_autoupdate, m_previewIsDisplayed;
00093
00094 QImage m_scaledOriginal;
00095 QImage m_scaledPreview;
00096 KisPaintDeviceSP m_previewDevice;
00097
00098 double m_zoom;
00099 KisProfile * m_profile;
00100
00101 KisPaintDeviceSP m_origDevice;
00102 };
00103
00104 #endif
|