コード例 #1
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(400, 300)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.console = InteractiveConsole(Form)
        self.console.setObjectName("console")
        self.verticalLayout.addWidget(self.console)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.edit_command = PromptLineEdit(Form)
        self.edit_command.setObjectName("edit_command")
        self.horizontalLayout.addWidget(self.edit_command)
        self.bt_run = QtWidgets.QToolButton(Form)
        self.bt_run.setText("")
        icon = QtGui.QIcon.fromTheme("system-run")
        self.bt_run.setIcon(icon)
        self.bt_run.setObjectName("bt_run")
        self.horizontalLayout.addWidget(self.bt_run)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
        self.console.setToolTip(_translate("Form", "Command output"))
        self.edit_command.setToolTip(_translate("Form", "Type a command to execute"))
        self.bt_run.setToolTip(_translate("Form", "Run command (keep pressed to access the terminal history)"))
コード例 #2
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(505, 355)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.edit_filter = PromptLineEdit(Form)
        self.edit_filter.setObjectName("edit_filter")
        self.verticalLayout.addWidget(self.edit_filter)
        self.table = QtWidgets.QTableWidget(Form)
        self.table.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.table.setObjectName("table")
        self.table.setColumnCount(2)
        self.table.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.table.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.table.setHorizontalHeaderItem(1, item)
        self.table.horizontalHeader().setCascadingSectionResizes(False)
        self.table.verticalHeader().setVisible(False)
        self.verticalLayout.addWidget(self.table)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
        self.edit_filter.setToolTip(_translate("Form", "Filter actions by name or by shortcut"))
        self.table.setToolTip(_translate("Form", "The list of application shortcuts"))
        item = self.table.horizontalHeaderItem(0)
        item.setText(_translate("Form", "Action"))
        item = self.table.horizontalHeaderItem(1)
        item.setText(_translate("Form", "Shortcut"))
コード例 #3
0
class Ui_Frame(object):
    def setupUi(self, Frame):
        Frame.setObjectName("Frame")
        Frame.resize(698, 274)
        Frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        Frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.verticalLayout = QtWidgets.QVBoxLayout(Frame)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.bt_infos = QtWidgets.QToolButton(Frame)
        icon = QtGui.QIcon.fromTheme("dialog-information")
        self.bt_infos.setIcon(icon)
        self.bt_infos.setObjectName("bt_infos")
        self.horizontalLayout.addWidget(self.bt_infos)
        self.lineEdit = PromptLineEdit(Frame)
        self.lineEdit.setMinimumSize(QtCore.QSize(400, 0))
        self.lineEdit.setObjectName("lineEdit")
        self.horizontalLayout.addWidget(self.lineEdit)
        self.bt_close = QtWidgets.QToolButton(Frame)
        icon = QtGui.QIcon.fromTheme("window-close")
        self.bt_close.setIcon(icon)
        self.bt_close.setObjectName("bt_close")
        self.horizontalLayout.addWidget(self.bt_close)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.treeWidget = QtWidgets.QTreeWidget(Frame)
        self.treeWidget.setMaximumSize(QtCore.QSize(16777215, 500))
        self.treeWidget.setHeaderHidden(True)
        self.treeWidget.setObjectName("treeWidget")
        self.treeWidget.headerItem().setText(0, "1")
        self.verticalLayout.addWidget(self.treeWidget)
        self.cb_non_project_files = QtWidgets.QCheckBox(Frame)
        self.cb_non_project_files.setObjectName("cb_non_project_files")
        self.verticalLayout.addWidget(self.cb_non_project_files)

        self.retranslateUi(Frame)
        QtCore.QMetaObject.connectSlotsByName(Frame)

    def retranslateUi(self, Frame):
        _translate = QtCore.QCoreApplication.translate
        Frame.setWindowTitle(_translate("Frame", "Frame"))
        self.bt_infos.setToolTip(_translate("Frame", "Help"))
        self.bt_infos.setText(_translate("Frame", "..."))
        self.bt_close.setToolTip(_translate("Frame", "Close"))
        self.bt_close.setText(_translate("Frame", "..."))
        self.cb_non_project_files.setText(
            _translate("Frame", "Include non-project files (Shift+Enter)"))
コード例 #4
0
ファイル: locator_ui.py プロジェクト: SirmoGames/hackedit
class Ui_Frame(object):
    def setupUi(self, Frame):
        Frame.setObjectName("Frame")
        Frame.resize(698, 274)
        Frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        Frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.verticalLayout = QtWidgets.QVBoxLayout(Frame)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.bt_infos = QtWidgets.QToolButton(Frame)
        icon = QtGui.QIcon.fromTheme("dialog-information")
        self.bt_infos.setIcon(icon)
        self.bt_infos.setObjectName("bt_infos")
        self.horizontalLayout.addWidget(self.bt_infos)
        self.lineEdit = PromptLineEdit(Frame)
        self.lineEdit.setMinimumSize(QtCore.QSize(400, 0))
        self.lineEdit.setObjectName("lineEdit")
        self.horizontalLayout.addWidget(self.lineEdit)
        self.bt_close = QtWidgets.QToolButton(Frame)
        icon = QtGui.QIcon.fromTheme("window-close")
        self.bt_close.setIcon(icon)
        self.bt_close.setObjectName("bt_close")
        self.horizontalLayout.addWidget(self.bt_close)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.treeWidget = QtWidgets.QTreeWidget(Frame)
        self.treeWidget.setMaximumSize(QtCore.QSize(16777215, 500))
        self.treeWidget.setHeaderHidden(True)
        self.treeWidget.setObjectName("treeWidget")
        self.treeWidget.headerItem().setText(0, "1")
        self.verticalLayout.addWidget(self.treeWidget)
        self.cb_non_project_files = QtWidgets.QCheckBox(Frame)
        self.cb_non_project_files.setObjectName("cb_non_project_files")
        self.verticalLayout.addWidget(self.cb_non_project_files)

        self.retranslateUi(Frame)
        QtCore.QMetaObject.connectSlotsByName(Frame)

    def retranslateUi(self, Frame):
        _translate = QtCore.QCoreApplication.translate
        Frame.setWindowTitle(_translate("Frame", "Frame"))
        self.bt_infos.setToolTip(_translate("Frame", "Help"))
        self.bt_infos.setText(_translate("Frame", "..."))
        self.bt_close.setToolTip(_translate("Frame", "Close"))
        self.bt_close.setText(_translate("Frame", "..."))
        self.cb_non_project_files.setText(_translate("Frame", "Include non-project files (Shift+Enter)"))
コード例 #5
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(505, 355)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.edit_filter = PromptLineEdit(Form)
        self.edit_filter.setObjectName("edit_filter")
        self.verticalLayout.addWidget(self.edit_filter)
        self.table = QtWidgets.QTableWidget(Form)
        self.table.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.table.setObjectName("table")
        self.table.setColumnCount(2)
        self.table.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.table.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.table.setHorizontalHeaderItem(1, item)
        self.table.horizontalHeader().setCascadingSectionResizes(False)
        self.table.verticalHeader().setVisible(False)
        self.verticalLayout.addWidget(self.table)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
        self.edit_filter.setToolTip(
            _translate("Form", "Filter actions by name or by shortcut"))
        self.table.setToolTip(
            _translate("Form", "The list of application shortcuts"))
        item = self.table.horizontalHeaderItem(0)
        item.setText(_translate("Form", "Action"))
        item = self.table.horizontalHeaderItem(1)
        item.setText(_translate("Form", "Shortcut"))
コード例 #6
0
ファイル: search_panel_ui.py プロジェクト: pixpil/gii
class Ui_SearchPanel(object):
    def setupUi(self, SearchPanel):
        SearchPanel.setObjectName("SearchPanel")
        SearchPanel.resize(884, 90)
        SearchPanel.setStyleSheet("")
        self.verticalLayout = QtWidgets.QVBoxLayout(SearchPanel)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.frame = QtWidgets.QFrame(SearchPanel)
        self.frame.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame)
        self.verticalLayout_2.setContentsMargins(9, 9, 9, 9)
        self.verticalLayout_2.setSpacing(9)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.widgetSearch = QtWidgets.QWidget(self.frame)
        self.widgetSearch.setObjectName("widgetSearch")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.widgetSearch)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.labelSearch = QtWidgets.QLabel(self.widgetSearch)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.labelSearch.sizePolicy().hasHeightForWidth())
        self.labelSearch.setSizePolicy(sizePolicy)
        self.labelSearch.setMinimumSize(QtCore.QSize(0, 0))
        self.labelSearch.setMaximumSize(QtCore.QSize(18, 18))
        self.labelSearch.setText("")
        self.labelSearch.setPixmap(
            QtGui.QPixmap(":/pycode-icons/rc/edit-find.png"))
        self.labelSearch.setScaledContents(True)
        self.labelSearch.setObjectName("labelSearch")
        self.horizontalLayout.addWidget(self.labelSearch)
        self.lineEditSearch = PromptLineEdit(self.widgetSearch)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.lineEditSearch.sizePolicy().hasHeightForWidth())
        self.lineEditSearch.setSizePolicy(sizePolicy)
        self.lineEditSearch.setMinimumSize(QtCore.QSize(200, 0))
        self.lineEditSearch.setObjectName("lineEditSearch")
        self.horizontalLayout.addWidget(self.lineEditSearch)
        self.toolButtonPrevious = QtWidgets.QToolButton(self.widgetSearch)
        self.toolButtonPrevious.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/pyqode_icons/rc/go-up.png"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButtonPrevious.setIcon(icon)
        self.toolButtonPrevious.setObjectName("toolButtonPrevious")
        self.horizontalLayout.addWidget(self.toolButtonPrevious)
        self.toolButtonNext = QtWidgets.QToolButton(self.widgetSearch)
        self.toolButtonNext.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/pycode-icons/rc/go-down.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButtonNext.setIcon(icon1)
        self.toolButtonNext.setObjectName("toolButtonNext")
        self.horizontalLayout.addWidget(self.toolButtonNext)
        self.checkBoxRegex = QtWidgets.QCheckBox(self.widgetSearch)
        self.checkBoxRegex.setObjectName("checkBoxRegex")
        self.horizontalLayout.addWidget(self.checkBoxRegex)
        self.checkBoxCase = QtWidgets.QCheckBox(self.widgetSearch)
        self.checkBoxCase.setStyleSheet("")
        self.checkBoxCase.setObjectName("checkBoxCase")
        self.horizontalLayout.addWidget(self.checkBoxCase)
        self.checkBoxWholeWords = QtWidgets.QCheckBox(self.widgetSearch)
        self.checkBoxWholeWords.setObjectName("checkBoxWholeWords")
        self.horizontalLayout.addWidget(self.checkBoxWholeWords)
        self.checkBoxInSelection = QtWidgets.QCheckBox(self.widgetSearch)
        self.checkBoxInSelection.setObjectName("checkBoxInSelection")
        self.horizontalLayout.addWidget(self.checkBoxInSelection)
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.labelMatches = QtWidgets.QLabel(self.widgetSearch)
        self.labelMatches.setObjectName("labelMatches")
        self.horizontalLayout.addWidget(self.labelMatches)
        self.toolButtonClose = QtWidgets.QToolButton(self.widgetSearch)
        self.toolButtonClose.setText("")
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/pycode-icons/rc/close.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButtonClose.setIcon(icon2)
        self.toolButtonClose.setObjectName("toolButtonClose")
        self.horizontalLayout.addWidget(self.toolButtonClose)
        self.verticalLayout_2.addWidget(self.widgetSearch)
        self.widgetReplace = QtWidgets.QWidget(self.frame)
        self.widgetReplace.setObjectName("widgetReplace")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.widgetReplace)
        self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.labelReplace = QtWidgets.QLabel(self.widgetReplace)
        self.labelReplace.setMaximumSize(QtCore.QSize(18, 18))
        self.labelReplace.setText("")
        self.labelReplace.setPixmap(
            QtGui.QPixmap(":/pycode-icons/rc/edit-find-replace.png"))
        self.labelReplace.setScaledContents(True)
        self.labelReplace.setObjectName("labelReplace")
        self.horizontalLayout_2.addWidget(self.labelReplace)
        self.lineEditReplace = PromptLineEdit(self.widgetReplace)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.lineEditReplace.sizePolicy().hasHeightForWidth())
        self.lineEditReplace.setSizePolicy(sizePolicy)
        self.lineEditReplace.setMinimumSize(QtCore.QSize(200, 0))
        self.lineEditReplace.setObjectName("lineEditReplace")
        self.horizontalLayout_2.addWidget(self.lineEditReplace)
        self.toolButtonReplace = QtWidgets.QToolButton(self.widgetReplace)
        self.toolButtonReplace.setObjectName("toolButtonReplace")
        self.horizontalLayout_2.addWidget(self.toolButtonReplace)
        self.toolButtonReplaceAll = QtWidgets.QToolButton(self.widgetReplace)
        self.toolButtonReplaceAll.setObjectName("toolButtonReplaceAll")
        self.horizontalLayout_2.addWidget(self.toolButtonReplaceAll)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem1)
        self.lineEditReplace.raise_()
        self.toolButtonReplace.raise_()
        self.toolButtonReplaceAll.raise_()
        self.labelReplace.raise_()
        self.verticalLayout_2.addWidget(self.widgetReplace)
        self.verticalLayout.addWidget(self.frame)
        self.actionSearch = QtWidgets.QAction(SearchPanel)
        icon = QtGui.QIcon.fromTheme("edit-find")
        self.actionSearch.setIcon(icon)
        self.actionSearch.setIconVisibleInMenu(True)
        self.actionSearch.setObjectName("actionSearch")
        self.actionActionSearchAndReplace = QtWidgets.QAction(SearchPanel)
        icon = QtGui.QIcon.fromTheme("edit-find-replace")
        self.actionActionSearchAndReplace.setIcon(icon)
        self.actionActionSearchAndReplace.setIconVisibleInMenu(True)
        self.actionActionSearchAndReplace.setObjectName(
            "actionActionSearchAndReplace")
        self.actionFindNext = QtWidgets.QAction(SearchPanel)
        icon = QtGui.QIcon.fromTheme("go-down")
        self.actionFindNext.setIcon(icon)
        self.actionFindNext.setIconVisibleInMenu(True)
        self.actionFindNext.setObjectName("actionFindNext")
        self.actionFindPrevious = QtWidgets.QAction(SearchPanel)
        icon = QtGui.QIcon.fromTheme("go-up")
        self.actionFindPrevious.setIcon(icon)
        self.actionFindPrevious.setIconVisibleInMenu(True)
        self.actionFindPrevious.setObjectName("actionFindPrevious")

        self.retranslateUi(SearchPanel)
        QtCore.QMetaObject.connectSlotsByName(SearchPanel)
        SearchPanel.setTabOrder(self.lineEditSearch, self.lineEditReplace)
        SearchPanel.setTabOrder(self.lineEditReplace, self.toolButtonPrevious)
        SearchPanel.setTabOrder(self.toolButtonPrevious, self.toolButtonNext)
        SearchPanel.setTabOrder(self.toolButtonNext, self.checkBoxCase)
        SearchPanel.setTabOrder(self.checkBoxCase, self.checkBoxWholeWords)
        SearchPanel.setTabOrder(self.checkBoxWholeWords,
                                self.toolButtonReplace)
        SearchPanel.setTabOrder(self.toolButtonReplace,
                                self.toolButtonReplaceAll)
        SearchPanel.setTabOrder(self.toolButtonReplaceAll,
                                self.toolButtonClose)

    def retranslateUi(self, SearchPanel):

        SearchPanel.setWindowTitle(_("Form"))
        self.lineEditSearch.setToolTip(_("Search term"))
        self.toolButtonPrevious.setToolTip(_("Select previous occurence"))
        self.toolButtonNext.setToolTip(_("Select next occurence"))
        self.checkBoxRegex.setToolTip(
            _("Use a regular expression for search occurences"))
        self.checkBoxRegex.setText(_("Regex"))
        self.checkBoxCase.setToolTip(_("Enable case sensitive search"))
        self.checkBoxCase.setText(_("Match case"))
        self.checkBoxWholeWords.setToolTip(_("Search for whole words only"))
        self.checkBoxWholeWords.setText(_("Whole words"))
        self.checkBoxInSelection.setText(_("In Selection"))
        self.labelMatches.setText(_("0 matches"))
        self.lineEditReplace.setToolTip(_("Replacement text"))
        self.toolButtonReplace.setToolTip(_("Replace current occurence"))
        self.toolButtonReplace.setText(_("Replace"))
        self.toolButtonReplaceAll.setToolTip(_("Replace all occurences"))
        self.toolButtonReplaceAll.setText(_("Replace All"))
        self.actionSearch.setText(_("Search"))
        self.actionSearch.setToolTip(_("Show the search panel"))
        self.actionSearch.setShortcut(_("Ctrl+F"))
        self.actionActionSearchAndReplace.setText(_("Search and replace"))
        self.actionActionSearchAndReplace.setToolTip(
            _("Show the search and replace panel"))
        self.actionActionSearchAndReplace.setShortcut(_("Ctrl+R"))
        self.actionFindNext.setText(_("Find next"))
        self.actionFindNext.setToolTip(
            _("Find the next occurrence (downward)"))
        self.actionFindNext.setShortcut(_("F3"))
        self.actionFindPrevious.setText(_("Find previous"))
        self.actionFindPrevious.setToolTip(
            _("Find previous occurrence (upward)"))
        self.actionFindPrevious.setShortcut(_("Shift+F3"))
コード例 #7
0
class Ui_SearchPanel(object):
    def setupUi(self, SearchPanel):
        SearchPanel.setObjectName("SearchPanel")
        SearchPanel.resize(884, 90)
        SearchPanel.setStyleSheet("")
        self.verticalLayout = QtWidgets.QVBoxLayout(SearchPanel)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.frame = QtWidgets.QFrame(SearchPanel)
        self.frame.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame)
        self.verticalLayout_2.setContentsMargins(9, 9, 9, 9)
        self.verticalLayout_2.setSpacing(9)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.widgetSearch = QtWidgets.QWidget(self.frame)
        self.widgetSearch.setObjectName("widgetSearch")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.widgetSearch)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.labelSearch = QtWidgets.QLabel(self.widgetSearch)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.labelSearch.sizePolicy().hasHeightForWidth())
        self.labelSearch.setSizePolicy(sizePolicy)
        self.labelSearch.setMinimumSize(QtCore.QSize(0, 0))
        self.labelSearch.setMaximumSize(QtCore.QSize(18, 18))
        self.labelSearch.setText("")
        self.labelSearch.setPixmap(QtGui.QPixmap(":/pycode-icons/rc/edit-find.png"))
        self.labelSearch.setScaledContents(True)
        self.labelSearch.setObjectName("labelSearch")
        self.horizontalLayout.addWidget(self.labelSearch)
        self.lineEditSearch = PromptLineEdit(self.widgetSearch)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lineEditSearch.sizePolicy().hasHeightForWidth())
        self.lineEditSearch.setSizePolicy(sizePolicy)
        self.lineEditSearch.setMinimumSize(QtCore.QSize(200, 0))
        self.lineEditSearch.setObjectName("lineEditSearch")
        self.horizontalLayout.addWidget(self.lineEditSearch)
        self.toolButtonPrevious = QtWidgets.QToolButton(self.widgetSearch)
        self.toolButtonPrevious.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/pyqode_icons/rc/go-up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButtonPrevious.setIcon(icon)
        self.toolButtonPrevious.setObjectName("toolButtonPrevious")
        self.horizontalLayout.addWidget(self.toolButtonPrevious)
        self.toolButtonNext = QtWidgets.QToolButton(self.widgetSearch)
        self.toolButtonNext.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/pycode-icons/rc/go-down.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButtonNext.setIcon(icon1)
        self.toolButtonNext.setObjectName("toolButtonNext")
        self.horizontalLayout.addWidget(self.toolButtonNext)
        self.checkBoxRegex = QtWidgets.QCheckBox(self.widgetSearch)
        self.checkBoxRegex.setObjectName("checkBoxRegex")
        self.horizontalLayout.addWidget(self.checkBoxRegex)
        self.checkBoxCase = QtWidgets.QCheckBox(self.widgetSearch)
        self.checkBoxCase.setStyleSheet("")
        self.checkBoxCase.setObjectName("checkBoxCase")
        self.horizontalLayout.addWidget(self.checkBoxCase)
        self.checkBoxWholeWords = QtWidgets.QCheckBox(self.widgetSearch)
        self.checkBoxWholeWords.setObjectName("checkBoxWholeWords")
        self.horizontalLayout.addWidget(self.checkBoxWholeWords)
        self.checkBoxInSelection = QtWidgets.QCheckBox(self.widgetSearch)
        self.checkBoxInSelection.setObjectName("checkBoxInSelection")
        self.horizontalLayout.addWidget(self.checkBoxInSelection)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.labelMatches = QtWidgets.QLabel(self.widgetSearch)
        self.labelMatches.setObjectName("labelMatches")
        self.horizontalLayout.addWidget(self.labelMatches)
        self.toolButtonClose = QtWidgets.QToolButton(self.widgetSearch)
        self.toolButtonClose.setText("")
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/pycode-icons/rc/close.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButtonClose.setIcon(icon2)
        self.toolButtonClose.setObjectName("toolButtonClose")
        self.horizontalLayout.addWidget(self.toolButtonClose)
        self.verticalLayout_2.addWidget(self.widgetSearch)
        self.widgetReplace = QtWidgets.QWidget(self.frame)
        self.widgetReplace.setObjectName("widgetReplace")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.widgetReplace)
        self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.labelReplace = QtWidgets.QLabel(self.widgetReplace)
        self.labelReplace.setMaximumSize(QtCore.QSize(18, 18))
        self.labelReplace.setText("")
        self.labelReplace.setPixmap(QtGui.QPixmap(":/pycode-icons/rc/edit-find-replace.png"))
        self.labelReplace.setScaledContents(True)
        self.labelReplace.setObjectName("labelReplace")
        self.horizontalLayout_2.addWidget(self.labelReplace)
        self.lineEditReplace = PromptLineEdit(self.widgetReplace)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lineEditReplace.sizePolicy().hasHeightForWidth())
        self.lineEditReplace.setSizePolicy(sizePolicy)
        self.lineEditReplace.setMinimumSize(QtCore.QSize(200, 0))
        self.lineEditReplace.setObjectName("lineEditReplace")
        self.horizontalLayout_2.addWidget(self.lineEditReplace)
        self.toolButtonReplace = QtWidgets.QToolButton(self.widgetReplace)
        self.toolButtonReplace.setObjectName("toolButtonReplace")
        self.horizontalLayout_2.addWidget(self.toolButtonReplace)
        self.toolButtonReplaceAll = QtWidgets.QToolButton(self.widgetReplace)
        self.toolButtonReplaceAll.setObjectName("toolButtonReplaceAll")
        self.horizontalLayout_2.addWidget(self.toolButtonReplaceAll)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem1)
        self.lineEditReplace.raise_()
        self.toolButtonReplace.raise_()
        self.toolButtonReplaceAll.raise_()
        self.labelReplace.raise_()
        self.verticalLayout_2.addWidget(self.widgetReplace)
        self.verticalLayout.addWidget(self.frame)
        self.actionSearch = QtWidgets.QAction(SearchPanel)
        icon = QtGui.QIcon.fromTheme("edit-find")
        self.actionSearch.setIcon(icon)
        self.actionSearch.setIconVisibleInMenu(True)
        self.actionSearch.setObjectName("actionSearch")
        self.actionActionSearchAndReplace = QtWidgets.QAction(SearchPanel)
        icon = QtGui.QIcon.fromTheme("edit-find-replace")
        self.actionActionSearchAndReplace.setIcon(icon)
        self.actionActionSearchAndReplace.setIconVisibleInMenu(True)
        self.actionActionSearchAndReplace.setObjectName("actionActionSearchAndReplace")
        self.actionFindNext = QtWidgets.QAction(SearchPanel)
        icon = QtGui.QIcon.fromTheme("go-down")
        self.actionFindNext.setIcon(icon)
        self.actionFindNext.setIconVisibleInMenu(True)
        self.actionFindNext.setObjectName("actionFindNext")
        self.actionFindPrevious = QtWidgets.QAction(SearchPanel)
        icon = QtGui.QIcon.fromTheme("go-up")
        self.actionFindPrevious.setIcon(icon)
        self.actionFindPrevious.setIconVisibleInMenu(True)
        self.actionFindPrevious.setObjectName("actionFindPrevious")

        self.retranslateUi(SearchPanel)
        QtCore.QMetaObject.connectSlotsByName(SearchPanel)
        SearchPanel.setTabOrder(self.lineEditSearch, self.lineEditReplace)
        SearchPanel.setTabOrder(self.lineEditReplace, self.toolButtonPrevious)
        SearchPanel.setTabOrder(self.toolButtonPrevious, self.toolButtonNext)
        SearchPanel.setTabOrder(self.toolButtonNext, self.checkBoxCase)
        SearchPanel.setTabOrder(self.checkBoxCase, self.checkBoxWholeWords)
        SearchPanel.setTabOrder(self.checkBoxWholeWords, self.toolButtonReplace)
        SearchPanel.setTabOrder(self.toolButtonReplace, self.toolButtonReplaceAll)
        SearchPanel.setTabOrder(self.toolButtonReplaceAll, self.toolButtonClose)

    def retranslateUi(self, SearchPanel):

        SearchPanel.setWindowTitle(_("Form"))
        self.lineEditSearch.setToolTip(_("Search term"))
        self.toolButtonPrevious.setToolTip(_("Select previous occurence"))
        self.toolButtonNext.setToolTip(_("Select next occurence"))
        self.checkBoxRegex.setToolTip(_("Use a regular expression for search occurences"))
        self.checkBoxRegex.setText(_("Regex"))
        self.checkBoxCase.setToolTip(_("Enable case sensitive search"))
        self.checkBoxCase.setText(_("Match case"))
        self.checkBoxWholeWords.setToolTip(_("Search for whole words only"))
        self.checkBoxWholeWords.setText(_("Whole words"))
        self.checkBoxInSelection.setText(_("In Selection"))
        self.labelMatches.setText(_("0 matches"))
        self.lineEditReplace.setToolTip(_("Replacement text"))
        self.toolButtonReplace.setToolTip(_("Replace current occurence"))
        self.toolButtonReplace.setText(_("Replace"))
        self.toolButtonReplaceAll.setToolTip(_("Replace all occurences"))
        self.toolButtonReplaceAll.setText(_("Replace All"))
        self.actionSearch.setText(_("Search"))
        self.actionSearch.setToolTip(_("Show the search panel"))
        self.actionSearch.setShortcut(_("Ctrl+F"))
        self.actionActionSearchAndReplace.setText(_("Search and replace"))
        self.actionActionSearchAndReplace.setToolTip(_("Show the search and replace panel"))
        self.actionActionSearchAndReplace.setShortcut(_("Ctrl+R"))
        self.actionFindNext.setText(_("Find next"))
        self.actionFindNext.setToolTip(_("Find the next occurrence (downward)"))
        self.actionFindNext.setShortcut(_("F3"))
        self.actionFindPrevious.setText(_("Find previous"))
        self.actionFindPrevious.setToolTip(_("Find previous occurrence (upward)"))
        self.actionFindPrevious.setShortcut(_("Shift+F3"))
コード例 #8
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(678, 390)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox = QtWidgets.QGroupBox(Form)
        self.groupBox.setObjectName("groupBox")
        self.gridLayout = QtWidgets.QGridLayout(self.groupBox)
        self.gridLayout.setSizeConstraint(
            QtWidgets.QLayout.SetDefaultConstraint)
        self.gridLayout.setObjectName("gridLayout")
        self.table_mimes = QtWidgets.QTableWidget(self.groupBox)
        self.table_mimes.setEditTriggers(
            QtWidgets.QAbstractItemView.NoEditTriggers)
        self.table_mimes.setSelectionMode(
            QtWidgets.QAbstractItemView.SingleSelection)
        self.table_mimes.setSelectionBehavior(
            QtWidgets.QAbstractItemView.SelectRows)
        self.table_mimes.setShowGrid(True)
        self.table_mimes.setCornerButtonEnabled(False)
        self.table_mimes.setObjectName("table_mimes")
        self.table_mimes.setColumnCount(2)
        self.table_mimes.setRowCount(1)
        item = QtWidgets.QTableWidgetItem()
        self.table_mimes.setVerticalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_mimes.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_mimes.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_mimes.setItem(0, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_mimes.setItem(0, 1, item)
        self.table_mimes.horizontalHeader().setVisible(True)
        self.table_mimes.horizontalHeader().setCascadingSectionResizes(True)
        self.table_mimes.horizontalHeader().setDefaultSectionSize(200)
        self.table_mimes.horizontalHeader().setHighlightSections(False)
        self.table_mimes.horizontalHeader().setStretchLastSection(True)
        self.table_mimes.verticalHeader().setVisible(False)
        self.table_mimes.verticalHeader().setHighlightSections(False)
        self.gridLayout.addWidget(self.table_mimes, 1, 0, 1, 1)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label = QtWidgets.QLabel(self.groupBox)
        self.label.setObjectName("label")
        self.horizontalLayout_2.addWidget(self.label)
        self.edit_mime_extensions = QtWidgets.QLineEdit(self.groupBox)
        self.edit_mime_extensions.setObjectName("edit_mime_extensions")
        self.horizontalLayout_2.addWidget(self.edit_mime_extensions)
        self.gridLayout.addLayout(self.horizontalLayout_2, 2, 0, 1, 1)
        self.edit_filter = PromptLineEdit(self.groupBox)
        self.edit_filter.setObjectName("edit_filter")
        self.gridLayout.addWidget(self.edit_filter, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.groupBox)
        self.groupBox_2 = QtWidgets.QGroupBox(Form)
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.edit_ignored = QtWidgets.QLineEdit(self.groupBox_2)
        self.edit_ignored.setObjectName("edit_ignored")
        self.gridLayout_2.addWidget(self.edit_ignored, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.groupBox_2)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
        self.groupBox.setTitle(_translate("Form", "Recognized mimetypes"))
        self.table_mimes.setToolTip(
            _translate("Form", "The list of mimetypes and their handler"))
        item = self.table_mimes.verticalHeaderItem(0)
        item.setText(_translate("Form", "0"))
        item = self.table_mimes.horizontalHeaderItem(0)
        item.setText(_translate("Form", "Mimetype"))
        item = self.table_mimes.horizontalHeaderItem(1)
        item.setText(_translate("Form", "Handler"))
        __sortingEnabled = self.table_mimes.isSortingEnabled()
        self.table_mimes.setSortingEnabled(False)
        item = self.table_mimes.item(0, 0)
        item.setText(_translate("Form", "text/x-python"))
        item = self.table_mimes.item(0, 1)
        item.setText(_translate("Form", "PyCodeEdit"))
        self.table_mimes.setSortingEnabled(__sortingEnabled)
        self.label.setText(_translate("Form", "Patterns:"))
        self.edit_mime_extensions.setToolTip(
            _translate("Form", "Mimetype patterns (separated by ;)"))
        self.groupBox_2.setTitle(
            _translate("Form", "Ignored files and directories"))
        self.edit_ignored.setToolTip(
            _translate(
                "Form",
                "<html><head/><body><p>The list of ignore patterns (each pattern must be separated by a semi-colon ;)</p></body></html>"
            ))