Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:36

0001 #ifndef Fireworks_Core_FWCollectionSummaryTableManager_h
0002 #define Fireworks_Core_FWCollectionSummaryTableManager_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWCollectionSummaryTableManager
0007 //
0008 /**\class FWCollectionSummaryTableManager FWCollectionSummaryTableManager.h Fireworks/Core/interface/FWCollectionSummaryTableManager.h
0009 
0010  Description: <one line class summary>
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Sun Feb 22 10:13:37 CST 2009
0019 //
0020 
0021 // system include files
0022 #include <vector>
0023 #include <memory>
0024 
0025 // user include files
0026 #include "Fireworks/TableWidget/interface/FWTableManagerBase.h"
0027 #include "Fireworks/TableWidget/interface/FWTextTableCellRenderer.h"
0028 #include "Fireworks/Core/src/FWCollectionSummaryModelCellRenderer.h"
0029 
0030 // forward declarations
0031 class FWEventItem;
0032 //class FWItemValueGetter;
0033 class FWCollectionSummaryWidget;
0034 
0035 class FWCollectionSummaryTableManager : public FWTableManagerBase {
0036 public:
0037   FWCollectionSummaryTableManager(FWEventItem* iCollection,
0038                                   const TGGC* iContext,
0039                                   const TGGC* iHighlightContext,
0040                                   FWCollectionSummaryWidget*);
0041   ~FWCollectionSummaryTableManager() override;
0042 
0043   // ---------- const member functions ---------------------
0044   int numberOfRows() const override;
0045   int numberOfColumns() const override;
0046   std::vector<std::string> getTitles() const override;
0047   int unsortedRowNumber(int iSortedRowNumber) const override;
0048 
0049   FWTableCellRendererBase* cellRenderer(int iSortedRowNumber, int iCol) const override;
0050 
0051   bool hasRowHeaders() const override;
0052   FWTableCellRendererBase* rowHeader(int iSortedRowNumber) const override;
0053 
0054   // ---------- static member functions --------------------
0055 
0056   // ---------- member functions ---------------------------
0057   void buttonReleasedInRowHeader(Int_t row, Event_t* event, Int_t relX, Int_t relY) override;
0058 
0059 protected:
0060   void implSort(int iCol, bool iSortOrder) override;
0061 
0062 public:
0063   FWCollectionSummaryTableManager(const FWCollectionSummaryTableManager&) = delete;  // stop default
0064 
0065   const FWCollectionSummaryTableManager& operator=(const FWCollectionSummaryTableManager&) = delete;  // stop default
0066 
0067 private:
0068   void dataChanged();
0069   // ---------- member data --------------------------------
0070   FWEventItem* m_collection;
0071   std::vector<int> m_sortedToUnsortedIndicies;
0072 
0073   mutable FWCollectionSummaryModelCellRenderer m_renderer;
0074   mutable FWTextTableCellRenderer m_bodyRenderer;
0075   FWCollectionSummaryWidget* m_widget;
0076 };
0077 
0078 #endif