Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:46:39

0001 #ifndef Fireworks_TableWidget_FWAdapterHeaderTableManager_h
0002 #define Fireworks_TableWidget_FWAdapterHeaderTableManager_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     TableWidget
0006 // Class  :     FWAdapterHeaderTableManager
0007 //
0008 /**\class FWAdapterHeaderTableManager FWAdapterHeaderTableManager.h Fireworks/TableWidget/interface/FWAdapterHeaderTableManager.h
0009 
0010  Description: a TableManager used to pass the header info of another table as the body of this table
0011 
0012  Usage:
0013     This class is an implementation detail of how the FWTableWidget handles the column headers.  The drawing
0014     of the column headers is done by the same widget as handles the drawing of the body. The
0015     FWAdapterHeaderTableManager is used to make the header information appear to be just another table so
0016     that it works with the above mentioned widget.
0017 
0018 */
0019 //
0020 // Original Author:  Chris Jones
0021 //         Created:  Mon Feb  2 16:44:43 EST 2009
0022 //
0023 
0024 // system include files
0025 
0026 // user include files
0027 #include "Fireworks/TableWidget/interface/FWTableManagerBase.h"
0028 
0029 // forward declarations
0030 class FWColumnLabelCellRenderer;
0031 
0032 class FWAdapterHeaderTableManager : public FWTableManagerBase {
0033 public:
0034   FWAdapterHeaderTableManager(const FWTableManagerBase*);
0035   ~FWAdapterHeaderTableManager() override;
0036 
0037   // ---------- const member functions ---------------------
0038   int numberOfRows() const override;
0039   int numberOfColumns() const override;
0040   std::vector<std::string> getTitles() const override;
0041   FWTableCellRendererBase* cellRenderer(int iRow, int iCol) const override;
0042   int unsortedRowNumber(int) const override;
0043 
0044   // ---------- static member functions --------------------
0045 
0046   // ---------- member functions ---------------------------
0047   void implSort(int col, bool sortOrder) override;
0048 
0049   FWAdapterHeaderTableManager(const FWAdapterHeaderTableManager&) = delete;  // stop default
0050 
0051   const FWAdapterHeaderTableManager& operator=(const FWAdapterHeaderTableManager&) = delete;  // stop default
0052 
0053 private:
0054   // ---------- member data --------------------------------
0055   const FWTableManagerBase* m_table;
0056   FWColumnLabelCellRenderer* m_renderer;
0057   int m_sortedColumn;
0058   bool m_descendingSort;
0059 };
0060 
0061 #endif