00001
00002
00003
00004
00005
00006
00007 #include "BackgroundStateContext.h"
00008 #include "BackgroundStateNone.h"
00009 #include "DocumentModelColorFilter.h"
00010 #include "DocumentModelGridRemoval.h"
00011 #include "GraphicsScene.h"
00012 #include "GraphicsView.h"
00013 #include "Logger.h"
00014 #include <QPixmap>
00015
00016 BackgroundStateNone::BackgroundStateNone(BackgroundStateContext &context,
00017 GraphicsScene &scene) :
00018 BackgroundStateAbstractBase(context,
00019 scene)
00020 {
00021 }
00022
00023 void BackgroundStateNone::begin()
00024 {
00025 LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::begin";
00026
00027 setImageVisible (true);
00028 }
00029
00030 void BackgroundStateNone::end()
00031 {
00032 LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::end";
00033
00034 setImageVisible (false);
00035 }
00036
00037 void BackgroundStateNone::fitInView (GraphicsView &view)
00038 {
00039 LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::fitInView";
00040
00041 view.fitInView (imageItem ().boundingRect());
00042 }
00043
00044 void BackgroundStateNone::setCurveSelected (const Transformation & ,
00045 const DocumentModelGridRemoval & ,
00046 const DocumentModelColorFilter & ,
00047 const QString & )
00048 {
00049 LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::setCurveSelected";
00050 }
00051
00052 void BackgroundStateNone::setPixmap (const Transformation & ,
00053 const DocumentModelGridRemoval & ,
00054 const DocumentModelColorFilter & ,
00055 const QPixmap &pixmapOriginal,
00056 const QString & )
00057 {
00058 LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::setPixmap";
00059
00060
00061 QPixmap pixmapNone (pixmapOriginal);
00062 pixmapNone.fill (Qt::white);
00063 setProcessedPixmap (pixmapNone);
00064
00065 }
00066
00067 QString BackgroundStateNone::state () const
00068 {
00069 return "BackgroundStateNone";
00070 }
00071
00072 void BackgroundStateNone::updateColorFilter (const Transformation & ,
00073 const DocumentModelGridRemoval & ,
00074 const DocumentModelColorFilter & ,
00075 const QString & )
00076 {
00077 LOG4CPP_INFO_S ((*mainCat)) << "BackgroundStateNone::updateColorFilter";
00078 }