本文整理汇总了Python中PySide.QtGui.QFrame.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QFrame.__init__方法的具体用法?Python QFrame.__init__怎么用?Python QFrame.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QFrame
的用法示例。
在下文中一共展示了QFrame.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, adjacencyClue, fragilityClue, parent=None):
""" Initialize the Adjacency Clue View """
QFrame.__init__(self, parent)
self.adjacencyClue = adjacencyClue
self.fragilityClue = fragilityClue
self.resize(34, 32)
self.setupClueLabel()
示例2: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, weaponCautionClue, parent=None):
""" Initialize the Weapon Caution Clue View """
QFrame.__init__(self, parent)
self.weaponCautionClue = weaponCautionClue
self.resize(16, 15)
self.loadImage()
self.setVisible(False)
示例3: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, plugin, *args):
QFrame.__init__(self, *args)
self.plugin = plugin
self.config_main = self.plugin.config_main
self.config_theme = self.plugin.config_theme
self.tools = self.plugin.tools
self.lvars = self.plugin.lvars
self.setFrameStyle(QFrame.StyledPanel | QFrame.Plain)
self.edit = self.PlainTextEdit(self)
self.number_bar = self.NumberBar(self.config_theme, self.edit)
hbox = QHBoxLayout(self)
hbox.setSpacing(0)
hbox.addWidget(self.number_bar)
hbox.addWidget(self.edit)
self.edit.blockCountChanged.connect(self.number_bar.adjust_width)
self.edit.updateRequest.connect(self.number_bar.update_contents)
QtGui.QShortcut(QtGui.QKeySequence("Ctrl+S"), self).\
activated.connect(self.save_file)
QtGui.QShortcut(QtGui.QKeySequence("Ctrl+F"), self).\
activated.connect(self.show_find)
return
示例4: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, parent, level_selection):
""" Initialize the Level Selection View """
QFrame.__init__(self)#, parent)
self.resize(640, 480)
self.level_selection = level_selection
self.setFocusPolicy(Qt.StrongFocus)
self.color = QColor(200, 200, 200)
self.setStyleSheet("QFrame { background-color: %s }" % self.color.name())
self.levelDetailsView = LevelDetailsView(self.level_selection, parent=self)
width = self.ENTRIES_PER_ROW*LevelOverviewView.WIDTH+32
self.levelDetailsView.move(width, 0)
self.levelDetailsView.resize(640-width, 480)
self.levelOverviews = []
for level in level_selection.levels:
overview = LevelOverviewView(self, level, level_selection)
self.levelOverviews.append(overview)
for i in range(len(self.levelOverviews)):
overview = self.levelOverviews[i]
overview.move(16+(i%self.ENTRIES_PER_ROW)*LevelOverviewView.WIDTH, 32+i/self.ENTRIES_PER_ROW*LevelOverviewView.HEIGHT)
示例5: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, level, width, height, parent=None):
""" Initialize the Level Completion View """
QFrame.__init__(self, parent)
self.level = level
self.setup()
self.updateView()
self.color = QColor(200, 200, 200)
self.setStyleSheet("QFrame { background-color: %s }" % self.color.name())
self.resize(width, height)
示例6: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, parent, level):
""" Initialize the Level View """
QFrame.__init__(self, parent)
self.level = level
self.background = BackgroundView()
self.enemy_view = EnemyShipView(self.level.enemy)
self.ship_view = HeroShipView(self.level.ship)
self.laser_views = []
self.setFocusPolicy(Qt.StrongFocus)
示例7: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, parent):
""" Initialize the Kao Widget With Menu """
QFrame.__init__(self)
self.parentWidget = parent
self.__left_widget__, self.__right_widget__ = self.setupWidgets()
self.setPieceSizes()
layout = QHBoxLayout(self)
layout.addWidget(self.__left_widget__)
layout.addWidget(self.__right_widget__)
self.setLayout(layout)
示例8: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, minefield, drone, parent=None):
""" Initialize the grid square view """
QFrame.__init__(self, parent)
self.minefield = minefield
self.drone = drone
self.row = 0
self.column = 0
self.setup()
self.resize(self.getWidth(), self.getHeight())
示例9: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self):
QFrame.__init__(self)
layout = QGridLayout()
self.btnMonitor1 = OutputButton(ID=2)
self.btnMonitor1.setText("Monitor 1")
layout.addWidget(self.btnMonitor1, 0, 1)
self.btnChurch = OutputButton(ID=4)
self.btnChurch.setText("Church")
layout.addWidget(self.btnChurch, 1, 0)
self.btnSpecial = OutputButton(ID=7)
self.btnSpecial.setText("Stage")
layout.addWidget(self.btnSpecial, 1, 1)
self.btnGallery = OutputButton(ID=6)
self.btnGallery.setText("Gallery")
layout.addWidget(self.btnGallery, 2, 0)
self.btnWelcome = OutputButton(ID=5)
self.btnWelcome.setText("Welcome")
layout.addWidget(self.btnWelcome, 2, 1)
self.btnFont = OutputButton(ID=3)
self.btnFont.setText("Font")
layout.addWidget(self.btnFont, 3, 0)
self.btnRecord = OutputButton(ID=8)
self.btnRecord.setText("Record")
layout.addWidget(self.btnRecord, 3, 1)
self.btnPCMix = OutputButton(ID=2)
self.btnPCMix.setText("PC Mix")
layout.addWidget(self.btnPCMix, 4, 0)
self.btnAll = IDedButton(ID=0)
self.btnAll.setText("All")
layout.addWidget(self.btnAll, 4, 1)
self.outputButtons = {
2: self.btnMonitor1,
3: self.btnFont,
4: self.btnChurch,
5: self.btnWelcome,
6: self.btnGallery,
7: self.btnSpecial,
8: self.btnRecord,
}
layout.setColumnMinimumWidth(0, 100)
layout.setColumnMinimumWidth(1, 100)
layout.setColumnStretch(0, 1)
layout.setColumnStretch(1, 1)
self.setLayout(layout)
示例10: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, parent=None):
""" Initialize the Transaction Menu Widget """
QFrame.__init__(self, parent=parent)
self.setFrameShape(QFrame.Panel)
self.layout = QVBoxLayout(self)
self.transaction = None
self.forms = [SubtransactionForm(self)]
self.setupHeader()
for form in self.forms:
form.setup()
self.layout.addStretch()
示例11: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, parent, level, levelSelection):
""" Initialize the Level Overview View """
QFrame.__init__(self, parent)
self.resize(self.WIDTH, self.HEIGHT)
self.level = level
self.levelSelection = levelSelection
self.bigFont = QFont()
self.bigFont.setPointSize(32)
self.smallFont = QFont()
self.smallFont.setPointSize(24)
self.label = self.getLabel(self.smallFont)
示例12: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, parent, level):
""" Initialize the Level View """
QFrame.__init__(self, parent)
self.resize(640, 480)
self.level = level
self.minefield_view = MinefieldView(self.level.minefield, self.level.drone, self)
self.levelCompletionView = LevelCompletionView(self.level, self.minefield_view.getWidth(), 480-self.minefield_view.getHeight(), self)
self.levelCompletionView.move(0, self.minefield_view.getHeight())
self.gameStatusBar = GameStatusView(level, 640-self.minefield_view.getWidth(), 480, parent=self)
self.gameStatusBar.move(self.minefield_view.getWidth(), 0)
self.setFocusPolicy(Qt.StrongFocus)
示例13: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, minefield, drone, parent=None):
""" Initialize the grid square view """
QFrame.__init__(self, parent)
self.minefield = minefield
self.drone = drone
self.minefield_grid = MinefieldGridView(minefield, drone, parent=self)
self.borderWidth = GridSquareFrame.GRID_SQUARE_SIZE/2
self.borderHeight = GridSquareFrame.GRID_SQUARE_SIZE/2
self.setup()
self.color = QColor(200, 200, 200)
#self.setStyleSheet("QFrame { background-color: rgba(200, 200, 200, 100%) }")
self.resize(self.getWidth(), self.getHeight())
self.minefield_grid.move(self.borderWidth, self.borderHeight)
示例14: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self, levelSelection, parent=None):
""" Initialize the Level Details View """
QFrame.__init__(self, parent)
#self.resize(self.WIDTH, self.HEIGHT)
self.levelSelection = levelSelection
self.smallFont = QFont()
self.smallFont.setPointSize(14)
self.bigFont = QFont()
self.bigFont.setPointSize(24)
self.detailsLabel = self.getLabel("Level Details", self.bigFont, alignment=Qt.AlignCenter)
self.detailsLabel.move(32, 16)
self.setupGridLabel()
self.setupDefensesLabels()
self.setupRatingsLabel()
示例15: __init__
# 需要导入模块: from PySide.QtGui import QFrame [as 别名]
# 或者: from PySide.QtGui.QFrame import __init__ [as 别名]
def __init__(self):
QFrame.__init__(self)
self._color = [220, 220, 220]
self._font = QFont()
self._font.setPixelSize(10)
self._pen = QPen(QColor(100, 100, 100, 255))
self.label = QLabel()
self.label.setWordWrap(True)
self.label.setFont(self._font)
self.label.setMaximumWidth(300)
self.label.setMaximumHeight(36)
self.label.setMinimumHeight(36)
layout = QGridLayout()
layout.setSpacing(0)
layout.addWidget(self.label)
self.setLayout(layout)
self.setMinimumWidth(360)
self.setMaximumWidth(360)