From 4d2903789bc9a497cb1210de6d7653f8215143a5 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 21 Apr 2006 13:50:55 +0000 Subject: *** empty log message *** --- acinclude.m4 | 2 +- client/mainwindow.cc | 39 +++++++++++++++++++++++++++++++-------- client/mainwindow.h | 1 + pixmaps/Makefile.am | 2 ++ 4 files changed, 35 insertions(+), 9 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 17469fc..cc682b4 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -151,7 +151,7 @@ case "${host}" in *linux*) QT_LIBS="$QT_LIB" if test $QT_IS_STATIC = yes && test $QT_IS_EMBEDDED = no; then - QT_LIBS="$QT_LIBS -L$x_libraries -lQtCore -lQtNetwork -lQtGui -lXext -lX11 -lm -lSM -lICE -ldl -ljpeg" + QT_LIBS="$QT_LIBS -L$x_libraries -lQtCore -lQtNetwork -lQtGui -lQtSvg -lXext -lX11 -lm -lSM -lICE -ldl -ljpeg" fi ;; diff --git a/client/mainwindow.cc b/client/mainwindow.cc index fa73a9e..d2c9248 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -39,21 +39,44 @@ #include "control.h" -QPushButton *MainWindow::createButton(char* icon) +#include +#include + +#define SVG false + +QPixmap MainWindow::loadIcon(char* fname) { - QPixmap pixmap(icon); + QSvgRenderer svgrenderer; + QPainter painter; int w = (int)((double)x11Info().appDpiX() / 1.5); int h = (int)((double)x11Info().appDpiY() / 1.5); - Qt::AspectRatioMode aspect = pixmap.width()setIconSize(QSize(50,50)); - btn->setIcon(pixmap); + btn->setIconSize(QSize(w,h)); + btn->setIcon(loadIcon(icon)); return btn; } @@ -152,7 +175,7 @@ void MainWindow::snapshot_clicked() { MIaV::control.shoot(); - QImage screenshot((uchar*)rgb, 720, 576, QImage::Format_RGB32); + QImage screenshot(720, 576, QImage::Format_RGB32); decoder->snapshot((char*)screenshot.bits()); QPixmap *p = new QPixmap(); diff --git a/client/mainwindow.h b/client/mainwindow.h index 9425d40..723b747 100644 --- a/client/mainwindow.h +++ b/client/mainwindow.h @@ -79,6 +79,7 @@ private: VideoWidget *video; QPushButton *createButton(char* icon); + QPixmap loadIcon(char* fname); }; #endif/*__MIAV_MAINWINDOW_H__*/ diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am index eaadad6..c78868e 100644 --- a/pixmaps/Makefile.am +++ b/pixmaps/Makefile.am @@ -7,6 +7,7 @@ EXTRA_DIST = \ freeze.png \ miav-logo.png \ record.png \ + record.svg \ snapshot.png \ stop.png \ unfreeze.png \ @@ -29,6 +30,7 @@ pixmap_DATA = \ freeze.png \ miav-logo.png \ record.png \ + record.svg \ snapshot.png \ stop.png \ unfreeze.png \ -- cgit v1.2.3