PSQt/include/GUIImageViewer.h

Go to the documentation of this file.
00001 #ifndef GUIIMAGEVIEWER_H
00002 #define GUIIMAGEVIEWER_H
00003 
00004 #include "PSQt/Frame.h"
00005 //#include <QVBox>
00006 //#include <QWidget>
00007 //#include <QLabel>
00008 //#include <QSlider>
00009 //#include <QPushButton>
00010 
00011 #include <Qt>
00012 #include <QtGui>
00013 #include <QtCore>
00014 
00015 //#include "PSQt/WdgImage.h"
00016 #include "PSQt/WdgImageFigs.h"
00017 #include "PSQt/WdgFile.h"
00018 #include "PSQt/WdgPointPos.h"
00019 #include "PSQt/WdgPointPos3D.h"
00020 #include "PSQt/WdgColorTable.h"
00021 #include "PSQt/ImageProc.h"
00022 #include "PSQt/WdgRadHist.h"
00023 #include "PSQt/WdgSpecHist.h"
00024 
00025 namespace PSQt {
00026 
00027 //--------------------------
00028 
00029 /**
00030  *  @ingroup PSQt
00031  * 
00032  *  @brief Widget/GUI for image viewer.
00033  * 
00034  *  @code
00035  *  @endcode
00036  *
00037  *  This software was developed for the LCLS project.  If you use all or 
00038  *  part of it, please give an appropriate acknowledgment.
00039  *
00040  *  @see GUIMain
00041  *
00042  *  @version $Id: GUIImageViewer.h 11039 2015-12-01 01:18:58Z dubrovin@SLAC.STANFORD.EDU $
00043  *
00044  *  @author Mikhail Dubrovin
00045  */
00046 
00047 //--------------------------
00048 
00049 class GUIImageViewer : public Frame
00050 //class GUIImageViewer : public QWidget
00051 {
00052  Q_OBJECT // macro is needed for connection of signals and slots
00053 
00054  public:
00055     GUIImageViewer(QWidget *parent=0, const int& xcent=2000, const int& ycent=2000);
00056 
00057     void resizeEvent     (QResizeEvent *event = 0) ;
00058     void closeEvent      (QCloseEvent  *event = 0) ;
00059     void moveEvent       (QMoveEvent   *event = 0) ;
00060     void mousePressEvent (QMouseEvent  *event = 0) ;
00061     //inline WdgImageFigs* wdgImageFigs(){ return m_image; }
00062     inline WdgImage* wdgImage(){ return (WdgImage*)m_image; }
00063     inline WdgFile*  wdgFile() { return m_file; }
00064     inline ImageProc* getImageProc() { return m_imageproc; }
00065     void showChildWindows();
00066 
00067     QPushButton*   m_but_reset; // public, because it emits signal which needs to be connected with other slots
00068 
00069  public slots:
00070     void onButExit(); // is not used
00071     void onButSpec();
00072     void onButRHis();
00073     void onButAdd();
00074     void onButReset();
00075     void onButColorTab();
00076     void onImageIsUpdated(ndarray<GeoImage::raw_image_t,2>&);
00077     void onCheckBox(int);
00078 
00079  private:
00080     //QLabel*      m_lab_fname;
00081     //QLineEdit*   m_edi_fncfg;
00082     QPushButton*   m_but_spec;
00083     QPushButton*   m_but_rhis;
00084     QPushButton*   m_but_add;
00085     QPushButton*   m_but_cols;
00086     QCheckBox*     m_cbx_more;
00087     QHBoxLayout*   m_hbox;
00088     QHBoxLayout*   m_hbex;
00089     QVBoxLayout*   m_vbox;
00090 
00091     //WdgImage*      m_image;
00092     WdgImageFigs*    m_image;
00093     WdgFile*         m_file;
00094     WdgPointPos*     m_pointpos;
00095     WdgPointPos3D*   m_curspos;
00096     WdgColorTable*   m_colortab;
00097     ImageProc*       m_imageproc;
00098     WdgRadHist*      m_radhist;
00099     WdgSpecHist*     m_spechist;
00100 
00101     inline const char* _name_(){ return "GUIImageViewer"; }
00102     void setStyle();
00103     void setTips();
00104     void message(QWidget* wdg, const char* cmt);
00105 };
00106 
00107 } // namespace PSQt
00108 
00109 #endif // GUIIMAGEVIEWER_H

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7