PSQt/include/WdgPointPos3D.h

Go to the documentation of this file.
00001 #ifndef WDGPOINTPOSITION3D_H
00002 #define WDGPOINTPOSITION3D_H
00003 
00004 #include <Qt>
00005 #include <QtGui>
00006 #include <QtCore>
00007 
00008 #include "PSQt/Frame.h"
00009 
00010 namespace PSQt {
00011 
00012 /**
00013  *  @ingroup PSQt
00014  * 
00015  *  @brief Widget to display 3 values for 3-d point (x,y,z/intensity). 
00016  * 
00017  *  This software was developed for the LCLS project.  If you use all or 
00018  *  part of it, please give an appropriate acknowledgment.
00019  *
00020  *  @see GUIImageViewer
00021  *
00022  *  @version $Id: WdgPointPos3D.h 11033 2015-11-26 01:38:24Z dubrovin@SLAC.STANFORD.EDU $
00023  *
00024  *  @author Mikhail Dubrovin
00025  */
00026 
00027 class WdgPointPos3D : public Frame // QWidget
00028 {
00029  Q_OBJECT // macro is needed for connection of signals and slots
00030 
00031 public:
00032     WdgPointPos3D( QWidget *parent = 0
00033             , const std::string& label1=std::string("X:")
00034             , const std::string& label2=std::string("Y:") 
00035             , const std::string& label3=std::string("Z:") 
00036             , const float& val1=0
00037             , const float& val2=0
00038             , const float& val3=0
00039             , const bool& show_boarder=true
00040             , const unsigned& fld_width=80
00041             , const unsigned& prec1=0
00042             , const unsigned& prec2=0
00043             , const unsigned& prec3=0);
00044 
00045     ~WdgPointPos3D(){}
00046 
00047     void resizeEvent(QResizeEvent *event = 0);
00048     void closeEvent (QCloseEvent  *event = 0);
00049 
00050  signals :
00051     void posIsChanged(const float&, const float&, const float&);
00052 
00053  public slots:
00054     void onEdi() ;
00055     void testPosIsChanged(const float& val1, const float& val2, const float& val3);
00056     void setPointPos(const float& val1, const float& val2, const float& val3);
00057 
00058  private :
00059     bool         m_show_boarder;
00060     unsigned     m_fld_width;
00061     unsigned     m_prec1;
00062     unsigned     m_prec2;
00063     unsigned     m_prec3;
00064 
00065     QLabel*      m_lab1;
00066     QLabel*      m_lab2;
00067     QLabel*      m_lab3;
00068     QLineEdit*   m_edi1;
00069     QLineEdit*   m_edi2;
00070     QLineEdit*   m_edi3;
00071 
00072     inline const char* _name_(){return "WdgPointPos3D";}
00073     void showTips() ;
00074 };
00075 
00076 } // namespace PSQt
00077 
00078 #endif // WDGPOINTPOSITION3D_H

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7