• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

haiiliin / abqpy / 6433593370

06 Oct 2023 03:30PM UTC coverage: 73.825% (-9.3%) from 83.134%
6433593370

push

github

web-flow
[feature] Add GUI Toolkit Commands (backport #5260) (#5285)

[feature] Add GUI Toolkit Commands (#5260)

* Markdown

* Delete

* Add AFXApp and AFXBoolKeyword

* Delete

* Update headings

* Create parse.py

* Update parse.py

* Unicode Spaces

* Update .pre-commit-config.yaml

* Update md types

* Update Kernel plug-in registration commands.md

* Generated python stubs

* Add class inheritance

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Revert "Update .pre-commit-config.yaml"

This reverts commit 9d3aef3cc.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix mypy errors

* Delete parse.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix return types and imports

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update AFXColumnItems.md

* Update abaqusGui.py

* Add class/global flags

* Delete flags.py

* Fix flags

* Fix

* Skip mypy

* Update abaqusGui.py

* Update constants.py

* Create kernelAccess.py

* Add plugin docs

* Revert changes by docformatter

* Delete markdown files

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
(cherry picked from commit a65ff5df8)

Co-authored-by: Hailin Wang <hailin.wang@connect.polyu.hk>

3661 of 3661 new or added lines in 151 files covered. (100.0%)

24137 of 32695 relevant lines covered (73.82%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/abaqus/PlugInRegistration/AFXDataDialog.py
1
from __future__ import annotations
×
2

3
from .AFXBoolKeyword import AFXBoolKeyword
×
4
from .AFXDialog import AFXDialog
×
5
from .AFXGuiMode import AFXGuiMode
×
6
from .AFXTransition import AFXTransition
×
7
from .constants import DIALOG_NORMAL
×
8
from .FXObject import FXObject
×
9
from .FXWindow import FXWindow
×
10

11
#: Perform bailout checks when the Cancel button is clicked.
12
DATADIALOG_BAILOUT: int = hash("DATADIALOG_BAILOUT")
×
13

14

15
class AFXDataDialog(AFXDialog):
×
16
    """AFXDataDialog."""
17

18
    #: Used to update the state.
19
    ID_UPDATE_STATE: int = hash("ID_UPDATE_STATE")
×
20

21
    def __init__(
×
22
        self,
23
        mode: AFXGuiMode,
24
        owner: FXWindow,
25
        title: str,
26
        actionButtonIds: int = 0,
27
        opts: int = DIALOG_NORMAL,
28
        x: int = 0,
29
        y: int = 0,
30
        w: int = 0,
31
        h: int = 0,
32
    ):
33
        """Constructor that creates a dialog box that occludes its owner widget.
34

35
        Parameters
36
        ----------
37
        mode : AFXGuiMode
38
            Host mode.
39
        owner : FXWindow
40
            Owner widget.
41
        title : str
42
            Title string.
43
        actionButtonIds : int
44
            ID's of action buttons to be created.
45
        opts : int
46
            Options and hints.
47
        x : int
48
            X coordinate of origin.
49
        y : int
50
            Y coordinate of origin.
51
        w : int
52
            Width of the widget.
53
        h : int
54
            Height of the widget.
55
        """
56

57
    def addTransition(
×
58
        self,
59
        keyword: AFXBoolKeyword,
60
        op: AFXTransition.Operator,
61
        value: bool,
62
        tgt: FXObject,
63
        sel: int,
64
        ptr: str = "None",
65
    ):
66
        """Adds a finite state transition to the dialog box. When the expression "keyword.getValue() op value"
67
        evaluates to True, an sel message will be sent to the tgt object.
68

69
        Parameters
70
        ----------
71
        keyword : AFXBoolKeyword
72
            Keyword.
73
        op : FXTransition.Operator
74
            Operator type.
75
        value : bool
76
            Reference value.
77
        tgt : FXObject
78
            Message target.
79
        sel : int
80
            Message selector.
81
        ptr : str
82
            Message data.
83
        """
84

85
    def bailout(self):
×
86
        """Performs checks to determine whether it is OK to cancel the dialog box.
87

88
        The implementaton of this class always returns True, and the derived class should reimplement this
89
        method to perform specific checks. Reimplemented from AFXDialog.
90
        """
91

92
    def getMode(self):
×
93
        """Returns the dialog box's host mode."""
94

95
    def onKeywordError(self, kwd: FXObject):
×
96
        """Handles the error that occurs when the given keyword or target contains invalid contents. This method
97
        will select the contents of the widget that is set for the keyword or target (with
98
        setWidgetForKeyword()). If no such widget is specified explicitly, it will select the contents of the
99
        widget that has the keyword or target as its message target.
100

101
        Parameters
102
        ----------
103
        kwd : FXObject
104
            Object that contains invalid contents.
105
        """
106

107
    def onTableError(self, tableKwd: FXObject, row: int, col: int):
×
108
        """Handles the error that occurs when the given table keyword or target contains an invalid element.
109
        This method will select the contents of the widget that is set for the element of the keyword or target
110
        (with setWidgetForKeyword()). If no such widget is specified explicitly, it will select the contents of
111
        the widget that has the keyword or target as its message target.
112

113
        Parameters
114
        ----------
115
        tableKwd : FXObject
116
            Object that contains invalid element.
117
        row : int
118
            Row index.
119
        col : int
120
            Column index.
121
        """
122

123
    def onTupleError(self, tupleKwd: FXObject, index: int):
×
124
        """Handles the error that occurs when the given tuple keyword or target contains an invalid element.
125
        This method will select the contents of the widget that is set for the element of the keyword or target
126
        (with setWidgetForKeyword()). If no such widget is specified explicitly, it will select the contents of
127
        the widget that has the keyword or target as its message target.
128

129
        Parameters
130
        ----------
131
        tupleKwd : FXObject
132
            Object that contains invalid element.
133
        index : int
134
            Element index.
135
        """
136

137
    def processUpdates(self):
×
138
        """Performs state processing during the GUI update cycles.
139

140
        This class provides an empty implementation of this method, and the derived class should redefine
141
        the method if it needs to process state updating.
142
        """
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc