Python PyQt5.QtWidgets.QSpacerItem() Examples

The following are 30 code examples for showing how to use PyQt5.QtWidgets.QSpacerItem(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module PyQt5.QtWidgets , or try the search function .

Example 1
Project: MusicBox   Author: HuberTRoy   File: addition.py    License: MIT License 7 votes vote down vote up
def __init__(self, parent=None):
        super(SearchLineEdit, self).__init__()
        self.setObjectName("SearchLine")
        self.parent = parent
        self.setMinimumSize(218, 20)
        with open('QSS/searchLine.qss', 'r') as f:
            self.setStyleSheet(f.read())

        self.button = QPushButton(self)
        self.button.setMaximumSize(13, 13)
        self.button.setCursor(QCursor(Qt.PointingHandCursor))

        self.setTextMargins(3, 0, 19, 0)

        self.spaceItem = QSpacerItem(150, 10, QSizePolicy.Expanding)

        self.mainLayout = QHBoxLayout()
        self.mainLayout.addSpacerItem(self.spaceItem)
        # self.mainLayout.addStretch(1)
        self.mainLayout.addWidget(self.button)
        self.mainLayout.addSpacing(10)
        self.mainLayout.setContentsMargins(0, 0, 0, 0)
        self.setLayout(self.mainLayout) 
Example 2
Project: PyQt   Author: PyQt5   File: combo_listwidget.py    License: GNU General Public License v3.0 6 votes vote down vote up
def initUi(self):
        self.horizontalLayout = QHBoxLayout(self)
        self.file_btn = QPushButton(QIcon(":/newPrefix/file.png"), self.text, self)
        sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred)
        self.file_btn.setSizePolicy(sizePolicy)
        qss = '''QPushButton 
{
    background-color: transparent;
    border: none;
}

QPushButton:hover {
    background:transparent;
    }'''
        self.file_btn.setStyleSheet(qss)
        self.bt_close = QToolButton(self)
        self.bt_close.setIcon(QIcon(":/newPrefix/if_Delete_1493279.png"))
        self.bt_close.setAutoRaise(True)
        self.bt_close.setToolTip("Delete")
        self.bt_close.clicked.connect(lambda: self.itemOpSignal.emit(self.listwidgetItem))

        self.horizontalLayout.addWidget(self.bt_close)
        self.horizontalLayout.addWidget(self.file_btn)
        spacerItem = QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem) 
Example 3
Project: openMotor   Author: reilleya   File: collectionEditor.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, parent, buttons=False):
        super(CollectionEditor, self).__init__(QWidget(parent))

        self.preferences = None

        self.propertyEditors = {}
        self.setLayout(QVBoxLayout())
        self.layout().setSpacing(0)

        self.form = QFormLayout()
        self.layout().addLayout(self.form)

        self.stats = QVBoxLayout()
        self.layout().addLayout(self.stats)


        self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
        self.layout().addItem(self.verticalSpacer)

        self.buttons = buttons
        if self.buttons:
            self.addButtons() 
Example 4
Project: multibootusb   Author: mbusb   File: ui_about.py    License: GNU General Public License v2.0 5 votes vote down vote up
def setupUi(self, About):
        About.setObjectName("About")
        About.resize(498, 369)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(About.sizePolicy().hasHeightForWidth())
        About.setSizePolicy(sizePolicy)
        self.verticalLayout = QtWidgets.QVBoxLayout(About)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridLayout_11 = QtWidgets.QGridLayout()
        self.gridLayout_11.setObjectName("gridLayout_11")
        self.label_6 = QtWidgets.QLabel(About)
        self.label_6.setObjectName("label_6")
        self.gridLayout_11.addWidget(self.label_6, 1, 1, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_11.addItem(spacerItem, 1, 2, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_11.addItem(spacerItem1, 1, 0, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_11.addItem(spacerItem2, 0, 1, 1, 1)
        spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_11.addItem(spacerItem3, 2, 1, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout_11)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem4)
        self.button_close = QtWidgets.QPushButton(About)
        self.button_close.setObjectName("button_close")
        self.horizontalLayout.addWidget(self.button_close)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(About)
        QtCore.QMetaObject.connectSlotsByName(About) 
Example 5
Project: pyleecan   Author: Eomys   File: Ui_WVent.py    License: Apache License 2.0 5 votes vote down vote up
def setupUi(self, WVent):
        WVent.setObjectName("WVent")
        WVent.resize(630, 470)
        WVent.setMinimumSize(QtCore.QSize(630, 470))
        self.main_layout = QtWidgets.QVBoxLayout(WVent)
        self.main_layout.setObjectName("main_layout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.in_vent_type = QtWidgets.QLabel(WVent)
        self.in_vent_type.setObjectName("in_vent_type")
        self.horizontalLayout.addWidget(self.in_vent_type)
        self.c_vent_type = QtWidgets.QComboBox(WVent)
        self.c_vent_type.setObjectName("c_vent_type")
        self.c_vent_type.addItem("")
        self.c_vent_type.addItem("")
        self.c_vent_type.addItem("")
        self.horizontalLayout.addWidget(self.c_vent_type)
        spacerItem = QtWidgets.QSpacerItem(
            40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum
        )
        self.horizontalLayout.addItem(spacerItem)
        self.main_layout.addLayout(self.horizontalLayout)
        self.w_vent = QtWidgets.QWidget(WVent)
        self.w_vent.setMinimumSize(QtCore.QSize(640, 480))
        self.w_vent.setObjectName("w_vent")
        self.main_layout.addWidget(self.w_vent)

        self.retranslateUi(WVent)
        QtCore.QMetaObject.connectSlotsByName(WVent) 
Example 6
Project: pyleecan   Author: Eomys   File: Ui_SPreview.py    License: Apache License 2.0 5 votes vote down vote up
def setupUi(self, SPreview):
        SPreview.setObjectName("SPreview")
        SPreview.resize(532, 450)
        SPreview.setMinimumSize(QtCore.QSize(0, 0))
        self.verticalLayout = QtWidgets.QVBoxLayout(SPreview)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.w_plot = MPLCanvas2(SPreview)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred
        )
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.w_plot.sizePolicy().hasHeightForWidth())
        self.w_plot.setSizePolicy(sizePolicy)
        self.w_plot.setMinimumSize(QtCore.QSize(300, 300))
        self.w_plot.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.w_plot.setObjectName("w_plot")
        self.horizontalLayout_2.addWidget(self.w_plot)
        self.tab_machine = WMachineTable(SPreview)
        self.tab_machine.setObjectName("tab_machine")
        self.horizontalLayout_2.addWidget(self.tab_machine)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(
            40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum
        )
        self.horizontalLayout.addItem(spacerItem)
        self.b_previous = QtWidgets.QPushButton(SPreview)
        self.b_previous.setObjectName("b_previous")
        self.horizontalLayout.addWidget(self.b_previous)
        self.b_next = QtWidgets.QPushButton(SPreview)
        self.b_next.setObjectName("b_next")
        self.horizontalLayout.addWidget(self.b_next)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(SPreview)
        QtCore.QMetaObject.connectSlotsByName(SPreview) 
Example 7
Project: IDAngr   Author: andreafioraldi   File: addmem.py    License: BSD 2-Clause "Simplified" License 5 votes vote down vote up
def setupUi(self, IDAngrAddMem):
        IDAngrAddMem.setObjectName("IDAngrAddMem")
        IDAngrAddMem.resize(440, 251)
        self.gridLayout_2 = QtWidgets.QGridLayout(IDAngrAddMem)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(IDAngrAddMem)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.addrTextEdit = QtWidgets.QLineEdit(IDAngrAddMem)
        self.addrTextEdit.setObjectName("addrTextEdit")
        self.gridLayout.addWidget(self.addrTextEdit, 1, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(IDAngrAddMem)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
        self.lenTextEdit = QtWidgets.QLineEdit(IDAngrAddMem)
        self.lenTextEdit.setObjectName("lenTextEdit")
        self.gridLayout.addWidget(self.lenTextEdit, 3, 0, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(20, 79, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_2.addItem(spacerItem, 1, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(IDAngrAddMem)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout_2.addWidget(self.buttonBox, 2, 0, 1, 1)

        self.retranslateUi(IDAngrAddMem)
        self.buttonBox.accepted.connect(IDAngrAddMem.accept)
        self.buttonBox.rejected.connect(IDAngrAddMem.reject)
        QtCore.QMetaObject.connectSlotsByName(IDAngrAddMem) 
Example 8
Project: uPyLoader   Author: BetaRavener   File: file_transfer.py    License: MIT License 5 votes vote down vote up
def setupUi(self, FileTransferDialog):
        FileTransferDialog.setObjectName("FileTransferDialog")
        FileTransferDialog.resize(400, 120)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(FileTransferDialog)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.label = QtWidgets.QLabel(FileTransferDialog)
        self.label.setObjectName("label")
        self.verticalLayout_2.addWidget(self.label)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.progressBar = QtWidgets.QProgressBar(FileTransferDialog)
        self.progressBar.setProperty("value", 24)
        self.progressBar.setObjectName("progressBar")
        self.verticalLayout.addWidget(self.progressBar)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.cancelButton = QtWidgets.QPushButton(FileTransferDialog)
        self.cancelButton.setEnabled(False)
        self.cancelButton.setCheckable(False)
        self.cancelButton.setObjectName("cancelButton")
        self.horizontalLayout.addWidget(self.cancelButton)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.verticalLayout_2.addLayout(self.verticalLayout)

        self.retranslateUi(FileTransferDialog)
        QtCore.QMetaObject.connectSlotsByName(FileTransferDialog) 
Example 9
Project: dash-masternode-tool   Author: Bertrand256   File: ui_message_dlg.py    License: MIT License 5 votes vote down vote up
def setupUi(self, MessageDlg):
        MessageDlg.setObjectName("MessageDlg")
        MessageDlg.resize(263, 96)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(15)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(MessageDlg.sizePolicy().hasHeightForWidth())
        MessageDlg.setSizePolicy(sizePolicy)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(MessageDlg)
        self.verticalLayout_2.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
        self.verticalLayout_2.setContentsMargins(6, 6, 6, 6)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.lblMessage = QtWidgets.QLabel(MessageDlg)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lblMessage.sizePolicy().hasHeightForWidth())
        self.lblMessage.setSizePolicy(sizePolicy)
        self.lblMessage.setSizeIncrement(QtCore.QSize(0, 0))
        self.lblMessage.setFrameShape(QtWidgets.QFrame.Box)
        self.lblMessage.setText("")
        self.lblMessage.setScaledContents(True)
        self.lblMessage.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
        self.lblMessage.setWordWrap(True)
        self.lblMessage.setOpenExternalLinks(True)
        self.lblMessage.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
        self.lblMessage.setObjectName("lblMessage")
        self.verticalLayout_2.addWidget(self.lblMessage)
        spacerItem = QtWidgets.QSpacerItem(20, 0, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(MessageDlg)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout_2.addWidget(self.buttonBox)

        self.retranslateUi(MessageDlg)
        QtCore.QMetaObject.connectSlotsByName(MessageDlg) 
Example 10
Project: dzetsaka   Author: nkarasiak   File: welcome.py    License: GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, DockWidget):
        DockWidget.setObjectName("DockWidget")
        DockWidget.resize(513, 387)
        self.dockWidgetContents = QtWidgets.QWidget()
        self.dockWidgetContents.setEnabled(True)
        self.dockWidgetContents.setObjectName("dockWidgetContents")
        self.gridLayout = QtWidgets.QGridLayout(self.dockWidgetContents)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(self.dockWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Preferred,
            QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setAcceptDrops(True)
        self.label.setAutoFillBackground(False)
        self.label.setText("")
        self.label.setPixmap(
            QtGui.QPixmap(":/plugins/dzetsaka/img/parcguyane.jpg"))
        self.label.setScaledContents(False)
        self.label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(
            478, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        self.gridLayout.addItem(spacerItem, 1, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_2.setAutoFillBackground(True)
        self.label_2.setWordWrap(True)
        self.label_2.setOpenExternalLinks(True)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
        DockWidget.setWidget(self.dockWidgetContents)

        self.retranslateUi(DockWidget)
        QtCore.QMetaObject.connectSlotsByName(DockWidget) 
Example 11
Project: stytra   Author: portugueslab   File: framerate_viewer.py    License: GNU General Public License v3.0 5 votes vote down vote up
def add_framerate(self, framerate_acc):
        lbl_name = QLabel(framerate_acc.name)
        fr_disp = FramerateWidget(framerate_acc)
        if len(self.fr_widgets) > 0:
            self.layout().addItem(QSpacerItem(40, 10))
        self.layout().addWidget(lbl_name)
        self.fr_widgets.append(fr_disp)
        self.layout().addWidget(fr_disp) 
Example 12
Project: pychemqt   Author: jjgomera   File: UI_mixer.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, equipment=None, entradas=1, parent=None):
        """
        equipment: Initial equipment instance to model
        entradas: Stream Input number to equipment
        """
        super().__init__(Mixer, salida=False, parent=parent)

        # Input tab
        for i in range(entradas):
            entrada = UI_corriente.Ui_corriente()
            entrada.Changed.connect(partial(self.cambiarEntrada, i))
            self.Entrada.addTab(entrada, str(i+1))

        # Calculate tab
        lyt_Calc = QtWidgets.QGridLayout(self.tabCalculo)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Output Pressure Method")), 1, 1)
        self.criterio = QtWidgets.QComboBox()
        for txt in self.Equipment.TEXT_METODO:
            self.criterio.addItem(txt)
        self.criterio.currentIndexChanged.connect(self.criterio_Changed)
        lyt_Calc.addWidget(self.criterio, 1, 2)

        lyt_Calc.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed),
            2, 1, 1, 3)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Output Pressure")), 3, 1)
        self.Pout = Entrada_con_unidades(Pressure)
        self.Pout.valueChanged.connect(partial(self.changeParams, "Pout"))
        lyt_Calc.addWidget(self.Pout, 3, 2)
        lyt_Calc.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding), 4, 1, 1, 3)

        self.criterio_Changed(0)

        if equipment:
            self.setEquipment(equipment)
        else:
            self.Equipment = Mixer(entradas=entradas) 
Example 13
Project: pychemqt   Author: jjgomera   File: UI_reactor.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, parent=None):
        super(widgetReacciones, self).__init__(parent)
        self.indices, self.nombres, M=getComponents()
        gridLayout = QtWidgets.QGridLayout(self)

        self.TablaReacciones=Tabla(5, horizontalHeader=[QtWidgets.QApplication.translate("pychemqt", "Reaction"), "ΔHr, %s" %unidades.MolarEnthalpy(None).text(), QtWidgets.QApplication.translate("pychemqt", "Type"), QtWidgets.QApplication.translate("pychemqt", "Phase"), QtWidgets.QApplication.translate("pychemqt", "Description")], dinamica=False, verticalHeader=True, orientacion=QtCore.Qt.AlignLeft)
        self.TablaReacciones.setMinimumWidth(500)
        self.TablaReacciones.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.TablaReacciones.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
        self.TablaReacciones.horizontalHeader().setStretchLastSection(True)
        self.TablaReacciones.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.TablaReacciones.itemSelectionChanged.connect(self.actualizarBotones)
        gridLayout.addWidget(self.TablaReacciones,1,1,6,4)

        self.botonAbrir=QtWidgets.QPushButton(QtGui.QIcon(QtGui.QPixmap(os.environ["pychemqt"]+"/images/button/fileOpen.png")), QtWidgets.QApplication.translate("pychemqt", "Open"))
        self.botonAbrir.clicked.connect(self.botonAbrirClicked)
        gridLayout.addWidget(self.botonAbrir,1,5)
        self.botonGuardar=QtWidgets.QPushButton(QtGui.QIcon(QtGui.QPixmap(os.environ["pychemqt"]+"/images/button/fileSave.png")), QtWidgets.QApplication.translate("pychemqt", "Save"))
        self.botonGuardar.clicked.connect(self.botonGuardarClicked)
        self.botonGuardar.setSizePolicy(QtWidgets.QSizePolicy.Fixed,QtWidgets.QSizePolicy.Fixed)
        self.botonGuardar.setEnabled(False)
        gridLayout.addWidget(self.botonGuardar,2,5)

        self.botonNew=QtWidgets.QPushButton(QtGui.QIcon(QtGui.QPixmap(os.environ["pychemqt"]+"/images/button/fileNew.png")), QtWidgets.QApplication.translate("pychemqt", "New"))
        self.botonNew.clicked.connect(self.botonNewClicked)
        gridLayout.addWidget(self.botonNew,3,5)
        self.botonEdit=QtWidgets.QPushButton(QtGui.QIcon(QtGui.QPixmap(os.environ["pychemqt"]+"/images/button/editor.png")), QtWidgets.QApplication.translate("pychemqt", "Edit"))
        self.botonEdit.setEnabled(False)
        self.botonEdit.setCheckable(True)
        self.botonEdit.clicked.connect(self.botonEditClicked)
        gridLayout.addWidget(self.botonEdit,4,5)
        self.botonDelete=QtWidgets.QPushButton(QtGui.QIcon(QtGui.QPixmap(os.environ["pychemqt"]+"/images/button/editDelete.png")), QtWidgets.QApplication.translate("pychemqt", "Delete"))
        self.botonDelete.setEnabled(False)
        self.botonDelete.clicked.connect(self.botonDeleteClicked)
        gridLayout.addWidget(self.botonDelete,5,5)
        self.botonClear=QtWidgets.QPushButton(QtGui.QIcon(QtGui.QPixmap(os.environ["pychemqt"]+"/images/button/clear.png")), QtWidgets.QApplication.translate("pychemqt", "Clear"))
        self.botonClear.clicked.connect(self.botonClearClicked)
        gridLayout.addWidget(self.botonClear,6,5)
        gridLayout.addItem(QtWidgets.QSpacerItem(10,10,QtWidgets.QSizePolicy.Expanding,QtWidgets.QSizePolicy.Expanding),10,1) 
Example 14
Project: pychemqt   Author: jjgomera   File: prefMoody.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, config=None, parent=None):
        super(Widget, self).__init__(parent)
        layout = QtWidgets.QGridLayout(self)
        layout.addWidget(QtWidgets.QLabel(
            QtWidgets.QApplication.translate("pychemqt", "Method:")), 1, 1)
        self.metodos = QtWidgets.QComboBox()
        for f in f_list:
            line = f.__doc__.split("\n")[0]
            year = line.split(" ")[-1]
            name = line.split(" ")[-3]
            doc = name + " " + year
            self.metodos.addItem(doc)
        layout.addWidget(self.metodos, 1, 2)
        self.fanning = QtWidgets.QCheckBox(QtWidgets.QApplication.translate(
            "pychemqt", "Calculate fanning friction factor"))
        layout.addWidget(self.fanning, 2, 1, 1, 2)

        layout.addWidget(QtWidgets.QLabel("ε/d:"), 3, 1)
        self.ed = QtWidgets.QLineEdit()
        layout.addWidget(self.ed, 3, 2)
        self.lineconfig = LineConfig(
            "line", QtWidgets.QApplication.translate(
                "pychemqt", "Relative roughtness style line"))
        layout.addWidget(self.lineconfig, 4, 1, 1, 2)
        self.cruxconfig = LineConfig(
            "crux", QtWidgets.QApplication.translate(
                "pychemqt", "Crux style line"))
        layout.addWidget(self.cruxconfig, 5, 1, 1, 2)

        layout.addItem(QtWidgets.QSpacerItem(
            10, 0, QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding), 10, 1, 1, 3)

        if config and config.has_section("Moody"):
            self.metodos.setCurrentIndex(config.getint("Moody", 'method'))
            self.fanning.setChecked(config.getboolean("Moody", 'fanning'))
            self.ed.setText(config.get("Moody", "ed"))
            self.lineconfig.setConfig(config, "Moody")
            self.cruxconfig.setConfig(config, "Moody") 
Example 15
Project: pychemqt   Author: jjgomera   File: widgets.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, color="#ffffff", alpha=255, isAlpha=False, parent=None):
        super(ColorSelector, self).__init__(parent)

        lyt = QtWidgets.QHBoxLayout(self)
        lyt.setContentsMargins(0, 0, 0, 0)
        lyt.setSpacing(0)

        self.RGB = QtWidgets.QLineEdit()
        self.RGB.editingFinished.connect(self.rgbChanged)
        self.RGB.setFixedSize(80, 24)
        lyt.addWidget(self.RGB)
        self.button = QtWidgets.QToolButton()
        self.button.setFixedSize(24, 24)
        self.button.clicked.connect(self.ColorButtonClicked)
        lyt.addWidget(self.button)
        lyt.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Fixed))

        if isAlpha:
            self.isAlpha = QtGui.QColor.HexArgb
        else:
            self.isAlpha = QtGui.QColor.HexRgb

        r = int(color[1:3], 16)
        g = int(color[3:5], 16)
        b = int(color[5:7], 16)
        color = QtGui.QColor(r, g, b, alpha)
        self.setColor(color) 
Example 16
Project: pychemqt   Author: jjgomera   File: prefElemental.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, config=None, parent=None):
        super(Widget, self).__init__(parent)
        layout = QtWidgets.QGridLayout(self)

        layout.addWidget(QtWidgets.QLabel(
            QtWidgets.QApplication.translate("pychemqt", "Color by element:")),
            1, 1)
        colorby = ["Element", "serie", "group_element", "period", "block", "phase",
                   "lattice_type", "space_group", "density_Solid",
                   "density_Liq", "density_Gas", "date", "atomic_mass",
                   "atomic_volume", "atomic_radius", "covalent_radius",
                   "vanderWaals_radius", "electronegativity",
                   "electron_affinity", "first_ionization", "Tf", "Tb",
                   "Heat_f", "Heat_b", "Cp", "k", "T_debye"]
        self.ElementalColorby = QtWidgets.QComboBox()
        for c in colorby:
            self.ElementalColorby.addItem(c)
        layout.addWidget(self.ElementalColorby, 1, 2)
        layout.addWidget(QtWidgets.QLabel(
            QtWidgets.QApplication.translate("pychemqt", "Color definition")),
            2, 1)
        self.ElementalDefinition = QtWidgets.QSpinBox()
        self.ElementalDefinition.setMaximumWidth(50)
        self.ElementalDefinition.setMinimum(5)
        layout.addWidget(self.ElementalDefinition, 2, 2)
        self.ElementalLog = QtWidgets.QCheckBox(
            QtWidgets.QApplication.translate("pychemqt", "Logarithmic scale"))
        layout.addWidget(self.ElementalLog, 3, 1, 1, 2)
        layout.addItem(QtWidgets.QSpacerItem(
            0, 0, QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding), 4, 3)

        if config.has_section("Applications"):
            self.ElementalColorby.setCurrentText(
                config.get("Applications", 'elementalColorby'))
            self.ElementalDefinition.setValue(
                config.getint("Applications", 'elementalDefinition'))
            self.ElementalLog.setChecked(
                config.getboolean("Applications", 'elementalLog')) 
Example 17
Project: pychemqt   Author: jjgomera   File: costIndex.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, equipment, parent=None):
        """constructor
        equipment: equipment class where the widget have to be put, define
        indiceCostos as a index in costIndex"""
        super(CostData, self).__init__(parent)
        self.indice = equipment.indiceCostos
        factor = equipment.kwargs["f_install"]
        gridLayout = QtWidgets.QGridLayout(self)
        gridLayout.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding), 1, 0, 1, 7)
        gridLayout.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Instalation factor:")), 2, 0, 1, 1)
        self.factorInstalacion = Entrada_con_unidades(
            float, spinbox=True, decimales=1, step=0.1, width=50, value=factor)
        self.factorInstalacion.valueChanged.connect(partial(
            self.valueChanged.emit, "f_install"))
        gridLayout.addWidget(self.factorInstalacion, 2, 1, 1, 1)
        gridLayout.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Base index:")), 2, 4, 1, 1)
        self.indiceBase = Entrada_con_unidades(
            float, readOnly=True, value=indiceBase[self.indice], decimales=1)
        gridLayout.addWidget(self.indiceBase, 2, 5, 1, 1)
        gridLayout.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Current index:")), 3, 4, 1, 1)
        self.indiceActual = Entrada_con_unidades(
            float, readOnly=True, colorReadOnly="white",
            value=indiceActual[self.indice], decimales=1)
        gridLayout.addWidget(self.indiceActual, 3, 5, 1, 1)
        self.costIndex = QtWidgets.QToolButton()
        self.costIndex.setFixedSize(QtCore.QSize(24, 24))
        self.costIndex.clicked.connect(self.on_costIndex_clicked)
        self.costIndex.setText("...")
        self.costIndex.setVisible(False)
        gridLayout.addWidget(self.costIndex, 3, 5, 1, 1)
        gridLayout.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding), 4, 0, 1, 7) 
Example 18
Project: pychemqt   Author: jjgomera   File: heatTransfer.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, parent=None):
        super(Chart, self).__init__(parent)
        self.setWindowTitle(self.title)
        layout = QtWidgets.QGridLayout(self)
        layout.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Flow Arrangement")), 1, 1)
        self.flow = QtWidgets.QComboBox()
        for text, flow in self.flujo:
            self.flow.addItem(text)
        self.flow.currentIndexChanged.connect(self.plot)
        layout.addWidget(self.flow, 1, 2)
        self.mixed = QtWidgets.QComboBox()
        for text in self.mezclado:
            self.mixed.addItem(text)
        self.mixed.currentIndexChanged.connect(self.changeMixed)
        layout.addWidget(self.mixed, 1, 3)
        layout.addItem(QtWidgets.QSpacerItem(
            10, 10, QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Fixed), 1, 4)

        self.diagrama = mpl(self, width=10, height=10)
        self.image = self.diagrama.fig.figimage([[0]], 0, 0, zorder=1)
        logo = image.imread('images/pychemqt_98.png')
        self.logo = self.diagrama.fig.figimage(logo, 0, 0, zorder=1)

        self.botonGuardar = QtWidgets.QToolButton()
        icon = os.environ["pychemqt"]+"/images/button/fileSave.png"
        self.botonGuardar.setIcon(QtGui.QIcon(QtGui.QPixmap(icon)))
        self.botonGuardar.setToolTip(
            QtWidgets.QApplication.translate("pychemqt", "Save chart to file"))
        self.botonGuardar.clicked.connect(self.save)
        layout.addWidget(self.botonGuardar, 5, 1)
        layout.addWidget(self.diagrama, 2, 1, 1, 6)
        self.buttonBox = QtWidgets.QDialogButtonBox(
            QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.rejected.connect(self.reject)
        layout.addWidget(self.buttonBox, 5, 2, 1, 5)

        self.plot(0)
        self.showMaximized()
        self.refixImage() 
Example 19
Project: universal_tool_template.py   Author: shiningdesign   File: UITranslator.py    License: MIT License 5 votes vote down vote up
def qui(self, ui_list_string, parentObject_string='', opt=''):
        # pre-defined user short name syntax
        type_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox',
            'txtEdit': 'LNTextEdit', 'txt': 'QTextEdit',
            'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem', 
        }
        # get ui_list, creation or existing ui object
        ui_list = [x.strip() for x in ui_list_string.split('|')]
        for i in range(len(ui_list)):
            if ui_list[i] in self.uiList:
                # - exisiting object
                ui_list[i] = self.uiList[ui_list[i]]
            else:
                # - string creation: 
                # get part info
                partInfo = ui_list[i].split(';',1)
                uiName = partInfo[0].split('@')[0]
                uiType = uiName.rsplit('_',1)[-1]
                if uiType in type_dict:
                    uiType = type_dict[uiType]
                # set quickUI string format
                ui_list[i] = partInfo[0]+';'+uiType
                if len(partInfo)==1:
                    # give empty button and label a place holder name
                    if uiType in ('btn', 'btnMsg', 'QPushButton','label', 'QLabel'):
                        ui_list[i] = partInfo[0]+';'+uiType + ';'+uiName 
                elif len(partInfo)==2:
                    ui_list[i]=ui_list[i]+";"+partInfo[1]
        # get parentObject or exisiting object
        parentObject = parentObject_string
        if parentObject in self.uiList:
            parentObject = self.uiList[parentObject]
        # process quickUI
        self.quickUI(ui_list, parentObject, opt) 
Example 20
Project: universal_tool_template.py   Author: shiningdesign   File: universal_tool_template_0903.py    License: MIT License 5 votes vote down vote up
def qui(self, ui_list_string, parentObject_string='', opt=''):
        # pre-defined user short name syntax
        type_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox',
            'txt': 'QTextEdit',
            'list': 'QListWidget', 'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem', 
        }
        # get ui_list, creation or existing ui object
        ui_list = [x.strip() for x in ui_list_string.split('|')]
        for i in range(len(ui_list)):
            if ui_list[i] in self.uiList:
                # - exisiting object
                ui_list[i] = self.uiList[ui_list[i]]
            else:
                # - string creation: 
                # get part info
                partInfo = ui_list[i].split(';',1)
                uiName = partInfo[0].split('@')[0]
                uiType = uiName.rsplit('_',1)[-1]
                if uiType in type_dict:
                    uiType = type_dict[uiType]
                # set quickUI string format
                ui_list[i] = partInfo[0]+';'+uiType
                if len(partInfo)==1:
                    # give empty button and label a place holder name
                    if uiType in ('btn', 'btnMsg', 'QPushButton','label', 'QLabel'):
                        ui_list[i] = partInfo[0]+';'+uiType + ';'+uiName 
                elif len(partInfo)==2:
                    ui_list[i]=ui_list[i]+";"+partInfo[1]
        # get parentObject or exisiting object
        parentObject = parentObject_string
        if parentObject in self.uiList:
            parentObject = self.uiList[parentObject]
        # process quickUI
        self.quickUI(ui_list, parentObject, opt) 
Example 21
Project: universal_tool_template.py   Author: shiningdesign   File: universal_tool_template_0803.py    License: MIT License 5 votes vote down vote up
def qui(self, ui_list_string, parentObject_string='', opt=''):
        # pre-defined user short name syntax
        type_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox',
            'txt': 'QTextEdit',
            'list': 'QListWidget', 'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem', 
        }
        # get ui_list, creation or existing ui object
        ui_list = [x.strip() for x in ui_list_string.split('|')]
        for i in range(len(ui_list)):
            if ui_list[i] in self.uiList:
                # - exisiting object
                ui_list[i] = self.uiList[ui_list[i]]
            else:
                # - string creation: 
                # get part info
                partInfo = ui_list[i].split(';',1)
                uiName = partInfo[0].split('@')[0]
                uiType = uiName.rsplit('_',1)[-1]
                if uiType in type_dict:
                    uiType = type_dict[uiType]
                # set quickUI string format
                ui_list[i] = partInfo[0]+';'+uiType
                if len(partInfo)==1:
                    # give empty button and label a place holder name
                    if uiType in ('btn', 'btnMsg', 'QPushButton','label', 'QLabel'):
                        ui_list[i] = partInfo[0]+';'+uiType + ';'+uiName 
                elif len(partInfo)==2:
                    ui_list[i]=ui_list[i]+";"+partInfo[1]
        # get parentObject or exisiting object
        parentObject = parentObject_string
        if parentObject in self.uiList:
            parentObject = self.uiList[parentObject]
        # process quickUI
        self.quickUI(ui_list, parentObject, opt) 
Example 22
Project: universal_tool_template.py   Author: shiningdesign   File: universal_tool_template_v8.1.py    License: MIT License 5 votes vote down vote up
def qui(self, ui_list_string, parentObject_string='', opt=''):
        # pre-defined user short name syntax
        type_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox',
            'txtEdit': 'LNTextEdit', 'txt': 'QTextEdit',
            'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem', 
        }
        # get ui_list, creation or existing ui object
        ui_list = [x.strip() for x in ui_list_string.split('|')]
        for i in range(len(ui_list)):
            if ui_list[i] in self.uiList:
                # - exisiting object
                ui_list[i] = self.uiList[ui_list[i]]
            else:
                # - string creation: 
                # get part info
                partInfo = ui_list[i].split(';',1)
                uiName = partInfo[0].split('@')[0]
                uiType = uiName.rsplit('_',1)[-1]
                if uiType in type_dict:
                    uiType = type_dict[uiType]
                # set quickUI string format
                ui_list[i] = partInfo[0]+';'+uiType
                if len(partInfo)==1:
                    # give empty button and label a place holder name
                    if uiType in ('btn', 'btnMsg', 'QPushButton','label', 'QLabel'):
                        ui_list[i] = partInfo[0]+';'+uiType + ';'+uiName 
                elif len(partInfo)==2:
                    ui_list[i]=ui_list[i]+";"+partInfo[1]
        # get parentObject or exisiting object
        parentObject = parentObject_string
        if parentObject in self.uiList:
            parentObject = self.uiList[parentObject]
        # process quickUI
        self.quickUI(ui_list, parentObject, opt) 
Example 23
Project: superboucle   Author: Vampouille   File: device_manager_ui.py    License: GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(320, 229)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.list = QtWidgets.QListWidget(Dialog)
        self.list.setObjectName("list")
        self.gridLayout.addWidget(self.list, 0, 0, 1, 1)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.editButton = QtWidgets.QPushButton(Dialog)
        self.editButton.setObjectName("editButton")
        self.verticalLayout.addWidget(self.editButton)
        self.deleteButton = QtWidgets.QPushButton(Dialog)
        self.deleteButton.setObjectName("deleteButton")
        self.verticalLayout.addWidget(self.deleteButton)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.importButton = QtWidgets.QPushButton(Dialog)
        self.importButton.setObjectName("importButton")
        self.verticalLayout.addWidget(self.importButton)
        self.exportButton = QtWidgets.QPushButton(Dialog)
        self.exportButton.setObjectName("exportButton")
        self.verticalLayout.addWidget(self.exportButton)
        self.gridLayout.addLayout(self.verticalLayout, 0, 1, 1, 1)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
Example 24
Project: superboucle   Author: Vampouille   File: scene_manager_ui.py    License: GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(320, 333)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.scenelistList = QtWidgets.QListWidget(Dialog)
        self.scenelistList.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.scenelistList.setSizeIncrement(QtCore.QSize(100, 100))
        self.scenelistList.setMovement(QtWidgets.QListView.Static)
        self.scenelistList.setResizeMode(QtWidgets.QListView.Adjust)
        self.scenelistList.setObjectName("scenelistList")
        self.horizontalLayout.addWidget(self.scenelistList)
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.loadScenesBtn = QtWidgets.QPushButton(Dialog)
        self.loadScenesBtn.setObjectName("loadScenesBtn")
        self.verticalLayout_3.addWidget(self.loadScenesBtn)
        self.addScenesBtn = QtWidgets.QPushButton(Dialog)
        self.addScenesBtn.setObjectName("addScenesBtn")
        self.verticalLayout_3.addWidget(self.addScenesBtn)
        self.removeScenesBtn = QtWidgets.QPushButton(Dialog)
        self.removeScenesBtn.setObjectName("removeScenesBtn")
        self.verticalLayout_3.addWidget(self.removeScenesBtn)
        self.preview = QtWidgets.QGridLayout()
        self.preview.setSpacing(2)
        self.preview.setObjectName("preview")
        self.verticalLayout_3.addLayout(self.preview)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_3.addItem(spacerItem)
        self.setInitialSceneBtn = QtWidgets.QPushButton(Dialog)
        self.setInitialSceneBtn.setObjectName("setInitialSceneBtn")
        self.verticalLayout_3.addWidget(self.setInitialSceneBtn)
        self.horizontalLayout.addLayout(self.verticalLayout_3)
        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
Example 25
Project: superboucle   Author: Vampouille   File: port_manager_ui.py    License: GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(320, 295)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.portList = QtWidgets.QListWidget(Dialog)
        self.portList.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.portList.setSizeIncrement(QtCore.QSize(100, 100))
        self.portList.setMovement(QtWidgets.QListView.Static)
        self.portList.setResizeMode(QtWidgets.QListView.Adjust)
        self.portList.setObjectName("portList")
        self.horizontalLayout.addWidget(self.portList)
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.addPortBtn = QtWidgets.QPushButton(Dialog)
        self.addPortBtn.setObjectName("addPortBtn")
        self.verticalLayout_3.addWidget(self.addPortBtn)
        self.removePortBtn = QtWidgets.QPushButton(Dialog)
        self.removePortBtn.setObjectName("removePortBtn")
        self.verticalLayout_3.addWidget(self.removePortBtn)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_3.addItem(spacerItem)
        self.loadPortlistBtn = QtWidgets.QPushButton(Dialog)
        self.loadPortlistBtn.setObjectName("loadPortlistBtn")
        self.verticalLayout_3.addWidget(self.loadPortlistBtn)
        self.savePortlistBtn = QtWidgets.QPushButton(Dialog)
        self.savePortlistBtn.setObjectName("savePortlistBtn")
        self.verticalLayout_3.addWidget(self.savePortlistBtn)
        self.horizontalLayout.addLayout(self.verticalLayout_3)
        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
        self.autoconnectCBox = QtWidgets.QCheckBox(Dialog)
        self.autoconnectCBox.setObjectName("autoconnectCBox")
        self.gridLayout.addWidget(self.autoconnectCBox, 1, 0, 1, 1)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
Example 26
Project: superboucle   Author: Vampouille   File: playlist_ui.py    License: GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(320, 333)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.playlistList = QtWidgets.QListWidget(Dialog)
        self.playlistList.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.playlistList.setSizeIncrement(QtCore.QSize(100, 100))
        self.playlistList.setMovement(QtWidgets.QListView.Static)
        self.playlistList.setResizeMode(QtWidgets.QListView.Adjust)
        self.playlistList.setObjectName("playlistList")
        self.horizontalLayout.addWidget(self.playlistList)
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.loadSongBtn = QtWidgets.QPushButton(Dialog)
        self.loadSongBtn.setObjectName("loadSongBtn")
        self.verticalLayout_3.addWidget(self.loadSongBtn)
        self.addSongsBtn = QtWidgets.QPushButton(Dialog)
        self.addSongsBtn.setObjectName("addSongsBtn")
        self.verticalLayout_3.addWidget(self.addSongsBtn)
        self.removeSongBtn = QtWidgets.QPushButton(Dialog)
        self.removeSongBtn.setObjectName("removeSongBtn")
        self.verticalLayout_3.addWidget(self.removeSongBtn)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_3.addItem(spacerItem)
        self.loadPlaylistBtn = QtWidgets.QPushButton(Dialog)
        self.loadPlaylistBtn.setObjectName("loadPlaylistBtn")
        self.verticalLayout_3.addWidget(self.loadPlaylistBtn)
        self.savePlaylistBtn = QtWidgets.QPushButton(Dialog)
        self.savePlaylistBtn.setObjectName("savePlaylistBtn")
        self.verticalLayout_3.addWidget(self.savePlaylistBtn)
        self.horizontalLayout.addLayout(self.verticalLayout_3)
        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
Example 27
Project: PhyloSuite   Author: dongzhang0725   File: Ui_popUp.py    License: GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, pop):
        pop.setObjectName("pop")
        pop.resize(442, 379)
        self.gridLayout = QtWidgets.QGridLayout(pop)
        self.gridLayout.setObjectName("gridLayout")
        self.textEdit = QtWidgets.QTextEdit(pop)
        self.textEdit.setObjectName("textEdit")
        self.gridLayout.addWidget(self.textEdit, 1, 0, 1, 2)
        self.pushButton = QtWidgets.QPushButton(pop)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/picture/resourses/btn_ok.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton.setIcon(icon)
        self.pushButton.setObjectName("pushButton")
        self.gridLayout.addWidget(self.pushButton, 2, 0, 1, 1)
        self.pushButton_2 = QtWidgets.QPushButton(pop)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/picture/resourses/if_Delete_1493279.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton_2.setIcon(icon1)
        self.pushButton_2.setObjectName("pushButton_2")
        self.gridLayout.addWidget(self.pushButton_2, 2, 1, 1, 1)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label = QtWidgets.QLabel(pop)
        self.label.setObjectName("label")
        self.horizontalLayout_2.addWidget(self.label)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem)
        self.toolButton = QtWidgets.QToolButton(pop)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/picture/resourses/interface-controls-text-wrap-512.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButton.setIcon(icon2)
        self.toolButton.setCheckable(True)
        self.toolButton.setObjectName("toolButton")
        self.horizontalLayout_2.addWidget(self.toolButton)
        self.gridLayout.addLayout(self.horizontalLayout_2, 0, 0, 1, 2)

        self.retranslateUi(pop)
        QtCore.QMetaObject.connectSlotsByName(pop) 
Example 28
Project: PhyloSuite   Author: dongzhang0725   File: Ui_untitled.py    License: GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(363, 193)
        self.widget = QtWidgets.QWidget(Form)
        self.widget.setGeometry(QtCore.QRect(40, 90, 71, 24))
        self.widget.setObjectName("widget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setSpacing(0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.toolButton = QtWidgets.QToolButton(self.widget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolButton.sizePolicy().hasHeightForWidth())
        self.toolButton.setSizePolicy(sizePolicy)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/picture/resourses/1485528481_arrow-down-01.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButton.setIcon(icon)
        self.toolButton.setObjectName("toolButton")
        self.horizontalLayout.addWidget(self.toolButton)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
Example 29
Project: liquid-swap   Author: Blockstream   File: dialogpaste.py    License: GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, PasteDialog):
        PasteDialog.setObjectName("PasteDialog")
        PasteDialog.resize(400, 300)
        self.gridLayout = QtWidgets.QGridLayout(PasteDialog)
        self.gridLayout.setObjectName("gridLayout")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.textBrowser = QtWidgets.QTextBrowser(PasteDialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.textBrowser.sizePolicy().hasHeightForWidth())
        self.textBrowser.setSizePolicy(sizePolicy)
        self.textBrowser.setAcceptRichText(False)
        self.textBrowser.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByKeyboard|QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextBrowserInteraction|QtCore.Qt.TextEditable|QtCore.Qt.TextEditorInteraction|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
        self.textBrowser.setOpenLinks(False)
        self.textBrowser.setObjectName("textBrowser")
        self.verticalLayout.addWidget(self.textBrowser)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.buttonImport = QtWidgets.QPushButton(PasteDialog)
        self.buttonImport.setObjectName("buttonImport")
        self.horizontalLayout.addWidget(self.buttonImport)
        self.buttonCancel = QtWidgets.QPushButton(PasteDialog)
        self.buttonCancel.setObjectName("buttonCancel")
        self.horizontalLayout.addWidget(self.buttonCancel)
        self.buttonOk = QtWidgets.QPushButton(PasteDialog)
        self.buttonOk.setObjectName("buttonOk")
        self.horizontalLayout.addWidget(self.buttonOk)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)

        self.retranslateUi(PasteDialog)
        QtCore.QMetaObject.connectSlotsByName(PasteDialog) 
Example 30
Project: liquid-swap   Author: Blockstream   File: dialogcopy.py    License: GNU General Public License v3.0 5 votes vote down vote up
def setupUi(self, CopyDialog):
        CopyDialog.setObjectName("CopyDialog")
        CopyDialog.resize(400, 300)
        self.gridLayout = QtWidgets.QGridLayout(CopyDialog)
        self.gridLayout.setObjectName("gridLayout")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.textBrowser = QtWidgets.QTextBrowser(CopyDialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.textBrowser.sizePolicy().hasHeightForWidth())
        self.textBrowser.setSizePolicy(sizePolicy)
        self.textBrowser.setAcceptRichText(False)
        self.textBrowser.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByKeyboard|QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextBrowserInteraction|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
        self.textBrowser.setOpenLinks(False)
        self.textBrowser.setObjectName("textBrowser")
        self.verticalLayout.addWidget(self.textBrowser)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.buttonExport = QtWidgets.QPushButton(CopyDialog)
        self.buttonExport.setObjectName("buttonExport")
        self.horizontalLayout.addWidget(self.buttonExport)
        self.buttonCopy = QtWidgets.QPushButton(CopyDialog)
        self.buttonCopy.setObjectName("buttonCopy")
        self.horizontalLayout.addWidget(self.buttonCopy)
        self.buttonCancel = QtWidgets.QPushButton(CopyDialog)
        self.buttonCancel.setObjectName("buttonCancel")
        self.horizontalLayout.addWidget(self.buttonCancel)
        self.buttonOk = QtWidgets.QPushButton(CopyDialog)
        self.buttonOk.setObjectName("buttonOk")
        self.horizontalLayout.addWidget(self.buttonOk)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.gridLayout.addLayout(self.verticalLayout, 0, 0, 1, 1)

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