FreeCAD

Форк
0
/
CommandPy.xml 
157 строк · 4.5 Кб
1
<?xml version="1.0" encoding="UTF-8"?>
2
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
3
  <PythonExport
4
      Father="PyObjectBase"
5
      Name="CommandPy"
6
      Twin="Command"
7
      TwinPointer="Command"
8
      Include="Gui/Command.h"
9
      FatherInclude="Base/PyObjectBase.h"
10
      Namespace="Gui"
11
      FatherNamespace="Base">
12
    <Documentation>
13
      <Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer[at]users.sourceforge.net" />
14
      <UserDocu>FreeCAD Python wrapper of Command functions</UserDocu>
15
    </Documentation>
16
    <Methode Name="get" Static='true'>
17
      <Documentation>
18
          <UserDocu>get(name) -> Gui.Command or None
19

20
Get a given command by name or None if it doesn't exist.
21

22
name : str
23
    Command name.</UserDocu>
24
      </Documentation>
25
    </Methode>
26
    <Methode Name="update" Static='true'>
27
      <Documentation>
28
          <UserDocu>update() -> None
29

30
Update active status of all commands.</UserDocu>
31
      </Documentation>
32
    </Methode>
33
    <Methode Name="listAll" Static='true'>
34
      <Documentation>
35
          <UserDocu>listAll() -> list of str
36

37
Returns the name of all commands.</UserDocu>
38
      </Documentation>
39
    </Methode>
40
    <Methode Name="listByShortcut" Static='true'>
41
      <Documentation>
42
          <UserDocu>listByShortcut(string, useRegExp=False) -> list of str
43

44
Returns a list of all commands, filtered by shortcut.
45
Shortcuts are converted to uppercase and spaces removed
46
prior to comparison.
47

48
string :  str
49
    Shortcut to be searched.
50
useRegExp : bool
51
    Filter using regular expression.</UserDocu>
52
      </Documentation>
53
    </Methode>
54
    <Methode Name="run">
55
      <Documentation>
56
          <UserDocu>run(item=0) -> None
57

58
Runs the given command.
59

60
item : int
61
    Item to be run.</UserDocu>
62
      </Documentation>
63
    </Methode>
64
    <Methode Name="isActive" Const="true">
65
      <Documentation>
66
          <UserDocu>isActive() -> bool
67

68
Returns True if the command is active, False otherwise.</UserDocu>
69
      </Documentation>
70
    </Methode>
71
    <Methode Name="getShortcut">
72
      <Documentation>
73
          <UserDocu>getShortcut() -> str
74

75
Returns string representing shortcut key accelerator for command.</UserDocu>
76
      </Documentation>
77
    </Methode>
78
    <Methode Name="setShortcut">
79
      <Documentation>
80
          <UserDocu>setShortcut(string) -> bool
81

82
Sets shortcut for given command, returns True for success.
83

84
string : str
85
    Shortcut to be set.</UserDocu>
86
      </Documentation>
87
    </Methode>
88
    <Methode Name="resetShortcut">
89
      <Documentation>
90
          <UserDocu>resetShortcut() -> bool
91

92
Resets shortcut for given command back to the default, returns True for success.</UserDocu>
93
      </Documentation>
94
    </Methode>
95
    <Methode Name="getInfo">
96
      <Documentation>
97
          <UserDocu>getInfo() -> dict
98

99
Return information about this command.</UserDocu>
100
      </Documentation>
101
    </Methode>
102
    <Methode Name="getAction">
103
      <Documentation>
104
          <UserDocu>getAction() -> list of QAction
105

106
Return the associated QAction object.</UserDocu>
107
      </Documentation>
108
    </Methode>
109
    <Methode Name="createCustomCommand" Static='true' Keyword='true'>
110
      <Documentation>
111
        <UserDocu>createCustomCommand(macroFile, menuText, toolTip, whatsThis, statusTip, pixmap, shortcut) -> str
112

113
Create a custom command for a macro. Returns name of the created command.
114

115
macroFile : str
116
    Macro file.
117
menuText : str
118
    Menu text. Optional.
119
toolTip : str
120
    Tool tip text. Optional.
121
whatsThis : str
122
    `What's this?` text. Optional.
123
statusTip : str
124
    Status tip text. Optional.
125
pixmap : str
126
    Pixmap name. Optional.
127
shortcut : str
128
    Shortcut key sequence. Optional.</UserDocu>
129
      </Documentation>
130
    </Methode>
131
    <Methode Name="removeCustomCommand" Static='true'>
132
      <Documentation>
133
        <UserDocu>removeCustomCommand(name) -> bool
134

135
Remove the custom command if it exists.
136
Given the name of a custom command, this removes that command.
137
It is not an error to remove a non-existent command, the function
138
simply does nothing in that case.
139
Returns True if something was removed, or False if not.
140

141
name : str
142
    Command name.</UserDocu>
143
      </Documentation>
144
    </Methode>
145
    <Methode Name="findCustomCommand" Static='true'>
146
      <Documentation>
147
        <UserDocu>findCustomCommand(name) -> str or None
148

149
Given the name of a macro, return the name of the custom command for that macro
150
or None if there is no command matching that macro script name.
151

152
name : str
153
    Macro name.</UserDocu>
154
      </Documentation>
155
    </Methode>
156
  </PythonExport>
157
</GenerateModel>
158

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.