CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/Fireworks/TableWidget/interface/FWTableManagerBase.h

Go to the documentation of this file.
00001 #ifndef Fireworks_TableWidget_FWTableManagerBase_h
00002 #define Fireworks_TableWidget_FWTableManagerBase_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     TableWidget
00006 // Class  :     FWTableManagerBase
00007 // 
00028 //
00029 // Original Author:  Chris Jones
00030 //         Created:  Mon Feb  2 16:40:52 EST 2009
00031 // $Id: FWTableManagerBase.h,v 1.8 2012/02/22 00:15:44 amraktad Exp $
00032 //
00033 
00034 // system include files
00035 #include <vector>
00036 #include <string>
00037 #include "TQObject.h"
00038 #include "GuiTypes.h"
00039 
00040 // user include files
00041 
00042 // forward declarations
00043 class FWTableCellRendererBase;
00044 
00045 class FWTableManagerBase : public TQObject 
00046 {
00047 
00048    public:
00049       FWTableManagerBase();
00050       virtual ~FWTableManagerBase();
00051 
00052       // ---------- const member functions ---------------------
00054       virtual  int numberOfRows() const = 0;
00056       virtual  int numberOfColumns() const = 0;
00057       
00059       virtual std::vector<std::string> getTitles() const = 0;
00060       
00062       virtual int unsortedRowNumber(int iSortedRowNumber) const = 0;
00063       
00069       virtual FWTableCellRendererBase* cellRenderer(int iSortedRowNumber, int iCol) const =0;
00070       
00072       virtual unsigned int cellHeight() const;
00073       
00075       virtual std::vector<unsigned int> maxWidthForColumns() const;
00076 
00077        virtual bool hasLabelHeaders() const ;
00078     
00080       virtual bool hasRowHeaders() const ;
00082       virtual FWTableCellRendererBase* rowHeader(int iSortedRowNumber) const ;
00083   
00084       virtual bool cellDataIsSortable() const { return true ; } 
00085   
00086 
00088       virtual void buttonPressedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY);
00089       virtual void buttonReleasedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY);
00090 
00091       // ---------- static member functions --------------------
00092 
00093       // ---------- member functions ---------------------------
00095       void sort(int iCol, bool iSortOrder);
00096 
00098       void dataChanged(); //*SIGNAL*
00099       
00101       void visualPropertiesChanged(); //*SIGNAL*
00102       
00103       ClassDef(FWTableManagerBase,0);
00104 
00106       bool sortOrder(void) { return m_sortOrder; }
00107       
00109       int sortColumn(void) { return m_sortColumn; }
00110 
00111    protected:
00113       virtual void implSort(int iCol, bool iSortOrder) = 0;
00114       
00115    private:
00116       //FWTableManagerBase(const FWTableManagerBase&); // stop default
00117 
00118       //const FWTableManagerBase& operator=(const FWTableManagerBase&); // stop default
00119 
00120       // ---------- member data --------------------------------
00121       int  m_sortColumn;
00122       bool m_sortOrder;
00123 };
00124 
00125 
00126 #endif