Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from qgis.gui import *
- from qgis.utils import *
- from qgis.core import *
- from PyQt4.QtGui import *
- from qgis.PyQt.QtCore import QSettings, Qt
- import time
- template=QgsApplication.qgisSettingsDirPath() + "python/"
- app=QgsApplication.instance()
- splash_pix = QPixmap(template+'splashscreen.png')
- splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint)
- splash.setWindowFlags(Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint)
- splash.setEnabled(False)
- splash.setMask(splash_pix.mask())
- progressBar = QProgressBar(splash)
- progressBar.setMaximum(10)
- progressBar.setGeometry(0, splash_pix.height() - 20, splash_pix.width(), 10)
- splash.show()
- if QgsApplication.instance().findChild(QSplashScreen):
- QgsMessageLog.logMessage("ja", "gridseen", level=QgsMessageLog.INFO)
- else:
- QgsMessageLog.logMessage("nein", "gridseen", level=QgsMessageLog.INFO)
- splash.showMessage("<h1><font color='white'>Grid Integration-Check!</font></h1>", Qt.AlignBottom | Qt.AlignCenter, Qt.black)
- for i in range(1, 11):
- progressBar.setValue(i)
- t = time.time()
- while time.time() < t + 0.1:
- app.processEvents()
- time.sleep(2)
- splash.close()
Add Comment
Please, Sign In to add comment