File size: 4,799 Bytes
985c397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# SPDX-License-Identifier: LGPL-2.1-or-later

from __future__ import annotations

from typing import Any

from Base.Metadata import export

from App.DocumentObject import DocumentObject

@export(
    Include="Mod/Spreadsheet/App/Sheet.h",
    Namespace="Spreadsheet",
    Constructor=True,
)
class Sheet(DocumentObject):
    """
    With this object you can manipulate spreadsheets

    Author: Eivind Kvedalen (eivind@kvedalen.name)
    License: LGPL-2.1-or-later
    """

    def set(self) -> Any:
        """Set data into a cell"""
        ...

    def get(self) -> Any:
        """Get evaluated cell contents"""
        ...

    def getContents(self) -> Any:
        """Get cell contents"""
        ...

    def clear(self) -> Any:
        """Clear a cell"""
        ...

    def clearAll(self) -> Any:
        """Clear all cells in the spreadsheet"""
        ...

    def importFile(self) -> Any:
        """Import file into spreadsheet"""
        ...

    def exportFile(self) -> Any:
        """Export file from spreadsheet"""
        ...

    def mergeCells(self) -> Any:
        """Merge given cell area into one cell"""
        ...

    def splitCell(self) -> Any:
        """Split a previously merged cell"""
        ...

    def insertColumns(self) -> Any:
        """Insert a given number of columns into the spreadsheet."""
        ...

    def removeColumns(self) -> Any:
        """Remove a given number of columns from the spreadsheet."""
        ...

    def insertRows(self) -> Any:
        """Insert a given number of rows into the spreadsheet."""
        ...

    def removeRows(self) -> Any:
        """Remove a given number of rows from the spreadsheet."""
        ...

    def setAlignment(self) -> Any:
        """Set alignment of the cell"""
        ...

    def getAlignment(self) -> Any:
        """Get alignment of the cell"""
        ...

    def setStyle(self) -> Any:
        """Set style of the cell"""
        ...

    def getStyle(self) -> Any:
        """Get style of the cell"""
        ...

    def setDisplayUnit(self) -> Any:
        """Set display unit for cell"""
        ...

    def setAlias(self) -> Any:
        """Set alias for cell address"""
        ...

    def getAlias(self) -> Any:
        """Get alias for cell address"""
        ...

    def getCellFromAlias(self) -> Any:
        """Get cell address given an alias"""
        ...

    def getDisplayUnit(self) -> Any:
        """Get display unit for cell"""
        ...

    def setForeground(self) -> Any:
        """Set foreground color of the cell"""
        ...

    def getForeground(self) -> Any:
        """Get foreground color of the cell"""
        ...

    def setBackground(self) -> Any:
        """Set background color of the cell"""
        ...

    def getBackground(self) -> Any:
        """Get background color of the cell"""
        ...

    def setColumnWidth(self) -> Any:
        """Set given spreadsheet column to given width"""
        ...

    def getColumnWidth(self) -> Any:
        """Get given spreadsheet column width"""
        ...

    def setRowHeight(self) -> Any:
        """Set given spreadsheet row to given height"""
        ...

    def getRowHeight(self) -> Any:
        """Get given spreadsheet row height"""
        ...

    def touchCells(self, address: str, address_to: str | None = None, /) -> None:
        """touch cells in the given range"""
        ...

    def recomputeCells(self, address: str, address_to: str | None = None, /) -> Any:
        """
        Manually recompute cells in the given range with the given order without
        following dependency order.
        """
        ...

    def getUsedCells(self) -> list[str]:
        """
        Get a list of the names of all cells that are marked as used. These cells may
        or may not have a non-empty string content.
        """
        ...

    def getNonEmptyCells(self) -> list[str]:
        """
        Get a list of the names of all cells with data in them.
        """
        ...

    def getUsedRange(self) -> tuple[str, str]:
        """
        Get a the total range of the used cells in a sheet, as a pair of strings
        representing the lowest row and column that are used, and the highest row and
        column that are used (inclusive). Note that the actual first and last cell
        of the block are not necessarily used.
        """
        ...

    def getNonEmptyRange(self) -> tuple[str, str]:
        """
        Get a the total range of the used cells in a sheet, as a pair of cell addresses
        representing the lowest row and column that contain data, and the highest row and
        column that contain data (inclusive). Note that the actual first and last cell
        of the block do not necessarily contain anything.
        """
        ...