Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CSheetModelFactory.hpp
Go to the documentation of this file.
1#ifndef LIBS_GUI_CSHEETMODELFACTORY_HPP_
2#define LIBS_GUI_CSHEETMODELFACTORY_HPP_
3
6
7#include <bits/stdint-uintn.h>
8#include <memory>
9#include <string>
10
12
13// TODO: aag. Extraer métodos no comunes y pasarlos a sus respectivas clases (como se ha hecho con CPanelChannelsWiredEditor)
14// TODO: aag. Una vez extraidos los métodos no comunes, renombrar la clase como CSheetModelHelper
15
17{
18public:
19 inline static const int32_t kDefaultLanguageColumnPosition = 9;
20 inline static const int32_t kNoId = 0;
21
22 // default methods disabled
24 CSheetModelFactory(const CSheetModelFactory &other) = delete;
29
30 static void addColumnDefinitionToSheetModel(const std::shared_ptr<AbstractSheetModel> &sheetModel,
31 const iv::gui::sheets::ColumnId &columnId, uint32_t columnPosition,
32 const std::string &columnTitle, const std::string &columnTooltip,
33 uint16_t columnWidth, bool isVisible);
34 static void removeColumnDefinitionFromSheetModel(const std::shared_ptr<AbstractSheetModel> &sheetModel,
35 const iv::gui::sheets::ColumnId &columnId);
37 static void addRowDefinitionToSheetModel(const std::shared_ptr<AbstractSheetModel> &sheetModel,
38 const iv::gui::sheets::RowId &rowId, uint32_t rowPosition, bool isVisible);
39
40 static bool findLowerBoundRow(const std::shared_ptr<AbstractSheetModel> &sheetModel,
41 const iv::gui::sheets::RowId &rowIdReference, iv::gui::sheets::RowId *resultRowId);
42 static void removeRow(const std::shared_ptr<AbstractSheetModel> &sheetModel, const iv::gui::sheets::RowId &rowId);
43 static void updateRowTitles(const std::shared_ptr<AbstractSheetModel> &sheetModel);
44
45 static bool findLowerBoundRowCheckingInAscendingPositionOrder(const std::shared_ptr<AbstractSheetModel> &sheetModel,
46 const iv::gui::sheets::RowId &rowIdReference,
47 iv::gui::sheets::RowId *resultRowId);
48
49 //------------- methods related to tanks ---------------
50
51 static std::shared_ptr<AbstractSheetModel>
52 createCSheetModelTankCalibrationTable(const std::shared_ptr<iv::tanks::TankCalibrationData> &calibrationDataRef,
53 double *selectedTrim);
54 static void
55 updateCSheetModelTankCalibrationTable(const std::shared_ptr<AbstractSheetModel> &sheetModel,
56 const std::shared_ptr<iv::tanks::TrimCalibrationData> &calibrationDataRef);
57 static void
58 addRowToCSheetModelTankCalibrationTable(const std::shared_ptr<iv::tanks::TrimCalibrationData> &calibrationDataRef,
59 const std::shared_ptr<AbstractSheetModel> &sheetModel,
60 const iv::gui::sheets::RowId &rowId);
62 bool shortName = true);
63
64 //protected:
66};
67
68#endif /* LIBS_GUI_CSHEETMODELFACTORY_HPP_ */
Definition CSheetModelFactory.hpp:17
static void addCommonCellDefinitionListeners(iv::gui::sheets::CellDefinition &cellDefinition)
Definition CSheetModelFactory.cpp:107
static void removeRow(const std::shared_ptr< AbstractSheetModel > &sheetModel, const iv::gui::sheets::RowId &rowId)
Definition CSheetModelFactory.cpp:206
static std::string getCSheetModelTankCalibrationTableColumnName(iv::gui::sheets::ColumnId columnId, bool shortName=true)
Definition CSheetModelFactory.cpp:481
CSheetModelFactory(CSheetModelFactory &&other)=delete
static iv::gui::sheets::CellDefinition prvCreateButtonCellDefinition(const std::string &text)
Definition CSheetModelFactory.cpp:67
static void updateRowTitles(const std::shared_ptr< AbstractSheetModel > &sheetModel)
Definition CSheetModelFactory.cpp:219
static void removeColumnDefinitionFromSheetModel(const std::shared_ptr< AbstractSheetModel > &sheetModel, const iv::gui::sheets::ColumnId &columnId)
Definition CSheetModelFactory.cpp:99
CSheetModelFactory(const CSheetModelFactory &other)=delete
static void updateCSheetModelTankCalibrationTable(const std::shared_ptr< AbstractSheetModel > &sheetModel, const std::shared_ptr< iv::tanks::TrimCalibrationData > &calibrationDataRef)
Definition CSheetModelFactory.cpp:446
static void addRowToCSheetModelTankCalibrationTable(const std::shared_ptr< iv::tanks::TrimCalibrationData > &calibrationDataRef, const std::shared_ptr< AbstractSheetModel > &sheetModel, const iv::gui::sheets::RowId &rowId)
Definition CSheetModelFactory.cpp:459
static const int32_t kNoId
Definition CSheetModelFactory.hpp:20
static std::shared_ptr< AbstractSheetModel > createCSheetModelTankCalibrationTable(const std::shared_ptr< iv::tanks::TankCalibrationData > &calibrationDataRef, double *selectedTrim)
Definition CSheetModelFactory.cpp:421
static const int32_t kDefaultLanguageColumnPosition
Definition CSheetModelFactory.hpp:19
~CSheetModelFactory()=delete
static bool findLowerBoundRow(const std::shared_ptr< AbstractSheetModel > &sheetModel, const iv::gui::sheets::RowId &rowIdReference, iv::gui::sheets::RowId *resultRowId)
Definition CSheetModelFactory.cpp:146
CSheetModelFactory & operator=(CSheetModelFactory &&other)=delete
CSheetModelFactory & operator=(const CSheetModelFactory &other)=delete
static bool findLowerBoundRowCheckingInAscendingPositionOrder(const std::shared_ptr< AbstractSheetModel > &sheetModel, const iv::gui::sheets::RowId &rowIdReference, iv::gui::sheets::RowId *resultRowId)
Definition CSheetModelFactory.cpp:175
static void addColumnDefinitionToSheetModel(const std::shared_ptr< AbstractSheetModel > &sheetModel, const iv::gui::sheets::ColumnId &columnId, uint32_t columnPosition, const std::string &columnTitle, const std::string &columnTooltip, uint16_t columnWidth, bool isVisible)
Definition CSheetModelFactory.cpp:81
CSheetModelFactory()=delete
static void addRowDefinitionToSheetModel(const std::shared_ptr< AbstractSheetModel > &sheetModel, const iv::gui::sheets::RowId &rowId, uint32_t rowPosition, bool isVisible)
Definition CSheetModelFactory.cpp:124
Definition IListenerIsAccept.hpp:7
Definition structs.hpp:18
Definition structs.hpp:24
Definition structs.hpp:50