/[projects]/infoscreen/pictureview.cpp
ViewVC logotype

Diff of /infoscreen/pictureview.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 638 by torben, Wed Jan 6 22:18:52 2010 UTC revision 639 by torben, Wed Apr 7 17:13:14 2010 UTC
# Line 1  Line 1 
1  #include "pictureview.h"  #include "pictureview.h"
2    
3  #include <QPainter>  #include <QPainter>
4    #include <QDebug>
5    
6  #include "httpwrapper.h"  #include "httpwrapper.h"
7    
# Line 25  void PictureView::loadFromUrl(QString so Line 25  void PictureView::loadFromUrl(QString so
25          image = it.value();          image = it.value();
26          this->repaint();          this->repaint();
27      } else {      } else {
28          QByteArray data = HttpWrapper::getSyncData(source);          qDebug() << "Loading file " << source;
29    
30          QPixmap pixmap;          QPixmap pixmap;
31          pixmap.loadFromData( data );          if (source.at(0) == '/') { //local file
32                pixmap = QPixmap(source);
33            } else {
34                QByteArray data = HttpWrapper::getSyncData(source);
35                pixmap.loadFromData( data );
36            }
37    
38          QPixmap scaledImage = pixmap.scaledToHeight(size().height(), Qt::SmoothTransformation );          QPixmap scaledImage = pixmap.scaledToHeight(size().height(), Qt::SmoothTransformation );
39    

Legend:
Removed from v.638  
changed lines
  Added in v.639

  ViewVC Help
Powered by ViewVC 1.1.20