summaryrefslogtreecommitdiffstats
path: root/kviewshell/zoom.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /kviewshell/zoom.h
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kviewshell/zoom.h')
-rw-r--r--kviewshell/zoom.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/kviewshell/zoom.h b/kviewshell/zoom.h
new file mode 100644
index 00000000..985e18a9
--- /dev/null
+++ b/kviewshell/zoom.h
@@ -0,0 +1,55 @@
+// -*- C++ -*-
+// zoom.h
+//
+// Part of KVIEWSHELL - A framework for multipage text/gfx viewers
+//
+// (C) 2002 Stefan Kebekus
+// Distributed under the GPL
+
+// Add header files alphabetically
+
+#ifndef ZOOM_H
+#define ZOOM_H
+
+#include <qobject.h>
+#include <qstringlist.h>
+
+
+class Zoom : public QObject
+{
+Q_OBJECT
+
+public:
+ /** Initializs the zoom with a default of 100% */
+ Zoom();
+
+ /** Returns a list like "33%", "100%", etc. If you call
+ zoomNames() more than once, it is guaranteed that the same
+ list of strings will be returned. */
+ QStringList zoomNames() const { return valueNames; }
+
+ float zoomIn();
+ float zoomOut();
+ float value() const { return _zoomValue; }
+
+public slots:
+ void setZoomValue(float);
+ void setZoomValue(const QString &);
+
+ void setZoomFitWidth(float zoom);
+ void setZoomFitHeight(float zoom);
+ void setZoomFitPage(float zoom);
+
+signals:
+ void zoomNamesChanged(const QStringList &);
+ void zoomNameChanged(const QString &);
+ void valNoChanged(int);
+
+private:
+ float _zoomValue;
+ QStringList valueNames;
+ // This will be the number of the current value in the generated QStringList.
+ int valNo;
+};
+
+#endif