-
Notifications
You must be signed in to change notification settings - Fork 0
Contants
RandyParedis edited this page Jan 31, 2020
·
6 revisions
Even though GraphDonkey
is widely customizable, there are a predefined set of
constants that exist throught the system. These cannot be changed and are used on
numerous occasions. If you are making a plugin, you might want to use
some of them to link with the overall system settings.
These constants are located in the main.extra.Contants
module, which is ideally
imported as follows to prevent collisions.
from main.extra import Constants
It contains the following values:
Constant | Meaning |
---|---|
APP_NAME |
The name of the app, e.g. GraphDonkey . |
APP_VERSION |
The current version of the app, following the SemVer versioning system |
APP_VERSION_NAME |
The name of the app version. |
APP_ICON |
A QIcon reference to the GraphDonkey icon. |
LINE_ENDING |
The QTextEdit line/block separator \u2029 . |
BRACKETS |
The list of pairs that define the default (open, close) sets. |
FILE_TYPES |
A list of fallback filenames used in the plugin export system. |
Additionally, there are a few functions there that handle with easy creation and lookup
for filetype dictionaries like the FILE_TYPES
dict.