当前位置: 首页>>代码示例>>Python>>正文


Python QFrame.__init__方法代码示例

本文整理汇总了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()
开发者ID:cloew,项目名称:PyMine,代码行数:9,代码来源:adjacency_clue_view.py

示例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)
开发者ID:cloew,项目名称:PyMine,代码行数:9,代码来源:weapon_caution_clue_view.py

示例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
开发者ID:453483289,项目名称:hrdev,代码行数:28,代码来源:gui.py

示例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)
开发者ID:cloew,项目名称:PyMine,代码行数:27,代码来源:level_selection_view.py

示例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)
开发者ID:cloew,项目名称:PyMine,代码行数:13,代码来源:level_completion_view.py

示例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)
开发者ID:cloew,项目名称:GalagaEsque,代码行数:13,代码来源:level_view.py

示例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)
开发者ID:cloew,项目名称:PersonalAccountingSoftware,代码行数:13,代码来源:kao_widget_with_menu.py

示例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())
开发者ID:cloew,项目名称:PyMine,代码行数:14,代码来源:minefield_grid_view.py

示例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)
开发者ID:staldates,项目名称:av-control,代码行数:54,代码来源:OutputsGrid.py

示例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()
开发者ID:cloew,项目名称:PersonalAccountingSoftware,代码行数:15,代码来源:transaction_menu_widget.py

示例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)
开发者ID:cloew,项目名称:PyMine,代码行数:17,代码来源:level_overview_view.py

示例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)
开发者ID:cloew,项目名称:PyMine,代码行数:17,代码来源:level_view.py

示例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)
开发者ID:cloew,项目名称:PyMine,代码行数:19,代码来源:minefield_view.py

示例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()
开发者ID:cloew,项目名称:PyMine,代码行数:20,代码来源:level_details_view.py

示例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)
开发者ID:rcockbur,项目名称:3DMedicalVisualizationTool,代码行数:26,代码来源:StatusWidget.py


注:本文中的PySide.QtGui.QFrame.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。