Initial commit
This commit is contained in:
commit
cc0faeee08
61 changed files with 1410 additions and 0 deletions
31
PixWidget.cpp
Normal file
31
PixWidget.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include "PixWidget.h"
|
||||
|
||||
|
||||
PixWidget::PixWidget (QWidget *parent) : QWidget (parent)
|
||||
{
|
||||
m_pixmap = QPixmap(0,0);
|
||||
}
|
||||
|
||||
|
||||
PixWidget::~PixWidget ()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Since almost every Widget I have here
|
||||
* is done by drawing self.pixmap onto self
|
||||
* we define this a generic PaintEvent handler
|
||||
*/
|
||||
void
|
||||
PixWidget::paintEvent (QPaintEvent *event)
|
||||
{
|
||||
if (m_pixmap.isNull () || !m_pixmap) {
|
||||
return;
|
||||
}
|
||||
|
||||
QPainter (paint);
|
||||
paint.begin (this);
|
||||
paint.drawPixmap (rect (), m_pixmap, m_pixmap.rect ());
|
||||
paint.end ();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue