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


Python QtGui.QFrame类代码示例

本文整理汇总了Python中PySide.QtGui.QFrame的典型用法代码示例。如果您正苦于以下问题:Python QFrame类的具体用法?Python QFrame怎么用?Python QFrame使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QFrame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 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,代码行数:7,代码来源:weapon_caution_clue_view.py

示例2: __init__

 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,代码行数:7,代码来源:adjacency_clue_view.py

示例3: createDisplayFields

    def createDisplayFields(self):
        display_widget = QFrame()
        display_widget.setFrameStyle(QtGui.QFrame.Panel | QtGui.QFrame.Sunken)
        self.left_layout.addWidget(display_widget)
        self.display_layout = QHBoxLayout()

        # self.turn = self.transcript.current_turn()
        self.time_field = qHotField("time", str, "00:00:00", min_size=75, max_size=75, pos="top", handler=self.update_time)
        self.display_layout.addWidget(self.time_field)
        self.speaker_field = qHotField("speaker", str, " ", min_size=75, max_size=75, pos="top", handler=self.update_speaker)
        self.display_layout.addWidget(self.speaker_field)
        self.utt_field = qHotField("utterance", str, " ", min_size=350, max_size=500, pos="top", handler=self.update_utterance, multiline=True)
        self.utt_field.setStyleSheet("font: 14pt \"Courier\";")
        # self.utt_field.efield.setFont(QFont('SansSerif', 12))
        self.display_layout.addWidget(self.utt_field)

        display_widget.setLayout(self.display_layout)
        self.display_layout.setStretchFactor(self.speaker_field, 0)
        self.display_layout.setStretchFactor(self.utt_field, 1)

        self.transcript_slider = QSlider(QtCore.Qt.Horizontal, self)
        self.display_layout.addWidget(self.transcript_slider)
        self.transcript_slider.setMaximum(100)
        self.connect(self.transcript_slider,
                     QtCore.SIGNAL("sliderMoved(int)"), self.position_transcript)
        self.left_layout.addWidget(self.transcript_slider)
开发者ID:bsherin,项目名称:shared_tools,代码行数:26,代码来源:stepperUI.py

示例4: init_notebooks

 def init_notebooks(self):
     frame = QFrame()
     layout = QVBoxLayout()
     frame.setLayout(layout)
     self.ui.scrollArea.setWidget(frame)
     for notebook_struct in self.app.provider.list_notebooks():
         notebook = Notebook.from_tuple(notebook_struct)
         count = self.app.provider.get_notebook_notes_count(notebook.id)
         widget = QWidget()
         menu = QMenu(self)
         menu.addAction(self.tr('Change Name'), Slot()(partial(
             self.change_notebook, notebook=notebook,
         )))
         action = menu.addAction(self.tr('Remove Notebook'), Slot()(partial(
             self.remove_notebook, notebook=notebook,
         )))
         action.setEnabled(False)
         widget.ui = Ui_Notebook()
         widget.ui.setupUi(widget)
         widget.ui.name.setText(notebook.name)
         widget.ui.content.setText(self.tr('Containts %d notes') % count)
         widget.ui.actionBtn.setIcon(QIcon.fromTheme('gtk-properties'))
         widget.setFixedHeight(50)
         layout.addWidget(widget)
         widget.ui.actionBtn.clicked.connect(Slot()(partial(
             self.show_notebook_menu,
             menu=menu, widget=widget,
         )))
开发者ID:fabianofranz,项目名称:everpad,代码行数:28,代码来源:management.py

示例5: __init__

    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,代码行数:26,代码来源:gui.py

示例6: __init__

    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,代码行数:25,代码来源:level_selection_view.py

示例7: HorizontalDivider

def HorizontalDivider():
    """
    Creates a horizontal divider line.
    :return:
    """
    divider = QFrame()
    divider.setFrameShape(QFrame.HLine)
    divider.setFrameShadow(QFrame.Raised)
    return divider
开发者ID:b-sea,项目名称:HatfieldFX,代码行数:9,代码来源:Label.py

示例8: VerticalDivider

def VerticalDivider():
    """
    Creates a vertical divider line.
    :return:
    """
    divider = QFrame()
    divider.setFrameShape(QFrame.VLine)
    divider.setFrameShadow(QFrame.Raised)
    return divider
开发者ID:b-sea,项目名称:HatfieldFX,代码行数:9,代码来源:Label.py

示例9: __init__

    def __init__(self):
        generic.GenericGui.__init__(self)
        window = QWidget()
        window.setWindowTitle('quichem-pyside')

        self.compiler_view = QListWidget()
        self.compiler_view.currentRowChanged.connect(self.show_source)
        self.stacked_widget = QStackedWidget()
        self.stacked_widget.setFrameStyle(QFrame.StyledPanel | QFrame.Raised)
        self.edit = QLineEdit()
        self.edit.setPlaceholderText('Type quichem input...')
        self.edit.textChanged.connect(self.change_value)
        self.view = QWebView()
        self.view.page().mainFrame().setScrollBarPolicy(Qt.Vertical,
                                                        Qt.ScrollBarAlwaysOff)
        self.view.page().action(QWebPage.Reload).setVisible(False)
        self.view.setMaximumHeight(0)
        self.view.setUrl('qrc:/web/page.html')
        self.view.setZoomFactor(2)
        self.view.page().mainFrame().contentsSizeChanged.connect(
            self._resize_view)
        # For debugging JS:
        ## from PySide.QtWebKit import QWebSettings
        ## QWebSettings.globalSettings().setAttribute(
        ##     QWebSettings.DeveloperExtrasEnabled, True)

        button_image = QPushButton('Copy as Image')
        button_image.clicked.connect(self.set_clipboard_image)
        button_image.setToolTip('Then paste into any graphics program')
        button_word = QPushButton('Copy as MS Word Equation')
        button_word.clicked.connect(self.set_clipboard_word)
        button_html = QPushButton('Copy as Formatted Text')
        button_html.clicked.connect(self.set_clipboard_html)
        line = QFrame()
        line.setFrameShape(QFrame.HLine)
        line.setFrameShadow(QFrame.Sunken)

        button_layout = QHBoxLayout()
        button_layout.addStretch()
        button_layout.addWidget(button_image)
        button_layout.addWidget(button_word)
        button_layout.addWidget(button_html)
        source_layout = QHBoxLayout()
        source_layout.addWidget(self.compiler_view)
        source_layout.addWidget(self.stacked_widget, 1)
        QVBoxLayout(window)
        window.layout().addWidget(self.edit)
        window.layout().addWidget(self.view)
        window.layout().addLayout(button_layout)
        window.layout().addWidget(line)
        window.layout().addLayout(source_layout, 1)

        window.show()
        window.resize(window.minimumWidth(), window.height())
        # To prevent garbage collection of internal Qt object.
        self._window = window
开发者ID:spamalot,项目名称:quichem,代码行数:56,代码来源:pyside.py

示例10: __init__

    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,代码行数:11,代码来源:level_view.py

示例11: __init__

 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,代码行数:11,代码来源:kao_widget_with_menu.py

示例12: __init__

 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,代码行数:11,代码来源:level_completion_view.py

示例13: __init__

 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,代码行数:12,代码来源:minefield_grid_view.py

示例14: __init__

    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,代码行数:52,代码来源:OutputsGrid.py

示例15: __init__

 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,代码行数:13,代码来源:transaction_menu_widget.py


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