From bf78f0b364a54cecd2613335cbafd1c3e4f0d2ff Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 3 Jul 2024 01:14:03 +0200 Subject: [PATCH] Regenerating stubs --- src/pymod/distutils_src/klayout/dbcore.pyi | 571 ++- src/pymod/distutils_src/klayout/laycore.pyi | 4454 +------------------ src/pymod/distutils_src/klayout/rdbcore.pyi | 45 +- src/pymod/distutils_src/klayout/tlcore.pyi | 23 + 4 files changed, 690 insertions(+), 4403 deletions(-) diff --git a/src/pymod/distutils_src/klayout/dbcore.pyi b/src/pymod/distutils_src/klayout/dbcore.pyi index 4cd0e8ea6..b0d7f3f0d 100644 --- a/src/pymod/distutils_src/klayout/dbcore.pyi +++ b/src/pymod/distutils_src/klayout/dbcore.pyi @@ -335,6 +335,16 @@ class Box: Returns true, if this box and the given box are not equal """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief Returns a string representing this box + + This string can be turned into a box again by using \from_s + . If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... @overload def __rmul__(self, box: Box) -> Box: r""" @@ -3082,6 +3092,13 @@ class CellInstArray: @brief Compares two arrays for inequality """ ... + def __repr__(self) -> str: + r""" + @brief Converts the array to a string + + This method was introduced in version 0.22. + """ + ... def __str__(self) -> str: r""" @brief Converts the array to a string @@ -5525,6 +5542,11 @@ class Connectivity: @brief Creates a new object of this class """ ... + def __repr__(self) -> str: + r""" + @hide + """ + ... def __str__(self) -> str: r""" @hide @@ -6218,6 +6240,15 @@ class CplxTrans: @brief Tests for inequality """ ... + def __repr__(self, lazy: Optional[bool] = ..., dbu: Optional[float] = ...) -> str: + r""" + @brief String conversion + If 'lazy' is true, some parts are omitted when not required. + If a DBU is given, the output units will be micrometers. + + The lazy and DBU arguments have been added in version 0.27.6. + """ + ... @overload def __rmul__(self, box: Box) -> DBox: r""" @@ -6986,6 +7017,16 @@ class DBox: Returns true, if this box and the given box are not equal """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief Returns a string representing this box + + This string can be turned into a box again by using \from_s + . If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... @overload def __rmul__(self, box: DBox) -> DBox: r""" @@ -7842,6 +7883,11 @@ class DCellInstArray: @brief Compares two arrays for inequality """ ... + def __repr__(self) -> str: + r""" + @brief Converts the array to a string + """ + ... def __str__(self) -> str: r""" @brief Converts the array to a string @@ -8575,6 +8621,15 @@ class DCplxTrans: @brief Tests for inequality """ ... + def __repr__(self, lazy: Optional[bool] = ..., dbu: Optional[float] = ...) -> str: + r""" + @brief String conversion + If 'lazy' is true, some parts are omitted when not required. + If a DBU is given, the output units will be micrometers. + + The lazy and DBU arguments have been added in version 0.27.6. + """ + ... @overload def __rmul__(self, box: DBox) -> DBox: r""" @@ -9227,6 +9282,14 @@ class DEdge: @param e The object to compare against """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief Returns a string representing the edge + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... def __rmul__(self, scale_factor: float) -> DEdge: r""" @brief Scale edge @@ -9975,6 +10038,14 @@ class DEdgePair: This method has been introduced in version 0.25. """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief Returns a string representing the edge pair + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... def __str__(self, dbu: Optional[float] = ...) -> str: r""" @brief Returns a string representing the edge pair @@ -10454,6 +10525,11 @@ class DPath: @param p The object to compare against """ ... + def __repr__(self) -> str: + r""" + @brief Convert to a string + """ + ... def __rmul__(self, f: float) -> DPath: r""" @brief Scaling by some factor @@ -10931,6 +11007,14 @@ class DPoint: This method has been added in version 0.23. """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief String conversion. + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... def __rmul__(self, f: float) -> DPoint: r""" @brief Scaling by some factor @@ -11333,6 +11417,11 @@ class DPolygon: @param p The object to compare against """ ... + def __repr__(self) -> str: + r""" + @brief Returns a string representing the polygon + """ + ... def __rmul__(self, f: float) -> DPolygon: r""" @brief Scales the polygon by some factor @@ -12172,6 +12261,11 @@ class DSimplePolygon: @param p The object to compare against """ ... + def __repr__(self) -> str: + r""" + @brief Returns a string representing the polygon + """ + ... def __rmul__(self, f: float) -> DSimplePolygon: r""" @brief Scales the polygon by some factor @@ -12726,8 +12820,7 @@ class DText: Setter: @brief Sets the vertical alignment - This property specifies how the text is aligned relative to the anchor point. - This property has been introduced in version 0.22 and extended to enums in 0.28. + This is the version accepting integer values. It's provided for backward compatibility. """ x: float r""" @@ -12898,6 +12991,14 @@ class DText: Return true, if this text object and the given text are not equal """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief Converts the object to a string. + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... def __str__(self, dbu: Optional[float] = ...) -> str: r""" @brief Converts the object to a string. @@ -13584,6 +13685,14 @@ class DTrans: @brief Tests for inequality """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief String conversion + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... @overload def __rmul__(self, box: DBox) -> DBox: r""" @@ -14129,6 +14238,14 @@ class DVector: Returns a new vector with -x,-y. """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief String conversion + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... @overload def __rmul__(self, f: float) -> DVector: r""" @@ -18084,6 +18201,14 @@ class Edge: @param e The object to compare against """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief Returns a string representing the edge + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... def __rmul__(self, scale_factor: float) -> Edge: r""" @brief Scale edge @@ -19455,6 +19580,14 @@ class EdgePair: This method has been introduced in version 0.25. """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief Returns a string representing the edge pair + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... def __str__(self, dbu: Optional[float] = ...) -> str: r""" @brief Returns a string representing the edge pair @@ -20605,6 +20738,12 @@ class EdgePairs(ShapeCollection): Starting with version 0.27, the method is called 'count' for consistency with \Region. 'size' is still provided as an alias. """ ... + def __repr__(self) -> str: + r""" + @brief Converts the edge pair collection to a string + The length of the output is limited to 20 edge pairs to avoid giant strings on large regions. For full output use "to_s" with a maximum count parameter. + """ + ... def __str__(self) -> str: r""" @brief Converts the edge pair collection to a string @@ -23667,6 +23806,12 @@ class Edges(ShapeCollection): The 'or' alias has been introduced in version 0.28.12. """ ... + def __repr__(self) -> str: + r""" + @brief Converts the edge collection to a string + The length of the output is limited to 20 edges to avoid giant strings on large regions. For full output use "to_s" with a maximum count parameter. + """ + ... def __str__(self) -> str: r""" @brief Converts the edge collection to a string @@ -26834,6 +26979,15 @@ class ICplxTrans: @brief Tests for inequality """ ... + def __repr__(self, lazy: Optional[bool] = ..., dbu: Optional[float] = ...) -> str: + r""" + @brief String conversion + If 'lazy' is true, some parts are omitted when not required. + If a DBU is given, the output units will be micrometers. + + The lazy and DBU arguments have been added in version 0.27.6. + """ + ... @overload def __rmul__(self, box: Box) -> Box: r""" @@ -27458,6 +27612,12 @@ class IMatrix2d: @return The transformed vector """ ... + def __repr__(self) -> str: + r""" + @brief Convert the matrix to a string. + @return The string representing this matrix + """ + ... @overload def __rmul__(self, box: Box) -> Box: r""" @@ -27928,6 +28088,12 @@ class IMatrix3d: @return The transformed vector """ ... + def __repr__(self) -> str: + r""" + @brief Convert the matrix to a string. + @return The string representing this matrix + """ + ... @overload def __rmul__(self, box: Box) -> Box: r""" @@ -28420,11 +28586,11 @@ class Instance: Starting with version 0.25 the displacement is of vector type. Setter: - @brief Sets the displacement vector for the 'a' axis in micrometer units + @brief Sets the displacement vector for the 'a' axis - Like \a= with an integer displacement, this method will set the displacement vector but it accepts a vector in micrometer units that is of \DVector type. The vector will be translated to database units internally. + If the instance was not an array instance before it is made one. - This method has been introduced in version 0.25. + This method has been introduced in version 0.23. Starting with version 0.25 the displacement is of vector type. """ b: Vector r""" @@ -28480,9 +28646,10 @@ class Instance: @brief Gets the complex transformation of the instance or the first instance in the array This method is always valid compared to \trans, since simple transformations can be expressed as complex transformations as well. Setter: - @brief Sets the complex transformation of the instance or the first instance in the array + @brief Sets the complex transformation of the instance or the first instance in the array (in micrometer units) + This method sets the transformation the same way as \cplx_trans=, but the displacement of this transformation is given in micrometer units. It is internally translated into database units. - This method has been introduced in version 0.23. + This method has been introduced in version 0.25. """ da: DVector r""" @@ -28668,6 +28835,13 @@ class Instance: Warning: this operator returns true if both objects refer to the same instance, not just identical ones. """ ... + def __repr__(self) -> str: + r""" + @brief Creates a string showing the contents of the reference + + This method has been introduced with version 0.16. + """ + ... def __setitem__(self, key: Any, value: Any) -> None: r""" @brief Sets the user property with the given key or, if available, the PCell parameter with the name given by the key @@ -28948,7 +29122,7 @@ class Instance: r""" @brief Gets the layout this instance is contained in - This const version of the method has been introduced in version 0.25. + This method has been introduced in version 0.22. """ ... @overload @@ -28956,7 +29130,7 @@ class Instance: r""" @brief Gets the layout this instance is contained in - This method has been introduced in version 0.22. + This const version of the method has been introduced in version 0.25. """ ... def pcell_declaration(self) -> PCellDeclaration_Native: @@ -30344,6 +30518,17 @@ class LayerInfo: This method was added in version 0.18. """ ... + def __repr__(self, as_target: Optional[bool] = ...) -> str: + r""" + @brief Convert the layer info object to a string + @return The string + + If 'as_target' is true, wildcard and relative specifications are formatted such such. + + This method was added in version 0.18. + The 'as_target' argument has been added in version 0.26.5. + """ + ... def __str__(self, as_target: Optional[bool] = ...) -> str: r""" @brief Convert the layer info object to a string @@ -36639,16 +36824,6 @@ class LoadLayoutOptions: This attribute has been added in version 0.28. """ @classmethod - def from_technology(cls, technology: str) -> LoadLayoutOptions: - r""" - @brief Gets the reader options of a given technology - @param technology The name of the technology to apply - Returns the reader options of a specific technology. If the technology name is not valid or an empty string, the reader options of the default technology are returned. - - This method has been introduced in version 0.25 - """ - ... - @classmethod def new(cls) -> LoadLayoutOptions: r""" @brief Creates a new object of this class @@ -36961,6 +37136,12 @@ class LogEntryData: @brief Creates a new object of this class """ ... + def __repr__(self, with_geometry: Optional[bool] = ...) -> str: + r""" + @brief Gets the string representation of this error or warning. + This method has been introduced in version 0.28.13. + """ + ... def __str__(self, with_geometry: Optional[bool] = ...) -> str: r""" @brief Gets the string representation of this error or warning. @@ -37434,6 +37615,12 @@ class Matrix2d: @return The transformed vector """ ... + def __repr__(self) -> str: + r""" + @brief Convert the matrix to a string. + @return The string representing this matrix + """ + ... @overload def __rmul__(self, box: DBox) -> DBox: r""" @@ -37936,6 +38123,12 @@ class Matrix3d: @return The transformed vector """ ... + def __repr__(self) -> str: + r""" + @brief Convert the matrix to a string. + @return The string representing this matrix + """ + ... @overload def __rmul__(self, box: DBox) -> DBox: r""" @@ -38442,6 +38635,13 @@ class Net(NetlistObject): @brief Sets the name of the net. The name of the net is used for naming the net in schematic files for example. The name of the net has to be unique. """ + def __repr__(self) -> str: + r""" + @brief Gets the qualified name. + The qualified name is like the expanded name, but the circuit's name is preceded + (i.e. 'CIRCUIT:NET') if available. + """ + ... def __str__(self) -> str: r""" @brief Gets the qualified name. @@ -39145,17 +39345,17 @@ class NetTerminalRef: @overload def device(self) -> Device: r""" - @brief Gets the device reference (non-const version). + @brief Gets the device reference. Gets the device object that this connection is made to. - - This constness variant has been introduced in version 0.26.8 """ ... @overload def device(self) -> Device: r""" - @brief Gets the device reference. + @brief Gets the device reference (non-const version). Gets the device object that this connection is made to. + + This constness variant has been introduced in version 0.26.8 """ ... def device_class(self) -> DeviceClass: @@ -39987,6 +40187,12 @@ class Netlist: @brief Creates a new object of this class """ ... + def __repr__(self) -> str: + r""" + @brief Converts the netlist to a string representation. + This method is intended for test purposes mainly. + """ + ... def __str__(self) -> str: r""" @brief Converts the netlist to a string representation. @@ -40067,17 +40273,17 @@ class Netlist: @overload def circuit_by_cell_index(self, cell_index: int) -> Circuit: r""" - @brief Gets the circuit object for a given cell index (const version). + @brief Gets the circuit object for a given cell index. If the cell index is not valid or no circuit is registered with this index, nil is returned. - - This constness variant has been introduced in version 0.26.8. """ ... @overload def circuit_by_cell_index(self, cell_index: int) -> Circuit: r""" - @brief Gets the circuit object for a given cell index. + @brief Gets the circuit object for a given cell index (const version). If the cell index is not valid or no circuit is registered with this index, nil is returned. + + This constness variant has been introduced in version 0.26.8. """ ... @overload @@ -40097,15 +40303,6 @@ class Netlist: """ ... @overload - def circuits_by_name(self, name_pattern: str) -> List[Circuit]: - r""" - @brief Gets the circuit objects for a given name filter. - The name filter is a glob pattern. This method will return all \Circuit objects matching the glob pattern. - - This method has been introduced in version 0.26.4. - """ - ... - @overload def circuits_by_name(self, name_pattern: str) -> List[Circuit]: r""" @brief Gets the circuit objects for a given name filter (const version). @@ -40115,6 +40312,15 @@ class Netlist: This constness variant has been introduced in version 0.26.8. """ ... + @overload + def circuits_by_name(self, name_pattern: str) -> List[Circuit]: + r""" + @brief Gets the circuit objects for a given name filter. + The name filter is a glob pattern. This method will return all \Circuit objects matching the glob pattern. + + This method has been introduced in version 0.26.4. + """ + ... def combine_devices(self) -> None: r""" @brief Combines devices where possible @@ -40166,15 +40372,15 @@ class Netlist: @overload def each_circuit(self) -> Iterator[Circuit]: r""" - @brief Iterates over the circuits of the netlist + @brief Iterates over the circuits of the netlist (const version) + + This constness variant has been introduced in version 0.26.8. """ ... @overload def each_circuit(self) -> Iterator[Circuit]: r""" - @brief Iterates over the circuits of the netlist (const version) - - This constness variant has been introduced in version 0.26.8. + @brief Iterates over the circuits of the netlist """ ... @overload @@ -42795,6 +43001,15 @@ class PCellParameterDeclaration: Setter: @brief Makes the parameter read-only if this attribute is set to true """ + tooltip: str + r""" + Getter: + @brief Gets the tool tip text + This attribute has been introduced in version 0.29.3. + Setter: + @brief Sets the tool tip text + This attribute has been introduced in version 0.29.3. + """ type: int r""" Getter: @@ -44054,6 +44269,11 @@ class Path: @param p The object to compare against """ ... + def __repr__(self) -> str: + r""" + @brief Convert to a string + """ + ... def __rmul__(self, f: float) -> Path: r""" @brief Scaling by some factor @@ -44609,6 +44829,14 @@ class Point: This method has been added in version 0.23. """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief String conversion. + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... def __rmul__(self, f: float) -> Point: r""" @brief Scaling by some factor @@ -45058,6 +45286,11 @@ class Polygon: @param p The object to compare against """ ... + def __repr__(self) -> str: + r""" + @brief Returns a string representing the polygon + """ + ... def __rmul__(self, f: float) -> Polygon: r""" @brief Scales the polygon by some factor @@ -49534,6 +49767,12 @@ class Region(ShapeCollection): The 'or' alias has been introduced in version 0.28.12. """ ... + def __repr__(self) -> str: + r""" + @brief Converts the region to a string + The length of the output is limited to 20 polygons to avoid giant strings on large regions. For full output use "to_s" with a maximum count parameter. + """ + ... def __str__(self) -> str: r""" @brief Converts the region to a string @@ -51481,6 +51720,88 @@ class Region(ShapeCollection): """ ... @overload + def size_inside(self, inside: Region, d: int, steps: int, mode: Optional[int] = ...) -> Region: + r""" + @brief Incremental, isotropic sizing inside of another region + + @return The region after the sizing has applied (self) + + This method is equivalent to "size_inside(d, d, steps, mode)". + + Merged semantics applies for this method (see \merged_semantics= for a description of this concept) + + This method has been introduced in version 0.29.3. + """ + ... + @overload + def size_inside(self, inside: Region, dv: Vector, steps: int, mode: Optional[int] = ...) -> Region: + r""" + @brief Incremental, anisotropic sizing inside of another region + + @return The region after the sizing has applied (self) + + This method is equivalent to "size_inside(dv.x, dv.y, steps, mode)". + + Merged semantics applies for this method (see \merged_semantics= for a description of this concept) + + This method has been introduced in version 0.29.3. + """ + ... + @overload + def size_inside(self, inside: Region, dx: int, dy: int, steps: int, mode: int) -> Region: + r""" + @brief Incremental, anisotropic sizing inside of another region + + @param inside The region the incremental sizing will stay inside. + @param dx The x sizing value + @param dy The y sizing value + @param steps The number of steps to take + @param mode The sizing mode (see \size) + + @return The region after the sizing has been applied (self) + + Sizes the region, keeping inside another region and performing the size in discrete steps. + + Using this method is equivalent to applying a single-step size and consecutively doing a boolean AND with the 'inside' region. This is repeated until the full sizing value is applied. + + This operation is employed to implement latch-up rules, where a device needs to be close to a well tap within the same well. For this, the tap footprint is incrementally sized, with the well as the 'inside' region. The steps is chosen so the per-step sizing is somewhat less than the minimum well space. Sizing the tap shape results in a growing footprint that follows the well contours and a small enough per-step sizing value ensures the sized contour does not cross well gaps. + + Merged semantics applies for this method (see \merged_semantics= for a description of this concept) + + This method has been introduced in version 0.29.3. + """ + ... + @overload + def size_outside(self, outside: Region, d: int, steps: int, mode: Optional[int] = ...) -> Region: + r""" + @brief Incremental, anisotropic sizing outside of another region + + This method is equivalent to \size_inside, except that sizing is performed outside the given 'outside' region. Technically this corresponds to a boolean 'NOT' operation instead of a boolean 'AND'. + + This method has been introduced in version 0.29.3. + """ + ... + @overload + def size_outside(self, outside: Region, dv: Vector, steps: int, mode: Optional[int] = ...) -> Region: + r""" + @brief Incremental, anisotropic sizing outside of another region + + This method is equivalent to \size_inside, except that sizing is performed outside the given 'outside' region. Technically this corresponds to a boolean 'NOT' operation instead of a boolean 'AND'. + + This method has been introduced in version 0.29.3. + """ + ... + @overload + def size_outside(self, outside: Region, dx: int, dy: int, steps: int, mode: int) -> Region: + r""" + @brief Incremental, anisotropic sizing outside of another region + + This method is equivalent to \size_inside, except that sizing is performed outside the given 'outside' region. Technically this corresponds to a boolean 'NOT' operation instead of a boolean 'AND'. + + This method has been introduced in version 0.29.3. + """ + ... + @overload def sized(self, d: int, mode: Optional[int] = ...) -> Region: r""" @brief Returns the isotropically sized region @@ -51520,6 +51841,74 @@ class Region(ShapeCollection): Merged semantics applies for this method (see \merged_semantics= for a description of this concept) """ ... + @overload + def sized_inside(self, inside: Region, d: int, steps: int, mode: Optional[int] = ...) -> Region: + r""" + @brief Returns the incrementally sized region + + @return The sized region + + This method returns the incrementally sized region (see \size_inside), but does not modify self. + + Merged semantics applies for this method (see \merged_semantics= for a description of this concept) + """ + ... + @overload + def sized_inside(self, inside: Region, dv: Vector, steps: int, mode: Optional[int] = ...) -> Region: + r""" + @brief Returns the incrementally and anisotropically sized region + + @return The sized region + + This method returns the incrementally sized region (see \size_inside), but does not modify self. + + Merged semantics applies for this method (see \merged_semantics= for a description of this concept) + + This variant has been introduced in version 0.28. + """ + ... + @overload + def sized_inside(self, inside: Region, dx: int, dy: int, steps: int, mode: int) -> Region: + r""" + @brief Returns the incrementally and anisotropically sized region + + @return The sized region + + This method returns the incrementally sized region (see \size_inside), but does not modify self. + + Merged semantics applies for this method (see \merged_semantics= for a description of this concept) + """ + ... + @overload + def sized_outside(self, outside: Region, d: int, steps: int, mode: Optional[int] = ...) -> Region: + r""" + @brief Incremental, anisotropic sizing outside of another region + + This method is equivalent to \size_inside, except that sizing is performed outside the given 'outside' region. Technically this corresponds to a boolean 'NOT' operation instead of a boolean 'AND'. + + This method has been introduced in version 0.29.3. + """ + ... + @overload + def sized_outside(self, outside: Region, dv: Vector, steps: int, mode: Optional[int] = ...) -> Region: + r""" + @brief Incremental, anisotropic sizing outside of another region + + This method is equivalent to \size_inside, except that sizing is performed outside the given 'outside' region. Technically this corresponds to a boolean 'NOT' operation instead of a boolean 'AND'. + + This method has been introduced in version 0.29.3. + """ + ... + @overload + def sized_outside(self, outside: Region, dx: int, dy: int, steps: int, mode: int) -> Region: + r""" + @brief Incremental, anisotropic sizing outside of another region + + This method is equivalent to \size_inside, except that sizing is performed outside the given 'outside' region. Technically this corresponds to a boolean 'NOT' operation instead of a boolean 'AND'. + + This method has been introduced in version 0.29.3. + """ + ... def smooth(self, d: int, keep_hv: Optional[bool] = ...) -> None: r""" @brief Smoothing @@ -54055,6 +54444,13 @@ class Shape: @brief Inequality operator """ ... + def __repr__(self) -> str: + r""" + @brief Create a string showing the contents of the reference + + This method has been introduced with version 0.16. + """ + ... def __str__(self) -> str: r""" @brief Create a string showing the contents of the reference @@ -56670,6 +57066,11 @@ class SimplePolygon: @param p The object to compare against """ ... + def __repr__(self) -> str: + r""" + @brief Returns a string representing the polygon + """ + ... def __rmul__(self, f: float) -> SimplePolygon: r""" @brief Scales the polygon by some factor @@ -57340,16 +57741,16 @@ class SubCircuit(NetlistObject): @overload def circuit_ref(self) -> Circuit: r""" - @brief Gets the circuit referenced by the subcircuit (non-const version). - - - This constness variant has been introduced in version 0.26.8 + @brief Gets the circuit referenced by the subcircuit. """ ... @overload def circuit_ref(self) -> Circuit: r""" - @brief Gets the circuit referenced by the subcircuit. + @brief Gets the circuit referenced by the subcircuit (non-const version). + + + This constness variant has been introduced in version 0.26.8 """ ... @overload @@ -57395,17 +57796,17 @@ class SubCircuit(NetlistObject): @overload def net_for_pin(self, pin_id: int) -> Net: r""" - @brief Gets the net connected to the specified pin of the subcircuit (non-const version). + @brief Gets the net connected to the specified pin of the subcircuit. If the pin is not connected, nil is returned for the net. - - This constness variant has been introduced in version 0.26.8 """ ... @overload def net_for_pin(self, pin_id: int) -> Net: r""" - @brief Gets the net connected to the specified pin of the subcircuit. + @brief Gets the net connected to the specified pin of the subcircuit (non-const version). If the pin is not connected, nil is returned for the net. + + This constness variant has been introduced in version 0.26.8 """ ... ... @@ -57993,7 +58394,8 @@ class Text: Setter: @brief Sets the horizontal alignment - This is the version accepting integer values. It's provided for backward compatibility. + This property specifies how the text is aligned relative to the anchor point. + This property has been introduced in version 0.22 and extended to enums in 0.28. """ size: int r""" @@ -58029,8 +58431,7 @@ class Text: Setter: @brief Sets the vertical alignment - This property specifies how the text is aligned relative to the anchor point. - This property has been introduced in version 0.22 and extended to enums in 0.28. + This is the version accepting integer values. It's provided for backward compatibility. """ x: int r""" @@ -58199,6 +58600,14 @@ class Text: Return true, if this text object and the given text are not equal """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief Converts the object to a string. + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... def __str__(self, dbu: Optional[float] = ...) -> str: r""" @brief Converts the object to a string. @@ -59481,6 +59890,12 @@ class Texts(ShapeCollection): Starting with version 0.27, the method is called 'count' for consistency with \Region. 'size' is still provided as an alias. """ ... + def __repr__(self) -> str: + r""" + @brief Converts the text collection to a string + The length of the output is limited to 20 texts to avoid giant strings on large collections. For full output use "to_s" with a maximum count parameter. + """ + ... def __str__(self) -> str: r""" @brief Converts the text collection to a string @@ -59562,31 +59977,11 @@ class Texts(ShapeCollection): Starting with version 0.27, the method is called 'count' for consistency with \Region. 'size' is still provided as an alias. """ ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... def data_id(self) -> int: r""" @brief Returns the data ID (a unique identifier for the underlying data storage) """ ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... def disable_progress(self) -> None: r""" @brief Disable progress reporting @@ -59720,13 +60115,6 @@ class Texts(ShapeCollection): @return A new text collection containing the texts inside or on the edge of polygons from the region """ ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... def is_deep(self) -> bool: r""" @brief Returns true if the edge pair collection is a deep (hierarchical) one @@ -61230,6 +61618,14 @@ class Trans: @brief Tests for inequality """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief String conversion + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... @overload def __rmul__(self, box: Box) -> Box: r""" @@ -62724,6 +63120,15 @@ class VCplxTrans: @brief Tests for inequality """ ... + def __repr__(self, lazy: Optional[bool] = ..., dbu: Optional[float] = ...) -> str: + r""" + @brief String conversion + If 'lazy' is true, some parts are omitted when not required. + If a DBU is given, the output units will be micrometers. + + The lazy and DBU arguments have been added in version 0.27.6. + """ + ... @overload def __rmul__(self, box: DBox) -> Box: r""" @@ -63355,6 +63760,14 @@ class Vector: Returns a new vector with -x,-y. """ ... + def __repr__(self, dbu: Optional[float] = ...) -> str: + r""" + @brief String conversion + If a DBU is given, the output units will be micrometers. + + The DBU argument has been added in version 0.27.6. + """ + ... @overload def __rmul__(self, f: float) -> Vector: r""" diff --git a/src/pymod/distutils_src/klayout/laycore.pyi b/src/pymod/distutils_src/klayout/laycore.pyi index a2b961f87..2ca5ae930 100644 --- a/src/pymod/distutils_src/klayout/laycore.pyi +++ b/src/pymod/distutils_src/klayout/laycore.pyi @@ -77,6 +77,16 @@ class AbstractMenu: This method has been introduced in version 0.26. """ ... + def __copy__(self) -> AbstractMenu: + r""" + @brief Creates a copy of self + """ + ... + def __deepcopy__(self) -> AbstractMenu: + r""" + @brief Creates a copy of self + """ + ... def __init__(self) -> None: r""" @hide @@ -133,6 +143,11 @@ class AbstractMenu: @return A reference to a Action object associated with this path or nil if the path is not valid """ ... + def assign(self, other: AbstractMenu) -> None: + r""" + @brief Assigns another object to self + """ + ... def clear_menu(self, path: str) -> None: r""" @brief Deletes the children of the item given by the path @@ -171,6 +186,11 @@ class AbstractMenu: The latter may happen, if the object is owned by a C++ object which got destroyed itself. """ ... + def dup(self) -> AbstractMenu: + r""" + @brief Creates a copy of self + """ + ... def group(self, group: str) -> List[str]: r""" @brief Gets the group members @@ -660,15 +680,6 @@ class ActionBase: The visibility combines with \is_hidden?. To get the true visiblity, use \is_effective_visible?. """ ... - def macro(self) -> Macro: - r""" - @brief Gets the macro associated with the action - If the action is associated with a macro, this method returns a reference to the \Macro object. Otherwise, this method returns nil. - - - This method has been added in version 0.25. - """ - ... def trigger(self) -> None: r""" @brief Triggers the action programmatically @@ -1240,6 +1251,12 @@ class Annotation(BasicAnnotation): @brief Inequality operator """ ... + def __repr__(self) -> str: + r""" + @brief Returns the string representation of the ruler + This method was introduced in version 0.19. + """ + ... def __str__(self) -> str: r""" @brief Returns the string representation of the ruler @@ -1675,12 +1692,6 @@ class BitmapBuffer: """ ... @classmethod - def from_qimage(cls, qimage: QtGui.QImage_Native) -> BitmapBuffer: - r""" - @brief Creates a pixel buffer object from a QImage object - """ - ... - @classmethod def new(cls, width: int, height: int) -> BitmapBuffer: r""" @brief Creates a pixel buffer object @@ -1839,11 +1850,6 @@ class BitmapBuffer: This method may not be available if PNG support is not compiled into KLayout. """ ... - def to_qimage(self) -> QtGui.QImage_Native: - r""" - @brief Converts the pixel buffer to a \QImage object - """ - ... def width(self) -> int: r""" @brief Gets the width of the pixel buffer in pixels @@ -1857,654 +1863,6 @@ class BitmapBuffer: ... ... -class BrowserDialog(QDialog_Native): - r""" - @brief A HTML display and browser dialog - - The browser dialog displays HTML code in a browser panel. The HTML code is delivered through a separate object of class \BrowserSource which acts as a "server" for a specific kind of URL scheme. Whenever the browser sees a URL starting with "int:" it will ask the connected BrowserSource object for the HTML code of that page using its 'get' method. The task of the BrowserSource object is to format the data requested in HTML and deliver it. - - One use case for that class is the implementation of rich data browsers for structured information. In a simple scenario, the browser dialog can be instantiated with a static HTML page. In that case, only the content of that page is shown. - - Here's a simple example: - - @code - html = "Hello, world!" - RBA::BrowserDialog::new(html).exec - @/code - - And that is an example for the use case with a \BrowserSource as the "server": - - @code - class MySource < RBA::BrowserSource - def get(url) - if (url =~ /b.html$/) - return "The second page" - else - return "The first page with a link" - end - end - end - - source = MySource::new - RBA::BrowserDialog::new(source).exec - @/code - """ - @property - def caption(self) -> None: - r""" - WARNING: This variable can only be set, not retrieved. - @brief Sets the caption of the window - """ - ... - @property - def home(self) -> None: - r""" - WARNING: This variable can only be set, not retrieved. - @brief Sets the browser's initial and current URL which is selected if the "home" location is chosen - The home URL is the one shown initially and the one which is selected when the "home" button is pressed. The default location is "int:/index.html". - """ - ... - @property - def label(self) -> None: - r""" - WARNING: This variable can only be set, not retrieved. - @brief Sets the label text - - The label is shown left of the navigation buttons. - By default, no label is specified. - - This method has been introduced in version 0.23. - """ - ... - @property - def source(self) -> None: - r""" - WARNING: This variable can only be set, not retrieved. - @brief Connects to a source object - - Setting the source should be the first thing done after the BrowserDialog object is created. It will not have any effect after the browser has loaded the first page. In particular, \home= should be called after the source was set. - """ - ... - @overload - @classmethod - def new(cls, html: str) -> BrowserDialog: - r""" - @brief Creates a HTML browser window with a static HTML content - This method has been introduced in version 0.23. - """ - ... - @overload - @classmethod - def new(cls, parent: QtWidgets.QWidget_Native, html: str) -> BrowserDialog: - r""" - @brief Creates a HTML browser window with a static HTML content - This method variant with a parent argument has been introduced in version 0.24.2. - """ - ... - @overload - @classmethod - def new(cls, parent: QtWidgets.QWidget_Native, source: BrowserSource) -> BrowserDialog: - r""" - @brief Creates a HTML browser window with a \BrowserSource as the source of HTML code - This method variant with a parent argument has been introduced in version 0.24.2. - """ - ... - @overload - @classmethod - def new(cls, source: BrowserSource) -> BrowserDialog: - r""" - @brief Creates a HTML browser window with a \BrowserSource as the source of HTML code - This method has been introduced in version 0.23. - """ - ... - @overload - def __init__(self, html: str) -> None: - r""" - @brief Creates a HTML browser window with a static HTML content - This method has been introduced in version 0.23. - """ - ... - @overload - def __init__(self, parent: QtWidgets.QWidget_Native, html: str) -> None: - r""" - @brief Creates a HTML browser window with a static HTML content - This method variant with a parent argument has been introduced in version 0.24.2. - """ - ... - @overload - def __init__(self, parent: QtWidgets.QWidget_Native, source: BrowserSource) -> None: - r""" - @brief Creates a HTML browser window with a \BrowserSource as the source of HTML code - This method variant with a parent argument has been introduced in version 0.24.2. - """ - ... - @overload - def __init__(self, source: BrowserSource) -> None: - r""" - @brief Creates a HTML browser window with a \BrowserSource as the source of HTML code - This method has been introduced in version 0.23. - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def exec_(self) -> int: - r""" - @brief Executes the HTML browser dialog as a modal window - """ - ... - def execute(self) -> int: - r""" - @brief Executes the HTML browser dialog as a modal window - """ - ... - def load(self, url: str) -> None: - r""" - @brief Loads the given URL into the browser dialog - Typically the URL has the "int:" scheme so the HTML code is taken from the \BrowserSource object. - """ - ... - def reload(self) -> None: - r""" - @brief Reloads the current page - """ - ... - def resize(self, width: int, height: int) -> None: - r""" - @brief Sets the size of the dialog window - """ - ... - def search(self, search_item: str) -> None: - r""" - @brief Issues a search request using the given search item and the search URL specified with \set_search_url - - See \set_search_url for a description of the search mechanism. - """ - ... - def set_caption(self, caption: str) -> None: - r""" - @brief Sets the caption of the window - """ - ... - def set_home(self, home_url: str) -> None: - r""" - @brief Sets the browser's initial and current URL which is selected if the "home" location is chosen - The home URL is the one shown initially and the one which is selected when the "home" button is pressed. The default location is "int:/index.html". - """ - ... - def set_search_url(self, url: str, query_item: str) -> None: - r""" - @brief Enables the search field and specifies the search URL generated for a search - - If a search URL is set, the search box right to the navigation bar will be enabled. When a text is entered into the search box, the browser will navigate to an URL composed of the search URL, the search item and the search text, i.e. "myurl?item=search_text". - - This method has been introduced in version 0.23. - """ - ... - def set_size(self, width: int, height: int) -> None: - r""" - @brief Sets the size of the dialog window - """ - ... - def set_source(self, source: BrowserSource) -> None: - r""" - @brief Connects to a source object - - Setting the source should be the first thing done after the BrowserDialog object is created. It will not have any effect after the browser has loaded the first page. In particular, \home= should be called after the source was set. - """ - ... - ... - -class BrowserPanel(QWidget_Native): - r""" - @brief A HTML display and browser widget - - This widget provides the functionality of \BrowserDialog within a widget. It can be embedded into other dialogs. For details about the use model of this class see \BrowserDialog. - - This class has been introduced in version 0.25. - """ - @property - def home(self) -> None: - r""" - WARNING: This variable can only be set, not retrieved. - @brief Sets the browser widget's initial and current URL which is selected if the "home" location is chosen - The home URL is the one shown initially and the one which is selected when the "home" button is pressed. The default location is "int:/index.html". - """ - ... - @property - def label(self) -> None: - r""" - WARNING: This variable can only be set, not retrieved. - @brief Sets the label text - - The label is shown left of the navigation buttons. - By default, no label is specified. - """ - ... - @property - def source(self) -> None: - r""" - WARNING: This variable can only be set, not retrieved. - @brief Connects to a source object - - Setting the source should be the first thing done after the BrowserDialog object is created. It will not have any effect after the browser has loaded the first page. In particular, \home= should be called after the source was set. - """ - ... - @overload - @classmethod - def new(cls, parent: QtWidgets.QWidget_Native) -> BrowserPanel: - r""" - @brief Creates a HTML browser widget - """ - ... - @overload - @classmethod - def new(cls, parent: QtWidgets.QWidget_Native, source: BrowserSource_Native) -> BrowserPanel: - r""" - @brief Creates a HTML browser widget with a \BrowserSource as the source of HTML code - """ - ... - @overload - def __init__(self, parent: QtWidgets.QWidget_Native) -> None: - r""" - @brief Creates a HTML browser widget - """ - ... - @overload - def __init__(self, parent: QtWidgets.QWidget_Native, source: BrowserSource_Native) -> None: - r""" - @brief Creates a HTML browser widget with a \BrowserSource as the source of HTML code - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def load(self, url: str) -> None: - r""" - @brief Loads the given URL into the browser widget - Typically the URL has the "int:" scheme so the HTML code is taken from the \BrowserSource object. - """ - ... - def reload(self) -> None: - r""" - @brief Reloads the current page - """ - ... - def search(self, search_item: str) -> None: - r""" - @brief Issues a search request using the given search item and the search URL specified with \set_search_url - - See \search_url= for a description of the search mechanism. - """ - ... - def set_search_url(self, url: str, query_item: str) -> None: - r""" - @brief Enables the search field and specifies the search URL generated for a search - - If a search URL is set, the search box right to the navigation bar will be enabled. When a text is entered into the search box, the browser will navigate to an URL composed of the search URL, the search item and the search text, i.e. "myurl?item=search_text". - """ - ... - def url(self) -> str: - r""" - @brief Gets the URL currently shown - """ - ... - ... - -class BrowserSource: - r""" - @brief The BrowserDialog's source for "int" URL's - - The source object basically acts as a "server" for special URL's using "int" as the scheme. - Classes that want to implement such functionality must derive from BrowserSource and reimplement - the \get method. This method is supposed to deliver a HTML page for the given URL. - - Alternatively to implementing this functionality, a source object may be instantiated using the - constructor with a HTML code string. This will create a source object that simply displays the given string - as the initial and only page. - """ - @classmethod - def new(cls, html: str) -> BrowserSource: - r""" - @brief Constructs a BrowserSource object with a default HTML string - - The default HTML string is sent when no specific implementation is provided. - """ - ... - @classmethod - def new_html(cls, html: str) -> BrowserSource: - r""" - @brief Constructs a BrowserSource object with a default HTML string - - The default HTML string is sent when no specific implementation is provided. - """ - ... - def __copy__(self) -> BrowserSource: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> BrowserSource: - r""" - @brief Creates a copy of self - """ - ... - def __init__(self, html: str) -> None: - r""" - @brief Constructs a BrowserSource object with a default HTML string - - The default HTML string is sent when no specific implementation is provided. - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: BrowserSource) -> None: - r""" - @brief Assigns another object to self - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def dup(self) -> BrowserSource: - r""" - @brief Creates a copy of self - """ - ... - def get_image(self, url: str) -> QtGui.QImage_Native: - r""" - @brief Gets the image object for a specific URL - - This method has been introduced in version 0.28. - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def next_topic(self, url: str) -> str: - r""" - @brief Gets the next topic URL from a given URL - An empty string will be returned if no next topic is available. - - This method has been introduced in version 0.28. - """ - ... - def prev_topic(self, url: str) -> str: - r""" - @brief Gets the previous topic URL from a given URL - An empty string will be returned if no previous topic is available. - - This method has been introduced in version 0.28. - """ - ... - ... - -class BrowserSource_Native: - r""" - @hide - @alias BrowserSource - """ - @classmethod - def new(cls) -> BrowserSource_Native: - r""" - @brief Creates a new object of this class - """ - ... - def __copy__(self) -> BrowserSource_Native: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> BrowserSource_Native: - r""" - @brief Creates a copy of self - """ - ... - def __init__(self) -> None: - r""" - @brief Creates a new object of this class - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: BrowserSource_Native) -> None: - r""" - @brief Assigns another object to self - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def dup(self) -> BrowserSource_Native: - r""" - @brief Creates a copy of self - """ - ... - def get(self, url: str) -> str: - r""" - """ - ... - def get_image(self, url: str) -> QtGui.QImage_Native: - r""" - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def next_topic(self, url: str) -> str: - r""" - """ - ... - def prev_topic(self, url: str) -> str: - r""" - """ - ... - ... - class ButtonState: r""" @brief The namespace for the button state flags in the mouse events of the Plugin class. @@ -3411,138 +2769,6 @@ class Dispatcher: ... ... -class DoubleValue: - r""" - @brief Encapsulate a floating point value - @hide - This class is provided as a return value of \InputDialog::get_double. - By using an object rather than a pure value, an object with \has_value? = false can be returned indicating that - the "Cancel" button was pressed. Starting with version 0.22, the InputDialog class offers new method which do no - longer requires to use this class. - """ - @classmethod - def new(cls) -> DoubleValue: - r""" - @brief Creates a new object of this class - """ - ... - def __copy__(self) -> DoubleValue: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> DoubleValue: - r""" - @brief Creates a copy of self - """ - ... - def __float__(self) -> float: - r""" - @brief Get the actual value (a synonym for \value) - """ - ... - def __init__(self) -> None: - r""" - @brief Creates a new object of this class - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: DoubleValue) -> None: - r""" - @brief Assigns another object to self - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def dup(self) -> DoubleValue: - r""" - @brief Creates a copy of self - """ - ... - def has_value(self) -> bool: - r""" - @brief True, if a value is present - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def to_f(self) -> float: - r""" - @brief Get the actual value (a synonym for \value) - """ - ... - def value(self) -> float: - r""" - @brief Get the actual value - """ - ... - ... - class EditorHooks: r""" @brief An implementation base class for editor hooks @@ -3824,437 +3050,6 @@ class EditorHooks: ... ... -class FileDialog: - r""" - @brief Various methods to request a file name - - This class provides some basic dialogs to select a file or directory. This functionality is provided through the static (class) methods ask_... - - Here are some examples: - - @code - # get an existing directory: - v = RBA::FileDialog::ask_existing_dir("Dialog Title", ".") - # get multiple files: - v = RBA::FileDialog::ask_open_file_names("Title", ".", "All files (*)") - # ask for one file name to save a file: - v = RBA::FileDialog::ask_save_file_name("Title", ".", "All files (*)") - @/code - - All these examples return the "nil" value if "Cancel" is pressed. - - If you have enabled the Qt binding, you can use \QFileDialog directly. - """ - @classmethod - def ask_existing_dir(cls, title: str, dir: str) -> Any: - r""" - @brief Open a dialog to select a directory - - @param title The title of the dialog - @param dir The directory selected initially - @return The directory path selected or "nil" if "Cancel" was pressed - - This method has been introduced in version 0.23. It is somewhat easier to use than the get_... equivalent. - """ - ... - @classmethod - def ask_open_file_name(cls, title: str, dir: str, filter: str) -> Any: - r""" - @brief Select one file for opening - - @param title The title of the dialog - @param dir The directory selected initially - @param filter The filters available, for example "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" - @return The path of the file selected or "nil" if "Cancel" was pressed - - This method has been introduced in version 0.23. It is somewhat easier to use than the get_... equivalent. - """ - ... - @classmethod - def ask_open_file_names(cls, title: str, dir: str, filter: str) -> Any: - r""" - @brief Select one or multiple files for opening - - @param title The title of the dialog - @param dir The directory selected initially - @param filter The filters available, for example "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" - @return An array with the file paths selected or "nil" if "Cancel" was pressed - - This method has been introduced in version 0.23. It is somewhat easier to use than the get_... equivalent. - """ - ... - @classmethod - def ask_save_file_name(cls, title: str, dir: str, filter: str) -> Any: - r""" - @brief Select one file for writing - - @param title The title of the dialog - @param dir The directory selected initially - @param filter The filters available, for example "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" - @return The path of the file chosen or "nil" if "Cancel" was pressed - - This method has been introduced in version 0.23. It is somewhat easier to use than the get_... equivalent. - """ - ... - @classmethod - def ask_save_file_name_with_filter(cls, title: str, dir: str, filter: str) -> Any: - r""" - @brief Select one file for writing - - @param title The title of the dialog - @param dir The directory selected initially - @param filter The filters available, for example "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" - @return "nil" if "Cancel" was pressed, otherwise a pair: The path of the file chosen and the index selected file type (-1 if no specific type was selected) - - This method has been introduced in version 0.28.11. - """ - ... - @classmethod - def get_existing_dir(cls, title: str, dir: str) -> StringValue: - r""" - @brief Open a dialog to select a directory - - @param title The title of the dialog - @param dir The directory selected initially - @return A \StringValue object that contains the directory path selected or with has_value? = false if "Cancel" was pressed - - Starting with version 0.23 this method is deprecated. Use \ask_existing_dir instead. - """ - ... - @classmethod - def get_open_file_name(cls, title: str, dir: str, filter: str) -> StringValue: - r""" - @brief Select one file for opening - - @param title The title of the dialog - @param dir The directory selected initially - @param filter The filters available, for example "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" - @return A \StringValue object that contains the files selected or with has_value? = false if "Cancel" was pressed - - Starting with version 0.23 this method is deprecated. Use \ask_open_file_name instead. - """ - ... - @classmethod - def get_open_file_names(cls, title: str, dir: str, filter: str) -> StringListValue: - r""" - @brief Select one or multiple files for opening - - @param title The title of the dialog - @param dir The directory selected initially - @param filter The filters available, for example "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" - @return A \StringListValue object that contains the files selected or with has_value? = false if "Cancel" was pressed - - Starting with version 0.23 this method is deprecated. Use \ask_open_file_names instead. - """ - ... - @classmethod - def get_save_file_name(cls, title: str, dir: str, filter: str) -> StringValue: - r""" - @brief Select one file for writing - - @param title The title of the dialog - @param dir The directory selected initially - @param filter The filters available, for example "Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" - @return A \StringValue object that contains the files selected or with has_value? = false if "Cancel" was pressed - - Starting with version 0.23 this method is deprecated. Use \ask_save_file_name instead. - """ - ... - @classmethod - def new(cls) -> FileDialog: - r""" - @brief Creates a new object of this class - """ - ... - def __copy__(self) -> FileDialog: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> FileDialog: - r""" - @brief Creates a copy of self - """ - ... - def __init__(self) -> None: - r""" - @brief Creates a new object of this class - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: FileDialog) -> None: - r""" - @brief Assigns another object to self - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def dup(self) -> FileDialog: - r""" - @brief Creates a copy of self - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - ... - -class HelpDialog(QDialog_Native): - r""" - @brief The help dialog - - This class makes the help dialog available as an individual object. - - This class has been added in version 0.25. - """ - @overload - @classmethod - def new(cls, modal: bool) -> HelpDialog: - r""" - @brief Creates a new help dialog - If the modal flag is true, the dialog will be shown as a modal window. - """ - ... - @overload - @classmethod - def new(cls, parent: QtWidgets.QWidget_Native, modal: bool) -> HelpDialog: - r""" - @brief Creates a new help dialog - If the modal flag is true, the dialog will be shown as a modal window. - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def load(self, url: str) -> None: - r""" - @brief Loads the specified URL - This method will call the page with the given URL. - """ - ... - def search(self, topic: str) -> None: - r""" - @brief Issues a search on the specified topic - This method will call the search page with the given topic. - """ - ... - ... - -class HelpSource(BrowserSource_Native): - r""" - @brief A BrowserSource implementation delivering the help text for the help dialog - This class can be used together with a \BrowserPanel or \BrowserDialog object to implement custom help systems. - - The basic URL's served by this class are: "int:/index.xml" for the index page and "int:/search.xml?string=..." for the search topic retrieval. - - This class has been added in version 0.25. - """ - @classmethod - def create_index_file(cls, path: str) -> None: - r""" - @brief Reserved internal use - """ - ... - @classmethod - def plain(cls) -> HelpSource: - r""" - @brief Reserved for internal use - """ - ... - def _assign(self, other: BrowserSource_Native) -> None: - r""" - @brief Assigns another object to self - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _dup(self) -> HelpSource: - r""" - @brief Creates a copy of self - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def get_dom(self, path: str) -> QtXml.QDomDocument: - r""" - @brief Reserved for internal use - """ - ... - def get_option(self, key: str) -> Any: - r""" - @brief Reserved for internal use - """ - ... - def parent_of(self, path: str) -> str: - r""" - @brief Reserved internal use - """ - ... - def scan(self) -> None: - r""" - @brief Reserved internal use - """ - ... - def set_option(self, key: str, value: Any) -> None: - r""" - @brief Reserved for internal use - """ - ... - def title_for(self, path: str) -> str: - r""" - @brief Reserved internal use - """ - ... - def urls(self) -> List[str]: - r""" - @brief Reserved for internal use - """ - ... - ... - class Image(BasicImage): r""" @brief An image to be stored as a layout annotation @@ -4464,21 +3259,6 @@ class Image(BasicImage): ... @overload @classmethod - def new(cls, image: QtGui.QImage_Native, trans: Optional[db.DCplxTrans] = ...) -> Image: - r""" - @brief Constructor from a image pixel buffer - - This constructor creates an image object from a pixel QImage object and uses RGB or mono image data to generate the image. - - The image will originally be put to position 0,0 (lower left corner) and each pixel - will have a size of 1. The transformation describes how to transform this image into micron space. - - @param filename The path to the image file to load. - @param trans The transformation to apply to the image when displaying it. - """ - ... - @overload - @classmethod def new(cls, pixels: PixelBuffer, trans: Optional[db.DCplxTrans] = ...) -> Image: r""" @brief Constructor from a image pixel buffer @@ -4602,20 +3382,6 @@ class Image(BasicImage): """ ... @overload - def __init__(self, image: QtGui.QImage_Native, trans: Optional[db.DCplxTrans] = ...) -> None: - r""" - @brief Constructor from a image pixel buffer - - This constructor creates an image object from a pixel QImage object and uses RGB or mono image data to generate the image. - - The image will originally be put to position 0,0 (lower left corner) and each pixel - will have a size of 1. The transformation describes how to transform this image into micron space. - - @param filename The path to the image file to load. - @param trans The transformation to apply to the image when displaying it. - """ - ... - @overload def __init__(self, pixels: PixelBuffer, trans: Optional[db.DCplxTrans] = ...) -> None: r""" @brief Constructor from a image pixel buffer @@ -4703,6 +3469,13 @@ class Image(BasicImage): @param blue The blue channel data set which will become owned by the image """ ... + def __repr__(self) -> str: + r""" + @brief Converts the image to a string + The string returned can be used to create an image object using \from_s. + @return The string + """ + ... def __str__(self) -> str: r""" @brief Converts the image to a string @@ -5288,430 +4061,6 @@ class ImageDataMapping: ... ... -class InputDialog: - r""" - @brief Various methods to open a dialog requesting data entry - This class provides some basic dialogs to enter a single value. Values can be strings floating-point values, integer values or an item from a list. - This functionality is provided through the static (class) methods ask_... - - Here are some examples: - - @code - # get a double value between -10 and 10 (initial value is 0): - v = RBA::InputDialog::ask_double_ex("Dialog Title", "Enter the value here:", 0, -10, 10, 1) - # get an item from a list: - v = RBA::InputDialog::ask_item("Dialog Title", "Select one:", [ "item 1", "item 2", "item 3" ], 1) - @/code - - All these examples return the "nil" value if "Cancel" is pressed. - - If you have enabled the Qt binding, you can use \QInputDialog directly. - """ - @classmethod - def ask_double(cls, title: str, label: str, value: float, digits: int) -> Any: - r""" - @brief Open an input dialog requesting a floating-point value - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @param digits The number of digits allowed - @return The value entered if "Ok" was pressed or nil if "Cancel" was pressed - This method has been introduced in 0.22 and is somewhat easier to use than the get_.. equivalent. - """ - ... - @classmethod - def ask_double_ex(cls, title: str, label: str, value: float, min: float, max: float, digits: int) -> Any: - r""" - @brief Open an input dialog requesting a floating-point value with enhanced capabilities - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @param min The minimum value allowed - @param max The maximum value allowed - @param digits The number of digits allowed - @return The value entered if "Ok" was pressed or nil if "Cancel" was pressed - This method has been introduced in 0.22 and is somewhat easier to use than the get_.. equivalent. - """ - ... - @classmethod - def ask_int(cls, title: str, label: str, value: int) -> Any: - r""" - @brief Open an input dialog requesting an integer value - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @return The value entered if "Ok" was pressed or nil if "Cancel" was pressed - This method has been introduced in 0.22 and is somewhat easier to use than the get_.. equivalent. - """ - ... - @classmethod - def ask_int_ex(cls, title: str, label: str, value: int, min: int, max: int, step: int) -> Any: - r""" - @brief Open an input dialog requesting an integer value with enhanced capabilities - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @param min The minimum value allowed - @param max The maximum value allowed - @param step The step size for the spin buttons - @return The value entered if "Ok" was pressed or nil if "Cancel" was pressed - This method has been introduced in 0.22 and is somewhat easier to use than the get_.. equivalent. - """ - ... - @classmethod - def ask_item(cls, title: str, label: str, items: Sequence[str], value: int) -> Any: - r""" - @brief Open an input dialog requesting an item from a list - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param items The list of items to show in the selection element - @param selection The initial selection (index of the element selected initially) - @return The string of the item selected if "Ok" was pressed or nil if "Cancel" was pressed - This method has been introduced in 0.22 and is somewhat easier to use than the get_.. equivalent. - """ - ... - @classmethod - def ask_string(cls, title: str, label: str, value: str) -> Any: - r""" - @brief Open an input dialog requesting a string - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @return The string entered if "Ok" was pressed or nil if "Cancel" was pressed - This method has been introduced in 0.22 and is somewhat easier to use than the get_.. equivalent. - """ - ... - @classmethod - def ask_string_password(cls, title: str, label: str, value: str) -> Any: - r""" - @brief Open an input dialog requesting a string without showing the actual characters entered - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @return The string entered if "Ok" was pressed or nil if "Cancel" was pressed - This method has been introduced in 0.22 and is somewhat easier to use than the get_.. equivalent. - """ - ... - @classmethod - def get_double(cls, title: str, label: str, value: float, digits: int) -> DoubleValue: - r""" - @brief Open an input dialog requesting a floating-point value - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @param digits The number of digits allowed - @return A \DoubleValue object with has_value? set to true, if "Ok" was pressed and the value given in its value attribute - Starting from 0.22, this method is deprecated and it is recommended to use the ask_... equivalent. - """ - ... - @classmethod - def get_double_ex(cls, title: str, label: str, value: float, min: float, max: float, digits: int) -> DoubleValue: - r""" - @brief Open an input dialog requesting a floating-point value with enhanced capabilities - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @param min The minimum value allowed - @param max The maximum value allowed - @param digits The number of digits allowed - @return A \DoubleValue object with has_value? set to true, if "Ok" was pressed and the value given in its value attribute - Starting from 0.22, this method is deprecated and it is recommended to use the ask_... equivalent. - """ - ... - @classmethod - def get_int(cls, title: str, label: str, value: int) -> IntValue: - r""" - @brief Open an input dialog requesting an integer value - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @return A \IntValue object with has_value? set to true, if "Ok" was pressed and the value given in its value attribute - Starting from 0.22, this method is deprecated and it is recommended to use the ask_... equivalent. - """ - ... - @classmethod - def get_int_ex(cls, title: str, label: str, value: int, min: int, max: int, step: int) -> IntValue: - r""" - @brief Open an input dialog requesting an integer value with enhanced capabilities - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @param min The minimum value allowed - @param max The maximum value allowed - @param step The step size for the spin buttons - @return A \IntValue object with has_value? set to true, if "Ok" was pressed and the value given in its value attribute - Starting from 0.22, this method is deprecated and it is recommended to use the ask_... equivalent. - """ - ... - @classmethod - def get_item(cls, title: str, label: str, items: Sequence[str], value: int) -> StringValue: - r""" - @brief Open an input dialog requesting an item from a list - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param items The list of items to show in the selection element - @param selection The initial selection (index of the element selected initially) - @return A \StringValue object with has_value? set to true, if "Ok" was pressed and the value given in its value attribute - Starting from 0.22, this method is deprecated and it is recommended to use the ask_... equivalent. - """ - ... - @classmethod - def get_string(cls, title: str, label: str, value: str) -> StringValue: - r""" - @brief Open an input dialog requesting a string - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @return A \StringValue object with has_value? set to true, if "Ok" was pressed and the value given in its value attribute - Starting from 0.22, this method is deprecated and it is recommended to use the ask_... equivalent. - """ - ... - @classmethod - def get_string_password(cls, title: str, label: str, value: str) -> StringValue: - r""" - @brief Open an input dialog requesting a string without showing the actual characters entered - @param title The title to display for the dialog - @param label The label text to display for the dialog - @param value The initial value for the input field - @return A \StringValue object with has_value? set to true, if "Ok" was pressed and the value given in its value attribute - Starting from 0.22, this method is deprecated and it is recommended to use the ask_... equivalent. - """ - ... - @classmethod - def new(cls) -> InputDialog: - r""" - @brief Creates a new object of this class - """ - ... - def __copy__(self) -> InputDialog: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> InputDialog: - r""" - @brief Creates a copy of self - """ - ... - def __init__(self) -> None: - r""" - @brief Creates a new object of this class - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: InputDialog) -> None: - r""" - @brief Assigns another object to self - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def dup(self) -> InputDialog: - r""" - @brief Creates a copy of self - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - ... - -class IntValue: - r""" - @brief Encapsulate an integer value - @hide - This class is provided as a return value of \InputDialog::get_int. - By using an object rather than a pure value, an object with \has_value? = false can be returned indicating that - the "Cancel" button was pressed. Starting with version 0.22, the InputDialog class offers new method which do no - longer requires to use this class. - """ - @classmethod - def new(cls) -> IntValue: - r""" - @brief Creates a new object of this class - """ - ... - def __copy__(self) -> IntValue: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> IntValue: - r""" - @brief Creates a copy of self - """ - ... - def __init__(self) -> None: - r""" - @brief Creates a new object of this class - """ - ... - def __int__(self) -> int: - r""" - @brief Get the actual value (a synonym for \value) - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: IntValue) -> None: - r""" - @brief Assigns another object to self - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def dup(self) -> IntValue: - r""" - @brief Creates a copy of self - """ - ... - def has_value(self) -> bool: - r""" - @brief True, if a value is present - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def to_i(self) -> int: - r""" - @brief Get the actual value (a synonym for \value) - """ - ... - def value(self) -> int: - r""" - @brief Get the actual value - """ - ... - ... - class KeyCode: r""" @brief The namespace for the some key codes. @@ -7265,52 +5614,41 @@ class LayoutView(LayoutViewBase): The visual part of the view is the tab panel in the main window. The non-visual part are the redraw thread, the layout handles, cell lists, layer view lists etc. This object controls these aspects of the view and controls the appearance of the data. """ - on_close: None + current: ClassVar[LayoutView] + r""" + @brief Returns the current view + The current view is the one that is made current by using \current=. + + This variation has been introduced for the non-Qt case in version 0.28. + """ + on_drawing_finished_event: None r""" Getter: - @brief A event indicating that the view is about to close + @brief An event indicating that the image is fully drawn - This event is triggered when the view is going to be closed entirely. + This event is triggered when calling \timer. Before this event is issue, a final \on_image_updated_event may be issued. - It has been added in version 0.25. + This event has been introduced in version 0.28. Setter: - @brief A event indicating that the view is about to close + @brief An event indicating that the image is fully drawn - This event is triggered when the view is going to be closed entirely. + This event is triggered when calling \timer. Before this event is issue, a final \on_image_updated_event may be issued. - It has been added in version 0.25. + This event has been introduced in version 0.28. """ - on_hide: None + on_image_updated_event: None r""" Getter: - @brief A event indicating that the view is going to become invisible + @brief An event indicating that the image ("screenshot") was updated - It has been added in version 0.25. + This event is triggered when calling \timer. + This event has been introduced in version 0.28. Setter: - @brief A event indicating that the view is going to become invisible + @brief An event indicating that the image ("screenshot") was updated - It has been added in version 0.25. + This event is triggered when calling \timer. + This event has been introduced in version 0.28. """ - on_show: None - r""" - Getter: - @brief A event indicating that the view is going to become visible - - It has been added in version 0.25. - Setter: - @brief A event indicating that the view is going to become visible - - It has been added in version 0.25. - """ - @classmethod - def current(cls) -> LayoutView: - r""" - @brief Returns the current view - The current view is the one that is shown in the current tab. Returns nil if no layout is loaded. - - This method has been introduced in version 0.23. - """ - ... @classmethod def new(cls, editable: Optional[bool] = ..., manager: Optional[db.Manager] = ..., options: Optional[int] = ...) -> LayoutView: r""" @@ -7320,7 +5658,7 @@ class LayoutView(LayoutViewBase): @param editable True to make the view editable @param manager The \Manager object to enable undo/redo - @param options A combination of the values in the LV_... constants from \LayoutViewBase + @param options A combination of the values in the LV_... constants This constructor has been introduced in version 0.25. It has been enhanced with the arguments in version 0.27. @@ -7334,7 +5672,7 @@ class LayoutView(LayoutViewBase): @param editable True to make the view editable @param manager The \Manager object to enable undo/redo - @param options A combination of the values in the LV_... constants from \LayoutViewBase + @param options A combination of the values in the LV_... constants This constructor has been introduced in version 0.25. It has been enhanced with the arguments in version 0.27. @@ -7383,43 +5721,14 @@ class LayoutView(LayoutViewBase): Usually it's not required to call this method. It has been introduced in version 0.24. """ ... - def bookmark_view(self, name: str) -> None: + def timer(self) -> None: r""" - @brief Bookmarks the current view under the given name + @brief A callback required to be called regularily in the non-Qt case. - @param name The name under which to bookmark the current state - """ - ... - def close(self) -> None: - r""" - @brief Closes the view + This callback eventually implements the event loop in the non-Qt case. The main task is to indicate new versions of the layout image while it is drawn. When a new image has arrived, this method will issue an \on_image_updated_event. In the implementation of the latter, "screenshot" may be called to retrieve the current image. + When drawing has finished, the \on_drawing_finished_event will be triggered. - This method has been added in version 0.27. - """ - ... - def show_l2ndb(self, l2ndb_index: int, cv_index: int) -> None: - r""" - @brief Shows a netlist database in the marker browser on a certain layout - The netlist browser is opened showing the netlist database with the index given by "l2ndb_index". - It will be attached (i.e. navigate to) the layout with the given cellview index in "cv_index". - - This method has been added in version 0.26. - """ - ... - def show_lvsdb(self, lvsdb_index: int, cv_index: int) -> None: - r""" - @brief Shows a netlist database in the marker browser on a certain layout - The netlist browser is opened showing the netlist database with the index given by "lvsdb_index". - It will be attached (i.e. navigate to) the layout with the given cellview index in "cv_index". - - This method has been added in version 0.26. - """ - ... - def show_rdb(self, rdb_index: int, cv_index: int) -> None: - r""" - @brief Shows a report database in the marker browser on a certain layout - The marker browser is opened showing the report database with the index given by "rdb_index". - It will be attached (i.e. navigate to) the layout with the given cellview index in "cv_index". + This method has been introduced in version 0.28. """ ... ... @@ -7672,6 +5981,17 @@ class LayoutViewBase: r""" @brief Removes from any existing selection """ + active_cellview_index: int + r""" + Getter: + @brief Gets the index of the active cellview (shown in hierarchy browser) + + Setter: + @brief Makes the cellview with the given index the active one (shown in hierarchy browser) + See \active_cellview_index. + + This method has been renamed from set_active_cellview_index to active_cellview_index= in version 0.25. The original name is still available, but is deprecated. + """ current_layer: LayerPropertiesIterator r""" Getter: @@ -8161,11 +6481,6 @@ class LayoutViewBase: Starting from version 0.25, the returned object can be manipulated which will have an immediate effect on the display. """ ... - def active_cellview_index(self) -> int: - r""" - @brief Gets the index of the active cellview (shown in hierarchy browser) - """ - ... def add_l2ndb(self, db: db.LayoutToNetlist) -> int: r""" @brief Adds the given netlist database to the view @@ -8213,6 +6528,25 @@ class LayoutViewBase: This method has been added in version 0.26. """ ... + def add_marker(self, marker: Marker) -> None: + r""" + @brief Adds a persistent marker to the view (transferring ownership) + + This method allows creating markers and transferring ownership to the view, hence making them persistent. This means, when the variable with the marker object goes out of scope, the marker will still exist in the view. + + To create a persistent marker, use the following code: + + @code + marker = RBA::Marker::new + # ... configure marker ... + view.add_marker(marker) + @/code + + To remove all persistent markers owned by the view, use \clear_markers. + + Persistent markers have been introduced in version 0.29.3 + """ + ... def add_missing_layers(self) -> None: r""" @brief Adds new layers to layer list @@ -8382,6 +6716,14 @@ class LayoutViewBase: This method has been introduced in version 0.25. """ ... + def clear_markers(self) -> None: + r""" + @brief Clears all persistent markers from the view + See \add_marker for details about persistent markers. + + Persistent markers have been introduced in version 0.29.3 + """ + ... def clear_object_selection(self) -> None: r""" @brief Clears the selection of geometrical objects (shapes or cell instances) @@ -8773,35 +7115,6 @@ class LayoutViewBase: This method is was deprecated in version 0.25 since from then, the \CellView object can be used to obtain an manipulate the selected cell. """ ... - def get_image(self, width: int, height: int) -> QtGui.QImage_Native: - r""" - @brief Gets the layout image as a \QImage - - @param width The width of the image to render in pixel. - @param height The height of the image to render in pixel. - - The image contains the current scene (layout, annotations etc.). - The image is drawn synchronously with the given width and height. Drawing may take some time. - """ - ... - def get_image_with_options(self, width: int, height: int, linewidth: Optional[int] = ..., oversampling: Optional[int] = ..., resolution: Optional[float] = ..., target: Optional[db.DBox] = ..., monochrome: Optional[bool] = ...) -> QtGui.QImage_Native: - r""" - @brief Gets the layout image as a \QImage (with options) - - @param width The width of the image to render in pixel. - @param height The height of the image to render in pixel. - @param linewidth The width of a line in pixels (usually 1) or 0 for default. - @param oversampling The oversampling factor (1..3) or 0 for default. - @param resolution The resolution (pixel size compared to a screen pixel size, i.e 1/oversampling) or 0 for default. - @param target_box The box to draw or an empty box for default. - @param monochrome If true, monochrome images will be produced. - - The image contains the current scene (layout, annotations etc.). - The image is drawn synchronously with the given width and height. Drawing may take some time. Monochrome images don't have background or annotation objects currently. - - This method has been introduced in version 0.23.10. - """ - ... def get_line_style(self, index: int) -> str: r""" @brief Gets the line style string for the style with the given index @@ -8856,13 +7169,6 @@ class LayoutViewBase: This method has been introduced in 0.28. """ ... - def get_screenshot(self) -> QtGui.QImage_Native: - r""" - @brief Gets a screenshot as a \QImage - - Getting the image requires the drawing to be complete. Ideally, synchronous mode is switched on for the application to guarantee this condition. The image will have the size of the viewport showing the current layout. - """ - ... def get_screenshot_pixels(self) -> PixelBuffer: r""" @brief Gets a screenshot as a \PixelBuffer @@ -9178,14 +7484,6 @@ class LayoutViewBase: This method has been introduced in version 0.28. """ ... - def netlist_browser(self) -> NetlistBrowserDialog: - r""" - @brief Gets the netlist browser object for the given layout view - - - This method has been added in version 0.27. - """ - ... def num_l2ndbs(self) -> int: r""" @brief Gets the number of netlist databases loaded into this view @@ -9884,13 +8182,6 @@ class LayoutViewBase: This method was introduced in version 0.18. """ ... - def widget(self) -> QtWidgets.QWidget_Native: - r""" - @brief Gets the QWidget object of the view - - This method has been introduced in version 0.28.7. - """ - ... def zoom_box(self, box: db.DBox) -> None: r""" @brief Sets the viewport to the given box @@ -9922,134 +8213,6 @@ class LayoutViewBase: ... ... -class LayoutViewWidget(QFrame_Native): - r""" - This object produces a widget which embeds a LayoutView. This widget can be used inside Qt widget hierarchies. - To access the \LayoutView object within, use \view. - - This class has been introduced in version 0.28. - """ - @classmethod - def new(cls, parent: QtWidgets.QWidget_Native, editable: Optional[bool] = ..., manager: Optional[db.Manager] = ..., options: Optional[int] = ...) -> LayoutViewWidget: - r""" - @brief Creates a standalone view widget - - @param parent The parent widget in which to embed the view - @param editable True to make the view editable - @param manager The \Manager object to enable undo/redo - @param options A combination of the values in the LV_... constants from \LayoutViewBase - - This constructor has been introduced in version 0.25. - It has been enhanced with the arguments in version 0.27. - """ - ... - def __init__(self, parent: QtWidgets.QWidget_Native, editable: Optional[bool] = ..., manager: Optional[db.Manager] = ..., options: Optional[int] = ...) -> None: - r""" - @brief Creates a standalone view widget - - @param parent The parent widget in which to embed the view - @param editable True to make the view editable - @param manager The \Manager object to enable undo/redo - @param options A combination of the values in the LV_... constants from \LayoutViewBase - - This constructor has been introduced in version 0.25. - It has been enhanced with the arguments in version 0.27. - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def bookmarks_frame(self) -> QtWidgets.QWidget_Native: - r""" - @brief Gets the bookmarks side widget - For details about side widgets see \layer_control_frame. - - This method has been introduced in version 0.27 - """ - ... - def hierarchy_control_frame(self) -> QtWidgets.QWidget_Native: - r""" - @brief Gets the cell view (hierarchy view) side widget - For details about side widgets see \layer_control_frame. - - This method has been introduced in version 0.27 - """ - ... - def layer_control_frame(self) -> QtWidgets.QWidget_Native: - r""" - @brief Gets the layer control side widget - A 'side widget' is a widget attached to the view. It does not have a parent, so you can embed it into a different context. Please note that with embedding through 'setParent' it will be destroyed when your parent widget gets destroyed. It will be lost then to the view. - - The side widget can be configured through the views configuration interface. - - This method has been introduced in version 0.27 - """ - ... - def layer_toolbox_frame(self) -> QtWidgets.QWidget_Native: - r""" - @brief Gets the layer toolbox side widget - A 'side widget' is a widget attached to the view. It does not have a parent, so you can embed it into a different context. Please note that with embedding through 'setParent' it will be destroyed when your parent widget gets destroyed. It will be lost then to the view. - - The side widget can be configured through the views configuration interface. - - This method has been introduced in version 0.28 - """ - ... - def libraries_frame(self) -> QtWidgets.QWidget_Native: - r""" - @brief Gets the library view side widget - For details about side widgets see \layer_control_frame. - - This method has been introduced in version 0.27 - """ - ... - def view(self) -> LayoutView: - r""" - @brief Gets the embedded view object. - """ - ... - ... - class Macro: r""" @brief A macro class @@ -11145,1488 +9308,33 @@ class MacroInterpreter: ... ... -class MainWindow(QMainWindow_Native): - r""" - @brief The main application window and central controller object - - This object first is the main window but also the main controller. The main controller is the port by which access can be gained to all the data objects, view and other aspects of the program. - """ - current_view_index: int - r""" - Getter: - @brief Returns the current view's index - - @return The index of the current view - - This method will return the index of the current view. - Setter: - @brief Selects the view with the given index - - @param index The index of the view to select (0 is the first) - - This method will make the view with the given index the current (front) view. - - This method was renamed from select_view to current_view_index= in version 0.25. The old name is still available, but deprecated. - """ - initial_technology: str - r""" - Getter: - @brief Gets the technology used for creating or loading layouts (unless explicitly specified) - - @return The current initial technology - This method was added in version 0.22. - Setter: - @brief Sets the technology used for creating or loading layouts (unless explicitly specified) - - Setting the technology will have an effect on the next load_layout or create_layout operation which does not explicitly specify the technology but might not be reflected correctly in the reader options dialog and changes will be reset when the application is restarted. - @param tech The new initial technology - - This method was added in version 0.22. - """ - on_current_view_changed: None - r""" - Getter: - @brief An event indicating that the current view has changed - - This event is triggered after the current view has changed. This happens, if the user switches the layout tab. - - Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_current_view_observer/remove_current_view_observer) have been removed in 0.25. - - Setter: - @brief An event indicating that the current view has changed - - This event is triggered after the current view has changed. This happens, if the user switches the layout tab. - - Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_current_view_observer/remove_current_view_observer) have been removed in 0.25. - """ - on_session_about_to_be_restored: None - r""" - Getter: - @brief An event indicating that a session is about to be restored - - This event has been added in version 0.28.8. - - Setter: - @brief An event indicating that a session is about to be restored - - This event has been added in version 0.28.8. - """ - on_session_restored: None - r""" - Getter: - @brief An event indicating that a session was restored - - This event has been added in version 0.28.8. - - Setter: - @brief An event indicating that a session was restored - - This event has been added in version 0.28.8. - """ - on_view_closed: None - r""" - Getter: - @brief An event indicating that a view was closed - @param index The index of the view that was closed - - This event is triggered after a view was closed. For example, because the tab was closed. - - This event has been added in version 0.25. - - Setter: - @brief An event indicating that a view was closed - @param index The index of the view that was closed - - This event is triggered after a view was closed. For example, because the tab was closed. - - This event has been added in version 0.25. - """ - on_view_created: None - r""" - Getter: - @brief An event indicating that a new view was created - @param index The index of the view that was created - - This event is triggered after a new view was created. For example, if a layout is loaded into a new panel. - - Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_new_view_observer/remove_new_view_observer) have been removed in 0.25. - - Setter: - @brief An event indicating that a new view was created - @param index The index of the view that was created - - This event is triggered after a new view was created. For example, if a layout is loaded into a new panel. - - Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods (add_new_view_observer/remove_new_view_observer) have been removed in 0.25. - """ - synchronous: bool - r""" - Getter: - @brief Gets a value indicating whether synchronous mode is activated - See \synchronous= for details about this attribute - - This property getter was introduced in version 0.29. - Setter: - @brief Puts the main window into synchronous mode - - @param sync_mode 'true' if the application should behave synchronously - - In synchronous mode, an application is allowed to block on redraw. While redrawing, no user interactions are possible. Although this is not desirable for smooth operation, it can be beneficial for test or automation purposes, i.e. if a screenshot needs to be produced once the application has finished drawing. - """ - title: str - r""" - Getter: - @brief Gets the window title - See \title= for a description of this property. - This property was introduced in version 0.29. - Setter: - @brief Sets the window title - If the window title is not empty, it will be used for the application window's title. Otherwise the default title is used. The title string is subject to expression interpolation. So it is possible to implement the default scheme of adding the current view using the following code: - - @code - add_view_info = "$(var view=LayoutView.current; view ? ' - ' + (view.is_dirty ? '[+] ' : '') + view.title : '')" - RBA::MainWindow.instance.title = "Custom Title" + add_view_info - @/code - - This property was introduced in version 0.29. - """ - @classmethod - def instance(cls) -> MainWindow: - r""" - @brief Gets application's main window instance - - This method has been added in version 0.24. - """ - ... - @classmethod - def menu_symbols(cls) -> List[str]: - r""" - @brief Gets all available menu symbols (see \call_menu). - NOTE: currently this method delivers a superset of all available symbols. Depending on the context, no all symbols may trigger actual functionality. - - This method has been introduced in version 0.27. - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def call_menu(self, symbol: str) -> None: - r""" - @brief Calls the menu item with the provided symbol. - To obtain all symbols, use menu_symbols. - - This method has been introduced in version 0.27 and replaces the previous cm_... methods. Instead of calling a specific cm_... method, use LayoutView#call_menu with 'cm_...' as the symbol. - """ - ... - def cancel(self) -> None: - r""" - @brief Cancels current editing operations - - This method call cancels all current editing operations and restores normal mouse mode. - """ - ... - def clear_config(self) -> None: - r""" - @brief Clears the configuration parameters - This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().clear_config()'. See \Dispatcher#clear_config for details. - - This method has been introduced in version 0.27. - """ - ... - def clone_current_view(self) -> None: - r""" - @brief Clones the current view and make it current - """ - ... - def close_all(self) -> None: - r""" - @brief Closes all views - - This method unconditionally closes all views. No dialog will be opened if unsaved edits exist. - - This method was added in version 0.18. - """ - ... - def close_current_view(self) -> None: - r""" - @brief Closes the current view - - This method does not open a dialog to ask which cell view to close if multiple cells are opened in the view, but rather closes all cells. - """ - ... - def cm_adjust_origin(self) -> None: - r""" - @brief 'cm_adjust_origin' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_adjust_origin')" instead. - """ - ... - def cm_bookmark_view(self) -> None: - r""" - @brief 'cm_bookmark_view' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_bookmark_view')" instead. - """ - ... - def cm_cancel(self) -> None: - r""" - @brief 'cm_cancel' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cancel')" instead. - """ - ... - def cm_cell_copy(self) -> None: - r""" - @brief 'cm_cell_copy' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cell_copy')" instead. - """ - ... - def cm_cell_cut(self) -> None: - r""" - @brief 'cm_cell_cut' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cell_cut')" instead. - """ - ... - def cm_cell_delete(self) -> None: - r""" - @brief 'cm_cell_delete' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cell_delete')" instead. - """ - ... - def cm_cell_flatten(self) -> None: - r""" - @brief 'cm_cell_flatten' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cell_flatten')" instead. - """ - ... - def cm_cell_hide(self) -> None: - r""" - @brief 'cm_cell_hide' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cell_hide')" instead. - """ - ... - def cm_cell_paste(self) -> None: - r""" - @brief 'cm_cell_paste' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cell_paste')" instead. - """ - ... - def cm_cell_rename(self) -> None: - r""" - @brief 'cm_cell_rename' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cell_rename')" instead. - """ - ... - def cm_cell_select(self) -> None: - r""" - @brief 'cm_cell_select' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cell_select')" instead. - """ - ... - def cm_cell_show(self) -> None: - r""" - @brief 'cm_cell_show' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cell_show')" instead. - """ - ... - def cm_cell_show_all(self) -> None: - r""" - @brief 'cm_cell_show_all' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cell_show_all')" instead. - """ - ... - def cm_clear_layer(self) -> None: - r""" - @brief 'cm_clear_layer' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_clear_layer')" instead. - """ - ... - def cm_clone(self) -> None: - r""" - @brief 'cm_clone' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_clone')" instead. - """ - ... - def cm_close(self) -> None: - r""" - @brief 'cm_close' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_close')" instead. - """ - ... - def cm_close_all(self) -> None: - r""" - @brief 'cm_close_all' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_close_all')" instead. - """ - ... - def cm_copy(self) -> None: - r""" - @brief 'cm_copy' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_copy')" instead. - """ - ... - def cm_copy_layer(self) -> None: - r""" - @brief 'cm_copy_layer' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_copy_layer')" instead. - """ - ... - def cm_cut(self) -> None: - r""" - @brief 'cm_cut' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_cut')" instead. - """ - ... - def cm_dec_max_hier(self) -> None: - r""" - @brief 'cm_dec_max_hier' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_dec_max_hier')" instead. - """ - ... - def cm_delete(self) -> None: - r""" - @brief 'cm_delete' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_delete')" instead. - """ - ... - def cm_delete_layer(self) -> None: - r""" - @brief 'cm_delete_layer' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_delete_layer')" instead. - """ - ... - def cm_edit_layer(self) -> None: - r""" - @brief 'cm_edit_layer' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_edit_layer')" instead. - """ - ... - def cm_exit(self) -> None: - r""" - @brief 'cm_exit' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_exit')" instead. - """ - ... - def cm_goto_position(self) -> None: - r""" - @brief 'cm_goto_position' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_goto_position')" instead. - """ - ... - def cm_help_about(self) -> None: - r""" - @brief 'cm_help_about' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_help_about')" instead. - """ - ... - def cm_inc_max_hier(self) -> None: - r""" - @brief 'cm_inc_max_hier' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_inc_max_hier')" instead. - """ - ... - def cm_last_display_state(self) -> None: - r""" - @brief 'cm_prev_display_state|#cm_last_display_state' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_prev_display_state|#cm_last_display_state')" instead. - """ - ... - def cm_layout_props(self) -> None: - r""" - @brief 'cm_layout_props' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_layout_props')" instead. - """ - ... - def cm_load_bookmarks(self) -> None: - r""" - @brief 'cm_load_bookmarks' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_load_bookmarks')" instead. - """ - ... - def cm_load_layer_props(self) -> None: - r""" - @brief 'cm_load_layer_props' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_load_layer_props')" instead. - """ - ... - def cm_lv_add_missing(self) -> None: - r""" - @brief 'cm_lv_add_missing' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_add_missing')" instead. - """ - ... - def cm_lv_delete(self) -> None: - r""" - @brief 'cm_lv_delete' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_delete')" instead. - """ - ... - def cm_lv_expand_all(self) -> None: - r""" - @brief 'cm_lv_expand_all' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_expand_all')" instead. - """ - ... - def cm_lv_group(self) -> None: - r""" - @brief 'cm_lv_group' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_group')" instead. - """ - ... - def cm_lv_hide(self) -> None: - r""" - @brief 'cm_lv_hide' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_hide')" instead. - """ - ... - def cm_lv_hide_all(self) -> None: - r""" - @brief 'cm_lv_hide_all' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_hide_all')" instead. - """ - ... - def cm_lv_insert(self) -> None: - r""" - @brief 'cm_lv_insert' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_insert')" instead. - """ - ... - def cm_lv_new_tab(self) -> None: - r""" - @brief 'cm_lv_new_tab' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_new_tab')" instead. - """ - ... - def cm_lv_regroup_by_datatype(self) -> None: - r""" - @brief 'cm_lv_regroup_by_datatype' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_regroup_by_datatype')" instead. - """ - ... - def cm_lv_regroup_by_index(self) -> None: - r""" - @brief 'cm_lv_regroup_by_index' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_regroup_by_index')" instead. - """ - ... - def cm_lv_regroup_by_layer(self) -> None: - r""" - @brief 'cm_lv_regroup_by_layer' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_regroup_by_layer')" instead. - """ - ... - def cm_lv_regroup_flatten(self) -> None: - r""" - @brief 'cm_lv_regroup_flatten' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_regroup_flatten')" instead. - """ - ... - def cm_lv_remove_tab(self) -> None: - r""" - @brief 'cm_lv_remove_tab' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_remove_tab')" instead. - """ - ... - def cm_lv_remove_unused(self) -> None: - r""" - @brief 'cm_lv_remove_unused' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_remove_unused')" instead. - """ - ... - def cm_lv_rename(self) -> None: - r""" - @brief 'cm_lv_rename' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_rename')" instead. - """ - ... - def cm_lv_rename_tab(self) -> None: - r""" - @brief 'cm_lv_rename_tab' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_rename_tab')" instead. - """ - ... - def cm_lv_select_all(self) -> None: - r""" - @brief 'cm_lv_select_all' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_select_all')" instead. - """ - ... - def cm_lv_show(self) -> None: - r""" - @brief 'cm_lv_show' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_show')" instead. - """ - ... - def cm_lv_show_all(self) -> None: - r""" - @brief 'cm_lv_show_all' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_show_all')" instead. - """ - ... - def cm_lv_show_only(self) -> None: - r""" - @brief 'cm_lv_show_only' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_show_only')" instead. - """ - ... - def cm_lv_sort_by_dli(self) -> None: - r""" - @brief 'cm_lv_sort_by_dli' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_sort_by_dli')" instead. - """ - ... - def cm_lv_sort_by_idl(self) -> None: - r""" - @brief 'cm_lv_sort_by_idl' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_sort_by_idl')" instead. - """ - ... - def cm_lv_sort_by_ild(self) -> None: - r""" - @brief 'cm_lv_sort_by_ild' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_sort_by_ild')" instead. - """ - ... - def cm_lv_sort_by_ldi(self) -> None: - r""" - @brief 'cm_lv_sort_by_ldi' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_sort_by_ldi')" instead. - """ - ... - def cm_lv_sort_by_name(self) -> None: - r""" - @brief 'cm_lv_sort_by_name' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_sort_by_name')" instead. - """ - ... - def cm_lv_source(self) -> None: - r""" - @brief 'cm_lv_source' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_source')" instead. - """ - ... - def cm_lv_ungroup(self) -> None: - r""" - @brief 'cm_lv_ungroup' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_lv_ungroup')" instead. - """ - ... - def cm_macro_editor(self) -> None: - r""" - @brief 'cm_macro_editor' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_macro_editor')" instead. - """ - ... - def cm_manage_bookmarks(self) -> None: - r""" - @brief 'cm_manage_bookmarks' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_manage_bookmarks')" instead. - """ - ... - def cm_max_hier(self) -> None: - r""" - @brief 'cm_max_hier' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_max_hier')" instead. - """ - ... - def cm_max_hier_0(self) -> None: - r""" - @brief 'cm_max_hier_0' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_max_hier_0')" instead. - """ - ... - def cm_max_hier_1(self) -> None: - r""" - @brief 'cm_max_hier_1' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_max_hier_1')" instead. - """ - ... - def cm_navigator_close(self) -> None: - r""" - @brief 'cm_navigator_close' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_navigator_close')" instead. - """ - ... - def cm_new_cell(self) -> None: - r""" - @brief 'cm_new_cell' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_new_cell')" instead. - """ - ... - def cm_new_layer(self) -> None: - r""" - @brief 'cm_new_layer' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_new_layer')" instead. - """ - ... - def cm_new_layout(self) -> None: - r""" - @brief 'cm_new_layout' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_new_layout')" instead. - """ - ... - def cm_new_panel(self) -> None: - r""" - @brief 'cm_new_panel' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_new_panel')" instead. - """ - ... - def cm_next_display_state(self) -> None: - r""" - @brief 'cm_next_display_state' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_next_display_state')" instead. - """ - ... - def cm_open(self) -> None: - r""" - @brief 'cm_open' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_open')" instead. - """ - ... - def cm_open_current_cell(self) -> None: - r""" - @brief 'cm_open_current_cell' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_open_current_cell')" instead. - """ - ... - def cm_open_new_view(self) -> None: - r""" - @brief 'cm_open_new_view' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_open_new_view')" instead. - """ - ... - def cm_open_too(self) -> None: - r""" - @brief 'cm_open_too' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_open_too')" instead. - """ - ... - def cm_packages(self) -> None: - r""" - @brief 'cm_packages' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_packages')" instead. - """ - ... - def cm_pan_down(self) -> None: - r""" - @brief 'cm_pan_down' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_pan_down')" instead. - """ - ... - def cm_pan_left(self) -> None: - r""" - @brief 'cm_pan_left' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_pan_left')" instead. - """ - ... - def cm_pan_right(self) -> None: - r""" - @brief 'cm_pan_right' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_pan_right')" instead. - """ - ... - def cm_pan_up(self) -> None: - r""" - @brief 'cm_pan_up' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_pan_up')" instead. - """ - ... - def cm_paste(self) -> None: - r""" - @brief 'cm_paste' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_paste')" instead. - """ - ... - def cm_prev_display_state(self) -> None: - r""" - @brief 'cm_prev_display_state|#cm_last_display_state' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_prev_display_state|#cm_last_display_state')" instead. - """ - ... - def cm_print(self) -> None: - r""" - @brief 'cm_print' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_print')" instead. - """ - ... - def cm_pull_in(self) -> None: - r""" - @brief 'cm_pull_in' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_pull_in')" instead. - """ - ... - def cm_reader_options(self) -> None: - r""" - @brief 'cm_reader_options' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_reader_options')" instead. - """ - ... - def cm_redo(self) -> None: - r""" - @brief 'cm_redo' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_redo')" instead. - """ - ... - def cm_redraw(self) -> None: - r""" - @brief 'cm_redraw' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_redraw')" instead. - """ - ... - def cm_reload(self) -> None: - r""" - @brief 'cm_reload' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_reload')" instead. - """ - ... - def cm_reset_window_state(self) -> None: - r""" - @brief 'cm_reset_window_state' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_reset_window_state')" instead. - """ - ... - def cm_restore_session(self) -> None: - r""" - @brief 'cm_restore_session' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_restore_session')" instead. - """ - ... - def cm_save(self) -> None: - r""" - @brief 'cm_save' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_save')" instead. - """ - ... - def cm_save_all(self) -> None: - r""" - @brief 'cm_save_all' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_save_all')" instead. - """ - ... - def cm_save_as(self) -> None: - r""" - @brief 'cm_save_as' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_save_as')" instead. - """ - ... - def cm_save_bookmarks(self) -> None: - r""" - @brief 'cm_save_bookmarks' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_save_bookmarks')" instead. - """ - ... - def cm_save_current_cell_as(self) -> None: - r""" - @brief 'cm_save_current_cell_as' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_save_current_cell_as')" instead. - """ - ... - def cm_save_layer_props(self) -> None: - r""" - @brief 'cm_save_layer_props' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_save_layer_props')" instead. - """ - ... - def cm_save_session(self) -> None: - r""" - @brief 'cm_save_session' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_save_session')" instead. - """ - ... - def cm_screenshot(self) -> None: - r""" - @brief 'cm_screenshot' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_screenshot')" instead. - """ - ... - def cm_screenshot_to_clipboard(self) -> None: - r""" - @brief 'cm_screenshot_to_clipboard' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_screenshot_to_clipboard')" instead. - """ - ... - def cm_sel_flip_x(self) -> None: - r""" - @brief 'cm_sel_flip_x' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_sel_flip_x')" instead. - """ - ... - def cm_sel_flip_y(self) -> None: - r""" - @brief 'cm_sel_flip_y' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_sel_flip_y')" instead. - """ - ... - def cm_sel_free_rot(self) -> None: - r""" - @brief 'cm_sel_free_rot' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_sel_free_rot')" instead. - """ - ... - def cm_sel_move(self) -> None: - r""" - @brief 'cm_sel_move' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_sel_move')" instead. - """ - ... - def cm_sel_move_to(self) -> None: - r""" - @brief 'cm_sel_move_to' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_sel_move_to')" instead. - """ - ... - def cm_sel_rot_ccw(self) -> None: - r""" - @brief 'cm_sel_rot_ccw' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_sel_rot_ccw')" instead. - """ - ... - def cm_sel_rot_cw(self) -> None: - r""" - @brief 'cm_sel_rot_cw' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_sel_rot_cw')" instead. - """ - ... - def cm_sel_scale(self) -> None: - r""" - @brief 'cm_sel_scale' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_sel_scale')" instead. - """ - ... - def cm_select_all(self) -> None: - r""" - @brief 'cm_select_all' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_select_all')" instead. - """ - ... - def cm_select_cell(self) -> None: - r""" - @brief 'cm_select_cell' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_select_cell')" instead. - """ - ... - def cm_select_current_cell(self) -> None: - r""" - @brief 'cm_select_current_cell' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_select_current_cell')" instead. - """ - ... - def cm_setup(self) -> None: - r""" - @brief 'cm_setup' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_setup')" instead. - """ - ... - def cm_show_properties(self) -> None: - r""" - @brief 'cm_show_properties' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_show_properties')" instead. - """ - ... - def cm_technologies(self) -> None: - r""" - @brief 'cm_technologies' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_technologies')" instead. - """ - ... - def cm_undo(self) -> None: - r""" - @brief 'cm_undo' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_undo')" instead. - """ - ... - def cm_unselect_all(self) -> None: - r""" - @brief 'cm_unselect_all' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_unselect_all')" instead. - """ - ... - def cm_view_log(self) -> None: - r""" - @brief 'cm_view_log' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_view_log')" instead. - """ - ... - def cm_zoom_fit(self) -> None: - r""" - @brief 'cm_zoom_fit' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_zoom_fit')" instead. - """ - ... - def cm_zoom_fit_sel(self) -> None: - r""" - @brief 'cm_zoom_fit_sel' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_zoom_fit_sel')" instead. - """ - ... - def cm_zoom_in(self) -> None: - r""" - @brief 'cm_zoom_in' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_zoom_in')" instead. - """ - ... - def cm_zoom_out(self) -> None: - r""" - @brief 'cm_zoom_out' action. - This method is deprecated in version 0.27. - Use "call_menu('cm_zoom_out')" instead. - """ - ... - def commit_config(self) -> None: - r""" - @brief Commits the configuration settings - This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().commit_config(...)'. See \Dispatcher#commit_config for details. - - This method has been introduced in version 0.27. - """ - ... - @overload - def create_layout(self, mode: int) -> CellView: - r""" - @brief Creates a new, empty layout - - @param mode An integer value of 0, 1 or 2 that determines how the layout is created - @return The cellview of the layout that was created - - Create the layout in the current view, replacing the current layouts (mode 0), in a new view (mode 1) or adding it to the current view (mode 2). - In mode 1, the new view is made the current one. - - This version uses the initial technology and associates it with the new layout. - - Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview. - """ - ... - @overload - def create_layout(self, tech: str, mode: int) -> CellView: - r""" - @brief Creates a new, empty layout with the given technology - - @param mode An integer value of 0, 1 or 2 that determines how the layout is created - @param tech The name of the technology to use for that layout. - @return The cellview of the layout that was created - - Create the layout in the current view, replacing the current layouts (mode 0), in a new view (mode 1) or adding it to the current view (mode 2). - In mode 1, the new view is made the current one. - - If the technology name is not a valid technology name, the default technology will be used. - - This version was introduced in version 0.22. - Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview. - """ - ... - def create_view(self) -> int: - r""" - @brief Creates a new, empty view - - @return The index of the view that was created - - Creates an empty view that can be filled with layouts using the load_layout and create_layout methods on the view object. Use the \view method to obtain the view object from the view index. - This method has been added in version 0.22. - """ - ... - def current_view(self) -> LayoutView: - r""" - @brief Returns a reference to the current view's object - - @return A reference to a \LayoutView object representing the current view. - """ - ... - def dispatcher(self) -> Dispatcher: - r""" - @brief Gets the dispatcher interface (the plugin root configuration space) - This method has been introduced in version 0.27. - """ - ... - def enable_edits(self, enable: bool) -> None: - r""" - @brief Enables or disables editing - - @param enable Enable edits if set to true - - Starting from version 0.25, this method enables/disables edits on the current view only. - Use LayoutView#enable_edits instead. - """ - ... - def exit(self) -> None: - r""" - @brief Schedules an exit for the application - - This method does not immediately exit the application but sends an exit request to the application which will cause a clean shutdown of the GUI. - """ - ... - def get_config(self, name: str) -> Any: - r""" - @brief Gets the value of a local configuration parameter - This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().get_config(...)'. See \Dispatcher#get_config for details. - - This method has been introduced in version 0.27. - """ - ... - def get_config_names(self) -> List[str]: - r""" - @brief Gets the configuration parameter names - This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().get_config_names(...)'. See \Dispatcher#get_config_names for details. - - This method has been introduced in version 0.27. - """ - ... - def get_default_key_bindings(self) -> Dict[str, str]: - r""" - @brief Gets the default key bindings - This method returns a hash with the default key binding vs. menu item path. - You can use this hash with \set_key_bindings to reset all key bindings to the default ones. - - This method has been introduced in version 0.27. - """ - ... - def get_default_menu_items_hidden(self) -> Dict[str, bool]: - r""" - @brief Gets the flags indicating whether menu items are hidden by default - You can use this hash with \set_menu_items_hidden to restore the visibility of all menu items. - - This method has been introduced in version 0.27. - """ - ... - def get_key_bindings(self) -> Dict[str, str]: - r""" - @brief Gets the current key bindings - This method returns a hash with the key binding vs. menu item path. - - This method has been introduced in version 0.27. - """ - ... - def get_menu_items_hidden(self) -> Dict[str, bool]: - r""" - @brief Gets the flags indicating whether menu items are hidden - This method returns a hash with the hidden flag vs. menu item path. - You can use this hash with \set_menu_items_hidden. - - This method has been introduced in version 0.27. - """ - ... - def grid_micron(self) -> float: - r""" - @brief Gets the global grid in micron - - @return The global grid in micron - - The global grid is used at various places, i.e. for ruler snapping, for grid display etc. - """ - ... - def index_of(self, view: LayoutView) -> int: - r""" - @brief Gets the index of the given view - - @return The index of the view that was given - - If the given view is not a view object within the main window, a negative value will be returned. - - This method has been added in version 0.25. - """ - ... - @overload - def load_layout(self, filename: str, mode: Optional[int] = ...) -> CellView: - r""" - @brief Loads a new layout - - @param filename The name of the file to load - @param mode An integer value of 0, 1 or 2 that determines how the file is loaded - @return The cellview into which the layout was loaded - - Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). - In mode 1, the new view is made the current one. - - This version will use the initial technology and the default reader options. Others versions are provided which allow specification of technology and reader options explicitly. - - Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview. The 'mode' argument has been made optional in version 0.28. - """ - ... - @overload - def load_layout(self, filename: str, options: db.LoadLayoutOptions, mode: Optional[int] = ...) -> CellView: - r""" - @brief Loads a new layout with the given options - - @param filename The name of the file to load - @param options The reader options to use. - @param mode An integer value of 0, 1 or 2 that determines how the file is loaded - @return The cellview into which the layout was loaded - - Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). - In mode 1, the new view is made the current one. - - This version was introduced in version 0.22. - Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview. The 'mode' argument has been made optional in version 0.28. - """ - ... - @overload - def load_layout(self, filename: str, options: db.LoadLayoutOptions, tech: str, mode: Optional[int] = ...) -> CellView: - r""" - @brief Loads a new layout with the given options and associate it with the given technology - - @param filename The name of the file to load - @param options The reader options to use. - @param tech The name of the technology to use for that layout. - @param mode An integer value of 0, 1 or 2 that determines how the file is loaded - @return The cellview into which the layout was loaded - - Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). - In mode 1, the new view is made the current one. - - If the technology name is not a valid technology name, the default technology will be used. - - This version was introduced in version 0.22. - Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview. The 'mode' argument has been made optional in version 0.28. - """ - ... - @overload - def load_layout(self, filename: str, tech: str, mode: Optional[int] = ...) -> CellView: - r""" - @brief Loads a new layout and associate it with the given technology - - @param filename The name of the file to load - @param tech The name of the technology to use for that layout. - @param mode An integer value of 0, 1 or 2 that determines how the file is loaded - @return The cellview into which the layout was loaded - - Loads the given file into the current view, replacing the current layouts (mode 0), into a new view (mode 1) or adding the layout to the current view (mode 2). - In mode 1, the new view is made the current one. - - If the technology name is not a valid technology name, the default technology will be used. The 'mode' argument has been made optional in version 0.28. - - This version was introduced in version 0.22. - Starting with version 0.25, this method returns a cellview object that can be modified to configure the cellview. - """ - ... - def manager(self) -> db.Manager: - r""" - @brief Gets the \Manager object of this window - - The manager object is responsible to managing the undo/redo stack. Usually this object is not required. It's more convenient and safer to use the related methods provided by \LayoutView (\LayoutView#transaction, \LayoutView#commit) and \MainWindow (such as \MainWindow#cm_undo and \MainWindow#cm_redo). - - This method has been added in version 0.24. - """ - ... - def menu(self) -> AbstractMenu: - r""" - @brief Returns a reference to the abstract menu - - @return A reference to an \AbstractMenu object representing the menu system - """ - ... - def message(self, message: str, time: Optional[int] = ...) -> None: - r""" - @brief Displays a message in the status bar - - @param message The message to display - @param time The time how long to display the message in ms. A negative value means 'infinitely'. - - This given message is shown in the status bar for the given time. - - This method has been added in version 0.18. The 'time' parameter was made optional in version 0.28.10. - """ - ... - def read_config(self, file_name: str) -> bool: - r""" - @brief Reads the configuration from a file - This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().read_config(...)'. See \Dispatcher#read_config for details. - - This method has been introduced in version 0.27. - """ - ... - def redraw(self) -> None: - r""" - @brief Redraws the current view - - Issues a redraw request to the current view. This usually happens automatically, so this method does not need to be called in most relevant cases. - """ - ... - def resize(self, width: int, height: int) -> None: - r""" - @brief Resizes the window - - @param width The new width of the window - @param height The new width of the window - - This method resizes the window to the given target size including decoration such as menu bar and control panels - """ - ... - def restore_session(self, fn: str) -> None: - r""" - @brief Restores a session from the given file - - @param fn The path to the session file - - The session stored in the given session file is restored. All existing views are closed and all layout edits are discarded without notification. - - This method was added in version 0.18. - """ - ... - def save_session(self, fn: str) -> None: - r""" - @brief Saves the session to the given file - - @param fn The path to the session file - - The session is saved to the given session file. Any existing layout edits are not automatically saved together with the session. The session just holds display settings and annotation objects. If layout edits exist, they have to be saved explicitly in a separate step. - - This method was added in version 0.18. - """ - ... - def select_view(self, index: int) -> None: - r""" - @brief Selects the view with the given index - - @param index The index of the view to select (0 is the first) - - This method will make the view with the given index the current (front) view. - - This method was renamed from select_view to current_view_index= in version 0.25. The old name is still available, but deprecated. - """ - ... - def set_config(self, name: str, value: str) -> None: - r""" - @brief Set a local configuration parameter with the given name to the given value - This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().set_config(...)'. See \Dispatcher#set_config for details. - - This method has been introduced in version 0.27. - """ - ... - def set_key_bindings(self, bindings: Dict[str, str]) -> None: - r""" - @brief Sets key bindings. - Sets the given key bindings. Pass a hash listing the key bindings per menu item paths. Key strings follow the usual notation, e.g. 'Ctrl+A', 'Shift+X' or just 'F2'. - Use an empty value to remove a key binding from a menu entry. - - \get_key_bindings will give you the current key bindings, \get_default_key_bindings will give you the default ones. - - Examples: - - @code - # reset all key bindings to default: - mw = RBA::MainWindow.instance() - mw.set_key_bindings(mw.get_default_key_bindings()) - - # disable key binding for 'copy': - RBA::MainWindow.instance.set_key_bindings({ "edit_menu.copy" => "" }) - - # configure 'copy' to use Shift+K and 'cut' to use Ctrl+K: - RBA::MainWindow.instance.set_key_bindings({ "edit_menu.copy" => "Shift+K", "edit_menu.cut" => "Ctrl+K" }) - @/code - - This method has been introduced in version 0.27. - """ - ... - def set_menu_items_hidden(self, flags: Dict[str, bool]) -> None: - r""" - @brief sets the flags indicating whether menu items are hidden - This method allows hiding certain menu items. It takes a hash with hidden flags vs. menu item paths. - Examples: - - @code - # show all menu items: - mw = RBA::MainWindow.instance() - mw.set_menu_items_hidden(mw.get_default_menu_items_hidden()) - - # hide the 'copy' entry from the 'Edit' menu: - RBA::MainWindow.instance().set_menu_items_hidden({ "edit_menu.copy" => true }) - @/code - - This method has been introduced in version 0.27. - """ - ... - def show_macro_editor(self, cat: Optional[str] = ..., add: Optional[bool] = ...) -> None: - r""" - @brief Shows the macro editor - If 'cat' is given, this category will be selected in the category tab. If 'add' is true, the 'new macro' dialog will be opened. - - This method has been introduced in version 0.26. - """ - ... - def view(self, n: int) -> LayoutView: - r""" - @brief Returns a reference to a view object by index - - @return The view object's reference for the view with the given index. - """ - ... - def views(self) -> int: - r""" - @brief Returns the number of views - - @return The number of views available so far. - """ - ... - def write_config(self, file_name: str) -> bool: - r""" - @brief Writes configuration to a file - This method is provided for using MainWindow without an Application object. It's a convience method which is equivalent to 'dispatcher().write_config(...)'. See \Dispatcher#write_config for details. - - This method has been introduced in version 0.27. - """ - ... - ... - class Marker: r""" @brief The floating-point coordinate marker object The marker is a visual object that "marks" (highlights) a certain area of the layout, given by a database object. This object accepts database objects with floating-point coordinates in micron values. + + Since version 0.29.3, markers can be attached to views in two ways: self-managed or persistent. + + Self-managed markers are created with a view argument. When the variable goes out of scope, the and the Marker object is released, the marker vanishes. This was the only concept before 0.29.3: + + @code + view = ... # some LayoutView + marker = RBA::Marker::new(view) + @/code + + Persistent markers on the other hand are attached to the view and stay within the view. To create a persistent marker, do not use a view argument to the constructor. Instead add them to the view using \LayoutView#add_marker. To remove persistent markers, use \LayoutView#clear_markers (removes all) or call \_destroy on a specific marker: + + @code + view = ... # some LayoutView + marker = RBA::Marker::new + view.add_marker(marker) + ... + view.clear_markers + @/code + + Persistent markers do not need to be held in separate variables to keep them visible. In some applications this may be useful. """ color: int r""" @@ -12708,18 +9416,26 @@ class Marker: This is the size of the rectangles drawn for the vertices object. """ @classmethod - def new(cls, view: LayoutViewBase) -> Marker: + def new(cls, view: Optional[LayoutViewBase] = ...) -> Marker: r""" @brief Creates a marker A marker is always associated with a view, in which it is shown. The view this marker is associated with must be passed to the constructor. + + See the class description about the options for attaching markers to a view. + + The 'view' argument is optional since version 0.29.3. """ ... - def __init__(self, view: LayoutViewBase) -> None: + def __init__(self, view: Optional[LayoutViewBase] = ...) -> None: r""" @brief Creates a marker A marker is always associated with a view, in which it is shown. The view this marker is associated with must be passed to the constructor. + + See the class description about the options for attaching markers to a view. + + The 'view' argument is optional since version 0.29.3. """ ... def _create(self) -> None: @@ -12904,624 +9620,6 @@ class Marker: ... ... -class MessageBox(QMainWindow_Native): - r""" - @brief Various methods to display message boxes - This class provides some basic message boxes. This functionality is provided through the static (class) methods \warning, \question and so on. - - Here is some example: - - @code - # issue a warning and ask whether to continue: - v = RBA::MessageBox::warning("Dialog Title", "Something happened. Continue?", RBA::MessageBox::Yes + RBA::MessageBox::No) - if v == RBA::MessageBox::Yes - ... continue ... - end - @/code - - If you have enabled the Qt binding, you can use \QMessageBox directly. - """ - Abort: ClassVar[int] - r""" - @brief A constant describing the 'Abort' button - """ - Cancel: ClassVar[int] - r""" - @brief A constant describing the 'Cancel' button - """ - Ignore: ClassVar[int] - r""" - @brief A constant describing the 'Ignore' button - """ - No: ClassVar[int] - r""" - @brief A constant describing the 'No' button - """ - Ok: ClassVar[int] - r""" - @brief A constant describing the 'Ok' button - """ - Retry: ClassVar[int] - r""" - @brief A constant describing the 'Retry' button - """ - Yes: ClassVar[int] - r""" - @brief A constant describing the 'Yes' button - """ - @classmethod - def b_abort(cls) -> int: - r""" - @brief A constant describing the 'Abort' button - """ - ... - @classmethod - def b_cancel(cls) -> int: - r""" - @brief A constant describing the 'Cancel' button - """ - ... - @classmethod - def b_ignore(cls) -> int: - r""" - @brief A constant describing the 'Ignore' button - """ - ... - @classmethod - def b_no(cls) -> int: - r""" - @brief A constant describing the 'No' button - """ - ... - @classmethod - def b_ok(cls) -> int: - r""" - @brief A constant describing the 'Ok' button - """ - ... - @classmethod - def b_retry(cls) -> int: - r""" - @brief A constant describing the 'Retry' button - """ - ... - @classmethod - def b_yes(cls) -> int: - r""" - @brief A constant describing the 'Yes' button - """ - ... - @classmethod - def critical(cls, title: str, text: str, buttons: int) -> int: - r""" - @brief Open a critical (error) message box - @param title The title of the window - @param text The text to show - @param buttons A combination (+) of button constants (\Ok and so on) describing the buttons to show for the message box - @return The button constant describing the button that was pressed - """ - ... - @classmethod - def info(cls, title: str, text: str, buttons: int) -> int: - r""" - @brief Open a information message box - @param title The title of the window - @param text The text to show - @param buttons A combination (+) of button constants (\Ok and so on) describing the buttons to show for the message box - @return The button constant describing the button that was pressed - """ - ... - @classmethod - def question(cls, title: str, text: str, buttons: int) -> int: - r""" - @brief Open a question message box - @param title The title of the window - @param text The text to show - @param buttons A combination (+) of button constants (\Ok and so on) describing the buttons to show for the message box - @return The button constant describing the button that was pressed - """ - ... - @classmethod - def warning(cls, title: str, text: str, buttons: int) -> int: - r""" - @brief Open a warning message box - @param title The title of the window - @param text The text to show - @param buttons A combination (+) of button constants (\Ok and so on) describing the buttons to show for the message box - @return The button constant describing the button that was pressed - """ - ... - def __copy__(self) -> MessageBox: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> MessageBox: - r""" - @brief Creates a copy of self - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: QObject_Native) -> None: - r""" - @brief Assigns another object to self - """ - ... - def dup(self) -> MessageBox: - r""" - @brief Creates a copy of self - """ - ... - ... - -class NetlistBrowserDialog: - r""" - @brief Represents the netlist browser dialog. - This dialog is a part of the \LayoutView class and can be obtained through \LayoutView#netlist_browser. - This interface allows to interact with the browser - mainly to get information about state changes. - - This class has been introduced in version 0.27. - """ - on_current_db_changed: None - r""" - Getter: - @brief This event is triggered when the current database is changed. - The current database can be obtained with \db. - Setter: - @brief This event is triggered when the current database is changed. - The current database can be obtained with \db. - """ - on_probe: None - r""" - Getter: - @brief This event is triggered when a net is probed. - The first path will indicate the location of the probed net in terms of two paths: one describing the instantiation of the net in layout space and one in schematic space. Both objects are \NetlistObjectPath objects which hold the root circuit, the chain of subcircuits leading to the circuit containing the net and the net itself. - Setter: - @brief This event is triggered when a net is probed. - The first path will indicate the location of the probed net in terms of two paths: one describing the instantiation of the net in layout space and one in schematic space. Both objects are \NetlistObjectPath objects which hold the root circuit, the chain of subcircuits leading to the circuit containing the net and the net itself. - """ - on_selection_changed: None - r""" - Getter: - @brief This event is triggered when the selection changed. - The selection can be obtained with \current_path_first, \current_path_second, \selected_nets, \selected_devices, \selected_subcircuits and \selected_circuits. - Setter: - @brief This event is triggered when the selection changed. - The selection can be obtained with \current_path_first, \current_path_second, \selected_nets, \selected_devices, \selected_subcircuits and \selected_circuits. - """ - @classmethod - def new(cls) -> NetlistBrowserDialog: - r""" - @brief Creates a new object of this class - """ - ... - def __init__(self) -> None: - r""" - @brief Creates a new object of this class - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def current_path(self) -> NetlistObjectsPath: - r""" - @brief Gets the path of the current object as a path pair (combines layout and schematic object paths in case of a LVS database view). - """ - ... - def current_path_first(self) -> NetlistObjectPath: - r""" - @brief Gets the path of the current object on the first (layout in case of LVS database) side. - """ - ... - def current_path_second(self) -> NetlistObjectPath: - r""" - @brief Gets the path of the current object on the second (schematic in case of LVS database) side. - """ - ... - def db(self) -> db.LayoutToNetlist: - r""" - @brief Gets the database the browser is connected to. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def selected_paths(self) -> List[NetlistObjectsPath]: - r""" - @brief Gets the nets currently selected objects (paths) in the netlist database browser. - The result is an array of path pairs. See \NetlistObjectsPath for details about these pairs. - """ - ... - ... - -class NetlistObjectPath: - r""" - @brief An object describing the instantiation of a netlist object. - This class describes the instantiation of a net or a device or a circuit in terms of a root circuit and a subcircuit chain leading to the indicated object. - - See \net= or \device= for the indicated object, \path= for the subcircuit chain. - - This class has been introduced in version 0.27. - """ - device: db.Device - r""" - Getter: - @brief Gets the device the path points to. - - Setter: - @brief Sets the device the path points to. - If the path describes the location of a device, this member will indicate it. - The other way to describe a final object is \net=. If neither a device nor net is given, the path describes a circuit and how it is referenced from the root. - """ - net: db.Net - r""" - Getter: - @brief Gets the net the path points to. - - Setter: - @brief Sets the net the path points to. - If the path describes the location of a net, this member will indicate it. - The other way to describe a final object is \device=. If neither a device nor net is given, the path describes a circuit and how it is referenced from the root. - """ - path: List[db.SubCircuit] - r""" - Getter: - @brief Gets the path. - - Setter: - @brief Sets the path. - The path is a list of subcircuits leading from the root to the final object. The final (net, device) object is located in the circuit called by the last subcircuit of the subcircuit chain. If the subcircuit list is empty, the final object is located inside the root object. - """ - root: db.Circuit - r""" - Getter: - @brief Gets the root circuit of the path. - - Setter: - @brief Sets the root circuit of the path. - The root circuit is the circuit from which the path starts. - """ - @classmethod - def new(cls) -> NetlistObjectPath: - r""" - @brief Creates a new object of this class - """ - ... - def __copy__(self) -> NetlistObjectPath: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> NetlistObjectPath: - r""" - @brief Creates a copy of self - """ - ... - def __init__(self) -> None: - r""" - @brief Creates a new object of this class - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: NetlistObjectPath) -> None: - r""" - @brief Assigns another object to self - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def dup(self) -> NetlistObjectPath: - r""" - @brief Creates a copy of self - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def is_null(self) -> bool: - r""" - @brief Returns a value indicating whether the path is an empty one. - """ - ... - ... - -class NetlistObjectsPath: - r""" - @brief An object describing the instantiation of a single netlist object or a pair of those. - This class is basically a pair of netlist object paths (see \NetlistObjectPath). When derived from a single netlist view, only the first path is valid and will point to the selected object (a net, a device or a circuit). The second path is null. - - If the path is derived from a paired netlist view (a LVS report view), the first path corresponds to the object in the layout netlist, the second one to the object in the schematic netlist. - If the selected object isn't a matched one, either the first or second path may be a null or a partial path without a final net or device object or a partial path. - - This class has been introduced in version 0.27. - """ - @classmethod - def new(cls) -> NetlistObjectsPath: - r""" - @brief Creates a new object of this class - """ - ... - def __copy__(self) -> NetlistObjectsPath: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> NetlistObjectsPath: - r""" - @brief Creates a copy of self - """ - ... - def __init__(self) -> None: - r""" - @brief Creates a new object of this class - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: NetlistObjectsPath) -> None: - r""" - @brief Assigns another object to self - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def dup(self) -> NetlistObjectsPath: - r""" - @brief Creates a copy of self - """ - ... - def first(self) -> NetlistObjectPath: - r""" - @brief Gets the first object's path. - In cases of paired netlists (LVS database), the first path points to the layout netlist object. - For the single netlist, the first path is the only path supplied. - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def second(self) -> NetlistObjectPath: - r""" - @brief Gets the second object's path. - In cases of paired netlists (LVS database), the first path points to the schematic netlist object. - For the single netlist, the second path is always a null path. - """ - ... - ... - class ObjectInstPath: r""" @brief A class describing a selected shape or instance @@ -13960,12 +10058,6 @@ class PixelBuffer: """ ... @classmethod - def from_qimage(cls, qimage: QtGui.QImage_Native) -> PixelBuffer: - r""" - @brief Creates a pixel buffer object from a QImage object - """ - ... - @classmethod def new(cls, width: int, height: int) -> PixelBuffer: r""" @brief Creates a pixel buffer object @@ -14093,13 +10185,6 @@ class PixelBuffer: @brief Creates a copy of self """ ... - @overload - def fill(self, color: QtGui.QColor) -> None: - r""" - @brief Fills the pixel buffer with the given QColor - """ - ... - @overload def fill(self, color: int) -> None: r""" @brief Fills the pixel buffer with the given pixel value @@ -14145,11 +10230,6 @@ class PixelBuffer: This method may not be available if PNG support is not compiled into KLayout. """ ... - def to_qimage(self) -> QtGui.QImage_Native: - r""" - @brief Converts the pixel buffer to a \QImage object - """ - ... def width(self) -> int: r""" @brief Gets the width of the pixel buffer in pixels @@ -14355,6 +10435,16 @@ class PluginFactory: @brief Creates a new object of this class """ ... + def __copy__(self) -> PluginFactory: + r""" + @brief Creates a copy of self + """ + ... + def __deepcopy__(self) -> PluginFactory: + r""" + @brief Creates a copy of self + """ + ... def __init__(self) -> None: r""" @brief Creates a new object of this class @@ -14468,6 +10558,11 @@ class PluginFactory: This method has been introduced in version 0.27. """ ... + def assign(self, other: PluginFactory) -> None: + r""" + @brief Assigns another object to self + """ + ... def create(self) -> None: r""" @brief Ensures the C++ object is created @@ -14488,6 +10583,11 @@ class PluginFactory: The latter may happen, if the object is owned by a C++ object which got destroyed itself. """ ... + def dup(self) -> PluginFactory: + r""" + @brief Creates a copy of self + """ + ... def is_const_object(self) -> bool: r""" @brief Returns a value indicating whether the reference is a const reference @@ -14522,257 +10622,3 @@ class PluginFactory: ... ... -class StringListValue: - r""" - @brief Encapsulate a string list - @hide - This class is provided as a return value of \FileDialog. - By using an object rather than a pure string list, an object with \has_value? = false can be returned indicating that - the "Cancel" button was pressed. Starting with version 0.22, the InputDialog class offers new method which do no - longer requires to use this class. - """ - @classmethod - def new(cls) -> StringListValue: - r""" - @brief Creates a new object of this class - """ - ... - def __copy__(self) -> StringListValue: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> StringListValue: - r""" - @brief Creates a copy of self - """ - ... - def __init__(self) -> None: - r""" - @brief Creates a new object of this class - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: StringListValue) -> None: - r""" - @brief Assigns another object to self - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def dup(self) -> StringListValue: - r""" - @brief Creates a copy of self - """ - ... - def has_value(self) -> bool: - r""" - @brief True, if a value is present - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def value(self) -> List[str]: - r""" - @brief Get the actual value (a list of strings) - """ - ... - ... - -class StringValue: - r""" - @brief Encapsulate a string value - @hide - This class is provided as a return value of \InputDialog::get_string, \InputDialog::get_item and \FileDialog. - By using an object rather than a pure value, an object with \has_value? = false can be returned indicating that - the "Cancel" button was pressed. Starting with version 0.22, the InputDialog class offers new method which do no - longer requires to use this class. - """ - @classmethod - def new(cls) -> StringValue: - r""" - @brief Creates a new object of this class - """ - ... - def __copy__(self) -> StringValue: - r""" - @brief Creates a copy of self - """ - ... - def __deepcopy__(self) -> StringValue: - r""" - @brief Creates a copy of self - """ - ... - def __init__(self) -> None: - r""" - @brief Creates a new object of this class - """ - ... - def __str__(self) -> str: - r""" - @brief Get the actual value (a synonym for \value) - """ - ... - def _create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def _destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def _destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def _is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def _manage(self) -> None: - r""" - @brief Marks the object as managed by the script side. - After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def _unmanage(self) -> None: - r""" - @brief Marks the object as no longer owned by the script side. - Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. - - Usually it's not required to call this method. It has been introduced in version 0.24. - """ - ... - def assign(self, other: StringValue) -> None: - r""" - @brief Assigns another object to self - """ - ... - def create(self) -> None: - r""" - @brief Ensures the C++ object is created - Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. - """ - ... - def destroy(self) -> None: - r""" - @brief Explicitly destroys the object - Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. - If the object is not owned by the script, this method will do nothing. - """ - ... - def destroyed(self) -> bool: - r""" - @brief Returns a value indicating whether the object was already destroyed - This method returns true, if the object was destroyed, either explicitly or by the C++ side. - The latter may happen, if the object is owned by a C++ object which got destroyed itself. - """ - ... - def dup(self) -> StringValue: - r""" - @brief Creates a copy of self - """ - ... - def has_value(self) -> bool: - r""" - @brief True, if a value is present - """ - ... - def is_const_object(self) -> bool: - r""" - @brief Returns a value indicating whether the reference is a const reference - This method returns true, if self is a const reference. - In that case, only const methods may be called on self. - """ - ... - def to_s(self) -> str: - r""" - @brief Get the actual value (a synonym for \value) - """ - ... - def value(self) -> str: - r""" - @brief Get the actual value - """ - ... - ... - diff --git a/src/pymod/distutils_src/klayout/rdbcore.pyi b/src/pymod/distutils_src/klayout/rdbcore.pyi index 07936205e..a2b846e97 100644 --- a/src/pymod/distutils_src/klayout/rdbcore.pyi +++ b/src/pymod/distutils_src/klayout/rdbcore.pyi @@ -100,14 +100,6 @@ class RdbCategory: """ ... @overload - def each_item(self) -> Iterator[RdbItem]: - r""" - @brief Iterates over all items inside the database which are associated with this category (non-const version) - - This method has been introduced in version 0.29. - """ - ... - @overload def each_item(self) -> Iterator[RdbItem]: r""" @brief Iterates over all items inside the database which are associated with this category @@ -116,9 +108,11 @@ class RdbCategory: """ ... @overload - def each_sub_category(self) -> Iterator[RdbCategory]: + def each_item(self) -> Iterator[RdbItem]: r""" - @brief Iterates over all sub-categories (non-const version) + @brief Iterates over all items inside the database which are associated with this category (non-const version) + + This method has been introduced in version 0.29. """ ... @overload @@ -129,6 +123,12 @@ class RdbCategory: The const version has been added in version 0.29. """ ... + @overload + def each_sub_category(self) -> Iterator[RdbCategory]: + r""" + @brief Iterates over all sub-categories (non-const version) + """ + ... def is_const_object(self) -> bool: r""" @brief Returns a value indicating whether the reference is a const reference @@ -465,17 +465,15 @@ class RdbItem: This attribute has been added in version 0.29.1. """ - image: QtGui.QImage_Native - r""" - Getter: - @brief Gets the attached image as a QImage object + @property + def image(self) -> None: + r""" + WARNING: This variable can only be set, not retrieved. + @brief Sets the attached image from a PixelBuffer object - This method has been added in version 0.28. - Setter: - @brief Sets the attached image from a PixelBuffer object - - This method has been added in version 0.28. - """ + This method has been added in version 0.28. + """ + ... image_str: str r""" Getter: @@ -898,6 +896,13 @@ class RdbItemValue: This method has been introduced in version 0.22. """ ... + def __repr__(self) -> str: + r""" + @brief Converts a value to a string + The string can be used by the string constructor to create another object from it. + @return The string + """ + ... def __str__(self) -> str: r""" @brief Converts a value to a string diff --git a/src/pymod/distutils_src/klayout/tlcore.pyi b/src/pymod/distutils_src/klayout/tlcore.pyi index 7f55789d6..573b3919f 100644 --- a/src/pymod/distutils_src/klayout/tlcore.pyi +++ b/src/pymod/distutils_src/klayout/tlcore.pyi @@ -361,6 +361,11 @@ class ArgType: @brief Inequality of two types """ ... + def __repr__(self) -> str: + r""" + @brief Convert to a string + """ + ... def __str__(self) -> str: r""" @brief Convert to a string @@ -1654,6 +1659,14 @@ class Method: @brief Creates a new object of this class """ ... + def __repr__(self) -> str: + r""" + @brief Describes the method + This attribute returns a string description of the method and its signature. + + This method has been introduced in version 0.29. + """ + ... def __str__(self) -> str: r""" @brief Describes the method @@ -2662,6 +2675,11 @@ class Timer: @brief Creates a new object of this class """ ... + def __repr__(self) -> str: + r""" + @brief Produces a string with the currently elapsed times + """ + ... def __str__(self) -> str: r""" @brief Produces a string with the currently elapsed times @@ -2832,6 +2850,11 @@ class Value: This constructor has been introduced in version 0.22. """ ... + def __repr__(self) -> str: + r""" + @brief Convert this object to a string + """ + ... def __str__(self) -> str: r""" @brief Convert this object to a string