00001 /****************************************************************************************************** 00002 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released * 00003 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file * 00004 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. * 00005 ******************************************************************************************************/ 00006 00007 #ifndef TRANSFORMATION_STATE_CONTEXT_H 00008 #define TRANSFORMATION_STATE_CONTEXT_H 00009 00010 #include <QVector> 00011 #include "TransformationStateAbstractBase.h" 00012 00013 class CmdMediator; 00014 class DocumentModelAxesChecker; 00015 class QGraphicsScene; 00016 class Transformation; 00017 00021 class TransformationStateContext 00022 { 00023 public: 00025 TransformationStateContext(QGraphicsScene &scene, 00026 bool isGnuplot); 00027 virtual ~TransformationStateContext(); 00028 00030 bool isGnuplot () const; 00031 00033 void resetOnLoad(); 00034 00036 void triggerStateTransition (TransformationState transformationState, 00037 CmdMediator &cmdMediator, 00038 const Transformation &transformation, 00039 const QString &selectedGraphCurve); 00040 00042 void updateAxesChecker (CmdMediator &cmdMediator, 00043 const Transformation &transformation); 00044 00045 private: 00046 TransformationStateContext(); 00047 00048 QVector<TransformationStateAbstractBase*> m_states; 00049 TransformationState m_currentState; 00050 bool m_isGnuplot; 00051 }; 00052 00053 #endif // TRANSFORMATION_STATE_CONTEXT_H