Go to the documentation of this file.00001 #ifndef Fireworks_TableWidget_FWTableManagerBase_h
00002 #define Fireworks_TableWidget_FWTableManagerBase_h
00003
00004
00005
00006
00007
00028
00029
00030
00031
00032
00033
00034
00035 #include <vector>
00036 #include <string>
00037 #include "TQObject.h"
00038 #include "GuiTypes.h"
00039
00040
00041
00042
00043 class FWTableCellRendererBase;
00044
00045 class FWTableManagerBase : public TQObject
00046 {
00047
00048 public:
00049 FWTableManagerBase();
00050 virtual ~FWTableManagerBase();
00051
00052
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
00092
00093
00095 void sort(int iCol, bool iSortOrder);
00096
00098 void dataChanged();
00099
00101 void visualPropertiesChanged();
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
00117
00118
00119
00120
00121 int m_sortColumn;
00122 bool m_sortOrder;
00123 };
00124
00125
00126 #endif