Python PyQt5.QtWidgets 模块,QListWidget() 实例源码

我们从Python开源项目中,提取了以下44个代码示例,用于说明如何使用PyQt5.QtWidgets.QListWidget()

项目:pyplaybin    作者:fraca7    | 项目源码 | 文件源码
def __init__(self, parent):
        super().__init__(parent)

        self._list = QtWidgets.QListWidget(self)
        self._list.itemDoubleClicked.connect(self._playItem)
        vlayout = QtWidgets.QVBoxLayout()
        vlayout.addWidget(self._list, stretch=1)

        btn = QtWidgets.QPushButton('', self)
        btn.setIcon(QtGui.QIcon('../icons/add.svg'))
        btn.setFlat(True)
        btn.clicked.connect(self._browse)
        hlayout = QtWidgets.QHBoxLayout()
        hlayout.addWidget(btn)
        hlayout.addStretch(1)
        vlayout.addLayout(hlayout)

        self.setLayout(vlayout)
项目:pytc-gui    作者:harmslab    | 项目源码 | 文件源码
def layout(self):
        """
        Lay out the dialog.
        """

        main_layout = QW.QVBoxLayout(self)
        test_layout = QW.QHBoxLayout()
        button_layout = QW.QVBoxLayout()

        self._fitter_select = QW.QListWidget()
        self._fitter_select.setSelectionMode(QW.QAbstractItemView.ExtendedSelection)

        for k,v in self._fit_snapshot_dict.items():
            self._fitter_select.addItem(k)

        self._fitter_select.setFixedSize(150, 100)

        ftest_button = QW.QPushButton("Perform AIC Test", self)
        ftest_button.clicked.connect(self.perform_test)

        add_fit_button = QW.QPushButton("Append New Fit", self)
        add_fit_button.clicked.connect(self.add_fitter)

        self._data_out = QW.QTextEdit()
        self._data_out.setReadOnly(True)
        self._data_out.setMinimumWidth(400)

        # add buttons to layout
        button_layout.addWidget(ftest_button)
        button_layout.addWidget(add_fit_button)

        # add widgets to layout
        test_layout.addWidget(self._fitter_select)
        test_layout.addLayout(button_layout)
        main_layout.addLayout(test_layout)
        main_layout.addWidget(self._data_out)

        self.setWindowTitle('AIC Test')
项目:pyree-old    作者:DrLuke    | 项目源码 | 文件源码
def __init__(self, *args, **kwargs):
        self.ownsheet = None
        self.sheets = None
        self.selectedSheet = None
        self.listSheetItems = {}

        super(SubSheet, self).__init__(*args, **kwargs)

        self.propertiesWidget = QWidget()

        self.vlayout = QVBoxLayout()

        self.listWidget = QListWidget()
        self.listWidget.itemClicked.connect(self.listClicked)
        self.vlayout.addWidget(self.listWidget)

        self.vlayout.addItem(QSpacerItem(40, 20, QSizePolicy.Minimum, QSizePolicy.Expanding))

        self.propertiesWidget.setLayout(self.vlayout)
项目:gtrans-web-gui    作者:takiyu    | 项目源码 | 文件源码
def _init_candidate_list(self):
        self.cand_list = QtWidgets.QListWidget(self)

        # Double click or press enter to insert
        self.cand_list.itemDoubleClicked.connect(self._set_from_list)
        self.cand_list.focusOutEvent = lambda _: self.cand_list.hide()

        # The abbreviation for that language
        self.candidates = {
            "Auto": "auto", "Arabic": "ar", "Chinese": "zh-CN",
            "English": "en", "Esperanto": "eo", "French": "fr",
            "German": "de", "Greek": "el", "Italian": "it",
            "Japanese": "ja", "Korean": "ko", "Latin": "la",
            "Portugese": "pt-PT", "Russian": "ru", "Spanish": "es",
        }

        for candidate in self.candidates.keys():
            QtWidgets.QListWidgetItem(candidate, self.cand_list)

        self.cand_list.setGeometry(100, 100, 250, 300)
项目:headcache    作者:s9w    | 项目源码 | 文件源码
def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        allLayout = QVBoxLayout()

        self.l1 = QListWidget(self)
        self.l1.setObjectName("search_result_list")
        self.l1.setViewMode(QListView.ListMode)
        # self.l1.currentItemChanged.connect(self.f1click)
        self.l1.itemDoubleClicked.connect(self.item_dclick)
        allLayout.addWidget(self.l1)
        self.setLayout(allLayout)

        # self.setWindowFlags(Qt.FramelessWindowHint | Qt.Popup)
        # self.setFocusPolicy(Qt.ClickFocus)

        # self.setAttribute(Qt.WA_ShowWithoutActivating)
        # self.l1.setAttribute(Qt.WA_ShowWithoutActivating)
        self.setFocusPolicy(Qt.StrongFocus)
        # self.l1.setFocusPolicy(Qt.NoFocus)
        # print(parent.finder)
        # self.setFocusProxy(parent.finder)
项目:well-being-diary    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self, i_parent = None):
        super(QuestionSelectionDialog, self).__init__(i_parent)

        vbox = QtWidgets.QVBoxLayout(self)

        self.list_widget = QtWidgets.QListWidget()
        vbox.addWidget(self.list_widget)
        self.populate_list()

        self.button_box = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
            QtCore.Qt.Horizontal,
            self
        )
        vbox.addWidget(self.button_box)
        self.button_box.accepted.connect(self.accept)
        self.button_box.rejected.connect(self.reject)
        # -accept and reject are "slots" built into Qt
项目:Visualization    作者:nwrush    | 项目源码 | 文件源码
def setupUi(self, pmi_control_panel):
        pmi_control_panel.setObjectName("pmi_control_panel")
        pmi_control_panel.resize(623, 200)
        pmi_control_panel.setMaximumSize(QtCore.QSize(16777215, 200))
        self.horizontalLayout = QtWidgets.QHBoxLayout(pmi_control_panel)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.groupBox_2 = QtWidgets.QGroupBox(pmi_control_panel)
        self.groupBox_2.setObjectName("groupBox_2")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_2)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.filteredList = QtWidgets.QListWidget(self.groupBox_2)
        self.filteredList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.filteredList.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection)
        self.filteredList.setObjectName("filteredList")
        self.verticalLayout_3.addWidget(self.filteredList)
        self.resetButton = QtWidgets.QPushButton(self.groupBox_2)
        self.resetButton.setObjectName("resetButton")
        self.verticalLayout_3.addWidget(self.resetButton)
        self.horizontalLayout.addWidget(self.groupBox_2)

        self.retranslateUi(pmi_control_panel)
        QtCore.QMetaObject.connectSlotsByName(pmi_control_panel)
项目:NeoAnalysis    作者:neoanalysis    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(241, 367)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 3)
        self.itemTree = QtWidgets.QTreeWidget(Form)
        self.itemTree.setObjectName("itemTree")
        self.itemTree.headerItem().setText(0, "1")
        self.itemTree.header().setVisible(False)
        self.gridLayout.addWidget(self.itemTree, 1, 0, 1, 3)
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 3)
        self.formatList = QtWidgets.QListWidget(Form)
        self.formatList.setObjectName("formatList")
        self.gridLayout.addWidget(self.formatList, 3, 0, 1, 3)
        self.exportBtn = QtWidgets.QPushButton(Form)
        self.exportBtn.setObjectName("exportBtn")
        self.gridLayout.addWidget(self.exportBtn, 6, 1, 1, 1)
        self.closeBtn = QtWidgets.QPushButton(Form)
        self.closeBtn.setObjectName("closeBtn")
        self.gridLayout.addWidget(self.closeBtn, 6, 2, 1, 1)
        self.paramTree = ParameterTree(Form)
        self.paramTree.setObjectName("paramTree")
        self.paramTree.headerItem().setText(0, "1")
        self.paramTree.header().setVisible(False)
        self.gridLayout.addWidget(self.paramTree, 5, 0, 1, 3)
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 4, 0, 1, 3)
        self.copyBtn = QtWidgets.QPushButton(Form)
        self.copyBtn.setObjectName("copyBtn")
        self.gridLayout.addWidget(self.copyBtn, 6, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:NeoAnalysis    作者:neoanalysis    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(241, 367)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 3)
        self.itemTree = QtWidgets.QTreeWidget(Form)
        self.itemTree.setObjectName("itemTree")
        self.itemTree.headerItem().setText(0, "1")
        self.itemTree.header().setVisible(False)
        self.gridLayout.addWidget(self.itemTree, 1, 0, 1, 3)
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 3)
        self.formatList = QtWidgets.QListWidget(Form)
        self.formatList.setObjectName("formatList")
        self.gridLayout.addWidget(self.formatList, 3, 0, 1, 3)
        self.exportBtn = QtWidgets.QPushButton(Form)
        self.exportBtn.setObjectName("exportBtn")
        self.gridLayout.addWidget(self.exportBtn, 6, 1, 1, 1)
        self.closeBtn = QtWidgets.QPushButton(Form)
        self.closeBtn.setObjectName("closeBtn")
        self.gridLayout.addWidget(self.closeBtn, 6, 2, 1, 1)
        self.paramTree = ParameterTree(Form)
        self.paramTree.setObjectName("paramTree")
        self.paramTree.headerItem().setText(0, "1")
        self.paramTree.header().setVisible(False)
        self.gridLayout.addWidget(self.paramTree, 5, 0, 1, 3)
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 4, 0, 1, 3)
        self.copyBtn = QtWidgets.QPushButton(Form)
        self.copyBtn.setObjectName("copyBtn")
        self.gridLayout.addWidget(self.copyBtn, 6, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:scm-workbench    作者:barry-scott    | 项目源码 | 文件源码
def __init__( self, wizard_state ):
        super().__init__()

        self.wizard_state = wizard_state

        self.setTitle( T_('Add Project') )
        self.setSubTitle( T_('Pick from the available projects') )

        self.scan_progress = QtWidgets.QLabel( T_('Scanning for projects...') )

        # QQQ maybe use a table to allow for SCM and PATH columns?
        self.wc_list = QtWidgets.QListWidget()
        self.wc_list.setSelectionMode( self.wc_list.SingleSelection )
        self.wc_list.setSortingEnabled( True )
        self.wc_list.itemSelectionChanged.connect( self.__selectionChanged )

        layout = QtWidgets.QVBoxLayout()
        layout.addWidget( self.scan_progress )
        layout.addWidget( self.wc_list )

        self.setLayout( layout )

        self.thread = None

        self.foundRepository.connect( self.__foundRepository, type=QtCore.Qt.QueuedConnection )
        self.scannedOneMoreFolder.connect( self.__setFeedback, type=QtCore.Qt.QueuedConnection )
        self.scanComplete.connect( self.__scanCompleted, type=QtCore.Qt.QueuedConnection )

        self.__all_labels_to_scm_info = {}
项目:FuME    作者:fupadev    | 项目源码 | 文件源码
def setupUi(self, filter):
        filter.setObjectName("filter")
        filter.resize(381, 435)
        self.gridLayout = QtWidgets.QGridLayout(filter)
        self.gridLayout.setObjectName("gridLayout")
        self.buttonBox = QtWidgets.QDialogButtonBox(filter)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 3, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(filter)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
        self.listWidget = QtWidgets.QListWidget(filter)
        self.listWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.listWidget.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.listWidget.setObjectName("listWidget")
        self.gridLayout.addWidget(self.listWidget, 2, 0, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtWidgets.QLabel(filter)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.lineEdit = QtWidgets.QLineEdit(filter)
        self.lineEdit.setInputMask("")
        self.lineEdit.setPlaceholderText("")
        self.lineEdit.setObjectName("lineEdit")
        self.horizontalLayout.addWidget(self.lineEdit)
        self.checkBox = QtWidgets.QCheckBox(filter)
        self.checkBox.setObjectName("checkBox")
        self.horizontalLayout.addWidget(self.checkBox)
        self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
        self.label_2.raise_()
        self.listWidget.raise_()
        self.buttonBox.raise_()
        self.label.raise_()

        self.retranslateUi(filter)
        self.buttonBox.accepted.connect(filter.accept)
        self.buttonBox.rejected.connect(filter.reject)
        QtCore.QMetaObject.connectSlotsByName(filter)
项目:coquery    作者:gkunter    | 项目源码 | 文件源码
def setupUi(self, OrphanagedDatabases):
        OrphanagedDatabases.setObjectName("OrphanagedDatabases")
        OrphanagedDatabases.resize(640, 479)
        self.verticalLayout = QtWidgets.QVBoxLayout(OrphanagedDatabases)
        self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(OrphanagedDatabases)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setWordWrap(True)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.listWidget = QtWidgets.QListWidget(OrphanagedDatabases)
        self.listWidget.setObjectName("listWidget")
        self.verticalLayout.addWidget(self.listWidget)
        self.label_3 = QtWidgets.QLabel(OrphanagedDatabases)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
        self.label_3.setSizePolicy(sizePolicy)
        self.label_3.setWordWrap(True)
        self.label_3.setObjectName("label_3")
        self.verticalLayout.addWidget(self.label_3)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(OrphanagedDatabases)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.No|QtWidgets.QDialogButtonBox.Yes)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(OrphanagedDatabases)
        self.buttonBox.accepted.connect(OrphanagedDatabases.accept)
        self.buttonBox.rejected.connect(OrphanagedDatabases.reject)
        QtCore.QMetaObject.connectSlotsByName(OrphanagedDatabases)
项目:PySAT    作者:USGS-Astrogeology    | 项目源码 | 文件源码
def make_listwidget(choices):
    listwidget = QtWidgets.QListWidget()
    listwidget.setItemDelegate
    for item in choices:
        item = QtWidgets.QListWidgetItem(item)
        listwidget.addItem(item)
    return listwidget
项目:BATS-Bayesian-Adaptive-Trial-Simulator    作者:ContaTP    | 项目源码 | 文件源码
def __init__(self, parent=None):

        QtWidgets.QListWidget.__init__(self, parent)
        self.parent = parent
        self.setFocusPolicy(False)
        self.horizontalScrollBar().setVisible(False)
        # Customize the list widget
        self.setIconSize(QtCore.QSize(60, 60))
        # Icon only
        self.settingItem = QtWidgets.QListWidgetItem(QtGui.QIcon(":/resources/result_setting.png"), "")
        self.settingItem.setToolTip("Setting")
        self.logItem = QtWidgets.QListWidgetItem(QtGui.QIcon(":/resources/result_log.png"), "")
        self.logItem.setToolTip("Log")
        self.tableItem = QtWidgets.QListWidgetItem(QtGui.QIcon(":/resources/result_table.png"), "")
        self.tableItem.setToolTip("Results")
        self.plotItem = QtWidgets.QListWidgetItem(QtGui.QIcon(":/resources/result_plot.png"), "")
        self.plotItem.setToolTip("Plots")
        self.addItem(self.settingItem)
        self.addItem(self.logItem)
        self.addItem(self.tableItem)
        self.addItem(self.plotItem)

        # Hide icon
        self.settingItem.setHidden(True)
        self.logItem.setHidden(True)
        self.tableItem.setHidden(True)
        self.plotItem.setHidden(True)

        # Stylesheet
        self.setStyleSheet("QListWidget{min-width:90px; background:#f7fafc;border:none;border-left: 2px solid #e9f0f5;}QListWidget::item{background: #f7fafc;background-origin: cotent;background-clip: margin;color: #000000;margin: 0 0 0 10px;padding: 25px 0 25px 0px;}QListWidget::item:selected{background: #bac3ef;position: fixed;}QLabel{background: transparent;border: none;}")

        # Signal
        self.currentRowChanged.connect(self.viewChange)


    # Swith function
项目:Enibar    作者:ENIB    | 项目源码 | 文件源码
def __init__(self, cid, pid, name, cat_name, prices, percentage=None):
        QtWidgets.QComboBox.__init__(self)
        BaseProduct.__init__(self, cid, pid, name, cat_name, prices)
        self.product_view = QtWidgets.QListWidget()
        self.product_view.wheelEvent = self.on_wheel
        self.setModel(self.product_view.model())
        self.widgets = []
        self.call = None
        self.should_accept_adding_products = False

        self.name_item = QtWidgets.QListWidgetItem("")
        self.name_layout = QtWidgets.QHBoxLayout()
        self.setLayout(self.name_layout)

        if percentage:
            self.name_label = QtWidgets.QLabel(f"{name} <span style=\"color: red; font-size: 7px\">{percentage} °</span>", self)
        else:
            self.name_label = QtWidgets.QLabel(name)
        self.name_label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter)
        self.name_layout.addWidget(self.name_label)

        self.product_view.addItem(self.name_item)
        for price in prices:
            widget = QtWidgets.QListWidgetItem(price)
            widget.setTextAlignment(QtCore.Qt.AlignHCenter |
                QtCore.Qt.AlignVCenter)
            widget.setSizeHint(QtCore.QSize(100, 35))
            self.product_view.addItem(widget)

        self.setView(self.product_view)
        self.activated.connect(self.callback)
        self.product_view.pressed.connect(self.on_click)
项目:CeNet-Interconnect    作者:shikharsrivastava    | 项目源码 | 文件源码
def setupUi(self, clientWin):
        clientWin.setObjectName("clientWin")
        clientWin.resize(607, 597)
        self.centralwidget = QtWidgets.QWidget(clientWin)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.refreshButton = QtWidgets.QPushButton(self.centralwidget)
        self.refreshButton.setObjectName("refreshButton")
        self.gridLayout.addWidget(self.refreshButton, 2, 0, 1, 1)
        self.onlineList = QtWidgets.QListWidget(self.centralwidget)
        self.onlineList.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
        self.onlineList.setObjectName("onlineList")
        self.gridLayout.addWidget(self.onlineList, 1, 0, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.roomButton = QtWidgets.QPushButton(self.centralwidget)
        self.roomButton.setObjectName("roomButton")
        self.horizontalLayout.addWidget(self.roomButton)
        self.exitButton = QtWidgets.QPushButton(self.centralwidget)
        self.exitButton.setObjectName("exitButton")
        self.horizontalLayout.addWidget(self.exitButton)
        self.gridLayout_2.addLayout(self.horizontalLayout, 0, 1, 1, 1)
        clientWin.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(clientWin)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 607, 19))
        self.menubar.setObjectName("menubar")
        clientWin.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(clientWin)
        self.statusbar.setObjectName("statusbar")
        clientWin.setStatusBar(self.statusbar)

        self.retranslateUi(clientWin)
        QtCore.QMetaObject.connectSlotsByName(clientWin)
项目:PINCE    作者:korcankaraokcu    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(768, 440)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.splitter = QtWidgets.QSplitter(Form)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.widget = QtWidgets.QWidget(self.splitter)
        self.widget.setObjectName("widget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.widget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(self.widget)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.listWidget_ReturnAddresses = QtWidgets.QListWidget(self.widget)
        self.listWidget_ReturnAddresses.setObjectName("listWidget_ReturnAddresses")
        self.verticalLayout.addWidget(self.listWidget_ReturnAddresses)
        self.widget1 = QtWidgets.QWidget(self.splitter)
        self.widget1.setObjectName("widget1")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.widget1)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.label_2 = QtWidgets.QLabel(self.widget1)
        self.label_2.setObjectName("label_2")
        self.verticalLayout_2.addWidget(self.label_2)
        self.textBrowser_Info = QtWidgets.QTextBrowser(self.widget1)
        self.textBrowser_Info.setObjectName("textBrowser_Info")
        self.verticalLayout_2.addWidget(self.textBrowser_Info)
        self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:PINCE    作者:korcankaraokcu    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1025, 530)
        Form.setToolTip("")
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.splitter = QtWidgets.QSplitter(Form)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.layoutWidget = QtWidgets.QWidget(self.splitter)
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.lineEdit_Regex = QtWidgets.QLineEdit(self.layoutWidget)
        self.lineEdit_Regex.setObjectName("lineEdit_Regex")
        self.horizontalLayout_2.addWidget(self.lineEdit_Regex)
        self.checkBox_IgnoreCase = QtWidgets.QCheckBox(self.layoutWidget)
        self.checkBox_IgnoreCase.setChecked(True)
        self.checkBox_IgnoreCase.setObjectName("checkBox_IgnoreCase")
        self.horizontalLayout_2.addWidget(self.checkBox_IgnoreCase)
        self.checkBox_Regex = QtWidgets.QCheckBox(self.layoutWidget)
        self.checkBox_Regex.setObjectName("checkBox_Regex")
        self.horizontalLayout_2.addWidget(self.checkBox_Regex)
        self.pushButton_Search = QtWidgets.QPushButton(self.layoutWidget)
        self.pushButton_Search.setObjectName("pushButton_Search")
        self.horizontalLayout_2.addWidget(self.pushButton_Search)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.listWidget_Referrers = QtWidgets.QListWidget(self.layoutWidget)
        self.listWidget_Referrers.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.listWidget_Referrers.setObjectName("listWidget_Referrers")
        self.verticalLayout.addWidget(self.listWidget_Referrers)
        self.textBrowser_DisasInfo = QtWidgets.QTextBrowser(self.splitter)
        self.textBrowser_DisasInfo.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
        self.textBrowser_DisasInfo.setObjectName("textBrowser_DisasInfo")
        self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:PINCE    作者:korcankaraokcu    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(900, 300)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(Form)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.listWidget = QtWidgets.QListWidget(Form)
        self.listWidget.setObjectName("listWidget")
        self.verticalLayout.addWidget(self.listWidget)
        self.horizontalLayout.addLayout(self.verticalLayout)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setObjectName("label_2")
        self.verticalLayout_2.addWidget(self.label_2)
        self.lineEdit_Info = QtWidgets.QLineEdit(Form)
        self.lineEdit_Info.setReadOnly(True)
        self.lineEdit_Info.setObjectName("lineEdit_Info")
        self.verticalLayout_2.addWidget(self.lineEdit_Info)
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setObjectName("label_3")
        self.verticalLayout_2.addWidget(self.label_3)
        self.lineEdit_Comment = QtWidgets.QLineEdit(Form)
        self.lineEdit_Comment.setReadOnly(True)
        self.lineEdit_Comment.setObjectName("lineEdit_Comment")
        self.verticalLayout_2.addWidget(self.lineEdit_Comment)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:Worksets    作者:DozyDolphin    | 项目源码 | 文件源码
def setupUi(self, manage_worksets):
        manage_worksets.setObjectName("manage_worksets")
        manage_worksets.resize(500, 350)
        manage_worksets.setMinimumSize(QtCore.QSize(500, 300))
        manage_worksets.setMaximumSize(QtCore.QSize(500, 350))
        self.buttonBox = QtWidgets.QDialogButtonBox(manage_worksets)
        self.buttonBox.setGeometry(QtCore.QRect(140, 300, 341, 32))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.workset_list = QtWidgets.QListWidget(manage_worksets)
        self.workset_list.setGeometry(QtCore.QRect(21, 20, 459, 221))
        self.workset_list.setMinimumSize(QtCore.QSize(459, 0))
        self.workset_list.setMaximumSize(QtCore.QSize(341, 350))
        self.workset_list.setObjectName("workset_list")
        self.new_workset_btn = QtWidgets.QPushButton(manage_worksets)
        self.new_workset_btn.setGeometry(QtCore.QRect(380, 250, 101, 26))
        self.new_workset_btn.setObjectName("new_workset_btn")
        self.delete_btn = QtWidgets.QPushButton(manage_worksets)
        self.delete_btn.setEnabled(False)
        self.delete_btn.setGeometry(QtCore.QRect(20, 250, 101, 26))
        self.delete_btn.setObjectName("delete_btn")

        self.retranslateUi(manage_worksets)
        self.buttonBox.accepted.connect(manage_worksets.accept)
        self.buttonBox.rejected.connect(manage_worksets.reject)
        QtCore.QMetaObject.connectSlotsByName(manage_worksets)
项目:mindfulness-at-the-computer    作者:SunyataZero    | 项目源码 | 文件源码
def click_on_list_widget_entry(
            i_list_widget: QtWidgets.QListWidget,
            i_text_for_entry_to_click: str):
        # -this assumes that the list widget has a custom qlwi set for each of the rows
        for i in range(0, i_list_widget.count()):
            qlwi = i_list_widget.item(i)
            custom_qll = i_list_widget.itemWidget(qlwi)
            if custom_qll.text() == i_text_for_entry_to_click:
                QtTest.QTest.mouseClick(custom_qll, QtCore.Qt.LeftButton)
                return True
        return False
项目:well-being-diary    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self):
        super().__init__()

        self.last_entry_clicked_id_int = NO_ENTRY_CLICKED_INT

        vbox = QtWidgets.QVBoxLayout()
        self.setLayout(vbox)

        self.reminder_list_qlw = QtWidgets.QListWidget()
        vbox.addWidget(self.reminder_list_qlw)
        self.reminder_list_qlw.currentRowChanged.connect(self.on_current_row_changed)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        self.adding_new_reminder_qle = QtWidgets.QLineEdit()
        self.adding_new_reminder_qle.setPlaceholderText("New reminder")
        hbox.addWidget(self.adding_new_reminder_qle)
        self.adding_new_reminder_bn = QtWidgets.QPushButton("Add")
        hbox.addWidget(self.adding_new_reminder_bn)
        self.adding_new_reminder_bn.clicked.connect(self.on_add_new_reminder_button_pressed)

        self.reminder_details_qll = QtWidgets.QLabel()
        vbox.addWidget(self.reminder_details_qll)
        self.reminder_details_qll.setWordWrap(True)
        self.reminder_details_qll.setTextFormat(QtCore.Qt.RichText)

        self.update_gui()

        self.reminder_list_qlw.setCurrentRow(0)
项目:well-being-diary    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self):
        super().__init__()

        self.show_archived_questions_bool = False

        self.last_entry_clicked_id_int = wbd.wbd_global.NO_ACTIVE_QUESTION_INT

        vbox_l2 = QtWidgets.QVBoxLayout()
        self.setLayout(vbox_l2)

        # Creating widgets
        # ..for ten practices (left column)
        ##habits_label = QtWidgets.QLabel("<h3>Journals</h3>")
        ##vbox_l2.addWidget(habits_label)
        self.list_widget = QtWidgets.QListWidget()
        ###self.list_widget.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
        vbox_l2.addWidget(self.list_widget)
        self.list_widget.currentRowChanged.connect(self.on_current_row_changed)
        ###self.list_widget.itemPressed.connect(self.on_item_selection_changed)
        # -itemClicked didn't work, unknown why (it worked on the first click but never when running in debug mode)
        # -currentItemChanged cannot be used here since it is activated before the list of selected items is updated
        # ..for adding a new question
        hbox_l3 = QtWidgets.QHBoxLayout()
        vbox_l2.addLayout(hbox_l3)
        self.adding_new_practice_qle = QtWidgets.QLineEdit()
        self.adding_new_practice_qle.setPlaceholderText("New question")
        hbox_l3.addWidget(self.adding_new_practice_qle)
        self.adding_new_practice_bn = QtWidgets.QPushButton("Add")
        hbox_l3.addWidget(self.adding_new_practice_bn)
        self.adding_new_practice_bn.clicked.connect(self.on_add_new_practice_button_pressed)

        hbox_l3 = QtWidgets.QHBoxLayout()
        vbox_l2.addLayout(hbox_l3)
        self.show_archived_qpb = QtWidgets.QPushButton("Show archived")
        hbox_l3.addWidget(self.show_archived_qpb)
        self.show_archived_qpb.setCheckable(True)
        self.show_archived_qpb.toggled.connect(self.on_show_archived_button_toggled)
项目:well-being-diary    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self, i_title: str, i_prefix: str):
        super().__init__()
        # , i_ref_search_qle

        self.prefix_str = i_prefix
        # self.ref_search_qle = i_ref_search_qle

        vbox = QtWidgets.QVBoxLayout()
        self.setLayout(vbox)
        self.tags_qll = QtWidgets.QLabel(i_title)
        vbox.addWidget(self.tags_qll)
        self.tags_qlw = QtWidgets.QListWidget()
        vbox.addWidget(self.tags_qlw)
        self.tags_qlw.currentRowChanged.connect(self.on_tags_current_row_changed)
项目:PySAT_Point_Spectra_GUI    作者:USGS-Astrogeology    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        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.setObjectName("gridLayout")
        self.chooseDataSetLabel = QtWidgets.QLabel(self.groupBox)
        self.chooseDataSetLabel.setObjectName("chooseDataSetLabel")
        self.gridLayout.addWidget(self.chooseDataSetLabel, 0, 0, 1, 2)
        self.chooseDataSetComboBox = QtWidgets.QComboBox(self.groupBox)
        self.chooseDataSetComboBox.setObjectName("chooseDataSetComboBox")
        self.gridLayout.addWidget(self.chooseDataSetComboBox, 1, 0, 1, 1)
        self.variablesToWriteLabel = QtWidgets.QLabel(self.groupBox)
        self.variablesToWriteLabel.setObjectName("variablesToWriteLabel")
        self.gridLayout.addWidget(self.variablesToWriteLabel, 2, 0, 1, 1)
        self.variablesToWriteListWidget = QtWidgets.QListWidget(self.groupBox)
        self.variablesToWriteListWidget.setObjectName("variablesToWriteListWidget")
        self.gridLayout.addWidget(self.variablesToWriteListWidget, 3, 0, 1, 2)
        self.specifyAFilenameLabel = QtWidgets.QLabel(self.groupBox)
        self.specifyAFilenameLabel.setObjectName("specifyAFilenameLabel")
        self.gridLayout.addWidget(self.specifyAFilenameLabel, 4, 0, 1, 1)
        self.specifyAFilenameLineEdit = QtWidgets.QLineEdit(self.groupBox)
        self.specifyAFilenameLineEdit.setObjectName("specifyAFilenameLineEdit")
        self.gridLayout.addWidget(self.specifyAFilenameLineEdit, 5, 0, 1, 1)
        self.pushButton = QtWidgets.QPushButton(self.groupBox)
        self.pushButton.setMaximumSize(QtCore.QSize(30, 16777215))
        self.pushButton.setObjectName("pushButton")
        self.gridLayout.addWidget(self.pushButton, 5, 1, 1, 1)
        self.verticalLayout.addWidget(self.groupBox)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:PySAT_Point_Spectra_GUI    作者:USGS-Astrogeology    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox = QtWidgets.QGroupBox(Form)
        self.groupBox.setObjectName("groupBox")
        self.formLayout = QtWidgets.QFormLayout(self.groupBox)
        self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
        self.formLayout.setObjectName("formLayout")
        self.fitInterceptLabel = QtWidgets.QLabel(self.groupBox)
        self.fitInterceptLabel.setObjectName("fitInterceptLabel")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.fitInterceptLabel)
        self.fit_intercept_list = QtWidgets.QListWidget(self.groupBox)
        self.fit_intercept_list.setMaximumSize(QtCore.QSize(16777215, 50))
        self.fit_intercept_list.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.fit_intercept_list.setObjectName("fit_intercept_list")
        item = QtWidgets.QListWidgetItem()
        self.fit_intercept_list.addItem(item)
        item = QtWidgets.QListWidgetItem()
        self.fit_intercept_list.addItem(item)
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.fit_intercept_list)
        self.verticalLayout.addWidget(self.groupBox)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:coquery    作者:gkunter    | 项目源码 | 文件源码
def setupUi(self, ButtonList):
        ButtonList.setObjectName("ButtonList")
        ButtonList.resize(472, 184)
        self.verticalLayout = QtWidgets.QVBoxLayout(ButtonList)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setSpacing(6)
        self.verticalLayout.setObjectName("verticalLayout")
        self.list_widget = QtWidgets.QListWidget(ButtonList)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.list_widget.sizePolicy().hasHeightForWidth())
        self.list_widget.setSizePolicy(sizePolicy)
        self.list_widget.setMinimumSize(QtCore.QSize(0, 24))
        self.list_widget.setDragDropMode(QtWidgets.QAbstractItemView.InternalMove)
        self.list_widget.setSelectionMode(QtWidgets.QAbstractItemView.ContiguousSelection)
        self.list_widget.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.list_widget.setObjectName("list_widget")
        self.verticalLayout.addWidget(self.list_widget)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setSpacing(3)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.button_remove_group = QtWidgets.QPushButton(ButtonList)
        self.button_remove_group.setObjectName("button_remove_group")
        self.horizontalLayout.addWidget(self.button_remove_group)
        spacerItem = QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.button_group_up = QtWidgets.QToolButton(ButtonList)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.button_group_up.sizePolicy().hasHeightForWidth())
        self.button_group_up.setSizePolicy(sizePolicy)
        self.button_group_up.setText("")
        self.button_group_up.setObjectName("button_group_up")
        self.horizontalLayout.addWidget(self.button_group_up)
        self.button_group_down = QtWidgets.QToolButton(ButtonList)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.button_group_down.sizePolicy().hasHeightForWidth())
        self.button_group_down.setSizePolicy(sizePolicy)
        self.button_group_down.setText("")
        self.button_group_down.setObjectName("button_group_down")
        self.horizontalLayout.addWidget(self.button_group_down)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.verticalLayout.setStretch(0, 1)

        self.retranslateUi(ButtonList)
        QtCore.QMetaObject.connectSlotsByName(ButtonList)
项目:MDT    作者:cbclab    | 项目源码 | 文件源码
def setupUi(self, RuntimeSettingsDialog):
        RuntimeSettingsDialog.setObjectName("RuntimeSettingsDialog")
        RuntimeSettingsDialog.resize(844, 243)
        self.verticalLayout = QtWidgets.QVBoxLayout(RuntimeSettingsDialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setSpacing(0)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.label_3 = QtWidgets.QLabel(RuntimeSettingsDialog)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.verticalLayout_3.addWidget(self.label_3)
        self.label_4 = QtWidgets.QLabel(RuntimeSettingsDialog)
        font = QtGui.QFont()
        font.setItalic(True)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.verticalLayout_3.addWidget(self.label_4)
        self.verticalLayout.addLayout(self.verticalLayout_3)
        self.line = QtWidgets.QFrame(RuntimeSettingsDialog)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout.addWidget(self.line)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.cldevicesSelection = QtWidgets.QListWidget(RuntimeSettingsDialog)
        self.cldevicesSelection.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.cldevicesSelection.setObjectName("cldevicesSelection")
        self.gridLayout.addWidget(self.cldevicesSelection, 0, 1, 1, 1)
        self.label_10 = QtWidgets.QLabel(RuntimeSettingsDialog)
        font = QtGui.QFont()
        font.setItalic(True)
        self.label_10.setFont(font)
        self.label_10.setObjectName("label_10")
        self.gridLayout.addWidget(self.label_10, 0, 2, 1, 1)
        self.label = QtWidgets.QLabel(RuntimeSettingsDialog)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.line_3 = QtWidgets.QFrame(RuntimeSettingsDialog)
        self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_3.setObjectName("line_3")
        self.verticalLayout.addWidget(self.line_3)
        self.buttonBox = QtWidgets.QDialogButtonBox(RuntimeSettingsDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(RuntimeSettingsDialog)
        self.buttonBox.accepted.connect(RuntimeSettingsDialog.accept)
        self.buttonBox.rejected.connect(RuntimeSettingsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(RuntimeSettingsDialog)
项目:BATS-Bayesian-Adaptive-Trial-Simulator    作者:ContaTP    | 项目源码 | 文件源码
def __init__(self, parent=None):

        QtWidgets.QListWidget.__init__(self, parent)
        # Get parent
        self.parent = parent
        # List font
        self.listFont = QtGui.QFont("Caviar Dreams")
        self.listFont.setPointSize(14)
        self.listFont.setBold(False)
        self.listFont.setLetterSpacing(QtGui.QFont.AbsoluteSpacing, 1.0)
        # Customize the widgets
        self.setFocusPolicy(QtCore.Qt.NoFocus)
        self.setFont(self.listFont)
        self.horizontalScrollBar().setVisible(False)
        self.setIconSize(QtCore.QSize(50, 50))
        self.setFlow(QtWidgets.QListView.TopToBottom)
        # Design icon
        self.designIcon = QtGui.QIcon()
        self.designIcon.addPixmap(QtGui.QPixmap(":/resources/design.png"), QtGui.QIcon.Normal)
        self.designIcon.addPixmap(QtGui.QPixmap(":/resources/design_selected.png"), QtGui.QIcon.Selected)
        """
        # Table?icon
        self.tableIcon = QtGui.QIcon()
        self.tableIcon.addPixmap(QtGui.QPixmap(":/resources/table.png"), QtGui.QIcon.Normal)
        self.tableIcon.addPixmap(QtGui.QPixmap(":/resources/table_selected.png"), QtGui.QIcon.Selected)
        """
        # Other icon
        self.otherIcon = QtGui.QIcon()
        self.otherIcon.addPixmap(QtGui.QPixmap(":/resources/other.png"), QtGui.QIcon.Normal)
        self.otherIcon.addPixmap(QtGui.QPixmap(":/resources/other_selected.png"), QtGui.QIcon.Selected)
        # Add design items
        self.designItem = QtWidgets.QListWidgetItem(self.designIcon, "Design")
        # self.tableItem = QtWidgets.QListWidgetItem(self.tableIcon, "Table")
        self.otherItem = QtWidgets.QListWidgetItem(self.otherIcon, "Analyze")
        # Add items to the list widget
        self.addItem(self.designItem)
        # self.addItem(self.tableItem)
        self.addItem(self.otherItem)
        # Stylesheet
        self.setStyleSheet("QListWidget{min-width: 100px; border:none; border-top:2px solid #4da8e8; color:#ffffff; margin: 0 0 0 0; padding: 0 0 0 0; text-align:center;} QListWidget::item{border-bottom: 2px solid #4da8e8; padding:15px 25px 15px 25px; margin: 0 0 0 0; text-align: center; background:#399ee5; color:#ffffff;} QListWidget::item:hover{border:none; background:#45c8dc; font-weight:bold;} QListWidget::item:selected{border:none; border-left: 6px solid #fa7064; background:#ffffff; color:#fa7064; font-weight:bold;} QListWidget::icon{margin: 0 0 0 0; padding: 0 20px 0 0;} QLabel{background:transparent; border: none; font-size: 15pt; color:#ffffff; font-family:'Segoe UI';}")
        # Action
        # Select the tab, change the layout
        self.currentRowChanged.connect(self.changeLayout)


    # Change color
项目:PINCE    作者:korcankaraokcu    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1025, 530)
        Form.setToolTip("")
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.splitter = QtWidgets.QSplitter(Form)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.layoutWidget = QtWidgets.QWidget(self.splitter)
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.lineEdit_Regex = QtWidgets.QLineEdit(self.layoutWidget)
        self.lineEdit_Regex.setObjectName("lineEdit_Regex")
        self.horizontalLayout_2.addWidget(self.lineEdit_Regex)
        self.checkBox_IgnoreCase = QtWidgets.QCheckBox(self.layoutWidget)
        self.checkBox_IgnoreCase.setChecked(True)
        self.checkBox_IgnoreCase.setObjectName("checkBox_IgnoreCase")
        self.horizontalLayout_2.addWidget(self.checkBox_IgnoreCase)
        self.checkBox_Regex = QtWidgets.QCheckBox(self.layoutWidget)
        self.checkBox_Regex.setObjectName("checkBox_Regex")
        self.horizontalLayout_2.addWidget(self.checkBox_Regex)
        self.pushButton_Search = QtWidgets.QPushButton(self.layoutWidget)
        self.pushButton_Search.setObjectName("pushButton_Search")
        self.horizontalLayout_2.addWidget(self.pushButton_Search)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.tableWidget_References = QtWidgets.QTableWidget(self.layoutWidget)
        self.tableWidget_References.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.tableWidget_References.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
        self.tableWidget_References.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.tableWidget_References.setObjectName("tableWidget_References")
        self.tableWidget_References.setColumnCount(2)
        self.tableWidget_References.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_References.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_References.setHorizontalHeaderItem(1, item)
        self.tableWidget_References.horizontalHeader().setStretchLastSection(True)
        self.tableWidget_References.verticalHeader().setVisible(False)
        self.tableWidget_References.verticalHeader().setDefaultSectionSize(16)
        self.tableWidget_References.verticalHeader().setMinimumSectionSize(16)
        self.verticalLayout.addWidget(self.tableWidget_References)
        self.listWidget_Referrers = QtWidgets.QListWidget(self.splitter)
        self.listWidget_Referrers.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.listWidget_Referrers.setObjectName("listWidget_Referrers")
        self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:ida-settings    作者:williballenthin    | 项目源码 | 文件源码
def PopulateForm(self):
        """
        +-----------------------------------------------------------------------+
        | +--- splitter ------------------------------------------------------+ |
        | | +-- list widget--------------+  +- IdaSettingsView -------------+ | |
        | | |                            |  |                               | | |
        | | |  - plugin name             |  |                               | | |
        | | |  - plugin name             |  |                               | | |
        | | |  - plugin name             |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | |                            |  |                               | | |
        | | +----------------------------+  +-------------------------------+ | |
        | +-------------------------------------------------------------------+ |
        +-----------------------------------------------------------------------+
        """
        hbox = QtWidgets.QHBoxLayout(self.parent)

        self._splitter = QtWidgets.QSplitter(QtCore.Qt.Horizontal)
        self._plugin_list = QtWidgets.QListWidget()

        plugin_names = set([])
        for scope, fn in (("idb", ida_settings.IDASettings.get_idb_plugin_names),
                ("directory", ida_settings.IDASettings.get_directory_plugin_names),
                ("user", ida_settings.IDASettings.get_user_plugin_names),
                ("system", ida_settings.IDASettings.get_system_plugin_names)):
            for plugin_name in fn():
                plugin_names.add(plugin_name)
        for plugin_name in plugin_names:
            self._plugin_list.addItem(plugin_name)
        self._splitter.addWidget(self._plugin_list)

        hbox.addWidget(self._splitter)
        self.parent.setLayout(hbox)

        self._plugin_list.currentItemChanged.connect(self._handle_plugin_changed)
项目:ida-settings    作者:williballenthin    | 项目源码 | 文件源码
def __init__(self, settings, parent=None):
        """
        +-----------------------------------------------------------------------+
        | +--- hbox ----------------------------------------------------------+ |
        | | +-- list widget--------------+  +- vbox ------------------------+ | |
        | | |                            |  | +- QTextEdit ---------------+ | | |
        | | |  - key                     |  | |                           | | | |
        | | |  - key                     |  | |  value                    | | | |
        | | |  - key                     |  | |                           | | | |
        | | |                            |  | |                           | | | |
        | | |                            |  | |                           | | | |
        | | |                            |  | |                           | | | |
        | | |                            |  | |                           | | | |
        | | |                            |  | |                           | | | |
        | | |                            |  | +---------------------------+ | | |
        | | |                            |  |                               | | |
        | | |                            |  | +- QPushButton -------------+ | | |
        | | |                            |  | |                           | | | |
        | | |                            |  | |  save                     | | | |
        | | |                            |  | |                           | | | |
        | | |                            |  | +---------------------------+ | | |
        | | +----------------------------+  +-------------------------------+ | |
        | +-------------------------------------------------------------------+ |
        +-----------------------------------------------------------------------+
        """
        super(IdaSettingsView, self).__init__(parent=parent)
        self._settings = settings
        self._current_key = None
        self._current_scope = None

        hbox = QtWidgets.QHBoxLayout(self)
        self._key_list = QtWidgets.QListWidget()
        for scope, keys in (("idb", self._settings.idb.iterkeys()),
                            ("directory", self._settings.directory.iterkeys()),
                            ("user", self._settings.user.iterkeys()),
                            ("system", self._settings.system.iterkeys())):
            for key in keys:
                self._key_list.addItem("({scope:s}) {key:s}".format(scope=scope, key=key))

        hbox.addWidget(self._key_list)

        vbox = QtWidgets.QVBoxLayout(self)
        self._value_view = QtWidgets.QTextEdit(self)
        self._save_button = QtWidgets.QPushButton("save")
        vbox.addWidget(self._value_view)
        vbox.addWidget(self._save_button)

        hbox.addLayout(vbox)

        self._key_list.currentItemChanged.connect(self._handle_key_changed)
        self._save_button.clicked.connect(self._handle_save_value)

        self.setLayout(hbox)
项目:ssh    作者:GDGVIT    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(400, 344)
        Form.setMaximumSize(QtCore.QSize(400, 344))
        Form.setStyleSheet(
            "QPushButton{background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 white, stop: 1 grey);\n"
            "border-style: solid;\n"
            "border-color: black;\n"
            "border-width: 2px;\n"
            "border-radius: 10px;}")
        self.listWidget = QtWidgets.QListWidget(Form)
        self.listWidget.setGeometry(QtCore.QRect(10, 70, 371, 192))
        self.listWidget.setObjectName("listWidget")
        self.pushButton = QtWidgets.QPushButton(Form)
        self.pushButton.setGeometry(QtCore.QRect(280, 20, 99, 31))
        self.pushButton.setObjectName("pushButton")
        self.label = QtWidgets.QLabel(Form)
        self.label.setGeometry(QtCore.QRect(20, 30, 251, 17))
        self.label.setObjectName("label")
        self.horizontalLayoutWidget = QtWidgets.QWidget(Form)
        self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 276, 371, 51))
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.pushButton_4 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.pushButton_4.setMinimumSize(QtCore.QSize(0, 30))
        self.pushButton_4.setObjectName("pushButton_4")
        self.horizontalLayout.addWidget(self.pushButton_4)
        self.pushButton_3 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.pushButton_3.setMinimumSize(QtCore.QSize(0, 30))
        self.pushButton_3.setObjectName("pushButton_3")
        self.horizontalLayout.addWidget(self.pushButton_3)
        self.pushButton_2 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.pushButton_2.setMinimumSize(QtCore.QSize(119, 30))
        self.pushButton_2.setObjectName("pushButton_2")
        self.horizontalLayout.addWidget(self.pushButton_2)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
        Form.setTabOrder(self.pushButton, self.listWidget)
        Form.setTabOrder(self.listWidget, self.pushButton_4)
        Form.setTabOrder(self.pushButton_4, self.pushButton_3)
        Form.setTabOrder(self.pushButton_3, self.pushButton_2)
项目:Worksets    作者:DozyDolphin    | 项目源码 | 文件源码
def setupUi(self, workset_dialog):
        workset_dialog.setObjectName("workset_dialog")
        workset_dialog.resize(500, 430)
        workset_dialog.setMinimumSize(QtCore.QSize(500, 430))
        workset_dialog.setMaximumSize(QtCore.QSize(500, 430))
        self.buttonBox = QtWidgets.QDialogButtonBox(workset_dialog)
        self.buttonBox.setGeometry(QtCore.QRect(140, 382, 341, 32))
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.name_label = QtWidgets.QLabel(workset_dialog)
        self.name_label.setGeometry(QtCore.QRect(20, 30, 67, 17))
        self.name_label.setObjectName("name_label")
        self.init_label = QtWidgets.QLabel(workset_dialog)
        self.init_label.setGeometry(QtCore.QRect(20, 70, 71, 17))
        self.init_label.setObjectName("init_label")
        self.apps_label = QtWidgets.QLabel(workset_dialog)
        self.apps_label.setGeometry(QtCore.QRect(20, 110, 171, 17))
        self.apps_label.setObjectName("apps_label")
        self.app_list = QtWidgets.QListWidget(workset_dialog)
        self.app_list.setGeometry(QtCore.QRect(20, 130, 461, 191))
        self.app_list.setObjectName("app_list")
        self.delete_btn = QtWidgets.QPushButton(workset_dialog)
        self.delete_btn.setEnabled(False)
        self.delete_btn.setGeometry(QtCore.QRect(20, 330, 97, 26))
        self.delete_btn.setObjectName("delete_btn")
        self.add_app_btn = QtWidgets.QPushButton(workset_dialog)
        self.add_app_btn.setGeometry(QtCore.QRect(304, 330, 177, 26))
        self.add_app_btn.setObjectName("add_app_btn")
        self.name_input = QtWidgets.QLineEdit(workset_dialog)
        self.name_input.setGeometry(QtCore.QRect(110, 30, 371, 27))
        self.name_input.setObjectName("name_input")
        self.test_btn = QtWidgets.QPushButton(workset_dialog)
        self.test_btn.setGeometry(QtCore.QRect(20, 385, 97, 26))
        self.test_btn.setObjectName("test_btn")
        self.init_line_edit = QtWidgets.QLineEdit(workset_dialog)
        self.init_line_edit.setGeometry(QtCore.QRect(110, 67, 338, 27))
        self.init_line_edit.setObjectName("init_line_edit")
        self.init_filechooser = QtWidgets.QPushButton(workset_dialog)
        self.init_filechooser.setGeometry(QtCore.QRect(450, 67, 31, 26))
        self.init_filechooser.setObjectName("init_filechooser")

        self.retranslateUi(workset_dialog)
        self.buttonBox.accepted.connect(workset_dialog.accept)
        self.buttonBox.rejected.connect(workset_dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(workset_dialog)
项目:mindfulness-at-the-computer    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self):
        super().__init__()
        vbox = QtWidgets.QVBoxLayout()
        self.setLayout(vbox)
        # self.setMinimumWidth(180)

        self.updating_gui_bool = False

        self.list_widget = QtWidgets.QListWidget()
        # self.list_widget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
        vbox.addWidget(self.list_widget)
        self.list_widget.itemSelectionChanged.connect(self.on_selection_changed)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        self.add_to_list_qle = QtWidgets.QLineEdit()
        hbox.addWidget(self.add_to_list_qle)
        self.add_to_list_qle.setPlaceholderText("New item")
        QtWidgets.QShortcut(
            QtGui.QKeySequence(QtCore.Qt.Key_Return),
            self.add_to_list_qle,
            member=self.add_new_phrase_button_clicked,
            context=QtCore.Qt.WidgetShortcut
        )
        self.add_new_phrase_qpb = QtWidgets.QPushButton("Add")
        self.add_new_phrase_qpb.clicked.connect(self.add_new_phrase_button_clicked)
        hbox.addWidget(self.add_new_phrase_qpb)

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        self.edit_texts_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.edit_texts_qpb)
        self.edit_texts_qpb.setIcon(QtGui.QIcon(mc.mc_global.get_icon_path("pencil-2x.png")))
        self.edit_texts_qpb.clicked.connect(self.on_edit_texts_clicked)
        self.move_to_top_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.move_to_top_qpb)
        self.move_to_top_qpb.setIcon(QtGui.QIcon(mc.mc_global.get_icon_path("data-transfer-upload-2x.png")))
        self.move_to_top_qpb.clicked.connect(self.on_move_to_top_clicked)
        self.move_up_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.move_up_qpb)
        self.move_up_qpb.setIcon(QtGui.QIcon(mc.mc_global.get_icon_path("arrow-top-2x.png")))
        self.move_up_qpb.clicked.connect(self.on_move_up_clicked)
        self.move_down_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.move_down_qpb)
        self.move_down_qpb.setIcon(QtGui.QIcon(mc.mc_global.get_icon_path("arrow-bottom-2x.png")))
        self.move_down_qpb.clicked.connect(self.on_move_down_clicked)

        hbox.addStretch(1)

        self.delete_phrase_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.delete_phrase_qpb)
        self.delete_phrase_qpb.setIcon(QtGui.QIcon(mc.mc_global.get_icon_path("trash-2x.png")))
        self.delete_phrase_qpb.clicked.connect(self.on_delete_clicked)

        self.update_gui()

        self.list_widget.setCurrentRow(0)  # -the first row
项目:mindfulness-at-the-computer    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self):
        super().__init__()

        self.updating_gui_bool = False

        vbox = QtWidgets.QVBoxLayout()
        self.setLayout(vbox)

        # Rest actions
        self.list_widget = QtWidgets.QListWidget()
        vbox.addWidget(self.list_widget)

        self.list_widget.itemSelectionChanged.connect(self.on_selection_changed)
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        self.rest_add_action_qle = QtWidgets.QLineEdit()
        hbox.addWidget(self.rest_add_action_qle)
        self.rest_add_action_qpb = QtWidgets.QPushButton("Add")
        hbox.addWidget(self.rest_add_action_qpb)
        self.rest_add_action_qpb.clicked.connect(self.add_rest_action_clicked)

        # Details

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        self.edit_texts_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.edit_texts_qpb)
        self.edit_texts_qpb.setIcon(QtGui.QIcon(mc_global.get_icon_path("pencil-2x.png")))
        self.edit_texts_qpb.clicked.connect(self.on_edit_texts_clicked)

        self.move_to_top_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.move_to_top_qpb)
        self.move_to_top_qpb.setIcon(QtGui.QIcon(mc_global.get_icon_path("data-transfer-upload-2x.png")))
        self.move_to_top_qpb.clicked.connect(self.on_move_to_top_clicked)
        self.move_up_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.move_up_qpb)
        self.move_up_qpb.setIcon(QtGui.QIcon(mc_global.get_icon_path("arrow-top-2x.png")))
        self.move_up_qpb.clicked.connect(self.on_move_up_clicked)
        self.move_down_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.move_down_qpb)
        self.move_down_qpb.setIcon(QtGui.QIcon(mc_global.get_icon_path("arrow-bottom-2x.png")))
        self.move_down_qpb.clicked.connect(self.on_move_down_clicked)
        hbox.addStretch(1)
        self.delete_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.delete_qpb)
        self.delete_qpb.setIcon(QtGui.QIcon(mc_global.get_icon_path("trash-2x.png")))
        self.delete_qpb.clicked.connect(self.on_delete_clicked)

        self.update_gui()
项目:mindfulness-at-the-computer    作者:SunyataZero    | 项目源码 | 文件源码
def __init__(self):
        super().__init__()

        self.updating_gui_bool = False

        vbox = QtWidgets.QVBoxLayout()
        self.setLayout(vbox)

        # Rest actions
        self.list_widget = QtWidgets.QListWidget()
        vbox.addWidget(self.list_widget)

        self.list_widget.itemSelectionChanged.connect(self.on_selection_changed)
        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)
        self.rest_add_action_qle = QtWidgets.QLineEdit()
        hbox.addWidget(self.rest_add_action_qle)
        self.rest_add_action_qpb = QtWidgets.QPushButton("Add")
        hbox.addWidget(self.rest_add_action_qpb)
        self.rest_add_action_qpb.clicked.connect(self.add_rest_action_clicked)

        # Details

        hbox = QtWidgets.QHBoxLayout()
        vbox.addLayout(hbox)

        self.edit_texts_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.edit_texts_qpb)
        self.edit_texts_qpb.setIcon(QtGui.QIcon(mc_global.get_icon_path("pencil-2x.png")))
        self.edit_texts_qpb.clicked.connect(self.on_edit_texts_clicked)

        self.move_to_top_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.move_to_top_qpb)
        self.move_to_top_qpb.setIcon(QtGui.QIcon(mc_global.get_icon_path("data-transfer-upload-2x.png")))
        self.move_to_top_qpb.clicked.connect(self.on_move_to_top_clicked)
        self.move_up_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.move_up_qpb)
        self.move_up_qpb.setIcon(QtGui.QIcon(mc_global.get_icon_path("arrow-top-2x.png")))
        self.move_up_qpb.clicked.connect(self.on_move_up_clicked)
        self.move_down_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.move_down_qpb)
        self.move_down_qpb.setIcon(QtGui.QIcon(mc_global.get_icon_path("arrow-bottom-2x.png")))
        self.move_down_qpb.clicked.connect(self.on_move_down_clicked)
        hbox.addStretch(1)
        self.delete_qpb = QtWidgets.QPushButton()
        hbox.addWidget(self.delete_qpb)
        self.delete_qpb.setIcon(QtGui.QIcon(mc_global.get_icon_path("trash-2x.png")))
        self.delete_qpb.clicked.connect(self.on_delete_clicked)

        self.update_gui()
项目:decentralized-chat    作者:Phil9l    | 项目源码 | 文件源码
def setup_ui(self, main_window):
        main_window.setObjectName("MainWindow")
        main_window.resize(886, 534)
        self.centralWidget = QtWidgets.QWidget(main_window)
        self.centralWidget.setMinimumSize(QtCore.QSize(886, 0))
        self.centralWidget.setObjectName("centralWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.centralWidget)
        self.gridLayout.setObjectName("gridLayout")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.textBrowser = QtWidgets.QTextBrowser(self.centralWidget)
        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        size_policy.setHorizontalStretch(3)
        size_policy.setVerticalStretch(0)
        size_policy.setHeightForWidth(self.textBrowser.sizePolicy().hasHeightForWidth())
        self.textBrowser.setSizePolicy(size_policy)
        self.textBrowser.setObjectName("textBrowser")
        self.horizontalLayout.addWidget(self.textBrowser)
        self.listWidget = QtWidgets.QListWidget(self.centralWidget)
        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        size_policy.setHorizontalStretch(1)
        size_policy.setVerticalStretch(0)
        size_policy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth())
        self.listWidget.setSizePolicy(size_policy)
        self.listWidget.setObjectName("listWidget")
        self.horizontalLayout.addWidget(self.listWidget)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.widget = QtWidgets.QWidget(self.centralWidget)
        self.widget.setMaximumSize(QtCore.QSize(16777215, 30))
        self.widget.setObjectName("widget")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.widget)
        self.gridLayout_2.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.pushButton = QtWidgets.QPushButton(self.widget)
        self.pushButton.setObjectName("pushButton")
        self.gridLayout_2.addWidget(self.pushButton, 0, 1, 1, 1)
        self.lineEdit = QtWidgets.QLineEdit(self.widget)
        self.lineEdit.setObjectName("lineEdit")
        self.lineEdit.setPlaceholderText("?????????")
        self.gridLayout_2.addWidget(self.lineEdit, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.widget)
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)
        main_window.setCentralWidget(self.centralWidget)

        self.retranslate_ui(main_window)
        QtCore.QMetaObject.connectSlotsByName(main_window)
项目:pyENL    作者:jon85p    | 项目源码 | 文件源码
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(499, 428)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.listWidget = QtWidgets.QListWidget(Dialog)
        self.listWidget.setObjectName("listWidget")
        self.gridLayout.addWidget(self.listWidget, 2, 0, 1, 2)
        self.textEdit = QtWidgets.QTextEdit(Dialog)
        self.textEdit.setObjectName("textEdit")
        self.gridLayout.addWidget(self.textEdit, 6, 0, 1, 3)
        self.label = QtWidgets.QLabel(Dialog)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 2)
        self.label_4 = QtWidgets.QLabel(Dialog)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 3, 0, 1, 2)
        self.label_3 = QtWidgets.QLabel(Dialog)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 1, 2, 1, 1)
        self.label_7 = QtWidgets.QLabel(Dialog)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 5, 0, 1, 1)
        self.listWidget_2 = QtWidgets.QListWidget(Dialog)
        self.listWidget_2.setObjectName("listWidget_2")
        self.gridLayout.addWidget(self.listWidget_2, 2, 2, 1, 1)
        self.label_5 = QtWidgets.QLabel(Dialog)
        self.label_5.setObjectName("label_5")
        self.gridLayout.addWidget(self.label_5, 3, 2, 1, 1)
        self.listWidget_3 = QtWidgets.QListWidget(Dialog)
        self.listWidget_3.setObjectName("listWidget_3")
        self.gridLayout.addWidget(self.listWidget_3, 4, 0, 1, 2)
        self.label_2 = QtWidgets.QLabel(Dialog)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.listWidget_4 = QtWidgets.QListWidget(Dialog)
        self.listWidget_4.setEnabled(False)
        self.listWidget_4.setObjectName("listWidget_4")
        self.gridLayout.addWidget(self.listWidget_4, 4, 2, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 7, 2, 1, 1)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
        self.buttonBox.accepted.connect(Dialog.accept)
        self.buttonBox.rejected.connect(Dialog.reject)
项目:PySAT_Point_Spectra_GUI    作者:USGS-Astrogeology    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.formGroupBox = QtWidgets.QGroupBox(Form)
        self.formGroupBox.setObjectName("formGroupBox")
        self.formLayout = QtWidgets.QFormLayout(self.formGroupBox)
        self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
        self.formLayout.setObjectName("formLayout")
        self.fit_interceptLabel = QtWidgets.QLabel(self.formGroupBox)
        self.fit_interceptLabel.setObjectName("fit_interceptLabel")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.fit_interceptLabel)
        self.fit_intercept_listWidget = QtWidgets.QListWidget(self.formGroupBox)
        self.fit_intercept_listWidget.setMaximumSize(QtCore.QSize(16777215, 50))
        self.fit_intercept_listWidget.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.fit_intercept_listWidget.setObjectName("fit_intercept_listWidget")
        item = QtWidgets.QListWidgetItem()
        self.fit_intercept_listWidget.addItem(item)
        item = QtWidgets.QListWidgetItem()
        self.fit_intercept_listWidget.addItem(item)
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.fit_intercept_listWidget)
        self.normalizeLabel = QtWidgets.QLabel(self.formGroupBox)
        self.normalizeLabel.setObjectName("normalizeLabel")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.normalizeLabel)
        self.normalize_list = QtWidgets.QListWidget(self.formGroupBox)
        self.normalize_list.setMaximumSize(QtCore.QSize(16777215, 50))
        self.normalize_list.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.normalize_list.setObjectName("normalize_list")
        item = QtWidgets.QListWidgetItem()
        self.normalize_list.addItem(item)
        item = QtWidgets.QListWidgetItem()
        self.normalize_list.addItem(item)
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.normalize_list)
        self.n_nonzero_coefsLabel = QtWidgets.QLabel(self.formGroupBox)
        self.n_nonzero_coefsLabel.setObjectName("n_nonzero_coefsLabel")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.n_nonzero_coefsLabel)
        self.n_nonzero_coefsLineEdit = QtWidgets.QLineEdit(self.formGroupBox)
        self.n_nonzero_coefsLineEdit.setObjectName("n_nonzero_coefsLineEdit")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.n_nonzero_coefsLineEdit)
        self.positiveLabel = QtWidgets.QLabel(self.formGroupBox)
        self.positiveLabel.setObjectName("positiveLabel")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.positiveLabel)
        self.positive_list = QtWidgets.QListWidget(self.formGroupBox)
        self.positive_list.setMaximumSize(QtCore.QSize(16777215, 50))
        self.positive_list.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.positive_list.setObjectName("positive_list")
        item = QtWidgets.QListWidgetItem()
        self.positive_list.addItem(item)
        item = QtWidgets.QListWidgetItem()
        self.positive_list.addItem(item)
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.positive_list)
        self.verticalLayout.addWidget(self.formGroupBox)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:PySAT_Point_Spectra_GUI    作者:USGS-Astrogeology    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.groupLayout = QtWidgets.QGroupBox(Form)
        self.groupLayout.setObjectName("groupLayout")
        self.gridLayout = QtWidgets.QGridLayout(self.groupLayout)
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.chooseDataLabel = QtWidgets.QLabel(self.groupLayout)
        self.chooseDataLabel.setObjectName("chooseDataLabel")
        self.horizontalLayout_3.addWidget(self.chooseDataLabel)
        self.chooseDataComboBox = QtWidgets.QComboBox(self.groupLayout)
        self.chooseDataComboBox.setObjectName("chooseDataComboBox")
        self.horizontalLayout_3.addWidget(self.chooseDataComboBox)
        self.gridLayout.addLayout(self.horizontalLayout_3, 0, 0, 1, 1)
        self.xVariableLabel = QtWidgets.QLabel(self.groupLayout)
        self.xVariableLabel.setObjectName("xVariableLabel")
        self.gridLayout.addWidget(self.xVariableLabel, 1, 0, 1, 1)
        self.xVariableList = QtWidgets.QListWidget(self.groupLayout)
        self.xVariableList.setEnabled(True)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.xVariableList.sizePolicy().hasHeightForWidth())
        self.xVariableList.setSizePolicy(sizePolicy)
        self.xVariableList.setObjectName("xVariableList")
        item = QtWidgets.QListWidgetItem()
        self.xVariableList.addItem(item)
        self.gridLayout.addWidget(self.xVariableList, 2, 0, 1, 1)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.chooseAlgorithmLabel = QtWidgets.QLabel(self.groupLayout)
        self.chooseAlgorithmLabel.setObjectName("chooseAlgorithmLabel")
        self.horizontalLayout_2.addWidget(self.chooseAlgorithmLabel)
        self.chooseAlgorithmComboBox = QtWidgets.QComboBox(self.groupLayout)
        self.chooseAlgorithmComboBox.setObjectName("chooseAlgorithmComboBox")
        self.horizontalLayout_2.addWidget(self.chooseAlgorithmComboBox)
        self.gridLayout.addLayout(self.horizontalLayout_2, 3, 0, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.gridLayout.addLayout(self.horizontalLayout, 3, 1, 1, 1)
        self.algorithmLayout = QtWidgets.QVBoxLayout()
        self.algorithmLayout.setObjectName("algorithmLayout")
        self.gridLayout.addLayout(self.algorithmLayout, 4, 0, 1, 2)
        self.verticalLayout_2.addWidget(self.groupLayout)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:PySAT_Point_Spectra_GUI    作者:USGS-Astrogeology    | 项目源码 | 文件源码
def setupUi(self, Form):
        Form.setObjectName("Form")
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.formGroupBox = QtWidgets.QGroupBox(Form)
        self.formGroupBox.setObjectName("formGroupBox")
        self.formLayout = QtWidgets.QFormLayout(self.formGroupBox)
        self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
        self.formLayout.setObjectName("formLayout")
        self.fitInterceptLabel = QtWidgets.QLabel(self.formGroupBox)
        self.fitInterceptLabel.setObjectName("fitInterceptLabel")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.fitInterceptLabel)
        self.normalizeLabel = QtWidgets.QLabel(self.formGroupBox)
        self.normalizeLabel.setObjectName("normalizeLabel")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.normalizeLabel)
        self.fit_intercept_list = QtWidgets.QListWidget(self.formGroupBox)
        self.fit_intercept_list.setMaximumSize(QtCore.QSize(16777215, 50))
        self.fit_intercept_list.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.fit_intercept_list.setObjectName("fit_intercept_list")
        item = QtWidgets.QListWidgetItem()
        self.fit_intercept_list.addItem(item)
        item = QtWidgets.QListWidgetItem()
        self.fit_intercept_list.addItem(item)
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.fit_intercept_list)
        self.normalize_list = QtWidgets.QListWidget(self.formGroupBox)
        self.normalize_list.setMaximumSize(QtCore.QSize(16777215, 50))
        self.normalize_list.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
        self.normalize_list.setObjectName("normalize_list")
        item = QtWidgets.QListWidgetItem()
        self.normalize_list.addItem(item)
        item = QtWidgets.QListWidgetItem()
        self.normalize_list.addItem(item)
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.normalize_list)
        self.n_coefs_label = QtWidgets.QLabel(self.formGroupBox)
        self.n_coefs_label.setObjectName("n_coefs_label")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.n_coefs_label)
        self.n_coefs_lineedit = QtWidgets.QLineEdit(self.formGroupBox)
        self.n_coefs_lineedit.setObjectName("n_coefs_lineedit")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.n_coefs_lineedit)
        self.verticalLayout.addWidget(self.formGroupBox)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def addToLibrary(self):
        global home
        #self.LibraryDialog.show()
        self.LibraryDialog = QtWidgets.QDialog()
        self.LibraryDialog.setObjectName(_fromUtf8("Dialog"))
        self.LibraryDialog.resize(582, 254)
        self.listLibrary = QtWidgets.QListWidget(self.LibraryDialog)
        self.listLibrary.setGeometry(QtCore.QRect(20, 20, 341, 192))
        self.listLibrary.setObjectName(_fromUtf8("listLibrary"))
        self.AddLibraryFolder = QtWidgets.QPushButton(self.LibraryDialog)
        self.AddLibraryFolder.setGeometry(QtCore.QRect(420, 50, 94, 27))
        self.AddLibraryFolder.setObjectName(_fromUtf8("AddLibraryFolder"))
        self.RemoveLibraryFolder = QtWidgets.QPushButton(self.LibraryDialog)
        self.RemoveLibraryFolder.setGeometry(QtCore.QRect(420, 90, 94, 27))
        self.RemoveLibraryFolder.setObjectName(_fromUtf8("RemoveLibraryFolder"))
        self.LibraryClose = QtWidgets.QPushButton(self.LibraryDialog)
        self.LibraryClose.setGeometry(QtCore.QRect(420, 130, 94, 27))
        self.LibraryClose.setObjectName(_fromUtf8("LibraryClose"))
        self.LibraryDialog.setWindowTitle(_translate("Dialog", "Library Setting", None))
        self.AddLibraryFolder.setText(_translate("Dialog", "ADD", None))
        self.RemoveLibraryFolder.setText(_translate("Dialog", "Remove", None))
        self.LibraryClose.setText(_translate("Dialog", "Close", None))
        self.LibraryDialog.show()
        file_name = os.path.join(home,'local.txt')
        if os.path.exists(file_name):
            lines = open_files(file_name,True)
            self.listLibrary.clear()
            for i in lines:
                i = i.replace('\n','')
                self.listLibrary.addItem(i)
        self.AddLibraryFolder.clicked.connect(self.addFolderLibrary)
        self.RemoveLibraryFolder.clicked.connect(self.removeFolderLibrary)
        self.LibraryClose.clicked.connect(self.LibraryDialog.close)

        self.LibraryClose.setStyleSheet("font: bold 12px;color:white;background:rgba(0,0,0,30%);border:rgba(0,0,0,30%);border-radius: 3px;")
        self.RemoveLibraryFolder.setStyleSheet("font: bold 12px;color:white;background:rgba(0,0,0,30%);border:rgba(0,0,0,30%);border-radius: 3px;")
        self.AddLibraryFolder.setStyleSheet("font: bold 12px;color:white;background:rgba(0,0,0,30%);border:rgba(0,0,0,30%);border-radius: 3px;")
        self.listLibrary.setStyleSheet("""QListWidget{
        font: bold 12px;color:white;background:rgba(0,0,0,30%);
        border:rgba(0,0,0,30%);border-radius: 3px;
        }
        QListWidget:item:selected:active {
        background:rgba(0,0,0,20%);
        color: violet;
        }
        QListWidget:item:selected:inactive {
        border:rgba(0,0,0,30%);
        }
        QMenu{
            font: bold 12px;color:black;background-image:url('1.png');
        }
        """)
        picn = self.default_background
        palette = QtGui.QPalette()
        palette.setBrush(QtGui.QPalette.Background,QtGui.QBrush(QtGui.QPixmap(picn)))
        self.LibraryDialog.setPalette(palette)
项目:AnimeWatch    作者:kanishka-linux    | 项目源码 | 文件源码
def addToLibrary(self):
        global home
        #self.LibraryDialog.show()
        self.LibraryDialog = QtWidgets.QDialog()
        self.LibraryDialog.setObjectName(_fromUtf8("Dialog"))
        self.LibraryDialog.resize(582, 254)
        self.listLibrary = QtWidgets.QListWidget(self.LibraryDialog)
        self.listLibrary.setGeometry(QtCore.QRect(20, 20, 341, 192))
        self.listLibrary.setObjectName(_fromUtf8("listLibrary"))
        self.AddLibraryFolder = QtWidgets.QPushButton(self.LibraryDialog)
        self.AddLibraryFolder.setGeometry(QtCore.QRect(420, 50, 94, 27))
        self.AddLibraryFolder.setObjectName(_fromUtf8("AddLibraryFolder"))
        self.RemoveLibraryFolder = QtWidgets.QPushButton(self.LibraryDialog)
        self.RemoveLibraryFolder.setGeometry(QtCore.QRect(420, 90, 94, 27))
        self.RemoveLibraryFolder.setObjectName(_fromUtf8("RemoveLibraryFolder"))
        self.LibraryClose = QtWidgets.QPushButton(self.LibraryDialog)
        self.LibraryClose.setGeometry(QtCore.QRect(420, 130, 94, 27))
        self.LibraryClose.setObjectName(_fromUtf8("LibraryClose"))
        self.LibraryDialog.setWindowTitle(_translate("Dialog", "Library Setting", None))
        self.AddLibraryFolder.setText(_translate("Dialog", "ADD", None))
        self.RemoveLibraryFolder.setText(_translate("Dialog", "Remove", None))
        self.LibraryClose.setText(_translate("Dialog", "Close", None))
        self.LibraryDialog.show()
        file_name = os.path.join(home,'local.txt')
        if os.path.exists(file_name):
            lines = open_files(file_name,True)
            self.listLibrary.clear()
            for i in lines:
                i = i.replace('\n','')
                self.listLibrary.addItem(i)
        self.AddLibraryFolder.clicked.connect(self.addFolderLibrary)
        self.RemoveLibraryFolder.clicked.connect(self.removeFolderLibrary)
        self.LibraryClose.clicked.connect(self.LibraryDialog.close)

        self.LibraryClose.setStyleSheet("font: bold 12px;color:white;background:rgba(0,0,0,30%);border:rgba(0,0,0,30%);border-radius: 3px;")
        self.RemoveLibraryFolder.setStyleSheet("font: bold 12px;color:white;background:rgba(0,0,0,30%);border:rgba(0,0,0,30%);border-radius: 3px;")
        self.AddLibraryFolder.setStyleSheet("font: bold 12px;color:white;background:rgba(0,0,0,30%);border:rgba(0,0,0,30%);border-radius: 3px;")
        self.listLibrary.setStyleSheet("""QListWidget{
        font: bold 12px;color:white;background:rgba(0,0,0,30%);
        border:rgba(0,0,0,30%);border-radius: 3px;
        }
        QListWidget:item:selected:active {
        background:rgba(0,0,0,20%);
        color: violet;
        }
        QListWidget:item:selected:inactive {
        border:rgba(0,0,0,30%);
        }
        QMenu{
            font: bold 12px;color:black;background-image:url('1.png');
        }
        """)
        picn = self.default_background
        palette = QtGui.QPalette()
        palette.setBrush(QtGui.QPalette.Background,QtGui.QBrush(QtGui.QPixmap(picn)))
        self.LibraryDialog.setPalette(palette)