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
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
00089
00090
00092 void sort(int iCol, bool iSortOrder);
00093
00095 void dataChanged();
00096
00098 void visualPropertiesChanged();
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
00114
00115
00116
00117
00118 int m_sortColumn;
00119 bool m_sortOrder;
00120 };
00121
00122
00123 #endif