startup_splash
startup_splash
¶
Attributes¶
Classes¶
NyxStartupSplash(screen=None)
¶
Bases: QSplashScreen
Splash screen showing the log messages logged while the editor starts.
The layout is in device independent pixels of the background, which is shown at
SIZE.
Initialize NyxStartupSplash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
screen
|
QScreen | None
|
screen to appear on, primary if None. |
None
|
Source code in src/nyx/editor/widgets/startup_splash.py
33 34 35 36 37 38 39 40 41 | |
Attributes¶
APP_ICON_SOURCE = ':/icons/nyx.png'
class-attribute
instance-attribute
¶
BACKGROUND_PIXMAP_SOURCE = ':/images/splash_background'
class-attribute
instance-attribute
¶
FOOTER_GAP = 16
class-attribute
instance-attribute
¶
FOOTER_PIXEL_SIZE = 13
class-attribute
instance-attribute
¶
FOOTER_RECT = QtCore.QRect(64, 346, 512, 24)
class-attribute
instance-attribute
¶
LOGO_RECT = QtCore.QRect(64, 135, 128, 128)
class-attribute
instance-attribute
¶
SECONDARY_COLOR = QtGui.QColor(143, 149, 168)
class-attribute
instance-attribute
¶
SIZE = QtCore.QSize(640, 400)
class-attribute
instance-attribute
¶
SUBTITLE_PIXEL_SIZE = 16
class-attribute
instance-attribute
¶
SUBTITLE_RECT = QtCore.QRect(TEXT_LEFT, 204, 400, 28)
class-attribute
instance-attribute
¶
SUBTITLE_TEXT = 'Python nodal execution graph'
class-attribute
instance-attribute
¶
TEXT_LEFT = 216
class-attribute
instance-attribute
¶
TITLE_COLOR = QtGui.QColor(232, 230, 223)
class-attribute
instance-attribute
¶
TITLE_PIXEL_SIZE = 40
class-attribute
instance-attribute
¶
TITLE_RECT = QtCore.QRect(TEXT_LEFT, 146, 400, 64)
class-attribute
instance-attribute
¶
VERSION_TEXT = f'v{__version__}'
class-attribute
instance-attribute
¶
Functions¶
connect_to_logger(signal_handler)
¶
Show the records of a logger signal handler as the splash message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
signal_handler
|
QSignalHandler
|
handler to listen to. |
required |
Source code in src/nyx/editor/widgets/startup_splash.py
103 104 105 106 107 108 109 110 111 | |
disconnect_from_logger()
¶
Stop showing log records.
Source code in src/nyx/editor/widgets/startup_splash.py
113 114 115 116 117 118 | |
drawContents(painter)
¶
Draw the message at the left of the footer, elided to leave the version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
painter
|
QPainter
|
painter of the splash. |
required |
Source code in src/nyx/editor/widgets/startup_splash.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
event(event)
¶
Handle events without QSplashScreen.event.
QSplashScreen.event makes the show event block for a second on macOS,
before the first message can be shown. Skipping it, the splash paints its
pixmap and contents itself, and the rest is handled by QWidget.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
QEvent
|
event. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
event was handled. |
Source code in src/nyx/editor/widgets/startup_splash.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
finish(main_window)
¶
Close the splash once the main window is shown.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
main_window
|
QWidget
|
window that replaces the splash. |
required |
Source code in src/nyx/editor/widgets/startup_splash.py
173 174 175 176 177 178 179 180 | |
show_log_message(message)
¶
Show a message in the footer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
str
|
text to show. |
required |
Source code in src/nyx/editor/widgets/startup_splash.py
120 121 122 123 124 125 126 127 128 | |