summaryrefslogtreecommitdiff
path: root/client/historywidget.cc
diff options
context:
space:
mode:
authordeva <deva>2006-03-09 11:03:35 +0000
committerdeva <deva>2006-03-09 11:03:35 +0000
commit0eb1af1add19c8ffb8f5ab11f74810366f1beed1 (patch)
tree06191ba6af6cbb474f670c5ecd729e48989791af /client/historywidget.cc
parent4f84ffc811d93371f395f11a0e0f42000eaa99fc (diff)
*** empty log message ***
Diffstat (limited to 'client/historywidget.cc')
-rw-r--r--client/historywidget.cc48
1 files changed, 11 insertions, 37 deletions
diff --git a/client/historywidget.cc b/client/historywidget.cc
index ba768eb..aff783a 100644
--- a/client/historywidget.cc
+++ b/client/historywidget.cc
@@ -28,43 +28,21 @@
#include "miav_config.h"
-#include <QPixmap>
#include <QResizeEvent>
-#define PIXMAP_DUMMY PIXMAPS"/dummy.png"
-HistoryWidget::HistoryWidget() : QLabel()
+HistoryWidget::HistoryWidget(QPixmap *pixmap)
{
- image = NULL;
- // set_image(new QImage(PIXMAP_DUMMY));
- setLineWidth(1);
- setFrameStyle(QFrame::Plain);
+ this->pixmap = pixmap;
+ setFrameStyle(QFrame::Panel | QFrame::Raised);
+ // setScaledContents(true);
+ setAlignment(Qt::AlignCenter);
}
HistoryWidget::~HistoryWidget()
{
- if(image) delete image;
+ delete pixmap;
}
-void HistoryWidget::set_image(QImage *i)
-{/*
- if(image) delete image;
-
- image = new QImage(*i);
-
- QImage resized = image->scaled(width(), height(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
- QPixmap pixmap;
- pixmap.fromImage(resized);
- setPixmap(pixmap);
- */
-}
-
-QImage * HistoryWidget::get_image()
-{
- return image;
-}
-
-//static HistoryWidget *fs = NULL;
-
void HistoryWidget::mouseReleaseEvent(QMouseEvent *event)
{
/*
@@ -85,13 +63,9 @@ void HistoryWidget::mouseReleaseEvent(QMouseEvent *event)
void HistoryWidget::resizeEvent(QResizeEvent *event)
{
- /*
- QImage resized = image->scaled(event->size().width(),
- event->size().height(),
- Qt::KeepAspectRatio,
- Qt::SmoothTransformation);
- QPixmap pixmap;
- pixmap.fromImage(resized);
- setPixmap(pixmap);
- */
+ QPixmap resized = pixmap->scaled(event->size().width(),
+ event->size().height(),
+ Qt::KeepAspectRatio,
+ Qt::SmoothTransformation);
+ setPixmap(resized);
}