aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Template/TableTemplate.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/Model/Template/TableTemplate.hpp')
-rw-r--r--core/src/Model/Template/TableTemplate.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/Model/Template/TableTemplate.hpp b/core/src/Model/Template/TableTemplate.hpp
index a9a89d4..141e952 100644
--- a/core/src/Model/Template/TableTemplate.hpp
+++ b/core/src/Model/Template/TableTemplate.hpp
@@ -32,6 +32,7 @@ public:
};
public:
+ /// Display content of this cell. This doesn't necessarily have to line up with the parameter name (if this cell is one).
std::string Content;
Vec2i Location;
/// Location of the primary (top left) cell, if this cell is a part of a merged group.
@@ -102,6 +103,7 @@ public:
/// Find the location of the cell within this array group that has the given name.
Vec2i FindCell(std::string_view name);
+ bool UpdateCellName(std::string_view oldName, std::string_view newName);
};
// Forward declaration of libxlsxwriter structs
@@ -165,13 +167,23 @@ public:
const TableCell& GetCell(Vec2i pos) const;
TableCell& GetCell(Vec2i pos);
+ /// <ul>
+ /// <li> In case of becoming a SingularParametricCell: the parameter name is filled with TableCell::Content.
+ /// <li> In case of becoming a ArrayGroupParametricCell: the array group name is automatically generated as the nth group it would be come.
+ /// i.e., if there aRe currently 3 groups, the newly created group would be named "4".
+ /// If this name collides with an existing group, hyphens \c - will be append to the name until no collision happens.
+ /// </ul>
void SetCellType(Vec2i pos, TableCell::CellType type);
+ /// Updates the parameter cell to a new name. Returns true on success and false on failure (param not found or name duplicates).
+ bool UpdateParameterName(std::string_view oldName, std::string_view newName);
+
int GetArrayGroupCount() const;
const TableArrayGroup& GetArrayGroup(int id) const;
TableArrayGroup& GetArrayGroup(int id);
TableArrayGroup* AddArrayGroup(int row, int left, int right);
TableArrayGroup* AddArrayGroup(std::string_view name, int row, int left, int right);
+ bool UpdateArrayGroupName(std::string_view oldName, std::string_view newName);
bool ExtendArrayGroupLeft(int id, int n);
bool ExtendArrayGroupRight(int id, int n);