• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • krita API Reference
  • KDE Home
  • Contact Us
 

KritaWidgets

  • sources
  • kfour-appscomplete
  • krita
  • libs
  • widgets
KoZoomController.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  * SPDX-FileCopyrightText: 2007 Thomas Zander <[email protected]>
3  * SPDX-FileCopyrightText: 2007, 2012 C. Boemann <[email protected]>
4  * SPDX-FileCopyrightText: 2007 Jan Hambrecht <[email protected]>
5  *
6  * SPDX-License-Identifier: LGPL-2.0-or-later
7  */
8 #ifndef KOZOOMCONTROLLER_H
9 #define KOZOOMCONTROLLER_H
10 
11 #include "KoZoomAction.h"
12 #include "kritawidgets_export.h"
13 #include <KoZoomMode.h>
14 #include <QObject>
15 #include <QSizeF>
16 
17 class KoCanvasController;
18 class KoZoomAction;
19 class KoZoomHandler;
20 class KActionCollection;
21 class QSize;
22 
23 
47 class KRITAWIDGETS_EXPORT KoZoomController : public QObject {
48 Q_OBJECT
49 public:
58  KoZoomController(KoCanvasController *controller,
59  KoZoomHandler *zoomHandler,
60  KActionCollection *actionCollection,
61  QObject *parent = 0);
62 
64  ~KoZoomController() override;
65 
67  KoZoomAction *zoomAction() const;
68 
73  void setZoomMode(KoZoomMode::Mode mode);
74 
78  KoZoomMode::Mode zoomMode() const;
79 
95  void setZoom(KoZoomMode::Mode mode, qreal zoom, qreal resolutionX, qreal resolutionY, const QPointF &stillPoint);
96 
97 
102  void setZoom(KoZoomMode::Mode mode, qreal zoom, qreal resolutionX, qreal resolutionY);
103 
108  void setZoom(KoZoomMode::Mode mode, qreal zoom, const QPointF &stillPoint);
109 
114  void setZoom(KoZoomMode::Mode mode, qreal zoom);
115 
116 
120  void setAspectMode(bool status);
121 
122 public Q_SLOTS:
128  void setPageSize(const QSizeF &pageSize);
129 
134  QSizeF pageSize() const;
135 
144  void setDocumentSize(const QSizeF &documentSize, bool recalculateCenter = false);
145 
150  QSizeF documentSize() const;
151 
152 Q_SIGNALS:
157  void zoomChanged (KoZoomMode::Mode mode, qreal zoom);
158 
163  void aspectModeChanged (bool aspectModeActivated);
164 
169  void zoomedToSelection();
170 
175  void zoomedToAll();
176 
177 protected:
178  virtual QSizeF documentToViewport(const QSizeF &size);
179  QSize documentToViewportCeil(const QSizeF &size);
180 
181 private:
182  Q_PRIVATE_SLOT(d, void setAvailableSize())
183  Q_PRIVATE_SLOT(d, void requestZoomRelative(const qreal, const QPointF&))
184  Q_PRIVATE_SLOT(d, void setZoom(KoZoomMode::Mode, qreal))
185  Q_DISABLE_COPY( KoZoomController )
186 
187  class Private;
188  Private * const d;
189 };
190 
191 #endif
KoZoomAction.h
KoZoomHandler
This class handles the zooming and DPI stuff (conversions between postscript pt values and pixels).
Definition: KoZoomHandler.h:24
QSize
QPointF
QObject
KoZoomMode.h
KoZoomMode::Mode
Mode
Definition: KoZoomMode.h:21
KoZoomController
This controller class handles zoom levels for any canvas.
Definition: KoZoomController.h:47
QSizeF
Private
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jan 19 2021 23:44:00 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KritaWidgets

Skip menu "KritaWidgets"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

krita API Reference

Skip menu "krita API Reference"
  • libs
  •   KritaBasicFlakes
  •   brush
  •   KritaUndo2
  •   KritaFlake
  •   image
  •   KritaPlugin
  •   Krita
  •   KritaPigment
  •   KritaResources
  •   KritaStore
  •   ui
  •   KritaWidgets
  •   KritaWidgetUtils
  • plugins
  •   Assitants
  •   Extensions
  •   Filters
  •   Generators
  •   Formats
  •           src
  •   PaintOps
  •     libpaintop

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal