• 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/AFXFileDialog.py
1
from __future__ import annotations
×
2

3
from .AFXBoolKeyword import AFXBoolKeyword
×
4
from .AFXDialog import AFXDialog
×
5
from .AFXIntTarget import AFXIntTarget
×
6
from .AFXStringTarget import AFXStringTarget
×
7
from .FXObject import FXObject
×
8
from .FXWindow import FXWindow
×
9

10
#: A single file, existing or not (to save to).
11
AFXSELECTFILE_ANY: int = hash("AFXSELECTFILE_ANY")
×
12

13

14
class AFXFileDialog(AFXDialog):
×
15
    """AFXFileDialog."""
16

17
    def __init__(
×
18
        self,
19
        title: str,
20
        pathNameTgt: AFXStringTarget,
21
        readOnlyKw: AFXBoolKeyword,
22
        tgt: FXObject | None = None,
23
        sel: int = 0,
24
        mode: int = AFXSELECTFILE_ANY,
25
        patterns: str = "*",
26
        patternIndexTgt: AFXIntTarget | None = None,
27
    ):
28
        """Constructor that creates a dialog box that always occludes the main window when overlapping with the
29
        main window. The constructor expects a string target for storing the selected file name. If the dialog
30
        box allows multiple selection, the string target contains comma-separated path names of all selected
31
        files.
32

33
        Parameters
34
        ----------
35
        title : str
36
            Dialog title.
37
        pathNameTgt : AFXStringTarget
38
            Path name target.
39
        readOnlyKw : AFXBoolKeyword
40
            Read-only keyword.
41
        tgt : FXObject | None
42
            Message target.
43
        sel : int
44
            Message ID.
45
        mode : int
46
            File selection mode.
47
        patterns : str
48
            File filter patterns.
49
        patternIndexTgt : AFXIntTarget | None
50
            Index used to select a file filter pattern when the dialog box is posted.
51
        """
52

53
    def getCurrentPattern(self):
×
54
        """Returns the current pattern number."""
55

56
    def getDirectory(self):
×
57
        """Returns the current directory."""
58

59
    def getFileBoxStyle(self):
×
60
        """Return file list style."""
61

62
    def getFilename(self):
×
63
        """Returns the file name."""
64

65
    def getFilenames(self):
×
66
        """Returns an empty-string terminated list of selected file names, or 0 if none is selected."""
67

68
    def getItemSpace(self):
×
69
        """Returns the inter-item spacing (in pixels)."""
70

71
    def getPattern(self):
×
72
        """Returns the file pattern."""
73

74
    def getPatternList(self):
×
75
        """Returns the list of patterns."""
76

77
    def getPatternText(self, patno: int):
×
78
        """Returns the pattern text for a given pattern number.
79

80
        Parameters
81
        ----------
82
        patno : int
83
        """
84

85
    def getPressedButtonId(self):
×
86
        """Returns the ID of the button that the user pressed in the dialog box."""
87

88
    def getReadOnly(self):
×
89
        """Returns the read-only state."""
90

91
    def getReadOnlyPatterns(self):
×
92
        """Returns the patterns that force the enabling of the read-only button."""
93

94
    def getSelectMode(self):
×
95
        """Returns the file selection mode."""
96

97
    def setCurrentPattern(self, n: int):
×
98
        """Sets the current active pattern.
99

100
        Parameters
101
        ----------
102
        n : int
103
        """
104

105
    def setDirectory(self, path: str):
×
106
        """Sets the current directory.
107

108
        Parameters
109
        ----------
110
        path : str
111
        """
112

113
    def setFileBoxStyle(self, style: int):
×
114
        """Sets the file list style.
115

116
        Parameters
117
        ----------
118
        style : int
119
        """
120

121
    def setFilename(self, path: str):
×
122
        """Sets the file name.
123

124
        Parameters
125
        ----------
126
        path : str
127
        """
128

129
    def setItemSpace(self, s: int):
×
130
        """Sets the inter-item spacing (in pixels).
131

132
        Parameters
133
        ----------
134
        s : int
135
        """
136

137
    def setPattern(self, ptrn: str):
×
138
        """Sets the file pattern.
139

140
        Parameters
141
        ----------
142
        ptrn : str
143
        """
144

145
    def setPatternList(self, patterns: str):
×
146
        """Sets the list of file patterns.
147

148
        Parameters
149
        ----------
150
        patterns : str
151
        """
152

153
    def setPatternListMaxVisible(self, maxVisible: int):
×
154
        """Sets the maximum number of visible items for the file pattern list.
155

156
        Parameters
157
        ----------
158
        maxVisible : int
159
        """
160

161
    def setPatternText(self, patno: int, text: str):
×
162
        """Sets the pattern text for a pattern number.
163

164
        Parameters
165
        ----------
166
        patno : int
167

168
        text : str
169
        """
170

171
    def setReadOnly(self, state: bool):
×
172
        """Sets the initial state of read-only button.
173

174
        Parameters
175
        ----------
176
        state : bool
177
        """
178

179
    def setReadOnlyPatterns(self, patterns: str):
×
180
        """Sets the patterns that force the display of the read-only button; separate the entries by a newline
181
        character .
182

183
        Parameters
184
        ----------
185
        patterns : str
186
        """
187

188
    def setSelectMode(self, mode: int):
×
189
        """Sets the file selection mode.
190

191
        Parameters
192
        ----------
193
        mode : int
194
        """
195

196
    def show(self):
×
197
        """Posts the dialog box.
198

199
        Reimplemented from AFXDialog.
200
        """
201

202
    def showModal(self, occludedWindow: FXWindow | None = None):
×
203
        """Posts the dialog box as a modal dialog box. The dialog box is centered against the given widget or
204
        its owner widget if 0 is given.
205

206
        Parameters
207
        ----------
208
        occludedWindow : FXWindow | None
209
            Widget to be occluded (0 for the owner widget).
210
        """
211

212
    def shownReadOnly(self):
×
213
        """Returns True if the read-only button is shown."""
214

215
    def showReadOnly(self, show: bool):
×
216
        """Shows the read-only button.
217

218
        Parameters
219
        ----------
220
        show : bool
221
        """
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