def __init__(self): QSplashScreen.__init__(self) text = self.outPutContents() self.setPixmap(QPixmap("Startup.png")) #启动程序的图片 self.setFont(QFont("方正细黑一简体", 11)) self.showMessage(text, Qt.AlignHCenter | Qt.AlignVCenter, QColor(240, 255, 240))
def __init__(self, movie, flags, parent=None): movie.jumpToFrame(0) pixmap = QPixmap(movie.frameRect().size()) QSplashScreen.__init__(self, pixmap, flags) self.movie = movie self.movie.frameChanged.connect(self.repaint)
def __init__(self, animation, flags): # run event dispatching in another thread QSplashScreen.__init__(self, QPixmap(), flags) self.movie = QMovie(animation) self.movie.frameChanged.connect(self.onNextFrame) #self.connect(self.movie, SIGNAL('frameChanged(int)'), SLOT('onNextFrame()')) self.movie.start()
def __init__(self): """ Constructor """ QSplashScreen.__init__(self, QPixmap(':/images/splash.png'), Qt.WindowStaysOnTopHint) QApplication.flush()
def __init__(self, animation, flags, msg=''): QSplashScreen.__init__(self, QPixmap(), flags) self.movie = QMovie(animation) self.movie.setCacheMode(QMovie.CacheAll) self.movie.frameChanged.connect(self.onNextFrame) self.movie.start() self.showMessage(msg, Qt.AlignBottom | Qt.AlignCenter, Qt.white) self.show()
def __init__(self, movie, parent=None): movie.jumpToFrame(0) pixmap = QPixmap(movie.frameRect().size()) QSplashScreen.__init__(self or parent, pixmap, QtCore.Qt.WindowStaysOnTopHint) self.movie = movie self.movie.frameChanged.connect(self.repaint)
def __init__(self): QSplashScreen.__init__(self) self.setPixmap(QPixmap(setting.imgLogo).scaledToWidth(500)) self.setWindowFlag(Qt.WindowStaysOnTopHint) self.setWindowFlag(Qt.FramelessWindowHint) self.mousePressEvent = self.MousePressEvent self.keyPressEvent = self.KeyPressEvent self.show()
def __init__(self, min_splash_time=2): """ Initialize the B3 splash screen. :param min_splash_time: the minimum amount of seconds the splash screen should be drawn. """ self.splash_pix = QPixmap(B3_SPLASH) self.min_splash_time = time() + min_splash_time QSplashScreen.__init__(self, self.splash_pix, Qt.WindowStaysOnTopHint) self.setMask(self.splash_pix.mask())
def __init__(self): """ Constructor """ pixmap = QPixmap(':/images/splash.png') self.labelAlignment = Qt.Alignment( Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute) QSplashScreen.__init__(self, pixmap, Qt.WindowStaysOnTopHint) QApplication.flush()
def __init__(self): QSplashScreen.__init__(self, QtGui.QPixmap(), QtCore.Qt.WindowStaysOnTopHint) self.rootDir = Path(__file__).parent # default values self.image = None self.version = "Version: 3.x" # pixmap.height - ? self.progress_y = 68 # pixmap.width - ? self.vx = 24 # pixmap.height - ? self.vy = 32 # message font size self.msize = 12 self.cv = OpenCVLib() self.progressBar = QProgressBar(self) self.progressBar.setMinimum(0) self.progressBar.setValue(0) self.progressBar.setMaximum(100) self.progressBar.setTextVisible(False) self.setPositionProgressBar() self.message = QLabel(self) self.message.setFont(QFont("Arial", self.msize)) self.message.setStyleSheet("QLabel { color : #000000; }") self.message.setAlignment(Qt.AlignCenter) # Shadow Effekt effect = QGraphicsDropShadowEffect(self) effect.setBlurRadius(5) effect.setColor(QColor("#ffffff")) effect.setOffset(1, 1) self.message.setGraphicsEffect(effect) self.setPositionMessage() # self.message.hide() # CSS Styling self.setStyleSheet(""" QProgressBar{ border: 1px solid #eeeeee; text-align: center; padding: 0; margin-top: 10px; } QProgressBar::chunk{ background-color: #3daee9; width: 0.34em; margin: 0 1px; } """)
def __init__(self, animation, flags): # run event dispatching in another thread QSplashScreen.__init__(self, QPixmap(), flags) qtRectangle = self.frameGeometry() centerPoint = QDesktopWidget().availableGeometry().center() qtRectangle.moveCenter(centerPoint) self.move(qtRectangle.topLeft()) self.movie = QMovie(animation) self.movie.frameChanged.connect(self.onNextFrame) self.movie.start()
def __init__(self, gif, parent=None): self.__movie = QMovie(gif) self.__movie.jumpToFrame(0) pixmap = QPixmap(self.__movie.frameRect().size()) QSplashScreen.__init__(self, pixmap) self.__movie.frameChanged.connect(self.repaint)
def __init__(self): """ Constructor """ img_path = os.path.join(os.getcwd(), 'gui', 'images', 'splash.png') pixmap = QPixmap(img_path) self.labelAlignment = Qt.Alignment(Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute) QSplashScreen.__init__(self, pixmap) self.show() QApplication.flush()
def __init__(self): """ Constructor """ img_path = os.path.join(os.getcwd(), 'gui', 'images', 'splash.png') pixmap = QPixmap(img_path) self.labelAlignment = Qt.Alignment( Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute) QSplashScreen.__init__(self, pixmap) self.show() QApplication.flush()
def __init__(self, animation): module_logger.info("Inside 'ArcaneSplashScreen' constructor.") QSplashScreen.__init__(self, QPixmap()) self.movie = QMovie(animation) self.movie.frameChanged.connect(self.onNextFrame) self.movie.start() module_logger.info("Done.")
def __init__(self, *arg, **args): QSplashScreen.__init__(self, *arg, **args) self.setCursor(Qt.BusyCursor) self.setPixmap(QPixmap("images/titan1.jpg")) loaut = QVBoxLayout(self) loaut.addItem(QSpacerItem(1, 1, QSizePolicy.Expanding, QSizePolicy.Expanding)) self.progress = QProgressBar(self) self.progress.setValue(0) self.progress.setMaximum(100) loaut.addWidget(self.progress) self.showMessage(u"Пример заставки", Qt.AlignTop) self.startTimer(5)
def __init__(self, parent=None, pixmap=None, textRect=None, **kwargs): QSplashScreen.__init__(self, parent, **kwargs) self.__textRect = textRect self.__message = "" self.__color = Qt.black self.__alignment = Qt.AlignLeft if pixmap is None: pixmap = QPixmap() self.setPixmap(pixmap) self.setAutoFillBackground(False) # Also set FramelesWindowHint (if not already set) self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint)
def __init__(self): """ **Constructor** [description] """ QSplashScreen.__init__( self, QPixmap(":/Images/Images/logo_with_uni_logo.png")) lblVersion = QLabel(self) lblVersion.setText( "RepTate Version %s %s<br><small>\u00A9 Jorge Ramírez, Universidad Politécnica de Madrid (2017-2020)<br>\u00A9 Victor Boudara, University of Leeds (2017-2020)</small>" % (Version.VERSION, Version.DATE)) font = self.font() font.setPixelSize(11) font.setWeight(QFont.Bold) self.setFont(font) lblVersion.adjustSize() #lblVersion.setStyleSheet("QLabel { color : white; }") #lblVersion.move(425 - lblVersion.width(), 195) QApplication.flush()
def __init__(self): """**Constructor**""" QSplashScreen.__init__( self, QPixmap(":/Images/Images/logo_with_uni_logo.png")) lblVersion = QLabel(self) verdata = RepTate._version.get_versions() version = verdata["version"].split("+")[0] date = verdata["date"].split("T")[0] build = verdata["version"] lblVersion.setText( "RepTate %s %s (build %s)<br><small>\u00A9 Jorge Ramírez, Universidad Politécnica de Madrid<br>\u00A9 Victor Boudara, University of Leeds</small><br>(2017-2020)<br><a href=\"https://dx.doi.org/10.1122/8.0000002\">Cite RepTate</a>" % (version, date, build)) font = self.font() font.setPixelSize(11) font.setWeight(QFont.Bold) self.setFont(font) lblVersion.adjustSize() # lblVersion.setStyleSheet("QLabel { color : white; }") # lblVersion.move(425 - lblVersion.width(), 195) QApplication.flush()
def __init__(self, movie, parent=None): movie.jumpToFrame(0) QSplashScreen.__init__(self, QPixmap(movie.frameRect().size())) self.movie = movie self.movie.setSpeed(200) self.movie.frameChanged.connect(self.repaint)
def __init__(self, animation, flags): QSplashScreen.__init__(self, QPixmap(), flags) self.movie = QMovie(animation) self.movie.frameChanged.connect(self.onNextFrame) self.movie.start()