PSQt/include/DragCenter.h

Go to the documentation of this file.
00001 #ifndef PSQT_DRAGCENTER_H
00002 #define PSQT_DRAGCENTER_H
00003 
00004 //--------------------------
00005 #include "PSQt/DragBase.h"
00006 
00007 //#include <map>
00008 #include <iostream>    // std::cout
00009 #include <fstream>     // std::ifstream(fname)
00010 #include <sstream>     // stringstream
00011 
00012 namespace PSQt {
00013 
00014 //--------------------------
00015 
00016 // @addtogroup PSQt DragCenter
00017 
00018 /**
00019  *  @ingroup PSQt DragCenter
00020  *
00021  *  @brief Derived class from DragBase for draggable circle.
00022  *
00023  *  This software was developed for the LCLS project.  If you use all or 
00024  *  part of it, please give an appropriate acknowledgment.
00025  *
00026  *  @see DragBase, DragStore, WdgImageFigs, WdgImage
00027  *
00028  *  @version $Id: DragCenter.h 9841 2015-03-26 18:35:44Z dubrovin@SLAC.STANFORD.EDU $
00029  *
00030  *  @author Mikhail Dubrovin
00031  *
00032  *
00033  *
00034  *
00035  *
00036  *  @anchor interface
00037  *  @par<interface> Interface Description
00038  * 
00039  *  @li  Include
00040  *  @code
00041  *  #include "PSQt/DragCenter.h"
00042  *  @endcode
00043  *
00044  *  @li Instatiation
00045  *  \n
00046  *  DragCenter inherits DragBase
00047  */
00048 
00049 //--------------------------
00050 
00051 class DragCenter : public DragBase
00052 {
00053  Q_OBJECT // macro is needed for connection of signals and slots
00054 
00055  public:
00056 
00057   /**
00058    *  @brief DragCenter class for draggable center-mark
00059    *  
00060    *  @param[in] wimg - pointer to WdgImage
00061    *  @param[in] points - array of points which defines initial figure parameters
00062    */ 
00063     DragCenter(WdgImage* wimg=0, const QPointF* points=0); 
00064     virtual ~DragCenter(){}; 
00065 
00066     virtual void draw(const DRAGMODE& mode=DRAW);
00067     virtual bool contains(const QPointF& p);
00068     virtual void move(const QPointF& p);
00069     virtual void moveIsCompleted(const QPointF& p);
00070     virtual void create();
00071 
00072     virtual void print();
00073 
00074     virtual const QPointF& getCenter(){ return m_points_raw[0]; };
00075     //virtual void setCenter(const QPointF& p) { moveToRaw(p); };
00076 
00077     void forceToEmitSignal();
00078 
00079  signals:
00080     void centerIsMoved(const QPointF&);
00081     void centerIsChanged(const QPointF&);
00082 
00083  public slots:
00084     void moveToRaw(const QPointF&);
00085     void testSignalCenterIsChanged(const QPointF&);
00086     void testSignalCenterIsMoved(const QPointF&);
00087 
00088  protected:
00089 
00090  private:
00091    virtual  const char* _name_(){return "DragCenter";}
00092 
00093 };
00094 
00095 //--------------------------
00096 
00097 } // namespace PSQt
00098 
00099 #endif // PSQT_DRAGCENTER_H
00100 //--------------------------
00101 //--------------------------
00102 //--------------------------
00103 

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7