本文整理汇总了Python中PyQt4.QtGui.QSplashScreen.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QSplashScreen.__init__方法的具体用法?Python QSplashScreen.__init__怎么用?Python QSplashScreen.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QSplashScreen
的用法示例。
在下文中一共展示了QSplashScreen.__init__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
def __init__(self,qgisPrefix):
p = qgisPrefix + "//data//icimod.png"
pic = QPixmap(p)
self.labelAlignment = Qt.Alignment(Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute)
QSplashScreen.__init__(self, pic)
self.show()
QApplication.flush()
示例2: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
def __init__(self, pixmap, waitTime=0, textColor=Qt.black, *args, **kwargs):
"""
Initializes the class.
:param pixmap: Current pixmap path.
:type pixmap: unicode
:param waitTime: wait time.
:type waitTime: int
:param \*args: Arguments.
:type \*args: \*
:param \*\*kwargs: Keywords arguments.
:type \*\*kwargs: \*\*
"""
LOGGER.debug("> Initializing '{0}()' class.".format(self.__class__.__name__))
QSplashScreen.__init__(self, pixmap, *args, **kwargs)
self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
# --- Setting class attributes. ---
self.__waitTime = None
self.waitTime = waitTime
self.__textColor = None
self.textColor = textColor
示例3: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
def __init__(self, parent=None):
from radiance import __version__
self.__version = __version__
self.parent = parent
pixmap = QPixmap(QString(':/Radiance/splashscreen.png'))
flags = Qt.WindowStaysOnTopHint
QSplashScreen.__init__(self, pixmap, flags)
self.setMask(pixmap.mask())
# Custom progress bar stylesheet
progressbar_stylesheet = """
QProgressBar:horizontal {
border: 1px solid black;
background: white;
padding: 1px;
}
QProgressBar::chunk:horizontal {
background-color: qlineargradient(spread: pad, x1: 1, y1: 0.5, x2: 0, y2: 0.5, stop: 0 black, stop: 1 white);
}
"""
# Place progress bar to bottom of splash screen.
progressbar = QProgressBar(self)
progressbar.setRange(0, 0)
progressbar.setGeometry(10, self.height() - 20, self.width() - 20, 10)
progressbar.setTextVisible(False)
progressbar.setStyleSheet(progressbar_stylesheet)
self.progressbar = progressbar
self.show()
示例4: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
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()
示例5: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
def __init__( self ):
self.labelAlignment = \
Qt.Alignment( Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute )
QSplashScreen.__init__( self, PixmapCache().getPixmap( 'splash.png' ) )
self.show()
QApplication.flush()
return
示例6: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
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)
示例7: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
def __init__( self ):
self.labelAlignment = \
Qt.Alignment( Qt.AlignBottom | Qt.AlignRight | Qt.AlignAbsolute )
splashPixmap = PixmapCache().getPixmap( 'splash.png' )
painter = QPainter( splashPixmap )
font = QFont( "Arial" )
font.setPointSize( 12 )
painter.setFont( font )
painter.drawText( QPoint( 20, 130 ), "CODIMENSION v" + str( cdmverspec.__version__ ) )
QSplashScreen.__init__( self, None, splashPixmap )
self.show()
QApplication.flush()
return
示例8: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
def __init__(self):
QSplashScreen.__init__(self)
self.setWindowFlags(Qt.WindowStaysOnTopHint | Qt.SplashScreen)
splash_width = 720
splash_height = 400
desktop = QApplication.desktop()
screen = desktop.screenGeometry(desktop.primaryScreen()).size()
screen_width, screen_height = screen.width(), screen.height()
x = screen_width / 2 - splash_width / 2
y = screen_height / 2 - splash_height / 2
self.setGeometry(x, y, splash_width, splash_height)
self.splash_image = resourceImage("splash.jpg")
self.ert = "ERT"
self.ert_title = "Ensemble based Reservoir Tool"
self.version = "Version string"
self.timestamp = "Timestamp string"
self.copyright = u"Copyright \u00A9 2017 Statoil ASA, Norway"
示例9: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
def __init__(self):
QSplashScreen.__init__(self)
self.setupUi()
示例10: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
def __init__(self):
QSplashScreen.__init__(self, QPixmap('media/splash.png'), Qt.WindowStaysOnTopHint)
self.show()
示例11: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import __init__ [as 别名]
def __init__(self, pixmap, windowFlag, versionNumber):
QSplashScreen.__init__(self, pixmap, windowFlag)
self.versionNumber = versionNumber