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


Python QFrame.setFrameStyle方法代码示例

本文整理汇总了Python中PyQt5.Qt.QFrame.setFrameStyle方法的典型用法代码示例。如果您正苦于以下问题:Python QFrame.setFrameStyle方法的具体用法?Python QFrame.setFrameStyle怎么用?Python QFrame.setFrameStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.Qt.QFrame的用法示例。


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

示例1: _initialize_file_type_settings

# 需要导入模块: from PyQt5.Qt import QFrame [as 别名]
# 或者: from PyQt5.Qt.QFrame import setFrameStyle [as 别名]
    def _initialize_file_type_settings(self, layout):
        '''Initialize file creation/sending type settings'''
        separator_b = QFrame()
        separator_b.setFrameStyle(QFrame.HLine)
        separator_b.setFrameShadow(QFrame.Sunken)
        layout.addWidget(separator_b)

        book_types_to_create = QGroupBox()
        book_types_to_create.setTitle('Book types to create files for:')
        book_types_to_create.setLayout(QHBoxLayout(book_types_to_create))

        self._settings['mobi'] = QCheckBox('MOBI')
        self._settings['mobi'].setChecked('mobi' in __prefs__['formats'])
        book_types_to_create.layout().addWidget(self._settings['mobi'])

        self._settings['azw3'] = QCheckBox('AZW3')
        self._settings['azw3'].setChecked('azw3' in __prefs__['formats'])
        book_types_to_create.layout().addWidget(self._settings['azw3'])
        layout.addWidget(book_types_to_create)

        file_preference_layout = QGroupBox()
        file_preference_layout.setTitle('If device has both (mobi and azw3) formats, prefer:')
        file_preference_layout.setLayout(QHBoxLayout(file_preference_layout))

        file_preference_group = QButtonGroup()
        self._settings['file_preference_mobi'] = QRadioButton('MOBI')
        self._settings['file_preference_mobi'].setChecked(__prefs__['file_preference'] == 'mobi')
        file_preference_group.addButton(self._settings['file_preference_mobi'])
        file_preference_layout.layout().addWidget(self._settings['file_preference_mobi'])

        self._settings['file_preference_azw3'] = QRadioButton('AZW3')
        self._settings['file_preference_azw3'].setChecked(__prefs__['file_preference'] == 'azw3')
        file_preference_group.addButton(self._settings['file_preference_azw3'])
        file_preference_layout.layout().addWidget(self._settings['file_preference_azw3'])
        layout.addWidget(file_preference_layout)
开发者ID:stoduk,项目名称:X-Ray_Calibre_Plugin,代码行数:37,代码来源:config.py

示例2: _intialize_file_settings

# 需要导入模块: from PyQt5.Qt import QFrame [as 别名]
# 或者: from PyQt5.Qt.QFrame import setFrameStyle [as 别名]
    def _intialize_file_settings(self, layout):
        '''Initialize file creation/sending settings'''
        separator_a = QFrame()
        separator_a.setFrameStyle(QFrame.HLine)
        separator_a.setFrameShadow(QFrame.Sunken)
        layout.addWidget(separator_a)

        files_to_create = QGroupBox()
        files_to_create.setTitle('Files to create/send')
        files_to_create.setLayout(QGridLayout(files_to_create))

        self._settings['create_send_xray'] = QCheckBox('X-Ray')
        self._settings['create_send_xray'].setChecked(__prefs__['create_send_xray'])
        files_to_create.layout().addWidget(self._settings['create_send_xray'], 0, 0)

        self._settings['create_send_author_profile'] = QCheckBox('Author Profile')
        self._settings['create_send_author_profile'].setChecked(__prefs__['create_send_author_profile'])
        files_to_create.layout().addWidget(self._settings['create_send_author_profile'], 1, 0)

        self._settings['create_send_start_actions'] = QCheckBox('Start Actions')
        self._settings['create_send_start_actions'].setChecked(__prefs__['create_send_start_actions'])
        files_to_create.layout().addWidget(self._settings['create_send_start_actions'], 0, 1)

        self._settings['create_send_end_actions'] = QCheckBox('End Actions')
        self._settings['create_send_end_actions'].setChecked(__prefs__['create_send_end_actions'])
        files_to_create.layout().addWidget(self._settings['create_send_end_actions'], 1, 1)
        layout.addWidget(files_to_create)
开发者ID:stoduk,项目名称:X-Ray_Calibre_Plugin,代码行数:29,代码来源:config.py

示例3: SearchBar

# 需要导入模块: from PyQt5.Qt import QFrame [as 别名]
# 或者: from PyQt5.Qt.QFrame import setFrameStyle [as 别名]
class SearchBar(QFrame):  # {{{

    def __init__(self, parent):
        QFrame.__init__(self, parent)
        self.setFrameStyle(QFrame.NoFrame)
        self.setObjectName('search_bar')
        self._layout = l = QHBoxLayout(self)
        l.setContentsMargins(0, 4, 0, 4)

        x = parent.virtual_library = QToolButton(self)
        x.setCursor(Qt.PointingHandCursor)
        x.setPopupMode(x.InstantPopup)
        x.setText(_('Virtual library'))
        x.setAutoRaise(True)
        x.setIcon(QIcon(I('lt.png')))
        x.setObjectName("virtual_library")
        x.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
        l.addWidget(x)

        x = QToolButton(self)
        x.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
        x.setAutoRaise(True)
        x.setIcon(QIcon(I('minus.png')))
        x.setObjectName('clear_vl')
        l.addWidget(x)
        x.setVisible(False)
        x.setToolTip(_('Close the Virtual library'))
        parent.clear_vl = x
        self.vl_sep = QFrame(self)
        self.vl_sep.setFrameStyle(QFrame.VLine | QFrame.Sunken)
        l.addWidget(self.vl_sep)

        parent.sort_sep = QFrame(self)
        parent.sort_sep.setFrameStyle(QFrame.VLine | QFrame.Sunken)
        parent.sort_sep.setVisible(False)
        parent.sort_button = self.sort_button = sb = QToolButton(self)
        sb.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
        sb.setToolTip(_('Change how the displayed books are sorted'))
        sb.setCursor(Qt.PointingHandCursor)
        sb.setPopupMode(QToolButton.InstantPopup)
        sb.setAutoRaise(True)
        sb.setText(_('Sort'))
        sb.setIcon(QIcon(I('sort.png')))
        sb.setMenu(QMenu())
        sb.menu().aboutToShow.connect(self.populate_sort_menu)
        sb.setVisible(False)
        l.addWidget(sb)
        l.addWidget(parent.sort_sep)

        x = parent.search = SearchBox2(self)
        x.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
        x.setObjectName("search")
        x.setToolTip(_("<p>Search the list of books by title, author, publisher, "
                       "tags, comments, etc.<br><br>Words separated by spaces are ANDed"))
        x.setMinimumContentsLength(10)
        l.addWidget(x)

        parent.advanced_search_toggle_action = ac = parent.search.add_action('gear.png', QLineEdit.LeadingPosition)
        parent.addAction(ac)
        ac.setToolTip(_('Advanced search'))
        parent.keyboard.register_shortcut('advanced search toggle',
                _('Advanced search'), default_keys=("Shift+Ctrl+F",),
                action=ac)

        self.search_button = QToolButton()
        self.search_button.setToolButtonStyle(Qt.ToolButtonTextOnly)
        self.search_button.setIcon(QIcon(I('search.png')))
        self.search_button.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
        self.search_button.setText(_('Search'))
        self.search_button.setAutoRaise(True)
        self.search_button.setCursor(Qt.PointingHandCursor)
        l.addWidget(self.search_button)
        self.search_button.setSizePolicy(QSizePolicy.Minimum,
                QSizePolicy.Minimum)
        self.search_button.clicked.connect(parent.do_search_button)
        self.search_button.setToolTip(
            _('Do Quick Search (you can also press the Enter key)'))

        x = parent.highlight_only_button = QToolButton(self)
        x.setAutoRaise(True)
        x.setText(_('Highlight'))
        x.setCursor(Qt.PointingHandCursor)
        x.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
        x.setIcon(QIcon(I('arrow-down.png')))
        l.addWidget(x)

        x = parent.saved_search = SavedSearchBox(self)
        x.setMaximumSize(QSize(150, 16777215))
        x.setMinimumContentsLength(10)
        x.setObjectName("saved_search")
        l.addWidget(x)
        x.setVisible(tweaks['show_saved_search_box'])

        x = parent.copy_search_button = QToolButton(self)
        x.setAutoRaise(True)
        x.setCursor(Qt.PointingHandCursor)
        x.setIcon(QIcon(I("search_copy_saved.png")))
        x.setObjectName("copy_search_button")
        l.addWidget(x)
        x.setToolTip(_("Copy current search text (instead of search name)"))
#.........这里部分代码省略.........
开发者ID:bwhitenb5e,项目名称:calibre,代码行数:103,代码来源:layout.py


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