replace depreciated bitBlt() with calls to qpainter's drawPixmap()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14691 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Edwin Leuven 2006-08-15 14:55:34 +00:00
parent 22a3512110
commit e305fdea55
2 changed files with 5 additions and 2 deletions

View File

@ -16,6 +16,7 @@
#include "support/filetools.h"
#include <QPixmap>
#include <QPainter>
#include <boost/assert.hpp>
@ -86,7 +87,8 @@ void BulletsModule::setupPanel(QListWidget * lw, QString panelname, std::string
for (int col = 0; col < 6; ++col) {
QPixmap small(w,h);
small.fill();
bitBlt(&small, 0, 0, &pixmap, col * w, row * h, w, h);
QPainter painter(&small);
painter.drawPixmap(small.rect(), pixmap, QRect(col * w, row * h, w, h));
new QListWidgetItem(QIcon(small), "" , lw, (6*row + col));
}
}

View File

@ -41,7 +41,8 @@ QSetBorder::QSetBorder(QWidget * parent, char const * name, Qt::WFlags fl)
void QSetBorder::paintEvent(QPaintEvent * e)
{
QWidget::paintEvent(e);
bitBlt(this, 0, 0, &buffer, 0, 0, width(), height());
QPainter painter(this);
painter.drawPixmap(0, 0, buffer);
}