summaryrefslogtreecommitdiffstats
path: root/kugar/lib/mpagedisplay.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kugar/lib/mpagedisplay.cpp
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kugar/lib/mpagedisplay.cpp')
-rw-r--r--kugar/lib/mpagedisplay.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/kugar/lib/mpagedisplay.cpp b/kugar/lib/mpagedisplay.cpp
new file mode 100644
index 00000000..c3a5d587
--- /dev/null
+++ b/kugar/lib/mpagedisplay.cpp
@@ -0,0 +1,63 @@
+/***************************************************************************
+ mpagedisplay.cpp - Kugar page display widget
+ -------------------
+ begin : Sun Aug 15 1999
+ copyright : (C) 1999 by Mutiny Bay Software
+***************************************************************************/
+
+#include "mpagedisplay.h"
+
+namespace Kugar
+{
+
+/** Constructor */
+MPageDisplay::MPageDisplay( QWidget *parent, const char *name ) : QWidget( parent, name )
+{
+ buffer.resize( 1, 1 );
+}
+
+/** Destructor */
+MPageDisplay::~MPageDisplay()
+{}
+
+/** Sets the report page image */
+void MPageDisplay::setPage( QPicture* image )
+{
+ buffer.fill( white );
+ QPainter p( &buffer );
+ image->play( &p );
+}
+
+/** Display object's paint event */
+void MPageDisplay::paintEvent( QPaintEvent* event )
+{
+ bitBlt( this, 0, 0, &buffer );
+}
+
+/** Sets the page display dimensions */
+void MPageDisplay::setPageDimensions( QSize size )
+{
+ buffer.resize( size );
+ resize( size );
+}
+
+
+// Return the preferred size of the display.
+
+QSize MPageDisplay::sizeHint() const
+{
+ return buffer.size();
+}
+
+
+// Return the size policy.
+
+QSizePolicy MPageDisplay::sizePolicy() const
+{
+ return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+}
+
+}
+
+#include "mpagedisplay.moc"