File indexing completed on 2024-04-06 12:11:36
0001 #ifndef Fireworks_Core_FWCollectionSummaryTableManager_h
0002 #define Fireworks_Core_FWCollectionSummaryTableManager_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <vector>
0023 #include <memory>
0024
0025
0026 #include "Fireworks/TableWidget/interface/FWTableManagerBase.h"
0027 #include "Fireworks/TableWidget/interface/FWTextTableCellRenderer.h"
0028 #include "Fireworks/Core/src/FWCollectionSummaryModelCellRenderer.h"
0029
0030
0031 class FWEventItem;
0032
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
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
0055
0056
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;
0064
0065 const FWCollectionSummaryTableManager& operator=(const FWCollectionSummaryTableManager&) = delete;
0066
0067 private:
0068 void dataChanged();
0069
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