QGUIBasketSelector.hh

00001 /*
00002  * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore
00003  * 
00004  * A.Giachero created 12/08/07 - <Andrea.Giachero@ge.infn.it> 
00005  * 
00006  $ $Id: $
00007  * $Revision: $
00008  *
00009  * Class QGUIBasketSelector: 
00010  *
00011  */
00012 
00013 #ifndef _QGUI_BASKET_SELECTOR_HH_
00014 #define _QGUI_BASKET_SELECTOR_HH_
00015 
00016 
00017 
00018 // Apollo Includes
00019 #include "QGUIBaseFrame.hh"
00020 #include "QGUIFont.hh"
00021 
00022 
00023 // Root Includes
00024 #include "Rtypes.h"
00025 
00026 // C/C++ Includes
00027 #include <vector>
00028 
00029 
00030 // Used Class
00031 class TGListBox;
00032 class TGTextEntry;
00033 class TGButton;
00034 
00035 
00036 class QGUIBasketSelector: public QGUIBaseFrame
00037 {
00038 
00039 public:
00040   
00041   // ctor
00042   QGUIBasketSelector(const TGWindow *p,size_t& Setting, size_t Width, size_t Height);
00043 
00044   // ctor with fixed dimensions
00045   QGUIBasketSelector(const TGWindow *p,size_t& Setting);
00046 
00047   // dtor
00048   virtual ~QGUIBasketSelector();
00049 
00050   //******************************** SIGNAL ****************************************
00051 
00052   // Close Window
00053   void Close(bool qStatus);
00054 
00055   // Update Fields
00056   void Update();
00057 
00058   //********************************************************************************
00059 
00060 protected:
00061 
00062 
00063 private:
00064 
00065 
00066   // Create Window
00067   void PopUp();
00068     
00069   // Set to zero all Pointers
00070   void Zeros();
00071 
00072   // Init
00073   bool Init();
00074 
00075   size_t fTmpBasket; // Setting Basket Selected
00076   size_t &fBasket;   // Address to store return values
00077 
00078   // Vector Filled with Setting Basket Ids
00079   std::vector<int> fBasketIds;
00080 
00081   
00082   // Frames Pointers
00083   TGHorizontalFrame* fHListFrame;   // Top Frame
00084   TGHorizontalFrame* fHBtnFrame;    // Bottom Frame
00085   TGHorizontalFrame* fHLeft;        // Left Frame
00086   TGHorizontalFrame* fHRight;       // Right Frame
00087 
00088   // Selected Setting Basket Text Entry
00089   TGTextEntry* fSelText;
00090   
00091   // List Box
00092   TGListBox*   fBasketList;         // List of Setting Basket
00093   
00094 
00095   TGTextButton *fOKBtn, *fCancelBtn;  // Buttons
00096 
00097 
00098   //****************************** NOT GRAPHICAL FUNCTIONS **************************************
00099 
00100   // Build Window Names
00101   void BuildNames();
00102 
00103   //*********************************************************************************************
00104 
00105 
00106   //******************************** GRAPHICAL FUNCTIONS ****************************************
00107   
00108   // Create all GUI Frames
00109   void CreateFrames();
00110 
00111   // Fill Basket List Box
00112   void FillBasketList(TGListBox* qList);
00113 
00114   // Add buttons
00115   void AddButtonsToFrame(TGCompositeFrame* qFrame);
00116 
00117   //*********************************************************************************************
00118   
00119 
00120   // To integrate QGUIWindowText class into the ROOT system
00121   ClassDef(QGUIBasketSelector,0)
00122 
00123 };
00124 
00125 #endif // _QGUI_BASKET_SELECTOR_HH_

Generated on Fri Mar 6 13:40:39 2009 for CUORE Software by  doxygen 1.5.1