當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。