CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWTableManagerBase.h
Go to the documentation of this file.
1 #ifndef Fireworks_TableWidget_FWTableManagerBase_h
2 #define Fireworks_TableWidget_FWTableManagerBase_h
3 // -*- C++ -*-
4 //
5 // Package: TableWidget
6 // Class : FWTableManagerBase
7 //
28 //
29 // Original Author: Chris Jones
30 // Created: Mon Feb 2 16:40:52 EST 2009
31 // $Id: FWTableManagerBase.h,v 1.6 2011/03/07 13:13:51 amraktad Exp $
32 //
33 
34 // system include files
35 #include <vector>
36 #include <string>
37 #include "TQObject.h"
38 #include "GuiTypes.h"
39 
40 // user include files
41 
42 // forward declarations
44 
45 class FWTableManagerBase : public TQObject
46 {
47 
48  public:
50  virtual ~FWTableManagerBase();
51 
52  // ---------- const member functions ---------------------
54  virtual int numberOfRows() const = 0;
56  virtual int numberOfColumns() const = 0;
57 
59  virtual std::vector<std::string> getTitles() const = 0;
60 
62  virtual int unsortedRowNumber(int iSortedRowNumber) const = 0;
63 
69  virtual FWTableCellRendererBase* cellRenderer(int iSortedRowNumber, int iCol) const =0;
70 
72  virtual unsigned int cellHeight() const;
73 
75  virtual std::vector<unsigned int> maxWidthForColumns() const;
76 
77  virtual bool hasLabelHeaders() const ;
78 
80  virtual bool hasRowHeaders() const ;
82  virtual FWTableCellRendererBase* rowHeader(int iSortedRowNumber) const ;
83 
85  virtual void buttonPressedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY);
86  virtual void buttonReleasedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY);
87 
88  // ---------- static member functions --------------------
89 
90  // ---------- member functions ---------------------------
92  void sort(int iCol, bool iSortOrder);
93 
95  void dataChanged(); //*SIGNAL*
96 
98  void visualPropertiesChanged(); //*SIGNAL*
99 
101 
103  bool sortOrder(void) { return m_sortOrder; }
104 
106  int sortColumn(void) { return m_sortColumn; }
107 
108  protected:
110  virtual void implSort(int iCol, bool iSortOrder) = 0;
111 
112  private:
113  //FWTableManagerBase(const FWTableManagerBase&); // stop default
114 
115  //const FWTableManagerBase& operator=(const FWTableManagerBase&); // stop default
116 
117  // ---------- member data --------------------------------
120 };
121 
122 
123 #endif
virtual int numberOfColumns() const =0
Number of columns in the table.
bool sortOrder(void)
The current sort order for the table.
virtual void implSort(int iCol, bool iSortOrder)=0
Called by &#39;sort&#39; method to actually handle the sorting of the rows. Arguments are the same as &#39;sort&#39;...
void sort(int iCol, bool iSortOrder)
Call to have table sorted on values in column iCol with the sort order being descending if iSortOrder...
virtual std::vector< std::string > getTitles() const =0
returns the title names for each column
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
virtual std::vector< unsigned int > maxWidthForColumns() const
for each column in the table this returns the present maximum width for that column ...
virtual bool hasLabelHeaders() const
virtual int numberOfRows() const =0
Number of rows in the table.
virtual int unsortedRowNumber(int iSortedRowNumber) const =0
when passed the index to the sorted order of the rows it returns the original row number from the und...
virtual FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const =0
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void buttonReleasedInRowHeader(Int_t row, Event_t *event, Int_t relX, Int_t relY)
ClassDef(FWTableManagerBase, 0)
virtual void buttonPressedInRowHeader(Int_t row, Event_t *event, Int_t relX, Int_t relY)
Called if mouse button pressed in Row Header, defaults is to do nothing.
void visualPropertiesChanged()
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e...
virtual unsigned int cellHeight() const
require all cells to be the same height
virtual FWTableCellRendererBase * rowHeader(int iSortedRowNumber) const
Returns the renderer for the row header for the sorted row number iSortedRowNumber.
virtual bool hasRowHeaders() const
Returns &#39;true&#39; if this table has row headers. Defaults return value is false.
int sortColumn(void)
The current sort column.