ImageBig.cpp
Go to the documentation of this file.
00001 #include <QGraphicsScene>
00002 #include <QPainter>
00003 #include <QStyleOption>
00004 
00005 #include "ImageBig.h"
00006 
00007 //This image is made to be a 640*480 image
00008 
00009 ImageBig::ImageBig()
00010 {
00011 
00012 
00013 }
00014 
00015 
00016 QRectF ImageBig::boundingRect() const
00017 {
00018     qreal adjust = 2;
00019     return QRectF(0, 0,
00020                   640 + adjust, 480 + adjust);
00021 }
00022 
00023 void ImageBig::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
00024 {
00025 
00026     painter->drawImage(0,0,image);
00027 }
00028 
00029 void ImageBig::setImage(QImage& image)
00030 //set the QImage
00031 {
00032    this->image = image;
00033 
00034 }
00035 
00036 void ImageBig::saveImage()
00037 {
00038 
00039     QString multifn;
00040     multifn ="../pictest.jpg";
00041 
00042     this->image.save(multifn,"JPG");
00043 
00044 }
00045 
00046 


corobot_teleop
Author(s): Morgan Cormier/Gang Li/mcormier@coroware.com
autogenerated on Tue Jan 7 2014 11:39:41