-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: jakimowb <[email protected]>
- Loading branch information
Showing
8 changed files
with
455 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
from pathlib import Path | ||
|
||
from qgis.PyQt.QtCore import Qt | ||
from qgis.PyQt.QtGui import QPixmap, QColor | ||
from qgis.PyQt.QtWidgets import QSplashScreen, QGraphicsDropShadowEffect, QApplication | ||
|
||
PATH_SPLASHSCREEN = Path(__file__).parent / 'splashscreen.png' | ||
|
||
|
||
class EnMAPBoxSplashScreen(QSplashScreen): | ||
""" | ||
Thr EnMAP-Box Splash Screen | ||
""" | ||
|
||
def __init__(self, parent=None): | ||
pm = QPixmap(PATH_SPLASHSCREEN.as_posix()) | ||
super(EnMAPBoxSplashScreen, self).__init__(parent, pixmap=pm) | ||
|
||
effect = QGraphicsDropShadowEffect() | ||
effect.setBlurRadius(5) | ||
effect.setColor(QColor('white')) | ||
self.setGraphicsEffect(effect) | ||
|
||
css = "" \ | ||
"" | ||
|
||
def showMessage(self, text: str, alignment: Qt.Alignment = None, color: QColor = None): | ||
""" | ||
Shows a message | ||
:param text: | ||
:param alignment: | ||
:param color: | ||
:return: | ||
""" | ||
if alignment is None: | ||
alignment = int(Qt.AlignLeft | Qt.AlignBottom) | ||
if color is None: | ||
color = QColor('black') | ||
super(EnMAPBoxSplashScreen, self).showMessage(text, alignment, color) | ||
QApplication.processEvents() | ||
|
||
""" | ||
def drawContents(self, painter: QPainter) -> None: | ||
# color = QColor('black') | ||
color = QColor('white') | ||
color.setAlpha(125) | ||
painter.setBrush(color) | ||
painter.setPen(color) | ||
size = self.size() | ||
h = 25 | ||
d = 10 | ||
rect = QRect(QRect(0, size.height()-h-d, size.width(), size.height()-d) ) | ||
painter.drawRect(rect) | ||
#painter.setPen(QColor('white')) | ||
super().drawContents(painter) | ||
""" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters