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 void zoomOneToOne();
00086
00087 void forceUpdate();
00088
00089 private:
00090
00091 bool zoomChanged();
00092
00093 bool m_autoupdate, m_previewIsDisplayed;
00094
00095 QImage m_scaledOriginal;
00096 QImage m_scaledPreview;
00097 KisPaintDeviceSP m_previewDevice;
00098
00099 double m_zoom;
00100 KisProfile * m_profile;
00101
00102 KisPaintDeviceSP m_origDevice;
00103 };
00104
00105 #endif
|