ImageViewer: De-slot

Change-Id: If488718679d31fd184b99c9ceb5004f15fb0a90b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-03-18 23:31:33 +02:00
committed by Orgad Shaneh
parent 63a691b5de
commit 24a922cb28
3 changed files with 9 additions and 17 deletions

View File

@@ -49,12 +49,11 @@ public:
void accept() override; void accept() override;
private slots: private:
void resetExportSize(); void resetExportSize();
void exportWidthChanged(int width); void exportWidthChanged(int width);
void exportHeightChanged(int height); void exportHeightChanged(int height);
private:
void setExportWidthBlocked(int width); void setExportWidthBlocked(int width);
void setExportHeightBlocked(int height); void setExportHeightBlocked(int height);

View File

@@ -68,11 +68,6 @@ public:
void reset(); void reset();
void createScene(); void createScene();
signals:
void scaleFactorChanged(qreal factor);
void imageSizeChanged(const QSize &size);
public slots:
void exportImage(); void exportImage();
void setViewBackground(bool enable); void setViewBackground(bool enable);
void setViewOutline(bool enable); void setViewOutline(bool enable);
@@ -81,18 +76,19 @@ public slots:
void resetToOriginalSize(); void resetToOriginalSize();
void fitToScreen(); void fitToScreen();
private slots: signals:
void emitScaleFactor(); void scaleFactorChanged(qreal factor);
void imageSizeChanged(const QSize &size);
private:
void emitScaleFactor();
void doScale(qreal factor);
protected:
void drawBackground(QPainter *p, const QRectF &rect); void drawBackground(QPainter *p, const QRectF &rect);
void hideEvent(QHideEvent *event); void hideEvent(QHideEvent *event);
void showEvent(QShowEvent *event); void showEvent(QShowEvent *event);
void wheelEvent(QWheelEvent *event); void wheelEvent(QWheelEvent *event);
private:
void doScale(qreal factor);
ImageViewerFile *m_file; ImageViewerFile *m_file;
QGraphicsItem *m_imageItem = 0; QGraphicsItem *m_imageItem = 0;
QGraphicsRectItem *m_backgroundItem = 0; QGraphicsRectItem *m_backgroundItem = 0;

View File

@@ -54,7 +54,6 @@ public:
IEditor *duplicate() override; IEditor *duplicate() override;
public slots:
void exportImage(); void exportImage();
void imageSizeUpdated(const QSize &size); void imageSizeUpdated(const QSize &size);
void scaleFactorUpdate(qreal factor); void scaleFactorUpdate(qreal factor);
@@ -68,12 +67,10 @@ public slots:
void updateToolButtons(); void updateToolButtons();
void togglePlay(); void togglePlay();
private slots:
void playToggled();
private: private:
ImageViewer(const QSharedPointer<ImageViewerFile> &document, QWidget *parent = 0); ImageViewer(const QSharedPointer<ImageViewerFile> &document, QWidget *parent = 0);
void ctor(); void ctor();
void playToggled();
void updatePauseAction(); void updatePauseAction();
struct ImageViewerPrivate *d; struct ImageViewerPrivate *d;