CMS 3D CMS Logo

CMSSW_4_4_3_patch1/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.7 2011/03/09 14:20:45 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 
00085       virtual void buttonPressedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY);
00086       virtual void buttonReleasedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY);
00087 
00088       // ---------- static member functions --------------------
00089 
00090       // ---------- member functions ---------------------------
00092       void sort(int iCol, bool iSortOrder);
00093 
00095       void dataChanged(); //*SIGNAL*
00096       
00098       void visualPropertiesChanged(); //*SIGNAL*
00099       
00100       ClassDef(FWTableManagerBase,0);
00101 
00103       bool sortOrder(void) { return m_sortOrder; }
00104       
00106       int sortColumn(void) { return m_sortColumn; }
00107 
00108    protected:
00110       virtual void implSort(int iCol, bool iSortOrder) = 0;
00111       
00112    private:
00113       //FWTableManagerBase(const FWTableManagerBase&); // stop default
00114 
00115       //const FWTableManagerBase& operator=(const FWTableManagerBase&); // stop default
00116 
00117       // ---------- member data --------------------------------
00118       int  m_sortColumn;
00119       bool m_sortOrder;
00120 };
00121 
00122 
00123 #endif