summaryrefslogtreecommitdiff
path: root/client/historywidget.cc
diff options
context:
space:
mode:
authordeva <deva>2006-03-07 19:12:18 +0000
committerdeva <deva>2006-03-07 19:12:18 +0000
commit4f84ffc811d93371f395f11a0e0f42000eaa99fc (patch)
treeb562b6c55f2a825dbbc12646df9741b51e1dff79 /client/historywidget.cc
parent1390ddfe6afe41dba141f8170f9b277573ebe8cd (diff)
*** empty log message ***
Diffstat (limited to 'client/historywidget.cc')
-rw-r--r--client/historywidget.cc34
1 files changed, 25 insertions, 9 deletions
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 <config.h>
-#ifdef USE_GUI
#include "historywidget.h"
#include "miav_config.h"
#include <QPixmap>
+#include <QResizeEvent>
-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);
+ */
+}