CMS 3D CMS Logo

FWTableViewTableManager.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef Fireworks_Core_FWTableViewTableManager_h
3 #define Fireworks_Core_FWTableViewTableManager_h
4 //
5 // Package: Core
6 // Class : FWTableViewTableManager
7 //
11 //
12 // Original Author:
13 // Created: Mon Feb 2 16:40:52 EST 2009
14 //
15 
16 // system include files
17 #include <vector>
18 #include <string>
19 #include "TQObject.h"
20 #include "GuiTypes.h"
21 
22 // user include files
27 
28 // forward declarations
29 class FWTableView;
31 
33  friend class FWTableView;
34 
35 public:
37  ~FWTableViewTableManager() override;
38 
39  // ---------- const member functions ---------------------
41  int numberOfRows() const override;
43  int numberOfColumns() const override;
44 
46  std::vector<std::string> getTitles() const override;
47 
50  int unsortedRowNumber(int iSortedRowNumber) const override;
51 
59  FWTableCellRendererBase *cellRenderer(int iSortedRowNumber, int iCol) const override;
60 
62  // virtual unsigned int cellHeight() const;
63 
65  // virtual std::vector<unsigned int> maxWidthForColumns() const;
66 
68  bool hasRowHeaders() const override;
70  FWTableCellRendererBase *rowHeader(int iSortedRowNumber) const override;
71 
73  //virtual void buttonPressedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY);
74  //virtual void buttonReleasedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY);
75 
76  // ---------- static member functions --------------------
77 
78  // ---------- member functions ---------------------------
81  // void sort(int iCol, bool iSortOrder);
82 
85  void dataChanged(); //*SIGNAL*
86 
89  // void visualPropertiesChanged(); //*SIGNAL*
90 
91  // ClassDef(FWTableViewTableManager,0);
92  void updateEvaluators();
93 
94 protected:
97  void implSort(int iCol, bool iSortOrder) override;
98  std::vector<int> m_sortedToUnsortedIndices;
99 
104 
108 
109  std::vector<FWExpressionEvaluator> m_evaluators;
110  std::vector<FWTableViewManager::TableEntry> *m_tableFormats;
111 
112  // ---------- member data --------------------------------
113  // int m_sortColumn;
114  // bool m_sortOrder;
116 
117 public:
118  FWTableViewTableManager(const FWTableViewTableManager &) = delete; // stop default
119  const FWTableViewTableManager &operator=(const FWTableViewTableManager &) = delete; // stop default
120 };
121 
122 #endif
FWTableViewTableManager(const FWTableView *)
FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const override
void dataChanged()
Called if mouse button pressed in Row Header, defaults is to do nothing.
bool hasRowHeaders() const override
require all cells to be the same height
FWFramedTextTableCellRenderer * m_rowRenderer
std::vector< int > m_sortedToUnsortedIndices
std::vector< FWTableViewManager::TableEntry > * m_tableFormats
int unsortedRowNumber(int iSortedRowNumber) const override
FWTableCellRendererBase * rowHeader(int iSortedRowNumber) const override
Returns the renderer for the row header for the sorted row number iSortedRowNumber.
std::vector< FWExpressionEvaluator > m_evaluators
void implSort(int iCol, bool iSortOrder) override
int numberOfRows() const override
Number of rows in the table.
FWTextTableCellRenderer * m_renderer
std::vector< std::string > getTitles() const override
returns the title names for each column
const FWTableViewTableManager & operator=(const FWTableViewTableManager &)=delete
int numberOfColumns() const override
Number of columns in the table.