From 4f84ffc811d93371f395f11a0e0f42000eaa99fc Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 7 Mar 2006 19:12:18 +0000 Subject: *** empty log message *** --- client/historywidget.cc | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'client/historywidget.cc') diff --git a/client/historywidget.cc b/client/historywidget.cc index 55fb178..ba768eb 100644 --- a/client/historywidget.cc +++ b/client/historywidget.cc @@ -24,18 +24,20 @@ * along with MIaV; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#ifdef USE_GUI #include "historywidget.h" #include "miav_config.h" #include +#include -HistoryWidget::HistoryWidget(QWidget *p) : QLabel(p) +#define PIXMAP_DUMMY PIXMAPS"/dummy.png" +HistoryWidget::HistoryWidget() : QLabel() { - parent = p; image = NULL; + // set_image(new QImage(PIXMAP_DUMMY)); + setLineWidth(1); + setFrameStyle(QFrame::Plain); } HistoryWidget::~HistoryWidget() @@ -44,7 +46,7 @@ HistoryWidget::~HistoryWidget() } void HistoryWidget::set_image(QImage *i) -{ +{/* if(image) delete image; image = new QImage(*i); @@ -53,6 +55,7 @@ void HistoryWidget::set_image(QImage *i) QPixmap pixmap; pixmap.fromImage(resized); setPixmap(pixmap); + */ } QImage * HistoryWidget::get_image() @@ -60,10 +63,11 @@ QImage * HistoryWidget::get_image() return image; } -static HistoryWidget *fs = NULL; +//static HistoryWidget *fs = NULL; void HistoryWidget::mouseReleaseEvent(QMouseEvent *event) { + /* if(!parent) { // We are a fullscreen window destroy(); } else { // We are a nested window @@ -72,10 +76,22 @@ void HistoryWidget::mouseReleaseEvent(QMouseEvent *event) fs = new HistoryWidget(NULL); fs->showFullScreen(); - fs->setFixedWidth(config->readInt("pixel_width")); - fs->setFixedHeight(config->readInt("pixel_height")); + fs->setFixedWidth(MIaV::config->readInt("pixel_width")); + fs->setFixedHeight(MIaV::config->readInt("pixel_height")); fs->set_image(image); } + */ } -#endif/*USE_GUI*/ +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); + */ +} -- cgit v1.2.3