00001 #ifndef WDGPOINTPOSITION_H
00002 #define WDGPOINTPOSITION_H
00003
00004 #include <Qt>
00005 #include <QtGui>
00006 #include <QtCore>
00007
00008 #include "PSQt/Frame.h"
00009
00010 namespace PSQt {
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 class WdgPointPos : public Frame
00028 {
00029 Q_OBJECT
00030
00031 public:
00032 WdgPointPos( QWidget *parent = 0
00033 , const std::string& label1=std::string("X:")
00034 , const std::string& label2=std::string("Y:")
00035 , const float& val1=0
00036 , const float& val2=0
00037 , const bool& show_boarder=true
00038 , const unsigned& fld_width=100
00039 , const unsigned& precision=2);
00040
00041 ~WdgPointPos(){}
00042
00043 void resizeEvent(QResizeEvent *event = 0) ;
00044 void closeEvent (QCloseEvent *event = 0) ;
00045
00046 public slots:
00047 void onEdi() ;
00048 void testPosIsChanged(const QPointF& pos);
00049 void setPointPos(const QPointF& pos);
00050
00051 signals :
00052 void posIsChanged(const QPointF&);
00053
00054 private :
00055 bool m_show_boarder;
00056 unsigned m_fld_width;
00057 unsigned m_precision;
00058
00059 QLabel* m_lab1;
00060 QLabel* m_lab2;
00061 QLineEdit* m_edi1;
00062 QLineEdit* m_edi2;
00063
00064 inline const char* _name_(){return "WdgPointPos";}
00065 void showTips() ;
00066 };
00067
00068 }
00069
00070 #endif // WDGPOINTPOSITION_H