summaryrefslogtreecommitdiffabout
path: root/korganizer/kowhatsnextview.cpp
authorzautrix <zautrix>2005-03-28 19:26:15 (UTC)
committer zautrix <zautrix>2005-03-28 19:26:15 (UTC)
commitea070abfcff313cac87dbb4d5c9410784740de21 (patch) (side-by-side diff)
tree3e95608a0444030016eb6845b95a582e265c1dad /korganizer/kowhatsnextview.cpp
parent57f95bb15f732ede3ddc68b077b6a5476246e971 (diff)
downloadkdepimpi-ea070abfcff313cac87dbb4d5c9410784740de21.zip
kdepimpi-ea070abfcff313cac87dbb4d5c9410784740de21.tar.gz
kdepimpi-ea070abfcff313cac87dbb4d5c9410784740de21.tar.bz2
print fixes
Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 66ff75d..53fe7d0 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -38,12 +38,13 @@
#ifndef KORG_NOPRINTER
#include "calprinter.h"
#endif
#include "koglobals.h"
#include "koprefs.h"
#include "koeventviewerdialog.h"
+#include "koeventviewer.h"
#include <qstylesheet.h>
#include "kowhatsnextview.h"
using namespace KOrg;
void WhatsNextTextBrowser::setSource(const QString& n)
{
@@ -58,12 +59,17 @@ void WhatsNextTextBrowser::setSource(const QString& n)
QTextBrowser::setSource(n);
}
}
void WhatsNextTextBrowser::printMe()
{
#ifdef DESKTOP_VERSION
+ KOPrintPrefs pp ( this );
+ if (!pp.exec() )
+ return;
+ int scaleval = pp.printMode() ;
+
QPrinter printer;
if (!printer.setup() )
return;
QPainter p;
p.begin ( &printer );
QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
@@ -75,13 +81,17 @@ void WhatsNextTextBrowser::printMe()
// scale to fit the width or height of the paper
if ( dx < dy )
scale = dx;
else
scale = dy;
p.translate( m.width()/10,0 );
- p.scale( scale, scale );
+ qDebug("Scale: %f ", scale );
+ if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
+ qDebug("SCALE ");
+ p.scale( scale, scale );
+ }
drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
p.end();
#endif
}
KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,