ソースを参照

Merge pull request #45551 from flyingpimonster/tree-item-docs

docs: Add TreeItem method descriptions
Rémi Verschelde 4 年 前
コミット
c4a2fe99e8
1 ファイル変更11 行追加1 行削除
  1. 11 1
      doc/classes/TreeItem.xml

+ 11 - 1
doc/classes/TreeItem.xml

@@ -208,6 +208,7 @@
 			<argument index="0" name="column" type="int">
 			<argument index="0" name="column" type="int">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns the metadata value that was set for the given column using [method set_metadata].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_next">
 		<method name="get_next">
@@ -268,6 +269,7 @@
 			<argument index="0" name="column" type="int">
 			<argument index="0" name="column" type="int">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns the value of a [constant CELL_MODE_RANGE] column.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_range_config">
 		<method name="get_range_config">
@@ -276,6 +278,7 @@
 			<argument index="0" name="column" type="int">
 			<argument index="0" name="column" type="int">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr".
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_structured_text_bidi_override" qualifiers="const">
 		<method name="get_structured_text_bidi_override" qualifiers="const">
@@ -300,6 +303,7 @@
 			<argument index="0" name="column" type="int">
 			<argument index="0" name="column" type="int">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Gets the suffix string shown after the column value.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_text" qualifiers="const">
 		<method name="get_text" qualifiers="const">
@@ -606,6 +610,7 @@
 			<argument index="1" name="meta" type="Variant">
 			<argument index="1" name="meta" type="Variant">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_opentype_feature">
 		<method name="set_opentype_feature">
@@ -629,6 +634,7 @@
 			<argument index="1" name="value" type="float">
 			<argument index="1" name="value" type="float">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets the value of a [constant CELL_MODE_RANGE] column.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_range_config">
 		<method name="set_range_config">
@@ -645,6 +651,8 @@
 			<argument index="4" name="expr" type="bool" default="false">
 			<argument index="4" name="expr" type="bool" default="false">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets the range of accepted values for a column. The column must be in the [constant CELL_MODE_RANGE] mode.
+				If [code]expr[/code] is [code]true[/code], the edit mode slider will use an exponential scale as with [member Range.exp_edit].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_selectable">
 		<method name="set_selectable">
@@ -686,6 +694,7 @@
 			<argument index="1" name="text" type="String">
 			<argument index="1" name="text" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets a string to be shown after a column's value (for example, a unit abbreviation).
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_text">
 		<method name="set_text">
@@ -696,6 +705,7 @@
 			<argument index="1" name="text" type="String">
 			<argument index="1" name="text" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets the given column's text value.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_text_align">
 		<method name="set_text_align">
@@ -748,7 +758,7 @@
 			Cell contains a string.
 			Cell contains a string.
 		</constant>
 		</constant>
 		<constant name="CELL_MODE_CHECK" value="1" enum="TreeCellMode">
 		<constant name="CELL_MODE_CHECK" value="1" enum="TreeCellMode">
-			Cell can be checked.
+			Cell contains a checkbox.
 		</constant>
 		</constant>
 		<constant name="CELL_MODE_RANGE" value="2" enum="TreeCellMode">
 		<constant name="CELL_MODE_RANGE" value="2" enum="TreeCellMode">
 			Cell contains a range.
 			Cell contains a range.