[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdegraphics
From: Wilfried Huss <Wilfried.Huss () gmx ! at>
Date: 2004-11-15 11:54:51
Message-ID: 20041115115451.0810216D36 () office ! kde ! org
[Download RAW message or body]
CVS commit by whuss:
Move setZoom from KDVIMultiPage to KMultiPage.
Plus again some include cleanups.
M +0 -13 kdvi/kdvi_multipage.cpp 1.149
M +0 -3 kdvi/kdvi_multipage.h 1.54
M +13 -4 kviewshell/kmultipage.cpp 1.26
M +2 -2 kviewshell/kmultipage.h 1.37
--- kdegraphics/kviewshell/kmultipage.cpp #1.25:1.26
@@ -1,19 +1,16 @@
#include <qobject.h>
-#include <qlayout.h>
#include <qscrollview.h>
-#include <kaction.h>
#include <kdebug.h>
#include <kfiledialog.h>
#include <kiconloader.h>
-#include <kinstance.h>
#include <kio/job.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <kstdaction.h>
#include "marklist.h"
#include "documentRenderer.h"
#include "documentWidget.h"
+#include "zoomlimits.h"
#include "kvsprefs.h"
@@ -622,2 +619,14 @@ void KMultiPage::repaintAllVisibleWidget
}
}
+
+
+double KMultiPage::setZoom(double zoom)
+{
+ if (zoom < ZoomLimits::MinZoom/1000.0)
+ zoom = ZoomLimits::MinZoom/1000.0;
+ if (zoom > ZoomLimits::MaxZoom/1000.0)
+ zoom = ZoomLimits::MaxZoom/1000.0;
+
+ renderer->setResolution(QPaintDevice::x11AppDpiX()*zoom);
+ return zoom;
+}
--- kdegraphics/kviewshell/kmultipage.h #1.36:1.37
@@ -73,6 +73,6 @@ public:
/// zoomlimits.h. In that case, the multipage implementation chooses a
/// different zomm factor. The implementation returns the factor which
- /// has actually been used.
- virtual double setZoom(double z) = 0;
+ /// has actually been used. A default implementation is provided.
+ virtual double setZoom(double z);
/// calculates the zoom needed to fit into a given width
--- kdegraphics/kdvi/kdvi_multipage.cpp #1.148:1.149
@@ -22,5 +22,4 @@
#include "performanceMeasurement.h"
#include "prefs.h"
-#include "zoomlimits.h"
#include "kprinterwrapper.h"
#include "dviWidget.h"
@@ -342,16 +341,4 @@ void KDVIMultiPage::gotoPage(int pageNr,
-double KDVIMultiPage::setZoom(double zoom)
-{
- if (zoom < ZoomLimits::MinZoom/1000.0)
- zoom = ZoomLimits::MinZoom/1000.0;
- if (zoom > ZoomLimits::MaxZoom/1000.0)
- zoom = ZoomLimits::MaxZoom/1000.0;
-
- window->setResolution(QPaintDevice::x11AppDpiX()*zoom);
- return zoom;
-}
-
-
double KDVIMultiPage::zoomForHeight(int height)
{
--- kdegraphics/kdvi/kdvi_multipage.h #1.53:1.54
@@ -52,7 +52,4 @@ public:
virtual bool openFile();
- /// sets a zoom factor
- virtual double setZoom(double z);
-
/// calculates the zoom needed to fit into a given width
virtual double zoomForWidth(int width);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic