[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kalziumkde4: kdeedu/kalzium/src
From: Jason Harris <kstars () 30doradus ! org>
Date: 2005-01-30 15:57:40
Message-ID: 20050130155740.B15561CFE6 () office ! kde ! org
[Download RAW message or body]
CVS commit by harris:
Added double-buffering with bitBlt()
CCMAIL: cniehaus@kde.org
M +13 -3 pse.cpp 1.18.4.19
M +7 -2 pse.h 1.14.4.5
--- kdeedu/kalzium/src/pse.cpp #1.18.4.18:1.18.4.19
@@ -29,9 +29,10 @@
#include <qlayout.h>
#include <qlabel.h>
+#include <qpixmap.h>
#include <qpainter.h>
PSE::PSE(KalziumDataObject *data, QWidget *parent, const char *name)
- : QWidget(parent, name)
+ : QWidget(parent, name), table(0)
{
d = data;
@@ -79,4 +80,5 @@ PSE::PSE(KalziumDataObject *data, QWidge
m_IUPACOLDlist.append( "0");
+ table = new QPixmap();
}
@@ -208,8 +210,14 @@ void PSE::setDate( int date )
}
+void PSE::resizeEvent( QResizeEvent *e )
+{
+ table->resize( width(), height() );
+}
+
void PSE::paintEvent( QPaintEvent *e )
{
QPainter p;
- p.begin( this );
+ p.begin( table );
+ p.fillRect( 0, 0, width(), height(), paletteBackgroundColor() );
if ( m_showSOM )
@@ -218,4 +226,6 @@ void PSE::paintEvent( QPaintEvent *e )
drawPSE( &p, m_isSimple );
p.end();
+
+ bitBlt( this, 0, 0, table );
}
--- kdeedu/kalzium/src/pse.h #1.14.4.4:1.14.4.5
@@ -22,4 +22,6 @@
class QLabel;
+class QPixmap;
+
#include <qvaluelist.h>
#include <qwidget.h>
@@ -150,4 +152,6 @@ class PSE : public QWidget
int m_num;
+ QPixmap *table;
+
public slots:
/**
@@ -161,4 +165,5 @@ class PSE : public QWidget
protected:
virtual void paintEvent( QPaintEvent *e );
+ virtual void resizeEvent( QResizeEvent *e );
public:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic