Exemplo n.º 1
0
def parsePaletteData(romData, palAddr):
    """ パレットデータの読み取り

        入力:ROMデータ,パレットのアドレス
        処理:ROMデータからのパレット読み込み、RGBAカラー化
        出力:QImage用のカラーテーブル
    """
    PALETTE_SIZE = 0x20
    COLOR_SIZE = 2

    read_addr = palAddr
    endAddr = read_addr + PALETTE_SIZE

    palData = []
    while read_addr < endAddr:
        color = romData[read_addr:read_addr+COLOR_SIZE]
        logger.debug(hex(int.from_bytes(color, "little")))

        [r, g, b] = gba2rgb(color)
        logger.debug("R:" + str(r) + " G:" + str(g) + " B:" + str(b))

        if len(palData) == 0:
            palData.append(QtGui.qRgba(r, g, b, 0))  # 最初の色は透過色
        else:
            palData.append(QtGui.qRgba(r, g, b, 255))

        read_addr += COLOR_SIZE

    return palData
 def setColorTable(self):
     """
     Sets the color table of the new image. If you don't do this Qt
     will segfault without giving you a traceback or any kind of
     warning message..
     """
     if self.colortable:
         for i in range(256):
             self.q_image.setColor(i, QtGui.qRgb(self.colortable[i][0], 
                                                 self.colortable[i][1], 
                                                 self.colortable[i][2]))
     else:
         for i in range(256):
             self.q_image.setColor(i,QtGui.qRgb(i,i,i))        
Exemplo n.º 3
0
 def __init__(self):         #初始化函化
     super().__init__()
     self.gui=QtGui(self.ui_file)
     self.gui.setup_UI(self,name='mainwindow',text=self.ui_text,apps=self.apps)
     self.init()
     self.widget.move((qApp.desktop().width()-self.widget.width())/2,
             (qApp.desktop().height()-self.widget.height())/2)
     self.widget.show()
Exemplo n.º 4
0
class MainWindow(Window):
    ui_text=None
    ui_file=None
    apps=None                   #子窗口类
    def __init__(self):         #初始化函化
        super().__init__()
        self.gui=QtGui(self.ui_file)
        self.gui.setup_UI(self,name='mainwindow',text=self.ui_text,
                          apps=self.apps)
        self.init()
        self.widget.move((qApp.desktop().width()-self.widget.width())/2,
                (qApp.desktop().height()-self.widget.height())/2)
        self.widget.show()

    @classmethod
    def run(cls):
        QtGui.main(cls)
Exemplo n.º 5
0
    def lut_from_color(color, ncolors):
        """Create a colormap from a single color e.g. red and return
        a list of qRgb instances.
        """

        lut = np.zeros((ncolors, 3), dtype=int)
        for i, col in enumerate((color.red(), color.green(), color.blue())):
            lut[:, i] = np.array(range(ncolors)) / (ncolors - 1.0) * col

        return [QtGui.qRgb(r, g, b) for r, g, b in lut]
Exemplo n.º 6
0
    def lut_from_channel(self, index, ncolors):
        """Create a colormap from a single color e.g. red and return
        a list of qRgb instances.
        """
        color = self.widgetAt(index, 1).currentColor()
        lut = np.zeros((ncolors, 3), dtype=int)
        for i, col in enumerate((color.red(), color.green(), color.blue())):
            lut[: , i] = np.array(range(ncolors)) / (ncolors - 1.0) * col

        lut2 = self.enhanceImage(index, lut)

        return [QtGui.qRgb(r, g, b) for r, g, b in lut2]
Exemplo n.º 7
0
    def wheelEvent(self, event):
        dy = event.angleDelta().y()
        if not event.buttons() & (Qt.LeftButton | Qt.RightButton):
            dy = math.copysign(min(abs(dy), 100), dy)
            self.logicalResources.moveForwardBackward(dy / 200.0)
        elif self.solver is None:
#           Searching currently pointed landscape cell and changing it's height            
            x = int((event.x() / self.width()) * self.openglResources.depthFramebuffer.width())
            y = int((event.y() / self.height()) * self.openglResources.depthFramebuffer.height())
            
            image = self.openglResources.depthFramebuffer.toImage()
            pixel = image.pixel(x, y)
            if QtGui.qAlpha(pixel) != 0:
#               In depthFramebuffer color texture indexes info coded as color                
#               Maybe not so genious and handy, but pretty beautiful ;-)                
                j = int((QtGui.qRed(pixel) / 256) * self.logicalResources.m)
                i = int((QtGui.qGreen(pixel) / 256) * self.logicalResources.n)
                self.logicalResources.changeLandscapeHeight(i, j, int(math.copysign(1, dy)))

                self.m_context.makeCurrent(self)
                self.openglResources.updateMeshesAndHeightsTexture(self.m_gl)

        self.renderLater()
Exemplo n.º 8
0
'''
Created on 2014-4-19

@author: wangweisheng
'''
from PyQt5 import QtGui, QtCore

app = QtGui.QApplication([])

w = QtGui.QWidget()

def showMsg():
    QtGui.QMessageBox.information(w, u"信息", u"ok")

btn = QtGui.QPushButton(u"点我", w)
w.connect(btn, QtCore.SIGNAL("clicked()"), showMsg)

w.show()
app.exec_()
Exemplo n.º 9
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1262, 783)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        MainWindow.setUnifiedTitleAndToolBarOnMac(True)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setMinimumSize(QtCore.QSize(1200, 730))
        self.centralwidget.setObjectName("centralwidget")
        self.groupBox_7 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_7.setGeometry(QtCore.QRect(590, 299, 671, 411))
        self.groupBox_7.setObjectName("groupBox_7")
        self.queryGroupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.queryGroupBox.setGeometry(QtCore.QRect(590, 30, 224, 231))
        self.queryGroupBox.setStyleSheet("")
        self.queryGroupBox.setObjectName("queryGroupBox")
        self.scrollArea = QtWidgets.QScrollArea(self.queryGroupBox)
        self.scrollArea.setGeometry(QtCore.QRect(0, 20, 221, 211))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.scrollArea.sizePolicy().hasHeightForWidth())
        self.scrollArea.setSizePolicy(sizePolicy)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 219, 209))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.queryImageLabel = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.queryImageLabel.setGeometry(QtCore.QRect(0, 0, 224, 224))
        self.queryImageLabel.setText("")
        self.queryImageLabel.setObjectName("queryImageLabel")
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.stage1_groupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.stage1_groupBox.setEnabled(True)
        self.stage1_groupBox.setGeometry(QtCore.QRect(30, 30, 161, 411))
        self.stage1_groupBox.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        self.stage1_groupBox.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"\n"
"")
        self.stage1_groupBox.setObjectName("stage1_groupBox")
        self.imageSizeGroupBox_s1 = QtWidgets.QGroupBox(self.stage1_groupBox)
        self.imageSizeGroupBox_s1.setGeometry(QtCore.QRect(10, 30, 141, 101))
        self.imageSizeGroupBox_s1.setMaximumSize(QtCore.QSize(160, 16777215))
        self.imageSizeGroupBox_s1.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"")
        self.imageSizeGroupBox_s1.setObjectName("imageSizeGroupBox_s1")
        self.imageWidthLineEdit_s1 = QtWidgets.QLineEdit(self.imageSizeGroupBox_s1)
        self.imageWidthLineEdit_s1.setGeometry(QtCore.QRect(60, 30, 41, 27))
        self.imageWidthLineEdit_s1.setAutoFillBackground(False)
        self.imageWidthLineEdit_s1.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.imageWidthLineEdit_s1.setReadOnly(False)
        self.imageWidthLineEdit_s1.setPlaceholderText("")
        self.imageWidthLineEdit_s1.setObjectName("imageWidthLineEdit_s1")
        self.imageHeightLineEdit_s1 = QtWidgets.QLineEdit(self.imageSizeGroupBox_s1)
        self.imageHeightLineEdit_s1.setGeometry(QtCore.QRect(60, 65, 41, 27))
        self.imageHeightLineEdit_s1.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.imageHeightLineEdit_s1.setReadOnly(False)
        self.imageHeightLineEdit_s1.setObjectName("imageHeightLineEdit_s1")
        self.label = QtWidgets.QLabel(self.imageSizeGroupBox_s1)
        self.label.setGeometry(QtCore.QRect(10, 30, 80, 30))
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self.imageSizeGroupBox_s1)
        self.label_2.setGeometry(QtCore.QRect(7, 70, 66, 16))
        self.label_2.setObjectName("label_2")
        self.label_3 = QtWidgets.QLabel(self.imageSizeGroupBox_s1)
        self.label_3.setGeometry(QtCore.QRect(110, 30, 21, 30))
        self.label_3.setObjectName("label_3")
        self.label_4 = QtWidgets.QLabel(self.imageSizeGroupBox_s1)
        self.label_4.setGeometry(QtCore.QRect(110, 70, 30, 20))
        self.label_4.setObjectName("label_4")
        self.groupBox_2 = QtWidgets.QGroupBox(self.stage1_groupBox)
        self.groupBox_2.setGeometry(QtCore.QRect(10, 140, 141, 151))
        self.groupBox_2.setMaximumSize(QtCore.QSize(160, 16777215))
        self.groupBox_2.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"")
        self.groupBox_2.setObjectName("groupBox_2")
        self.vggRadioButton = QtWidgets.QRadioButton(self.groupBox_2)
        self.vggRadioButton.setGeometry(QtCore.QRect(20, 30, 115, 22))
        self.vggRadioButton.setObjectName("vggRadioButton")
        self.netvladRadioButton = QtWidgets.QRadioButton(self.groupBox_2)
        self.netvladRadioButton.setGeometry(QtCore.QRect(20, 122, 115, 20))
        self.netvladRadioButton.setObjectName("netvladRadioButton")
        self.resnetRadioButton = QtWidgets.QRadioButton(self.groupBox_2)
        self.resnetRadioButton.setGeometry(QtCore.QRect(20, 60, 115, 22))
        self.resnetRadioButton.setObjectName("resnetRadioButton")
        self.googlenetRadioButton = QtWidgets.QRadioButton(self.groupBox_2)
        self.googlenetRadioButton.setGeometry(QtCore.QRect(20, 90, 115, 22))
        self.googlenetRadioButton.setObjectName("googlenetRadioButton")
        self.groupBox_8 = QtWidgets.QGroupBox(self.stage1_groupBox)
        self.groupBox_8.setGeometry(QtCore.QRect(10, 300, 141, 100))
        self.groupBox_8.setMaximumSize(QtCore.QSize(160, 16777215))
        self.groupBox_8.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"")
        self.groupBox_8.setObjectName("groupBox_8")
        self.pcaDimLineEdit_s1 = QtWidgets.QLineEdit(self.groupBox_8)
        self.pcaDimLineEdit_s1.setGeometry(QtCore.QRect(80, 20, 51, 27))
        self.pcaDimLineEdit_s1.setAutoFillBackground(False)
        self.pcaDimLineEdit_s1.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.pcaDimLineEdit_s1.setReadOnly(False)
        self.pcaDimLineEdit_s1.setPlaceholderText("")
        self.pcaDimLineEdit_s1.setObjectName("pcaDimLineEdit_s1")
        self.label_21 = QtWidgets.QLabel(self.groupBox_8)
        self.label_21.setGeometry(QtCore.QRect(10, 20, 80, 30))
        self.label_21.setObjectName("label_21")
        self.label_22 = QtWidgets.QLabel(self.groupBox_8)
        self.label_22.setGeometry(QtCore.QRect(10, 50, 80, 30))
        self.label_22.setObjectName("label_22")
        self.pcaSamplesLineEdit_s1 = QtWidgets.QLineEdit(self.groupBox_8)
        self.pcaSamplesLineEdit_s1.setGeometry(QtCore.QRect(80, 50, 51, 27))
        self.pcaSamplesLineEdit_s1.setAutoFillBackground(False)
        self.pcaSamplesLineEdit_s1.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.pcaSamplesLineEdit_s1.setReadOnly(False)
        self.pcaSamplesLineEdit_s1.setPlaceholderText("")
        self.pcaSamplesLineEdit_s1.setObjectName("pcaSamplesLineEdit_s1")
        self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_3.setGeometry(QtCore.QRect(30, 460, 531, 131))
        self.groupBox_3.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"\n"
"")
        self.groupBox_3.setObjectName("groupBox_3")
        self.btnLoadReference = QtWidgets.QPushButton(self.groupBox_3)
        self.btnLoadReference.setGeometry(QtCore.QRect(20, 24, 101, 27))
        self.btnLoadReference.setObjectName("btnLoadReference")
        self.btnLoadTest = QtWidgets.QPushButton(self.groupBox_3)
        self.btnLoadTest.setGeometry(QtCore.QRect(20, 60, 101, 27))
        self.btnLoadTest.setObjectName("btnLoadTest")
        self.btnLoadGroungTruth = QtWidgets.QPushButton(self.groupBox_3)
        self.btnLoadGroungTruth.setGeometry(QtCore.QRect(20, 96, 101, 27))
        self.btnLoadGroungTruth.setObjectName("btnLoadGroungTruth")
        self.refOkLabel = QtWidgets.QLabel(self.groupBox_3)
        self.refOkLabel.setGeometry(QtCore.QRect(130, 30, 391, 17))
        font = QtGui.QFont()
        font.setPointSize(9)
        font.setItalic(True)
        self.refOkLabel.setFont(font)
        self.refOkLabel.setText("")
        self.refOkLabel.setObjectName("refOkLabel")
        self.testOkLabel = QtWidgets.QLabel(self.groupBox_3)
        self.testOkLabel.setGeometry(QtCore.QRect(130, 66, 391, 17))
        font = QtGui.QFont()
        font.setPointSize(9)
        font.setItalic(True)
        self.testOkLabel.setFont(font)
        self.testOkLabel.setText("")
        self.testOkLabel.setObjectName("testOkLabel")
        self.groundTruthOkLabel = QtWidgets.QLabel(self.groupBox_3)
        self.groundTruthOkLabel.setGeometry(QtCore.QRect(130, 103, 391, 17))
        font = QtGui.QFont()
        font.setPointSize(9)
        font.setItalic(True)
        self.groundTruthOkLabel.setFont(font)
        self.groundTruthOkLabel.setText("")
        self.groundTruthOkLabel.setObjectName("groundTruthOkLabel")
        self.groupBox_4 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_4.setGeometry(QtCore.QRect(30, 610, 161, 111))
        self.groupBox_4.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"\n"
"")
        self.groupBox_4.setObjectName("groupBox_4")
        self.btnCreateDB = QtWidgets.QPushButton(self.groupBox_4)
        self.btnCreateDB.setGeometry(QtCore.QRect(30, 30, 91, 27))
        self.btnCreateDB.setObjectName("btnCreateDB")
        self.btnRecognition = QtWidgets.QPushButton(self.groupBox_4)
        self.btnRecognition.setGeometry(QtCore.QRect(30, 70, 91, 27))
        self.btnRecognition.setObjectName("btnRecognition")
        self.textBrowser = QtWidgets.QTextBrowser(self.centralwidget)
        self.textBrowser.setGeometry(QtCore.QRect(590, 320, 671, 401))
        font = QtGui.QFont()
        font.setFamily("Monospace")
        font.setPointSize(8)
        self.textBrowser.setFont(font)
        self.textBrowser.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"\n"
"")
        self.textBrowser.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
        self.textBrowser.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByKeyboard|QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextBrowserInteraction|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
        self.textBrowser.setObjectName("textBrowser")
        self.outputGroupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.outputGroupBox.setGeometry(QtCore.QRect(810, 30, 224, 231))
        self.outputGroupBox.setStyleSheet("")
        self.outputGroupBox.setObjectName("outputGroupBox")
        self.scrollArea_4 = QtWidgets.QScrollArea(self.outputGroupBox)
        self.scrollArea_4.setGeometry(QtCore.QRect(0, 20, 221, 211))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.scrollArea_4.sizePolicy().hasHeightForWidth())
        self.scrollArea_4.setSizePolicy(sizePolicy)
        self.scrollArea_4.setWidgetResizable(True)
        self.scrollArea_4.setObjectName("scrollArea_4")
        self.scrollAreaWidgetContents_4 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 219, 209))
        self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4")
        self.outputImageLabel = QtWidgets.QLabel(self.scrollAreaWidgetContents_4)
        self.outputImageLabel.setGeometry(QtCore.QRect(0, 0, 224, 224))
        self.outputImageLabel.setText("")
        self.outputImageLabel.setObjectName("outputImageLabel")
        self.scrollArea_4.setWidget(self.scrollAreaWidgetContents_4)
        self.referenceGroupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.referenceGroupBox.setGeometry(QtCore.QRect(1030, 30, 224, 231))
        self.referenceGroupBox.setStyleSheet("")
        self.referenceGroupBox.setObjectName("referenceGroupBox")
        self.scrollArea_6 = QtWidgets.QScrollArea(self.referenceGroupBox)
        self.scrollArea_6.setGeometry(QtCore.QRect(0, 20, 221, 211))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.scrollArea_6.sizePolicy().hasHeightForWidth())
        self.scrollArea_6.setSizePolicy(sizePolicy)
        self.scrollArea_6.setWidgetResizable(True)
        self.scrollArea_6.setObjectName("scrollArea_6")
        self.scrollAreaWidgetContents_6 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_6.setGeometry(QtCore.QRect(0, 0, 219, 209))
        self.scrollAreaWidgetContents_6.setObjectName("scrollAreaWidgetContents_6")
        self.referenceImageLabel = QtWidgets.QLabel(self.scrollAreaWidgetContents_6)
        self.referenceImageLabel.setGeometry(QtCore.QRect(1, 0, 224, 224))
        self.referenceImageLabel.setText("")
        self.referenceImageLabel.setObjectName("referenceImageLabel")
        self.scrollArea_6.setWidget(self.scrollAreaWidgetContents_6)
        self.groupBox_5 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_5.setGeometry(QtCore.QRect(400, 610, 161, 111))
        self.groupBox_5.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"\n"
"")
        self.groupBox_5.setObjectName("groupBox_5")
        self.btnPause = QtWidgets.QPushButton(self.groupBox_5)
        self.btnPause.setGeometry(QtCore.QRect(30, 30, 91, 27))
        self.btnPause.setObjectName("btnPause")
        self.btnStop = QtWidgets.QPushButton(self.groupBox_5)
        self.btnStop.setGeometry(QtCore.QRect(30, 70, 91, 27))
        self.btnStop.setObjectName("btnStop")
        self.stage2_groupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.stage2_groupBox.setGeometry(QtCore.QRect(210, 30, 161, 411))
        self.stage2_groupBox.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"\n"
"")
        self.stage2_groupBox.setObjectName("stage2_groupBox")
        self.groupBox_10 = QtWidgets.QGroupBox(self.stage2_groupBox)
        self.groupBox_10.setGeometry(QtCore.QRect(10, 30, 141, 101))
        self.groupBox_10.setMaximumSize(QtCore.QSize(160, 16777215))
        self.groupBox_10.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"\n"
"")
        self.groupBox_10.setObjectName("groupBox_10")
        self.imageWidthLineEdit_s2 = QtWidgets.QLineEdit(self.groupBox_10)
        self.imageWidthLineEdit_s2.setGeometry(QtCore.QRect(60, 29, 41, 27))
        self.imageWidthLineEdit_s2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.imageWidthLineEdit_s2.setReadOnly(False)
        self.imageWidthLineEdit_s2.setPlaceholderText("")
        self.imageWidthLineEdit_s2.setObjectName("imageWidthLineEdit_s2")
        self.imageHeightLineEdit_s2 = QtWidgets.QLineEdit(self.groupBox_10)
        self.imageHeightLineEdit_s2.setGeometry(QtCore.QRect(60, 63, 41, 30))
        self.imageHeightLineEdit_s2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.imageHeightLineEdit_s2.setReadOnly(False)
        self.imageHeightLineEdit_s2.setObjectName("imageHeightLineEdit_s2")
        self.label_8 = QtWidgets.QLabel(self.groupBox_10)
        self.label_8.setGeometry(QtCore.QRect(10, 30, 80, 30))
        self.label_8.setObjectName("label_8")
        self.label_9 = QtWidgets.QLabel(self.groupBox_10)
        self.label_9.setGeometry(QtCore.QRect(7, 70, 66, 16))
        self.label_9.setObjectName("label_9")
        self.label_10 = QtWidgets.QLabel(self.groupBox_10)
        self.label_10.setGeometry(QtCore.QRect(110, 30, 21, 30))
        self.label_10.setObjectName("label_10")
        self.label_13 = QtWidgets.QLabel(self.groupBox_10)
        self.label_13.setGeometry(QtCore.QRect(110, 66, 30, 31))
        self.label_13.setObjectName("label_13")
        self.groupBox_9 = QtWidgets.QGroupBox(self.stage2_groupBox)
        self.groupBox_9.setGeometry(QtCore.QRect(10, 140, 141, 151))
        self.groupBox_9.setMaximumSize(QtCore.QSize(160, 16777215))
        self.groupBox_9.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"")
        self.groupBox_9.setObjectName("groupBox_9")
        self.vggRadioButton_s2 = QtWidgets.QRadioButton(self.groupBox_9)
        self.vggRadioButton_s2.setGeometry(QtCore.QRect(20, 30, 115, 22))
        self.vggRadioButton_s2.setObjectName("vggRadioButton_s2")
        self.resnetRadioButton_s2 = QtWidgets.QRadioButton(self.groupBox_9)
        self.resnetRadioButton_s2.setGeometry(QtCore.QRect(20, 60, 115, 22))
        self.resnetRadioButton_s2.setObjectName("resnetRadioButton_s2")
        self.googlenetRadioButton_s2 = QtWidgets.QRadioButton(self.groupBox_9)
        self.googlenetRadioButton_s2.setGeometry(QtCore.QRect(20, 90, 115, 22))
        self.googlenetRadioButton_s2.setObjectName("googlenetRadioButton_s2")
        self.groupBox_11 = QtWidgets.QGroupBox(self.stage2_groupBox)
        self.groupBox_11.setGeometry(QtCore.QRect(10, 300, 141, 100))
        self.groupBox_11.setMaximumSize(QtCore.QSize(160, 16777215))
        self.groupBox_11.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"")
        self.groupBox_11.setObjectName("groupBox_11")
        self.pcaDimLineEdit_s2 = QtWidgets.QLineEdit(self.groupBox_11)
        self.pcaDimLineEdit_s2.setGeometry(QtCore.QRect(80, 20, 51, 27))
        self.pcaDimLineEdit_s2.setAutoFillBackground(False)
        self.pcaDimLineEdit_s2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.pcaDimLineEdit_s2.setReadOnly(False)
        self.pcaDimLineEdit_s2.setPlaceholderText("")
        self.pcaDimLineEdit_s2.setObjectName("pcaDimLineEdit_s2")
        self.label_23 = QtWidgets.QLabel(self.groupBox_11)
        self.label_23.setGeometry(QtCore.QRect(10, 20, 80, 30))
        self.label_23.setObjectName("label_23")
        self.label_24 = QtWidgets.QLabel(self.groupBox_11)
        self.label_24.setGeometry(QtCore.QRect(10, 50, 80, 30))
        self.label_24.setObjectName("label_24")
        self.pcaSamplesLineEdit_s2 = QtWidgets.QLineEdit(self.groupBox_11)
        self.pcaSamplesLineEdit_s2.setGeometry(QtCore.QRect(80, 50, 51, 27))
        self.pcaSamplesLineEdit_s2.setAutoFillBackground(False)
        self.pcaSamplesLineEdit_s2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.pcaSamplesLineEdit_s2.setReadOnly(False)
        self.pcaSamplesLineEdit_s2.setPlaceholderText("")
        self.pcaSamplesLineEdit_s2.setObjectName("pcaSamplesLineEdit_s2")
        self.groupBox_6 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_6.setGeometry(QtCore.QRect(220, 610, 161, 111))
        self.groupBox_6.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"\n"
"")
        self.groupBox_6.setObjectName("groupBox_6")
        self.btnSaveOutput = QtWidgets.QPushButton(self.groupBox_6)
        self.btnSaveOutput.setGeometry(QtCore.QRect(30, 30, 91, 27))
        self.btnSaveOutput.setObjectName("btnSaveOutput")
        self.btnPRcurves = QtWidgets.QPushButton(self.groupBox_6)
        self.btnPRcurves.setGeometry(QtCore.QRect(30, 70, 91, 27))
        self.btnPRcurves.setObjectName("btnPRcurves")
        self.groupBox_12 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_12.setGeometry(QtCore.QRect(390, 30, 171, 221))
        self.groupBox_12.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"")
        self.groupBox_12.setObjectName("groupBox_12")
        self.label_17 = QtWidgets.QLabel(self.groupBox_12)
        self.label_17.setGeometry(QtCore.QRect(10, 65, 111, 30))
        self.label_17.setObjectName("label_17")
        self.frameTolLineEdit = QtWidgets.QLineEdit(self.groupBox_12)
        self.frameTolLineEdit.setGeometry(QtCore.QRect(125, 65, 38, 27))
        self.frameTolLineEdit.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.frameTolLineEdit.setObjectName("frameTolLineEdit")
        self.candidatesLineEdit = QtWidgets.QLineEdit(self.groupBox_12)
        self.candidatesLineEdit.setGeometry(QtCore.QRect(125, 31, 38, 27))
        self.candidatesLineEdit.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.candidatesLineEdit.setObjectName("candidatesLineEdit")
        self.label_18 = QtWidgets.QLabel(self.groupBox_12)
        self.label_18.setGeometry(QtCore.QRect(10, 32, 81, 30))
        self.label_18.setObjectName("label_18")
        self.prevFramesLineEdit = QtWidgets.QLineEdit(self.groupBox_12)
        self.prevFramesLineEdit.setGeometry(QtCore.QRect(125, 100, 38, 27))
        self.prevFramesLineEdit.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.prevFramesLineEdit.setObjectName("prevFramesLineEdit")
        self.label_5 = QtWidgets.QLabel(self.groupBox_12)
        self.label_5.setGeometry(QtCore.QRect(10, 100, 111, 31))
        self.label_5.setText("Frame corr. (FC)")
        self.label_5.setObjectName("label_5")
        self.gpuGroupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.gpuGroupBox.setGeometry(QtCore.QRect(390, 310, 171, 131))
        self.gpuGroupBox.setStyleSheet("QGroupBox {\n"
"    border: 1px solid gray;\n"
"    border-radius: 9px;\n"
"    margin-top: 0.5em;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
"    subcontrol-origin: margin;\n"
"    left: 3px;\n"
"    padding: 3 0 3 0;\n"
"}\n"
"")
        self.gpuGroupBox.setObjectName("gpuGroupBox")
        self.label_12 = QtWidgets.QLabel(self.gpuGroupBox)
        self.label_12.setGeometry(QtCore.QRect(10, 80, 111, 31))
        self.label_12.setText("Max. candidates ")
        self.label_12.setObjectName("label_12")
        self.gpuCandLineEdit = QtWidgets.QLineEdit(self.gpuGroupBox)
        self.gpuCandLineEdit.setGeometry(QtCore.QRect(125, 80, 38, 27))
        self.gpuCandLineEdit.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.gpuCandLineEdit.setObjectName("gpuCandLineEdit")
        self.loadDbOnGpuCheckBox = QtWidgets.QCheckBox(self.gpuGroupBox)
        self.loadDbOnGpuCheckBox.setGeometry(QtCore.QRect(10, 40, 141, 22))
        self.loadDbOnGpuCheckBox.setObjectName("loadDbOnGpuCheckBox")
        self.useGpuCheckBox = QtWidgets.QCheckBox(self.centralwidget)
        self.useGpuCheckBox.setGeometry(QtCore.QRect(390, 280, 96, 22))
        self.useGpuCheckBox.setObjectName("useGpuCheckBox")
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.menuBar = QtWidgets.QMenuBar(MainWindow)
        self.menuBar.setGeometry(QtCore.QRect(0, 0, 1262, 25))
        self.menuBar.setObjectName("menuBar")
        self.menuAbout = QtWidgets.QMenu(self.menuBar)
        self.menuAbout.setObjectName("menuAbout")
        MainWindow.setMenuBar(self.menuBar)
        self.actionOpen = QtWidgets.QAction(MainWindow)
        self.actionOpen.setObjectName("actionOpen")
        self.actionSpectrogram = QtWidgets.QAction(MainWindow)
        self.actionSpectrogram.setObjectName("actionSpectrogram")
        self.actionFrequency_Map = QtWidgets.QAction(MainWindow)
        self.actionFrequency_Map.setObjectName("actionFrequency_Map")
        self.actionSave_path = QtWidgets.QAction(MainWindow)
        self.actionSave_path.setObjectName("actionSave_path")
        self.actionAbout = QtWidgets.QAction(MainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.menuAbout.addAction(self.actionAbout)
        self.menuBar.addAction(self.menuAbout.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Exemplo n.º 10
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(908, 533)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        MainWindow.setMinimumSize(QtCore.QSize(908, 531))
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(13, 20,
                                           QtWidgets.QSizePolicy.Maximum,
                                           QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.frame_3 = QtWidgets.QFrame(self.centralwidget)
        self.frame_3.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_3.setObjectName("frame_3")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.frame_3)
        self.verticalLayout.setObjectName("verticalLayout")
        spacerItem1 = QtWidgets.QSpacerItem(13, 5,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Maximum)
        self.verticalLayout.addItem(spacerItem1)
        self.frame = QtWidgets.QFrame(self.frame_3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(255)
        sizePolicy.setHeightForWidth(
            self.frame.sizePolicy().hasHeightForWidth())
        self.frame.setSizePolicy(sizePolicy)
        self.frame.setFrameShape(QtWidgets.QFrame.Box)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.frame)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        spacerItem2 = QtWidgets.QSpacerItem(5, 20,
                                            QtWidgets.QSizePolicy.Maximum,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem2)
        self.plainTextEdit = QtWidgets.QPlainTextEdit(self.frame)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(160)
        sizePolicy.setVerticalStretch(100)
        sizePolicy.setHeightForWidth(
            self.plainTextEdit.sizePolicy().hasHeightForWidth())
        self.plainTextEdit.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(12)
        self.plainTextEdit.setFont(font)
        self.plainTextEdit.setObjectName("plainTextEdit")
        self.horizontalLayout_2.addWidget(self.plainTextEdit)
        spacerItem3 = QtWidgets.QSpacerItem(10, 20,
                                            QtWidgets.QSizePolicy.Maximum,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem3)
        self.tableWidget = QtWidgets.QTableWidget(self.frame)
        self.tableWidget.setEnabled(True)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(200)
        sizePolicy.setVerticalStretch(100)
        sizePolicy.setHeightForWidth(
            self.tableWidget.sizePolicy().hasHeightForWidth())
        self.tableWidget.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(11)
        self.tableWidget.setFont(font)
        self.tableWidget.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.tableWidget.setSizeAdjustPolicy(
            QtWidgets.QAbstractScrollArea.AdjustIgnored)
        self.tableWidget.setDragEnabled(True)
        self.tableWidget.setAlternatingRowColors(True)
        self.tableWidget.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.tableWidget.setTextElideMode(QtCore.Qt.ElideRight)
        self.tableWidget.setShowGrid(True)
        self.tableWidget.setGridStyle(QtCore.Qt.SolidLine)
        self.tableWidget.setWordWrap(True)
        self.tableWidget.setCornerButtonEnabled(True)
        self.tableWidget.setRowCount(10)
        self.tableWidget.setColumnCount(4)
        self.tableWidget.setObjectName("tableWidget")
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(3, item)
        self.tableWidget.horizontalHeader().setVisible(True)
        self.tableWidget.horizontalHeader().setCascadingSectionResizes(False)
        self.tableWidget.horizontalHeader().setDefaultSectionSize(100)
        self.tableWidget.horizontalHeader().setHighlightSections(True)
        self.tableWidget.horizontalHeader().setMinimumSectionSize(25)
        self.tableWidget.horizontalHeader().setSortIndicatorShown(False)
        self.tableWidget.horizontalHeader().setStretchLastSection(True)
        self.tableWidget.verticalHeader().setCascadingSectionResizes(False)
        self.tableWidget.verticalHeader().setSortIndicatorShown(False)
        self.tableWidget.verticalHeader().setStretchLastSection(False)
        self.horizontalLayout_2.addWidget(self.tableWidget)
        spacerItem4 = QtWidgets.QSpacerItem(5, 20,
                                            QtWidgets.QSizePolicy.Maximum,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem4)
        self.verticalLayout.addWidget(self.frame)
        spacerItem5 = QtWidgets.QSpacerItem(20, 5,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Maximum)
        self.verticalLayout.addItem(spacerItem5)
        self.frame_2 = QtWidgets.QFrame(self.frame_3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(40)
        sizePolicy.setHeightForWidth(
            self.frame_2.sizePolicy().hasHeightForWidth())
        self.frame_2.setSizePolicy(sizePolicy)
        self.frame_2.setFrameShape(QtWidgets.QFrame.Box)
        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.frame_2)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        spacerItem6 = QtWidgets.QSpacerItem(122, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem6)
        self.loadPushButton = QtWidgets.QPushButton(self.frame_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(81)
        sizePolicy.setVerticalStretch(41)
        sizePolicy.setHeightForWidth(
            self.loadPushButton.sizePolicy().hasHeightForWidth())
        self.loadPushButton.setSizePolicy(sizePolicy)
        self.loadPushButton.setObjectName("loadPushButton")
        self.horizontalLayout_3.addWidget(self.loadPushButton)
        spacerItem7 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem7)
        self.label = QtWidgets.QLabel(self.frame_2)
        font = QtGui.QFont()
        font.setFamily("楷体")
        font.setPointSize(14)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.horizontalLayout_3.addWidget(self.label)
        spacerItem8 = QtWidgets.QSpacerItem(58, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem8)
        self.savePushButton = QtWidgets.QPushButton(self.frame_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(91)
        sizePolicy.setVerticalStretch(41)
        sizePolicy.setHeightForWidth(
            self.savePushButton.sizePolicy().hasHeightForWidth())
        self.savePushButton.setSizePolicy(sizePolicy)
        self.savePushButton.setObjectName("savePushButton")
        self.horizontalLayout_3.addWidget(self.savePushButton)
        spacerItem9 = QtWidgets.QSpacerItem(192, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem9)
        self.verticalLayout.addWidget(self.frame_2)
        spacerItem10 = QtWidgets.QSpacerItem(20, 5,
                                             QtWidgets.QSizePolicy.Minimum,
                                             QtWidgets.QSizePolicy.Maximum)
        self.verticalLayout.addItem(spacerItem10)
        self.horizontalLayout.addWidget(self.frame_3)
        spacerItem11 = QtWidgets.QSpacerItem(13, 20,
                                             QtWidgets.QSizePolicy.Maximum,
                                             QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem11)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 908, 23))
        self.menubar.setObjectName("menubar")
        self.menu = QtWidgets.QMenu(self.menubar)
        self.menu.setObjectName("menu")
        self.menu_2 = QtWidgets.QMenu(self.menubar)
        self.menu_2.setObjectName("menu_2")
        self.menu_4 = QtWidgets.QMenu(self.menubar)
        self.menu_4.setObjectName("menu_4")
        self.menu_3 = QtWidgets.QMenu(self.menubar)
        self.menu_3.setObjectName("menu_3")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.action_ShowKEY = QtWidgets.QAction(MainWindow)
        self.action_ShowKEY.setObjectName("action_ShowKEY")
        self.actionOP_Arithmetic = QtWidgets.QAction(MainWindow)
        self.actionOP_Arithmetic.setObjectName("actionOP_Arithmetic")
        self.actionOP_Relation = QtWidgets.QAction(MainWindow)
        self.actionOP_Relation.setObjectName("actionOP_Relation")
        self.actionOP_Delimiter = QtWidgets.QAction(MainWindow)
        self.actionOP_Delimiter.setObjectName("actionOP_Delimiter")
        self.action = QtWidgets.QAction(MainWindow)
        self.action.setObjectName("action")
        self.action_2 = QtWidgets.QAction(MainWindow)
        self.action_2.setObjectName("action_2")
        self.action_3 = QtWidgets.QAction(MainWindow)
        self.action_3.setObjectName("action_3")
        self.action_4 = QtWidgets.QAction(MainWindow)
        self.action_4.setObjectName("action_4")
        self.actionReDefault = QtWidgets.QAction(MainWindow)
        self.actionReDefault.setObjectName("actionReDefault")
        self.action_5 = QtWidgets.QAction(MainWindow)
        self.action_5.setObjectName("action_5")
        self.action_6 = QtWidgets.QAction(MainWindow)
        self.action_6.setObjectName("action_6")
        self.action_7 = QtWidgets.QAction(MainWindow)
        self.action_7.setObjectName("action_7")
        self.action_8 = QtWidgets.QAction(MainWindow)
        self.action_8.setObjectName("action_8")
        self.actionAbout = QtWidgets.QAction(MainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.actionShowDefault = QtWidgets.QAction(MainWindow)
        self.actionShowDefault.setObjectName("actionShowDefault")
        self.actionReDefault_2 = QtWidgets.QAction(MainWindow)
        self.actionReDefault_2.setObjectName("actionReDefault_2")
        self.actionShowAll = QtWidgets.QAction(MainWindow)
        self.actionShowAll.setObjectName("actionShowAll")
        self.actionsetRule = QtWidgets.QAction(MainWindow)
        self.actionsetRule.setObjectName("actionsetRule")
        self.actionsaveList = QtWidgets.QAction(MainWindow)
        self.actionsaveList.setObjectName("actionsaveList")
        self.menu.addAction(self.action_ShowKEY)
        self.menu.addAction(self.actionOP_Arithmetic)
        self.menu.addAction(self.actionOP_Relation)
        self.menu.addAction(self.actionOP_Delimiter)
        self.menu.addAction(self.actionShowAll)
        self.menu_2.addAction(self.actionShowDefault)
        self.menu_2.addAction(self.actionReDefault_2)
        self.menu_4.addAction(self.actionAbout)
        self.menu_3.addAction(self.actionsetRule)
        self.menubar.addAction(self.menu.menuAction())
        self.menubar.addAction(self.menu_2.menuAction())
        self.menubar.addAction(self.menu_3.menuAction())
        self.menubar.addAction(self.menu_4.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Exemplo n.º 11
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.setWindowModality(QtCore.Qt.NonModal)
        MainWindow.resize(984, 715)
        MainWindow.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
        MainWindow.setStyleSheet("#toolBar_Devices QToolButton {\n"
                                 "width: 50px;\n"
                                 "height: 55px;\n"
                                 "border:solid 1px black opacity 0.4;\n"
                                 "background-none;\n"
                                 "}\n"
                                 "\n"
                                 "#toolBar_General QToolButton {\n"
                                 "width: 36px;\n"
                                 "height: 36px;\n"
                                 "border:solid 1px black opacity 0.4;\n"
                                 "background-none;\n"
                                 "}\n"
                                 "\n"
                                 "")
        MainWindow.setDockOptions(QtWidgets.QMainWindow.AllowTabbedDocks
                                  | QtWidgets.QMainWindow.AnimatedDocks)
        self.uiCentralWidget = QtWidgets.QWidget(MainWindow)
        self.uiCentralWidget.setObjectName("uiCentralWidget")
        self.gridlayout = QtWidgets.QGridLayout(self.uiCentralWidget)
        self.gridlayout.setContentsMargins(0, 0, 0, 0)
        self.gridlayout.setSpacing(0)
        self.gridlayout.setObjectName("gridlayout")
        self.uiGraphicsView = GraphicsView(self.uiCentralWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.uiGraphicsView.sizePolicy().hasHeightForWidth())
        self.uiGraphicsView.setSizePolicy(sizePolicy)
        self.uiGraphicsView.setObjectName("uiGraphicsView")
        self.gridlayout.addWidget(self.uiGraphicsView, 0, 0, 1, 1)
        MainWindow.setCentralWidget(self.uiCentralWidget)
        self.uiMenuBar = QtWidgets.QMenuBar(MainWindow)
        self.uiMenuBar.setGeometry(QtCore.QRect(0, 0, 984, 22))
        self.uiMenuBar.setObjectName("uiMenuBar")
        self.uiEditMenu = QtWidgets.QMenu(self.uiMenuBar)
        self.uiEditMenu.setObjectName("uiEditMenu")
        self.uiFileMenu = QtWidgets.QMenu(self.uiMenuBar)
        self.uiFileMenu.setObjectName("uiFileMenu")
        self.uiHelpMenu = QtWidgets.QMenu(self.uiMenuBar)
        self.uiHelpMenu.setObjectName("uiHelpMenu")
        self.uiViewMenu = QtWidgets.QMenu(self.uiMenuBar)
        self.uiViewMenu.setObjectName("uiViewMenu")
        self.uiDocksMenu = QtWidgets.QMenu(self.uiViewMenu)
        self.uiDocksMenu.setObjectName("uiDocksMenu")
        self.uiControlMenu = QtWidgets.QMenu(self.uiMenuBar)
        self.uiControlMenu.setObjectName("uiControlMenu")
        self.uiAnnotateMenu = QtWidgets.QMenu(self.uiMenuBar)
        self.uiAnnotateMenu.setObjectName("uiAnnotateMenu")
        self.uiDeviceMenu = QtWidgets.QMenu(self.uiMenuBar)
        self.uiDeviceMenu.setObjectName("uiDeviceMenu")
        self.uiToolsMenu = QtWidgets.QMenu(self.uiMenuBar)
        self.uiToolsMenu.setObjectName("uiToolsMenu")
        MainWindow.setMenuBar(self.uiMenuBar)
        self.uiStatusBar = QtWidgets.QStatusBar(MainWindow)
        self.uiStatusBar.setObjectName("uiStatusBar")
        MainWindow.setStatusBar(self.uiStatusBar)
        self.uiGeneralToolBar = QtWidgets.QToolBar(MainWindow)
        self.uiGeneralToolBar.setToolTip("")
        self.uiGeneralToolBar.setStatusTip("")
        self.uiGeneralToolBar.setOrientation(QtCore.Qt.Horizontal)
        self.uiGeneralToolBar.setIconSize(QtCore.QSize(32, 32))
        self.uiGeneralToolBar.setObjectName("uiGeneralToolBar")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.uiGeneralToolBar)
        self.uiNodesDockWidget = QtWidgets.QDockWidget(MainWindow)
        self.uiNodesDockWidget.setEnabled(True)
        self.uiNodesDockWidget.setVisible(True)
        self.uiNodesDockWidget.setFloating(False)
        self.uiNodesDockWidget.setAllowedAreas(QtCore.Qt.LeftDockWidgetArea
                                               | QtCore.Qt.RightDockWidgetArea)
        self.uiNodesDockWidget.setObjectName("uiNodesDockWidget")
        self.uiNodesDockWidgetContents = QtWidgets.QWidget()
        self.uiNodesDockWidgetContents.setObjectName(
            "uiNodesDockWidgetContents")
        self.vboxlayout = QtWidgets.QVBoxLayout(self.uiNodesDockWidgetContents)
        self.vboxlayout.setContentsMargins(0, 0, 0, 0)
        self.vboxlayout.setSpacing(0)
        self.vboxlayout.setObjectName("vboxlayout")
        self.uiNodesView = NodesView(self.uiNodesDockWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.uiNodesView.sizePolicy().hasHeightForWidth())
        self.uiNodesView.setSizePolicy(sizePolicy)
        self.uiNodesView.setDragEnabled(False)
        self.uiNodesView.setIconSize(QtCore.QSize(32, 32))
        self.uiNodesView.setRootIsDecorated(False)
        self.uiNodesView.setObjectName("uiNodesView")
        self.uiNodesView.header().setVisible(False)
        self.vboxlayout.addWidget(self.uiNodesView)
        self.uiNodesDockWidget.setWidget(self.uiNodesDockWidgetContents)
        MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(1),
                                 self.uiNodesDockWidget)
        self.uiBrowsersToolBar = QtWidgets.QToolBar(MainWindow)
        self.uiBrowsersToolBar.setIconSize(QtCore.QSize(48, 48))
        self.uiBrowsersToolBar.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
        self.uiBrowsersToolBar.setObjectName("uiBrowsersToolBar")
        MainWindow.addToolBar(QtCore.Qt.LeftToolBarArea,
                              self.uiBrowsersToolBar)
        self.uiControlToolBar = QtWidgets.QToolBar(MainWindow)
        self.uiControlToolBar.setIconSize(QtCore.QSize(32, 32))
        self.uiControlToolBar.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
        self.uiControlToolBar.setObjectName("uiControlToolBar")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.uiControlToolBar)
        self.uiConsoleDockWidget = QtWidgets.QDockWidget(MainWindow)
        self.uiConsoleDockWidget.setMaximumSize(QtCore.QSize(524287, 524287))
        self.uiConsoleDockWidget.setAllowedAreas(QtCore.Qt.AllDockWidgetAreas)
        self.uiConsoleDockWidget.setObjectName("uiConsoleDockWidget")
        self.uiConsoleDockWidgetContents = QtWidgets.QWidget()
        self.uiConsoleDockWidgetContents.setObjectName(
            "uiConsoleDockWidgetContents")
        self.vboxlayout1 = QtWidgets.QVBoxLayout(
            self.uiConsoleDockWidgetContents)
        self.vboxlayout1.setContentsMargins(0, 0, 0, 0)
        self.vboxlayout1.setSpacing(0)
        self.vboxlayout1.setObjectName("vboxlayout1")
        self.uiConsoleTextEdit = ConsoleView(self.uiConsoleDockWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.uiConsoleTextEdit.sizePolicy().hasHeightForWidth())
        self.uiConsoleTextEdit.setSizePolicy(sizePolicy)
        self.uiConsoleTextEdit.setObjectName("uiConsoleTextEdit")
        self.vboxlayout1.addWidget(self.uiConsoleTextEdit)
        self.uiConsoleDockWidget.setWidget(self.uiConsoleDockWidgetContents)
        MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(8),
                                 self.uiConsoleDockWidget)
        self.uiAnnotationToolBar = QtWidgets.QToolBar(MainWindow)
        self.uiAnnotationToolBar.setIconSize(QtCore.QSize(32, 32))
        self.uiAnnotationToolBar.setObjectName("uiAnnotationToolBar")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea,
                              self.uiAnnotationToolBar)
        self.uiTopologySummaryDockWidget = QtWidgets.QDockWidget(MainWindow)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.uiTopologySummaryDockWidget.sizePolicy().hasHeightForWidth())
        self.uiTopologySummaryDockWidget.setSizePolicy(sizePolicy)
        self.uiTopologySummaryDockWidget.setAllowedAreas(
            QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea)
        self.uiTopologySummaryDockWidget.setObjectName(
            "uiTopologySummaryDockWidget")
        self.uiTopologySummaryDockWidgetContents = QtWidgets.QWidget()
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.uiTopologySummaryDockWidgetContents.
                                     sizePolicy().hasHeightForWidth())
        self.uiTopologySummaryDockWidgetContents.setSizePolicy(sizePolicy)
        self.uiTopologySummaryDockWidgetContents.setObjectName(
            "uiTopologySummaryDockWidgetContents")
        self.gridlayout1 = QtWidgets.QGridLayout(
            self.uiTopologySummaryDockWidgetContents)
        self.gridlayout1.setContentsMargins(0, 0, 0, 0)
        self.gridlayout1.setSpacing(0)
        self.gridlayout1.setObjectName("gridlayout1")
        self.uiTopologySummaryTreeWidget = TopologySummaryView(
            self.uiTopologySummaryDockWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.uiTopologySummaryTreeWidget.sizePolicy().hasHeightForWidth())
        self.uiTopologySummaryTreeWidget.setSizePolicy(sizePolicy)
        self.uiTopologySummaryTreeWidget.setObjectName(
            "uiTopologySummaryTreeWidget")
        self.uiTopologySummaryTreeWidget.header().setVisible(False)
        self.gridlayout1.addWidget(self.uiTopologySummaryTreeWidget, 0, 0, 1,
                                   1)
        self.uiTopologySummaryDockWidget.setWidget(
            self.uiTopologySummaryDockWidgetContents)
        MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2),
                                 self.uiTopologySummaryDockWidget)
        self.uiAboutAction = QtWidgets.QAction(MainWindow)
        self.uiAboutAction.setMenuRole(QtWidgets.QAction.AboutRole)
        self.uiAboutAction.setObjectName("uiAboutAction")
        self.uiQuitAction = QtWidgets.QAction(MainWindow)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/quit.svg"), QtGui.QIcon.Normal,
                       QtGui.QIcon.Off)
        self.uiQuitAction.setIcon(icon)
        self.uiQuitAction.setObjectName("uiQuitAction")
        self.uiOpenProjectAction = QtWidgets.QAction(MainWindow)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/icons/open.svg"), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        self.uiOpenProjectAction.setIcon(icon1)
        self.uiOpenProjectAction.setObjectName("uiOpenProjectAction")
        self.uiSaveProjectAction = QtWidgets.QAction(MainWindow)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/icons/save.svg"), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        self.uiSaveProjectAction.setIcon(icon2)
        self.uiSaveProjectAction.setObjectName("uiSaveProjectAction")
        self.uiOnlineHelpAction = QtWidgets.QAction(MainWindow)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(":/icons/help.svg"), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        self.uiOnlineHelpAction.setIcon(icon3)
        self.uiOnlineHelpAction.setObjectName("uiOnlineHelpAction")
        self.uiScreenshotAction = QtWidgets.QAction(MainWindow)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(":/icons/camera-photo.svg"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon4.addPixmap(QtGui.QPixmap(":/icons/camera-photo-hover.svg"),
                        QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiScreenshotAction.setIcon(icon4)
        self.uiScreenshotAction.setObjectName("uiScreenshotAction")
        self.uiStartAllAction = QtWidgets.QAction(MainWindow)
        self.uiStartAllAction.setEnabled(True)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(":/icons/start.svg"), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        icon5.addPixmap(QtGui.QPixmap(":/icons/start-hover.svg"),
                        QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiStartAllAction.setIcon(icon5)
        self.uiStartAllAction.setObjectName("uiStartAllAction")
        self.uiStopAllAction = QtWidgets.QAction(MainWindow)
        self.uiStopAllAction.setEnabled(True)
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap(":/icons/stop.svg"), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        icon6.addPixmap(QtGui.QPixmap(":/icons/stop-hover.svg"),
                        QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiStopAllAction.setIcon(icon6)
        self.uiStopAllAction.setObjectName("uiStopAllAction")
        self.uiShowNamesAction = QtWidgets.QAction(MainWindow)
        self.uiShowNamesAction.setCheckable(True)
        icon7 = QtGui.QIcon()
        icon7.addPixmap(QtGui.QPixmap(":/icons/show-hostname.svg"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiShowNamesAction.setIcon(icon7)
        self.uiShowNamesAction.setObjectName("uiShowNamesAction")
        self.uiConsoleAllAction = QtWidgets.QAction(MainWindow)
        self.uiConsoleAllAction.setEnabled(True)
        icon8 = QtGui.QIcon()
        icon8.addPixmap(QtGui.QPixmap(":/icons/console.svg"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiConsoleAllAction.setIcon(icon8)
        self.uiConsoleAllAction.setObjectName("uiConsoleAllAction")
        self.uiAboutQtAction = QtWidgets.QAction(MainWindow)
        self.uiAboutQtAction.setMenuRole(QtWidgets.QAction.AboutQtRole)
        self.uiAboutQtAction.setObjectName("uiAboutQtAction")
        self.uiZoomInAction = QtWidgets.QAction(MainWindow)
        icon9 = QtGui.QIcon()
        icon9.addPixmap(QtGui.QPixmap(":/icons/zoom-in.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon9.addPixmap(QtGui.QPixmap(":/icons/zoom-in-hover.png"),
                        QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiZoomInAction.setIcon(icon9)
        self.uiZoomInAction.setObjectName("uiZoomInAction")
        self.uiZoomOutAction = QtWidgets.QAction(MainWindow)
        icon10 = QtGui.QIcon()
        icon10.addPixmap(QtGui.QPixmap(":/icons/zoom-out.png"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon10.addPixmap(QtGui.QPixmap(":/icons/zoom-out-hover.png"),
                         QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiZoomOutAction.setIcon(icon10)
        self.uiZoomOutAction.setObjectName("uiZoomOutAction")
        self.uiZoomResetAction = QtWidgets.QAction(MainWindow)
        self.uiZoomResetAction.setObjectName("uiZoomResetAction")
        self.uiSelectAllAction = QtWidgets.QAction(MainWindow)
        self.uiSelectAllAction.setObjectName("uiSelectAllAction")
        self.uiSelectNoneAction = QtWidgets.QAction(MainWindow)
        self.uiSelectNoneAction.setObjectName("uiSelectNoneAction")
        self.uiPreferencesAction = QtWidgets.QAction(MainWindow)
        icon11 = QtGui.QIcon()
        icon11.addPixmap(QtGui.QPixmap(":/icons/applications.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiPreferencesAction.setIcon(icon11)
        self.uiPreferencesAction.setMenuRole(QtWidgets.QAction.PreferencesRole)
        self.uiPreferencesAction.setObjectName("uiPreferencesAction")
        self.uiSuspendAllAction = QtWidgets.QAction(MainWindow)
        icon12 = QtGui.QIcon()
        icon12.addPixmap(QtGui.QPixmap(":/icons/pause.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon12.addPixmap(QtGui.QPixmap(":/icons/pause-hover.svg"),
                         QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiSuspendAllAction.setIcon(icon12)
        self.uiSuspendAllAction.setObjectName("uiSuspendAllAction")
        self.uiAddNoteAction = QtWidgets.QAction(MainWindow)
        self.uiAddNoteAction.setCheckable(True)
        icon13 = QtGui.QIcon()
        icon13.addPixmap(QtGui.QPixmap(":/icons/add-note.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiAddNoteAction.setIcon(icon13)
        self.uiAddNoteAction.setObjectName("uiAddNoteAction")
        self.uiNewProjectAction = QtWidgets.QAction(MainWindow)
        icon14 = QtGui.QIcon()
        icon14.addPixmap(QtGui.QPixmap(":/icons/new-project.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiNewProjectAction.setIcon(icon14)
        self.uiNewProjectAction.setObjectName("uiNewProjectAction")
        self.uiImportExportConfigsAction = QtWidgets.QAction(MainWindow)
        icon15 = QtGui.QIcon()
        icon15.addPixmap(QtGui.QPixmap(":/icons/import_export_configs.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiImportExportConfigsAction.setIcon(icon15)
        self.uiImportExportConfigsAction.setObjectName(
            "uiImportExportConfigsAction")
        self.uiInsertImageAction = QtWidgets.QAction(MainWindow)
        self.uiInsertImageAction.setCheckable(False)
        icon16 = QtGui.QIcon()
        icon16.addPixmap(QtGui.QPixmap(":/icons/image.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiInsertImageAction.setIcon(icon16)
        self.uiInsertImageAction.setObjectName("uiInsertImageAction")
        self.uiDrawRectangleAction = QtWidgets.QAction(MainWindow)
        self.uiDrawRectangleAction.setCheckable(True)
        icon17 = QtGui.QIcon()
        icon17.addPixmap(QtGui.QPixmap(":/icons/rectangle.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon17.addPixmap(QtGui.QPixmap(":/icons/rectangle-hover.svg"),
                         QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiDrawRectangleAction.setIcon(icon17)
        self.uiDrawRectangleAction.setObjectName("uiDrawRectangleAction")
        self.uiDrawEllipseAction = QtWidgets.QAction(MainWindow)
        self.uiDrawEllipseAction.setCheckable(True)
        icon18 = QtGui.QIcon()
        icon18.addPixmap(QtGui.QPixmap(":/icons/ellipse.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon18.addPixmap(QtGui.QPixmap(":/icons/ellipse-hover.svg"),
                         QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiDrawEllipseAction.setIcon(icon18)
        self.uiDrawEllipseAction.setObjectName("uiDrawEllipseAction")
        self.uiShowPortNamesAction = QtWidgets.QAction(MainWindow)
        self.uiShowPortNamesAction.setCheckable(True)
        icon19 = QtGui.QIcon()
        icon19.addPixmap(QtGui.QPixmap(":/icons/show-interface-names.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiShowPortNamesAction.setIcon(icon19)
        self.uiShowPortNamesAction.setObjectName("uiShowPortNamesAction")
        self.uiSnapshotAction = QtWidgets.QAction(MainWindow)
        icon20 = QtGui.QIcon()
        icon20.addPixmap(QtGui.QPixmap(":/icons/snapshot.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiSnapshotAction.setIcon(icon20)
        self.uiSnapshotAction.setObjectName("uiSnapshotAction")
        self.uiShowLayersAction = QtWidgets.QAction(MainWindow)
        self.uiShowLayersAction.setCheckable(True)
        self.uiShowLayersAction.setObjectName("uiShowLayersAction")
        self.uiSaveProjectAsAction = QtWidgets.QAction(MainWindow)
        icon21 = QtGui.QIcon()
        icon21.addPixmap(QtGui.QPixmap(":/icons/save-as-project.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiSaveProjectAsAction.setIcon(icon21)
        self.uiSaveProjectAsAction.setObjectName("uiSaveProjectAsAction")
        self.uiReloadAllAction = QtWidgets.QAction(MainWindow)
        icon22 = QtGui.QIcon()
        icon22.addPixmap(QtGui.QPixmap(":/icons/reload.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiReloadAllAction.setIcon(icon22)
        self.uiReloadAllAction.setObjectName("uiReloadAllAction")
        self.uiAuxConsoleAllAction = QtWidgets.QAction(MainWindow)
        self.uiAuxConsoleAllAction.setEnabled(True)
        icon23 = QtGui.QIcon()
        icon23.addPixmap(QtGui.QPixmap(":/icons/aux-console.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiAuxConsoleAllAction.setIcon(icon23)
        self.uiAuxConsoleAllAction.setObjectName("uiAuxConsoleAllAction")
        self.uiResetPortLabelsAction = QtWidgets.QAction(MainWindow)
        self.uiResetPortLabelsAction.setObjectName("uiResetPortLabelsAction")
        self.uiCheckForUpdateAction = QtWidgets.QAction(MainWindow)
        self.uiCheckForUpdateAction.setObjectName("uiCheckForUpdateAction")
        self.uiEnergySavingStyleAction = QtWidgets.QAction(MainWindow)
        self.uiEnergySavingStyleAction.setCheckable(True)
        self.uiEnergySavingStyleAction.setObjectName(
            "uiEnergySavingStyleAction")
        self.uiDefaultStyleAction = QtWidgets.QAction(MainWindow)
        self.uiDefaultStyleAction.setCheckable(True)
        self.uiDefaultStyleAction.setChecked(True)
        self.uiDefaultStyleAction.setObjectName("uiDefaultStyleAction")
        self.uiBrowseRoutersAction = QtWidgets.QAction(MainWindow)
        icon24 = QtGui.QIcon()
        icon24.addPixmap(QtGui.QPixmap(":/icons/router.png"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon24.addPixmap(QtGui.QPixmap(":/icons/router-hover.png"),
                         QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiBrowseRoutersAction.setIcon(icon24)
        self.uiBrowseRoutersAction.setObjectName("uiBrowseRoutersAction")
        self.uiBrowseSwitchesAction = QtWidgets.QAction(MainWindow)
        icon25 = QtGui.QIcon()
        icon25.addPixmap(QtGui.QPixmap(":/icons/switch.png"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon25.addPixmap(QtGui.QPixmap(":/icons/switch-hover.png"),
                         QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiBrowseSwitchesAction.setIcon(icon25)
        self.uiBrowseSwitchesAction.setObjectName("uiBrowseSwitchesAction")
        self.uiBrowseEndDevicesAction = QtWidgets.QAction(MainWindow)
        icon26 = QtGui.QIcon()
        icon26.addPixmap(QtGui.QPixmap(":/icons/PC.png"), QtGui.QIcon.Normal,
                         QtGui.QIcon.Off)
        icon26.addPixmap(QtGui.QPixmap(":/icons/PC-hover.png"),
                         QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiBrowseEndDevicesAction.setIcon(icon26)
        self.uiBrowseEndDevicesAction.setObjectName("uiBrowseEndDevicesAction")
        self.uiBrowseSecurityDevicesAction = QtWidgets.QAction(MainWindow)
        icon27 = QtGui.QIcon()
        icon27.addPixmap(QtGui.QPixmap(":/icons/firewall.png"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon27.addPixmap(QtGui.QPixmap(":/icons/firewall-hover.png"),
                         QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiBrowseSecurityDevicesAction.setIcon(icon27)
        self.uiBrowseSecurityDevicesAction.setObjectName(
            "uiBrowseSecurityDevicesAction")
        self.uiBrowseAllDevicesAction = QtWidgets.QAction(MainWindow)
        icon28 = QtGui.QIcon()
        icon28.addPixmap(QtGui.QPixmap(":/icons/browse-all-icons.png"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon28.addPixmap(QtGui.QPixmap(":/icons/browse-all-icons-hover.png"),
                         QtGui.QIcon.Active, QtGui.QIcon.Off)
        self.uiBrowseAllDevicesAction.setIcon(icon28)
        self.uiBrowseAllDevicesAction.setObjectName("uiBrowseAllDevicesAction")
        self.uiAddLinkAction = QtWidgets.QAction(MainWindow)
        self.uiAddLinkAction.setCheckable(True)
        icon29 = QtGui.QIcon()
        icon29.addPixmap(QtGui.QPixmap(":/icons/connection-new.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon29.addPixmap(QtGui.QPixmap(":/icons/cancel-connection.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.On)
        icon29.addPixmap(QtGui.QPixmap(":/icons/connection-new-hover.svg"),
                         QtGui.QIcon.Active, QtGui.QIcon.Off)
        icon29.addPixmap(QtGui.QPixmap(":/icons/cancel-connection.svg"),
                         QtGui.QIcon.Active, QtGui.QIcon.On)
        self.uiAddLinkAction.setIcon(icon29)
        self.uiAddLinkAction.setObjectName("uiAddLinkAction")
        self.uiGettingStartedAction = QtWidgets.QAction(MainWindow)
        self.uiGettingStartedAction.setObjectName("uiGettingStartedAction")
        self.uiLabInstructionsAction = QtWidgets.QAction(MainWindow)
        self.uiLabInstructionsAction.setObjectName("uiLabInstructionsAction")
        self.uiFitInViewAction = QtWidgets.QAction(MainWindow)
        self.uiFitInViewAction.setObjectName("uiFitInViewAction")
        self.uiExportProjectAction = QtWidgets.QAction(MainWindow)
        self.uiExportProjectAction.setVisible(False)
        self.uiExportProjectAction.setObjectName("uiExportProjectAction")
        self.uiImportProjectAction = QtWidgets.QAction(MainWindow)
        self.uiImportProjectAction.setVisible(False)
        self.uiImportProjectAction.setObjectName("uiImportProjectAction")
        self.uiMoveLocalProjectToCloudAction = QtWidgets.QAction(MainWindow)
        self.uiMoveLocalProjectToCloudAction.setVisible(False)
        self.uiMoveLocalProjectToCloudAction.setObjectName(
            "uiMoveLocalProjectToCloudAction")
        self.uiMoveCloudProjectToLocalAction = QtWidgets.QAction(MainWindow)
        self.uiMoveCloudProjectToLocalAction.setVisible(False)
        self.uiMoveCloudProjectToLocalAction.setObjectName(
            "uiMoveCloudProjectToLocalAction")
        self.uiDarkStyleAction = QtWidgets.QAction(MainWindow)
        self.uiDarkStyleAction.setObjectName("uiDarkStyleAction")
        self.uiActionFullscreen = QtWidgets.QAction(MainWindow)
        self.uiActionFullscreen.setObjectName("uiActionFullscreen")
        self.uiVPCSAction = QtWidgets.QAction(MainWindow)
        self.uiVPCSAction.setObjectName("uiVPCSAction")
        self.uiDownloadRemoteProject = QtWidgets.QAction(MainWindow)
        icon30 = QtGui.QIcon()
        icon30.addPixmap(QtGui.QPixmap(":/classic_icons/save-as-project.svg"),
                         QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.uiDownloadRemoteProject.setIcon(icon30)
        self.uiDownloadRemoteProject.setObjectName("uiDownloadRemoteProject")
        self.uiQemuImgWizardAction = QtWidgets.QAction(MainWindow)
        icon31 = QtGui.QIcon()
        icon31.addPixmap(QtGui.QPixmap(":/icons/qemu.svg"), QtGui.QIcon.Normal,
                         QtGui.QIcon.Off)
        self.uiQemuImgWizardAction.setIcon(icon31)
        self.uiQemuImgWizardAction.setObjectName("uiQemuImgWizardAction")
        self.uiSetupWizard = QtWidgets.QAction(MainWindow)
        self.uiSetupWizard.setMenuRole(QtWidgets.QAction.NoRole)
        self.uiSetupWizard.setObjectName("uiSetupWizard")
        self.uiIOUVMConverterAction = QtWidgets.QAction(MainWindow)
        self.uiIOUVMConverterAction.setObjectName("uiIOUVMConverterAction")
        self.uiOpenApplianceAction = QtWidgets.QAction(MainWindow)
        self.uiOpenApplianceAction.setIcon(icon1)
        self.uiOpenApplianceAction.setObjectName("uiOpenApplianceAction")
        self.uiExportDebugInformationAction = QtWidgets.QAction(MainWindow)
        self.uiExportDebugInformationAction.setObjectName(
            "uiExportDebugInformationAction")
        self.uiEditMenu.addAction(self.uiSelectAllAction)
        self.uiEditMenu.addAction(self.uiSelectNoneAction)
        self.uiEditMenu.addSeparator()
        self.uiEditMenu.addAction(self.uiPreferencesAction)
        self.uiFileMenu.addAction(self.uiNewProjectAction)
        self.uiFileMenu.addAction(self.uiOpenProjectAction)
        self.uiFileMenu.addAction(self.uiSaveProjectAction)
        self.uiFileMenu.addAction(self.uiSaveProjectAsAction)
        self.uiFileMenu.addAction(self.uiExportProjectAction)
        self.uiFileMenu.addAction(self.uiImportProjectAction)
        self.uiFileMenu.addSeparator()
        self.uiFileMenu.addAction(self.uiMoveLocalProjectToCloudAction)
        self.uiFileMenu.addAction(self.uiMoveCloudProjectToLocalAction)
        self.uiFileMenu.addAction(self.uiDownloadRemoteProject)
        self.uiFileMenu.addSeparator()
        self.uiFileMenu.addAction(self.uiOpenApplianceAction)
        self.uiFileMenu.addAction(self.uiImportExportConfigsAction)
        self.uiFileMenu.addAction(self.uiScreenshotAction)
        self.uiFileMenu.addAction(self.uiSnapshotAction)
        self.uiFileMenu.addSeparator()
        self.uiFileMenu.addAction(self.uiQuitAction)
        self.uiHelpMenu.addAction(self.uiOnlineHelpAction)
        self.uiHelpMenu.addAction(self.uiCheckForUpdateAction)
        self.uiHelpMenu.addAction(self.uiSetupWizard)
        self.uiHelpMenu.addAction(self.uiLabInstructionsAction)
        self.uiHelpMenu.addAction(self.uiExportDebugInformationAction)
        self.uiHelpMenu.addAction(self.uiAboutQtAction)
        self.uiHelpMenu.addAction(self.uiAboutAction)
        self.uiViewMenu.addAction(self.uiActionFullscreen)
        self.uiViewMenu.addSeparator()
        self.uiViewMenu.addAction(self.uiZoomInAction)
        self.uiViewMenu.addAction(self.uiZoomOutAction)
        self.uiViewMenu.addAction(self.uiZoomResetAction)
        self.uiViewMenu.addAction(self.uiFitInViewAction)
        self.uiViewMenu.addSeparator()
        self.uiViewMenu.addAction(self.uiShowLayersAction)
        self.uiViewMenu.addAction(self.uiResetPortLabelsAction)
        self.uiViewMenu.addAction(self.uiShowPortNamesAction)
        self.uiViewMenu.addSeparator()
        self.uiViewMenu.addAction(self.uiDocksMenu.menuAction())
        self.uiControlMenu.addAction(self.uiStartAllAction)
        self.uiControlMenu.addAction(self.uiSuspendAllAction)
        self.uiControlMenu.addAction(self.uiStopAllAction)
        self.uiControlMenu.addAction(self.uiReloadAllAction)
        self.uiControlMenu.addAction(self.uiAuxConsoleAllAction)
        self.uiControlMenu.addAction(self.uiConsoleAllAction)
        self.uiAnnotateMenu.addAction(self.uiAddNoteAction)
        self.uiAnnotateMenu.addAction(self.uiInsertImageAction)
        self.uiAnnotateMenu.addAction(self.uiDrawRectangleAction)
        self.uiAnnotateMenu.addAction(self.uiDrawEllipseAction)
        self.uiToolsMenu.addAction(self.uiVPCSAction)
        self.uiToolsMenu.addAction(self.uiIOUVMConverterAction)
        self.uiMenuBar.addAction(self.uiFileMenu.menuAction())
        self.uiMenuBar.addAction(self.uiEditMenu.menuAction())
        self.uiMenuBar.addAction(self.uiViewMenu.menuAction())
        self.uiMenuBar.addAction(self.uiControlMenu.menuAction())
        self.uiMenuBar.addAction(self.uiDeviceMenu.menuAction())
        self.uiMenuBar.addAction(self.uiAnnotateMenu.menuAction())
        self.uiMenuBar.addAction(self.uiToolsMenu.menuAction())
        self.uiMenuBar.addAction(self.uiHelpMenu.menuAction())
        self.uiGeneralToolBar.addAction(self.uiNewProjectAction)
        self.uiGeneralToolBar.addAction(self.uiOpenProjectAction)
        self.uiGeneralToolBar.addAction(self.uiSaveProjectAction)
        self.uiBrowsersToolBar.addAction(self.uiBrowseRoutersAction)
        self.uiBrowsersToolBar.addSeparator()
        self.uiBrowsersToolBar.addAction(self.uiBrowseSwitchesAction)
        self.uiBrowsersToolBar.addSeparator()
        self.uiBrowsersToolBar.addAction(self.uiBrowseEndDevicesAction)
        self.uiBrowsersToolBar.addSeparator()
        self.uiBrowsersToolBar.addAction(self.uiBrowseSecurityDevicesAction)
        self.uiBrowsersToolBar.addSeparator()
        self.uiBrowsersToolBar.addAction(self.uiBrowseAllDevicesAction)
        self.uiBrowsersToolBar.addSeparator()
        self.uiBrowsersToolBar.addAction(self.uiAddLinkAction)
        self.uiBrowsersToolBar.addSeparator()
        self.uiControlToolBar.addAction(self.uiSnapshotAction)
        self.uiControlToolBar.addAction(self.uiShowPortNamesAction)
        self.uiControlToolBar.addAction(self.uiConsoleAllAction)
        self.uiControlToolBar.addSeparator()
        self.uiControlToolBar.addAction(self.uiStartAllAction)
        self.uiControlToolBar.addAction(self.uiSuspendAllAction)
        self.uiControlToolBar.addAction(self.uiStopAllAction)
        self.uiControlToolBar.addAction(self.uiReloadAllAction)
        self.uiAnnotationToolBar.addAction(self.uiAddNoteAction)
        self.uiAnnotationToolBar.addAction(self.uiInsertImageAction)
        self.uiAnnotationToolBar.addAction(self.uiDrawRectangleAction)
        self.uiAnnotationToolBar.addAction(self.uiDrawEllipseAction)
        self.uiAnnotationToolBar.addAction(self.uiZoomInAction)
        self.uiAnnotationToolBar.addAction(self.uiZoomOutAction)
        self.uiAnnotationToolBar.addAction(self.uiScreenshotAction)

        self.retranslateUi(MainWindow)
        self.uiQuitAction.triggered.connect(MainWindow.close)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
        MainWindow.setTabOrder(self.uiGraphicsView, self.uiNodesView)
        MainWindow.setTabOrder(self.uiNodesView, self.uiConsoleTextEdit)
        MainWindow.setTabOrder(self.uiConsoleTextEdit,
                               self.uiTopologySummaryTreeWidget)
Exemplo n.º 12
0
	def load_names(self): #when radio buttons clicked
		datacurs.execute('SELECT player,value from stats WHERE ctg = "BAT";')
		batter = datacurs.fetchall()
		datacurs.execute('SELECT Player,value from stats WHERE ctg = "WK";')
		wick = datacurs.fetchall()
		datacurs.execute('SELECT Player,value from stats WHERE ctg ="AR";')
		rounder = datacurs.fetchall()
		datacurs.execute('SELECT Player,value from stats WHERE ctg = "BWL";')
		bowlin = datacurs.fetchall()

		batsmen = []
		bowlers = []
		allrounders = []
		wcktkeepers = []

		for boo in bowlin:
			bowlers.append(boo[0])
			self.stats[boo[0]] = boo[1]
			self.a.append(boo[0])
		for batt in batter:
			batsmen.append(batt[0])
			self.b.append(batt[0])
			self.stats[batt[0]] = batt[1]
		for roun in rounder:
			allrounders.append(roun[0])
			self.stats[roun[0]] = roun[1]
			self.c.append(roun[0])
		for wic in wick:
			wcktkeepers.append(wic[0])
			self.stats[wic[0]] = wic[1]
			self.d.append(wic[0])
		
		for selected in self.selectlist:
			if selected in allrounders:
				allrounders.remove(selected)
			elif selected in batsmen:
				batsmen.remove(selected)
			elif selected in bowlers:
				bowlers.remove(selected)
			elif selected in wcktkeepers:
				wcktkeepers.remove(selected)

		if self.batradio.isChecked() == True:
			self.availablelist.clear()
			for i in range(len(batsmen)):
				item = QtWidgets.QListWidgetItem(batsmen[i])
				font = QtGui.QFont()
				font.setBold(True)
				font.setWeight(69)
				item.setFont(font)
				self.availablelist.addItem(item)
		elif self.bowlradio.isChecked() == True:
			self.availablelist.clear()
			for i in range(len(bowlers)):
				item = QtWidgets.QListWidgetItem(bowlers[i])
				font = QtGui.QFont()
				font.setBold(True)
				font.setWeight(69)
				item.setFont(font)
				self.availablelist.addItem(item)
		elif self.arradio.isChecked() == True:
			self.availablelist.clear()
			for i in range(len(allrounders)):
				item = QtWidgets.QListWidgetItem(allrounders[i])
				font = QtGui.QFont()
				font.setBold(True)
				font.setWeight(69)
				item.setFont(font)
				self.availablelist.addItem(item)

		elif self.wkradio.isChecked() == True:
			self.availablelist.clear()
			for i in range(len(wcktkeepers)):
				item = QtWidgets.QListWidgetItem(wcktkeepers[i])
				font = QtGui.QFont()
				font.setBold(True)
				font.setWeight(69)
				item.setFont(font)
				self.availablelist.addItem(item)
Exemplo n.º 13
0
 def openF(self):
     self.fname,_ = QtWidgets.QFileDialog.getOpenFileName()
     print(self.fname)
     self.citra.setPixmap(QtGui.QPixmap(self.fname))
Exemplo n.º 14
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1920, 1080)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.main_gl = QtWidgets.QGridLayout()
        self.main_gl.setObjectName("main_gl")
        self.controls_gl = QtWidgets.QGridLayout()
        self.controls_gl.setObjectName("controls_gl")
        self.logo_lb = QtWidgets.QLabel(self.centralwidget)
        self.logo_lb.setStyleSheet("border-image: url(:/images/itu_rov_logo.png);")
        self.logo_lb.setText("")
        self.logo_lb.setObjectName("logo_lb")
        self.controls_gl.addWidget(self.logo_lb, 0, 1, 1, 1)
        self.buttons_gb = QtWidgets.QGroupBox(self.centralwidget)
        self.buttons_gb.setStyleSheet("")
        self.buttons_gb.setTitle("")
        self.buttons_gb.setCheckable(False)
        self.buttons_gb.setChecked(False)
        self.buttons_gb.setObjectName("buttons_gb")
        self.record_pb = QtWidgets.QPushButton(self.buttons_gb)
        self.record_pb.setGeometry(QtCore.QRect(210, 20, 75, 75))
        self.record_pb.setStyleSheet("border-image: url(:/images/stop_record.png);\n"
"border-image: url(:/images/start_record.png);")
        self.record_pb.setText("")
        self.record_pb.setObjectName("record_pb")
        self.takephoto_pb = QtWidgets.QPushButton(self.buttons_gb)
        self.takephoto_pb.setGeometry(QtCore.QRect(20, 20, 75, 75))
        self.takephoto_pb.setStyleSheet("border-image: url(:/images/takepic_b.png);\n"
"border-image: url(:/images/takepic_w.png);\n"
"\n"
"")
        self.takephoto_pb.setText("")
        self.takephoto_pb.setObjectName("takephoto_pb")
        self.startimgprocess_pb = QtWidgets.QPushButton(self.buttons_gb)
        self.startimgprocess_pb.setGeometry(QtCore.QRect(590, 40, 131, 41))
        self.startimgprocess_pb.setObjectName("startimgprocess_pb")
        self.linedetector_pb = QtWidgets.QPushButton(self.buttons_gb)
        self.linedetector_pb.setGeometry(QtCore.QRect(440, 40, 121, 41))
        self.linedetector_pb.setStyleSheet("")
        self.linedetector_pb.setObjectName("linedetector_pb")
        self.cannonphoto_pb = QtWidgets.QPushButton(self.buttons_gb)
        self.cannonphoto_pb.setGeometry(QtCore.QRect(110, 20, 81, 81))
        self.cannonphoto_pb.setStyleSheet("\n"
"\n"
"border-image: url(:/images/cannon.png);")
        self.cannonphoto_pb.setText("")
        self.cannonphoto_pb.setObjectName("cannonphoto_pb")
        self.recordtime_lb = QtWidgets.QLabel(self.buttons_gb)
        self.recordtime_lb.setGeometry(QtCore.QRect(310, 30, 101, 61))
        font = QtGui.QFont()
        font.setFamily("MS Shell Dlg 2")
        font.setPointSize(22)
        font.setStyleStrategy(QtGui.QFont.PreferDefault)
        self.recordtime_lb.setFont(font)
        self.recordtime_lb.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.recordtime_lb.setStyleSheet("border: 2px solid;\n"
"border-color: rgb(85, 0, 127);\n"
"")
        self.recordtime_lb.setAlignment(QtCore.Qt.AlignCenter)
        self.recordtime_lb.setObjectName("recordtime_lb")
        self.camera_gb = QtWidgets.QGroupBox(self.buttons_gb)
        self.camera_gb.setEnabled(True)
        self.camera_gb.setGeometry(QtCore.QRect(1450, 10, 331, 91))
        self.camera_gb.setCheckable(True)
        self.camera_gb.setChecked(False)
        self.camera_gb.setObjectName("camera_gb")
        self.gridLayout = QtWidgets.QGridLayout(self.camera_gb)
        self.gridLayout.setObjectName("gridLayout")
        self.frontcam_pb = QtWidgets.QPushButton(self.camera_gb)
        self.frontcam_pb.setObjectName("frontcam_pb")
        self.gridLayout.addWidget(self.frontcam_pb, 0, 0, 1, 1)
        self.bottomcam_pb = QtWidgets.QPushButton(self.camera_gb)
        self.bottomcam_pb.setObjectName("bottomcam_pb")
        self.gridLayout.addWidget(self.bottomcam_pb, 0, 1, 1, 1)
        self.closecam_pb = QtWidgets.QPushButton(self.camera_gb)
        self.closecam_pb.setObjectName("closecam_pb")
        self.gridLayout.addWidget(self.closecam_pb, 0, 2, 1, 1)
        self.cameratype_lb = QtWidgets.QLabel(self.camera_gb)
        self.cameratype_lb.setObjectName("cameratype_lb")
        self.gridLayout.addWidget(self.cameratype_lb, 1, 0, 1, 1)
        self.st_cameratype_lb = QtWidgets.QLabel(self.camera_gb)
        self.st_cameratype_lb.setText("")
        self.st_cameratype_lb.setObjectName("st_cameratype_lb")
        self.gridLayout.addWidget(self.st_cameratype_lb, 1, 1, 1, 2)
        self.warnings_lb = QtWidgets.QLabel(self.buttons_gb)
        self.warnings_lb.setGeometry(QtCore.QRect(694, 10, 701, 81))
        self.warnings_lb.setText("")
        self.warnings_lb.setObjectName("warnings_lb")
        self.takephoto_pb.raise_()
        self.startimgprocess_pb.raise_()
        self.linedetector_pb.raise_()
        self.cannonphoto_pb.raise_()
        self.recordtime_lb.raise_()
        self.record_pb.raise_()
        self.camera_gb.raise_()
        self.warnings_lb.raise_()
        self.controls_gl.addWidget(self.buttons_gb, 0, 0, 1, 1)
        self.controls_gl.setColumnStretch(0, 95)
        self.controls_gl.setColumnStretch(1, 5)
        self.main_gl.addLayout(self.controls_gl, 1, 0, 1, 1)
        self.frame = QtWidgets.QFrame(self.centralwidget)
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.camera_lb = QtWidgets.QLabel(self.frame)
        self.camera_lb.setGeometry(QtCore.QRect(2, 2, 1891, 951))
        self.camera_lb.setText("")
        self.camera_lb.setObjectName("camera_lb")
        self.verticalLayoutWidget = QtWidgets.QWidget(self.frame)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(1619, 10, 261, 251))
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        compass = CompassWidget()
        self.verticalLayout.addWidget(compass)
        self.main_gl.addWidget(self.frame, 0, 0, 1, 1)
        self.main_gl.setRowStretch(0, 90)
        self.main_gl.setRowStretch(1, 10)
        self.gridLayout_2.addLayout(self.main_gl, 0, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)

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

        self.camera_lb.setAlignment(QtCore.Qt.AlignTop)
        self.warnings_lb.setAlignment(QtCore.Qt.AlignHCenter)
        self.takephoto_pb.clicked.connect(self.takepic)
        self.record_pb.clicked.connect(self.record)
        self.cannonphoto_pb.clicked.connect(self.cannonpic)
        self.closecam_pb.clicked.connect(self.closecam_pb_event)
        self.bottomcam_pb.clicked.connect(self.bottomcam_pb_event)
        self.frontcam_pb.clicked.connect(self.frontcam_pb_event)

        self.record_bool = False
        self.takepic_bool = False
        self.record_bool1 = True
        self.i = 0
        self.img_ctr = 0
        self.camera_var = 0
        self.st_cameratype_lb_text = "Close"
        self.message = ""
        self.warnings_list = []

        self.th = CameraShowThread(MainWindow)
        self.th.changePixmap.connect(self.setImage)
        self.th.start()

        self.timer = QtCore.QTimer() 
        self.timer.timeout.connect(lambda: self.timer_func()) 
        self.timer.start(200)
Exemplo n.º 15
0
    def __init__(self, parent=None):
        super(Definicion_Petro, self).__init__(parent)
        self.setWindowTitle(QtWidgets.QApplication.translate(
            "pychemqt", "Petrol component definition"))

        layout = QtWidgets.QVBoxLayout(self)
        self.toolBox = QtWidgets.QTabWidget()
        self.toolBox.setTabPosition(QtWidgets.QTabWidget.South)
        layout.addWidget(self.toolBox)

        # Distillation data definition
        distilationPage = QtWidgets.QWidget()
        self.toolBox.addTab(
            distilationPage,
            QtWidgets.QApplication.translate("pychemqt", "Distillation data"))
        lyt = QtWidgets.QGridLayout(distilationPage)

        # Widget with curve functionality
        curveWidget = QtWidgets.QWidget()
        lytcurve = QtWidgets.QGridLayout(curveWidget)
        lytcurve.addWidget(QtWidgets.QLabel("Curve type"), 1, 1)
        self.tipoCurva = QtWidgets.QComboBox()
        for method in Petroleo.CURVE_TYPE:
            self.tipoCurva.addItem(method)
        self.tipoCurva.currentIndexChanged.connect(self.curveIndexChanged)
        lytcurve.addWidget(self.tipoCurva, 1, 2)
        self.curvaDestilacion = InputTableWidget(2)
        self.curvaDestilacion.tabla.horizontalHeader().show()
        self.curvaDestilacion.tabla.rowFinished.connect(self.checkStatusCurve)
        lytcurve.addWidget(self.curvaDestilacion, 2, 1, 3, 3)
        self.regresionButton = QtWidgets.QPushButton(QtGui.QIcon(QtGui.QPixmap(
            os.path.join(IMAGE_PATH, "button", "fit.png"))),
            QtWidgets.QApplication.translate("pychemqt", "Regression"))
        self.regresionButton.setToolTip(QtWidgets.QApplication.translate(
            "pychemqt", "Calculate missing required values from a curve fit"))
        self.regresionButton.clicked.connect(self.regresionCurve)
        lytcurve.addWidget(self.regresionButton, 2, 3)
        self.finishButton = QtWidgets.QPushButton(QtGui.QIcon(QtGui.QPixmap(
            os.path.join(IMAGE_PATH, "button", "arrow-right.png"))),
            QtWidgets.QApplication.translate("pychemqt", "Finish"))
        self.finishButton.clicked.connect(self.finishCurva)
        lytcurve.addWidget(self.finishButton, 5, 3)
        lytcurve.addWidget(QtWidgets.QLabel(
            QtWidgets.QApplication.translate("pychemqt", "Pressure")), 5, 1)
        self.presion = Entrada_con_unidades(Pressure, value=101325.)
        self.presion.valueChanged.connect(partial(
            self.changeParams, "P_curve"))
        lytcurve.addWidget(self.presion, 5, 2)
        lytcurve.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding), 6, 4)

        # Widget with crude functionality
        crudeWidget = QtWidgets.QWidget()
        lytcrude = QtWidgets.QGridLayout(crudeWidget)
        self.crudo = QtWidgets.QComboBox()
        self.crudo.addItem("")
        query = "SELECT name, location, API, sulfur FROM CrudeOil"
        sql.databank.execute(query)
        for name, location, API, sulfur in sql.databank:
            self.crudo.addItem("%s (%s)  API: %s %s: %s" % (
                name, location, API, "%S", sulfur))
        self.crudo.currentIndexChanged.connect(partial(
            self.changeParams, "index"))
        lytcrude.addWidget(self.crudo, 1, 1, 1, 2)
        lytcrude.addWidget(QtWidgets.QLabel("Pseudo C+"), 2, 1)
        self.Cplus = Entrada_con_unidades(int, width=50)
        self.Cplus.valueChanged.connect(partial(self.changeParams, "Cplus"))
        lytcrude.addWidget(self.Cplus, 2, 2)

        self.checkCurva = QtWidgets.QRadioButton(
            QtWidgets.QApplication.translate(
                "pychemqt", "Define destillation curve"))
        self.checkCurva.toggled.connect(curveWidget.setEnabled)
        curveWidget.setEnabled(False)
        lyt.addWidget(self.checkCurva, 1, 1, 1, 2)
        lyt.addWidget(curveWidget, 2, 1, 1, 2)
        lyt.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed),
            3, 1)
        self.checkCrudo = QtWidgets.QRadioButton(
            QtWidgets.QApplication.translate(
                "pychemqt", "Use petrol fraction from list"))
        self.checkCrudo.toggled.connect(self.changeUnknown)
        self.checkCrudo.toggled.connect(crudeWidget.setEnabled)
        crudeWidget.setEnabled(False)
        lyt.addWidget(self.checkCrudo, 4, 1, 1, 2)
        lyt.addWidget(crudeWidget, 5, 1, 1, 2)
        lyt.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed),
            6, 1, 1, 2)
        self.checkBlend = QtWidgets.QCheckBox(QtWidgets.QApplication.translate(
            "pychemqt", "Blend if its necessary"))
        lyt.addWidget(self.checkBlend, 7, 1, 1, 2)
        self.cutButton = QtWidgets.QPushButton(
            QtWidgets.QApplication.translate("pychemqt", "Define cut ranges"))
        self.cutButton.setEnabled(False)
        self.cutButton.clicked.connect(self.showCutRange)
        lyt.addWidget(self.cutButton, 7, 2)
        self.checkBlend.toggled.connect(self.cutButton.setEnabled)
        lyt.addItem(QtWidgets.QSpacerItem(
            5, 5, QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding), 8, 1)

        # Definition with bulk properties
        definitionPage = QtWidgets.QWidget()
        self.toolBox.addTab(
            definitionPage,
            QtWidgets.QApplication.translate("pychemqt", "Bulk Definition"))

        lyt = QtWidgets.QGridLayout(definitionPage)
        txt = QtWidgets.QLabel("Tb")
        txt.setToolTip(
            QtWidgets.QApplication.translate("pychemqt", "Boiling point"))
        lyt.addWidget(txt, 1, 1)
        self.Tb = Entrada_con_unidades(Temperature)
        self.Tb.valueChanged.connect(partial(self.changeParams, "Tb"))
        lyt.addWidget(self.Tb, 1, 2)
        txt = QtWidgets.QLabel("M")
        txt.setToolTip(
            QtWidgets.QApplication.translate("pychemqt", "Molecular weight"))
        lyt.addWidget(txt, 2, 1)
        self.M = Entrada_con_unidades(float, textounidad="g/mol")
        self.M.valueChanged.connect(partial(self.changeParams, "M"))
        lyt.addWidget(self.M, 2, 2)
        txt = QtWidgets.QLabel("SG")
        txt.setToolTip(
            QtWidgets.QApplication.translate("pychemqt", "Specific Gravity"))
        lyt.addWidget(txt, 3, 1)
        self.SG = Entrada_con_unidades(float)
        self.SG.valueChanged.connect(partial(self.changeParams, "SG"))
        lyt.addWidget(self.SG, 3, 2)
        txt = QtWidgets.QLabel("API")
        txt.setToolTip(
            QtWidgets.QApplication.translate("pychemqt", "API Gravity"))
        lyt.addWidget(txt, 4, 1)
        self.API = Entrada_con_unidades(float)
        self.API.valueChanged.connect(partial(self.changeParams, "API"))
        lyt.addWidget(self.API, 4, 2)
        txt = QtWidgets.QLabel("Kw")
        txt.setToolTip(QtWidgets.QApplication.translate(
            "pychemqt", "Watson characterization factor"))
        lyt.addWidget(txt, 5, 1)
        self.Kw = Entrada_con_unidades(float)
        self.Kw.valueChanged.connect(partial(self.changeParams, "Kw"))
        lyt.addWidget(self.Kw, 5, 2)
        lyt.addWidget(QtWidgets.QLabel("C/H"), 6, 1)
        self.CH = Entrada_con_unidades(float)
        self.CH.valueChanged.connect(partial(self.changeParams, "CH"))
        lyt.addWidget(self.CH, 6, 2)
        txt = QtWidgets.QLabel("ν<sub>100F</sub>")
        txt.setToolTip(QtWidgets.QApplication.translate(
            "pychemqt", "Kinematic viscosity at 100ºF"))
        lyt.addWidget(txt, 7, 1)
        self.v100 = Entrada_con_unidades(Diffusivity)
        self.v100.valueChanged.connect(partial(self.changeParams, "v100"))
        lyt.addWidget(self.v100, 7, 2)
        txt = QtWidgets.QLabel("ν<sub>210F</sub>")
        txt.setToolTip(QtWidgets.QApplication.translate(
            "pychemqt", "Kinematic viscosity at 210ºF"))
        lyt.addWidget(txt, 8, 1)
        self.v210 = Entrada_con_unidades(Diffusivity)
        self.v210.valueChanged.connect(partial(self.changeParams, "v210"))
        lyt.addWidget(self.v210, 8, 2)
        txt = QtWidgets.QLabel("n")
        txt.setToolTip(QtWidgets.QApplication.translate(
            "pychemqt", "Refractive index"))
        lyt.addWidget(txt, 9, 1)
        self.n = Entrada_con_unidades(float)
        self.n.valueChanged.connect(partial(self.changeParams, "n"))
        lyt.addWidget(self.n, 9, 2)
        txt = QtWidgets.QLabel("I")
        txt.setToolTip(QtWidgets.QApplication.translate(
            "pychemqt", "Huang Parameter"))
        lyt.addWidget(txt, 10, 1)
        self.I = Entrada_con_unidades(float)
        self.I.valueChanged.connect(partial(self.changeParams, "I"))
        lyt.addWidget(self.I, 10, 2)
        lyt.addWidget(QtWidgets.QLabel("%S"), 11, 1)
        self.S = Entrada_con_unidades(float, spinbox=True, step=1.0, max=100)
        self.S.valueChanged.connect(partial(self.changeParams, "S"))
        lyt.addWidget(self.S, 11, 2)
        lyt.addWidget(QtWidgets.QLabel("%H"), 12, 1)
        self.H = Entrada_con_unidades(float, spinbox=True, step=1.0, max=100)
        self.H.valueChanged.connect(partial(self.changeParams, "H"))
        lyt.addWidget(self.H, 12, 2)
        lyt.addWidget(QtWidgets.QLabel("%N"), 13, 1)
        self.N = Entrada_con_unidades(float, spinbox=True, step=1.0, max=100)
        self.N.valueChanged.connect(partial(self.changeParams, "N"))
        lyt.addWidget(self.N, 13, 2)

        lyt.addItem(QtWidgets.QSpacerItem(
            10, 10, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed),
            14, 1, 1, 2)
        lyt.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Alternate definition, poor accuracy")), 15, 1, 1, 2)
        txt = QtWidgets.QLabel("Nc")
        txt.setToolTip(QtWidgets.QApplication.translate(
            "pychemqt", "Carbon number"))
        lyt.addWidget(txt, 16, 1)
        self.Nc = Entrada_con_unidades(int, width=50)
        self.Nc.valueChanged.connect(partial(self.changeParams, "Nc"))
        lyt.addWidget(self.Nc, 16, 2)

        # Configuration
        configPage = prefPetro.Widget(Preferences)
        self.toolBox.addTab(
            configPage,
            QtGui.QIcon(IMAGE_PATH + "button/configure.png"),
            QtWidgets.QApplication.translate("pychemqt", "Configuration"))

        # Initialization section
        newComponent.loadUI(self)
        self.curveParameters = None  # Fitting parameter for distillation curve

        self.Petroleo = Petroleo()
        self.Crudo = Crudo()
        self.curveIndexChanged(0)
        self.checkStatusCurve()
Exemplo n.º 16
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1500, 808)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/icons/rake.jpg"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(10, 0, 431, 61))
        self.label.setStyleSheet("font: 36pt \"Calibri\";\n" "")
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self.centralwidget)
        self.label_2.setGeometry(QtCore.QRect(90, 140, 981, 541))
        self.label_2.setText("")
        self.label_2.setPixmap(QtGui.QPixmap(":/photos/others/walle_3.jpg"))
        self.label_2.setObjectName("label_2")
        self.verticalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(
            1040, 240, 331, 345))
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.pushButton_3 = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.pushButton_3.setStyleSheet(
            "background-color: rgb(255, 255, 255,0);")
        self.pushButton_3.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(
            QtGui.QPixmap(
                ":/icons/icons/png-transparent-computer-icons-symbol-plus-icon-miscellaneous-plus-cross-thumbnail.png"
            ), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton_3.setIcon(icon1)
        self.pushButton_3.setIconSize(QtCore.QSize(80, 80))
        self.pushButton_3.setCheckable(True)
        self.pushButton_3.setObjectName("pushButton_3")
        self.verticalLayout.addWidget(self.pushButton_3)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.pushButton = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.pushButton.setStyleSheet(
            "background-color: rgb(255, 255, 255,0);")
        self.pushButton.setText("")
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/icons/icons/left.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton.setIcon(icon2)
        self.pushButton.setIconSize(QtCore.QSize(120, 120))
        self.pushButton.setCheckable(True)
        self.pushButton.setObjectName("pushButton")
        self.horizontalLayout.addWidget(self.pushButton, 0,
                                        QtCore.Qt.AlignLeft)
        self.pushButton_2 = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.pushButton_2.setStyleSheet(
            "background-color: rgb(255, 255, 255,0);")
        self.pushButton_2.setText("")
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(":/icons/icons/right.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton_2.setIcon(icon3)
        self.pushButton_2.setIconSize(QtCore.QSize(120, 120))
        self.pushButton_2.setCheckable(True)
        self.pushButton_2.setObjectName("pushButton_2")
        self.horizontalLayout.addWidget(self.pushButton_2, 0,
                                        QtCore.Qt.AlignRight)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.pushButton_4 = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.pushButton_4.setStyleSheet(
            "background-color: rgb(255, 255, 255,0);")
        self.pushButton_4.setText("")
        icon4 = QtGui.QIcon()
        icon4.addPixmap(
            QtGui.QPixmap(
                ":/icons/icons/png-transparent-black-line-illustration-plus-and-minus-signs-computer-icons-plus-minus-sign-meno-symbol-minus.png"
            ), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton_4.setIcon(icon4)
        self.pushButton_4.setIconSize(QtCore.QSize(100, 100))
        self.pushButton_4.setCheckable(True)
        self.pushButton_4.setObjectName("pushButton_4")
        self.verticalLayout.addWidget(self.pushButton_4)
        self.commandLinkButton = QtWidgets.QCommandLinkButton(
            self.centralwidget)
        self.commandLinkButton.setGeometry(QtCore.QRect(1290, 0, 222, 48))
        self.commandLinkButton.setObjectName("commandLinkButton")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1500, 26))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Exemplo n.º 17
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1406, 895)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.scrollArea_2 = QtWidgets.QScrollArea(self.centralwidget)
        self.scrollArea_2.setGeometry(QtCore.QRect(1120, 30, 281, 511))
        self.scrollArea_2.setWidgetResizable(True)
        self.scrollArea_2.setObjectName("scrollArea_2")
        self.scrollAreaWidgetContents_2 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 279, 509))
        self.scrollAreaWidgetContents_2.setObjectName("scrollAreaWidgetContents_2")
        self.searchTabWidget = QtWidgets.QTabWidget(self.scrollAreaWidgetContents_2)
        self.searchTabWidget.setGeometry(QtCore.QRect(0, 0, 281, 511))
        font = QtGui.QFont()
        font.setFamily("宋体")
        self.searchTabWidget.setFont(font)
        self.searchTabWidget.setTabPosition(QtWidgets.QTabWidget.North)
        self.searchTabWidget.setObjectName("searchTabWidget")
        self.index_tab = QtWidgets.QWidget()
        self.index_tab.setObjectName("index_tab")
        self.createIndex_btn = QtWidgets.QPushButton(self.index_tab)
        self.createIndex_btn.setGeometry(QtCore.QRect(20, 410, 111, 41))
        self.createIndex_btn.setObjectName("createIndex_btn")
        self.indexSelectBox1 = QtWidgets.QComboBox(self.index_tab)
        self.indexSelectBox1.setGeometry(QtCore.QRect(20, 50, 241, 31))
        self.indexSelectBox1.setEditable(False)
        self.indexSelectBox1.setObjectName("indexSelectBox1")
        self.indexSelectBox1.addItem("")
        self.indexSelectBox1.addItem("")
        self.indexLabel1 = QtWidgets.QLabel(self.index_tab)
        self.indexLabel1.setGeometry(QtCore.QRect(20, 20, 201, 31))
        font = QtGui.QFont()
        font.setFamily("宋体")
        font.setPointSize(9)
        self.indexLabel1.setFont(font)
        self.indexLabel1.setObjectName("indexLabel1")
        self.indexSelectBox2 = QtWidgets.QComboBox(self.index_tab)
        self.indexSelectBox2.setGeometry(QtCore.QRect(20, 130, 241, 31))
        self.indexSelectBox2.setEditable(False)
        self.indexSelectBox2.setObjectName("indexSelectBox2")
        self.indexLabel2 = QtWidgets.QLabel(self.index_tab)
        self.indexLabel2.setGeometry(QtCore.QRect(20, 100, 201, 31))
        font = QtGui.QFont()
        font.setFamily("宋体")
        font.setPointSize(9)
        self.indexLabel2.setFont(font)
        self.indexLabel2.setObjectName("indexLabel2")
        self.showIndexes_btn = QtWidgets.QPushButton(self.index_tab)
        self.showIndexes_btn.setGeometry(QtCore.QRect(150, 410, 111, 41))
        self.showIndexes_btn.setObjectName("showIndexes_btn")
        self.indexEdit = QtWidgets.QTextEdit(self.index_tab)
        self.indexEdit.setGeometry(QtCore.QRect(20, 190, 241, 131))
        self.indexEdit.setObjectName("indexEdit")
        self.indexNameLabel = QtWidgets.QLabel(self.index_tab)
        self.indexNameLabel.setGeometry(QtCore.QRect(30, 350, 51, 31))
        self.indexNameLabel.setObjectName("indexNameLabel")
        self.indexNameEdit = QtWidgets.QLineEdit(self.index_tab)
        self.indexNameEdit.setGeometry(QtCore.QRect(92, 350, 161, 31))
        self.indexNameEdit.setObjectName("indexNameEdit")
        self.searchTabWidget.addTab(self.index_tab, "")
        self.special_search_tab = QtWidgets.QWidget()
        self.special_search_tab.setObjectName("special_search_tab")
        self.specialSelectBox = QtWidgets.QComboBox(self.special_search_tab)
        self.specialSelectBox.setGeometry(QtCore.QRect(20, 10, 241, 31))
        self.specialSelectBox.setEditable(False)
        self.specialSelectBox.setObjectName("specialSelectBox")
        self.specialSelectBox.addItem("")
        self.specialSelectBox.addItem("")
        self.specialSelectBox.addItem("")
        self.selectBox_group1 = QtWidgets.QComboBox(self.special_search_tab)
        self.selectBox_group1.setGeometry(QtCore.QRect(20, 90, 241, 31))
        self.selectBox_group1.setEditable(False)
        self.selectBox_group1.setObjectName("selectBox_group1")
        self.selectBox_group1.addItem("")
        self.selectBox_group1.addItem("")
        self.selectLabel_group1 = QtWidgets.QLabel(self.special_search_tab)
        self.selectLabel_group1.setGeometry(QtCore.QRect(20, 60, 201, 31))
        font = QtGui.QFont()
        font.setFamily("宋体")
        font.setPointSize(9)
        self.selectLabel_group1.setFont(font)
        self.selectLabel_group1.setObjectName("selectLabel_group1")
        self.specialCreateView_btn = QtWidgets.QPushButton(self.special_search_tab)
        self.specialCreateView_btn.setGeometry(QtCore.QRect(150, 410, 111, 41))
        self.specialCreateView_btn.setObjectName("specialCreateView_btn")
        self.specialSearch_btn = QtWidgets.QPushButton(self.special_search_tab)
        self.specialSearch_btn.setGeometry(QtCore.QRect(20, 410, 111, 41))
        self.specialSearch_btn.setObjectName("specialSearch_btn")
        self.selectBox_group2 = QtWidgets.QComboBox(self.special_search_tab)
        self.selectBox_group2.setGeometry(QtCore.QRect(20, 170, 241, 31))
        self.selectBox_group2.setEditable(False)
        self.selectBox_group2.setObjectName("selectBox_group2")
        self.selectLabel_group2 = QtWidgets.QLabel(self.special_search_tab)
        self.selectLabel_group2.setGeometry(QtCore.QRect(20, 140, 201, 31))
        font = QtGui.QFont()
        font.setFamily("宋体")
        font.setPointSize(9)
        self.selectLabel_group2.setFont(font)
        self.selectLabel_group2.setObjectName("selectLabel_group2")
        self.searchTabWidget.addTab(self.special_search_tab, "")
        self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2)
        self.scrollArea_3 = QtWidgets.QScrollArea(self.centralwidget)
        self.scrollArea_3.setGeometry(QtCore.QRect(0, 0, 281, 811))
        self.scrollArea_3.setWidgetResizable(True)
        self.scrollArea_3.setObjectName("scrollArea_3")
        self.scrollAreaWidgetContents_3 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_3.setGeometry(QtCore.QRect(0, 0, 279, 809))
        self.scrollAreaWidgetContents_3.setObjectName("scrollAreaWidgetContents_3")
        self.pokebase_label = QtWidgets.QLabel(self.scrollAreaWidgetContents_3)
        self.pokebase_label.setGeometry(QtCore.QRect(10, 0, 101, 31))
        font = QtGui.QFont()
        font.setFamily("黑体")
        font.setPointSize(12)
        self.pokebase_label.setFont(font)
        self.pokebase_label.setObjectName("pokebase_label")
        self.table_list = QtWidgets.QListWidget(self.scrollAreaWidgetContents_3)
        self.table_list.setGeometry(QtCore.QRect(0, 30, 281, 781))
        self.table_list.setResizeMode(QtWidgets.QListView.Adjust)
        self.table_list.setObjectName("table_list")
        self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_3)
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        self.tabWidget.setGeometry(QtCore.QRect(300, 0, 801, 811))
        self.tabWidget.setIconSize(QtCore.QSize(20, 20))
        self.tabWidget.setTabsClosable(True)
        self.tabWidget.setMovable(True)
        self.tabWidget.setTabBarAutoHide(False)
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
        self.scrollArea = QtWidgets.QScrollArea(self.tab)
        self.scrollArea.setGeometry(QtCore.QRect(0, 30, 791, 741))
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 789, 739))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.table_info = QtWidgets.QTableWidget(self.scrollAreaWidgetContents)
        self.table_info.setGeometry(QtCore.QRect(0, 0, 791, 741))
        self.table_info.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
        self.table_info.setObjectName("table_info")
        self.table_info.setColumnCount(0)
        self.table_info.setRowCount(0)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.add_btn = QtWidgets.QPushButton(self.tab)
        self.add_btn.setGeometry(QtCore.QRect(0, 0, 61, 31))
        self.add_btn.setObjectName("add_btn")
        self.delete_btn = QtWidgets.QPushButton(self.tab)
        self.delete_btn.setGeometry(QtCore.QRect(60, 0, 61, 31))
        self.delete_btn.setObjectName("delete_btn")
        self.buttonBox = QtWidgets.QDialogButtonBox(self.tab)
        self.buttonBox.setEnabled(False)
        self.buttonBox.setGeometry(QtCore.QRect(590, 0, 193, 28))
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.tabWidget.addTab(self.tab, "")
        self.scrollArea_4 = QtWidgets.QScrollArea(self.centralwidget)
        self.scrollArea_4.setGeometry(QtCore.QRect(1120, 550, 281, 251))
        self.scrollArea_4.setWidgetResizable(True)
        self.scrollArea_4.setObjectName("scrollArea_4")
        self.scrollAreaWidgetContents_4 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 279, 249))
        self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4")
        self.sql_text = QtWidgets.QTextBrowser(self.scrollAreaWidgetContents_4)
        self.sql_text.setGeometry(QtCore.QRect(0, 30, 281, 221))
        self.sql_text.setObjectName("sql_text")
        self.sql_label = QtWidgets.QLabel(self.scrollAreaWidgetContents_4)
        self.sql_label.setGeometry(QtCore.QRect(10, 0, 81, 31))
        font = QtGui.QFont()
        font.setFamily("黑体")
        font.setPointSize(12)
        font.setBold(False)
        font.setWeight(50)
        self.sql_label.setFont(font)
        self.sql_label.setObjectName("sql_label")
        self.scrollArea_4.setWidget(self.scrollAreaWidgetContents_4)
        self.error_label = QtWidgets.QLabel(self.centralwidget)
        self.error_label.setGeometry(QtCore.QRect(10, 820, 1381, 20))
        self.error_label.setText("")
        self.error_label.setObjectName("error_label")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1406, 26))
        self.menubar.setObjectName("menubar")
        self.database_menu = QtWidgets.QMenu(self.menubar)
        self.database_menu.setObjectName("database_menu")
        self.table_menu = QtWidgets.QMenu(self.menubar)
        self.table_menu.setObjectName("table_menu")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.connect_action = QtWidgets.QAction(MainWindow)
        self.connect_action.setCheckable(True)
        self.connect_action.setObjectName("connect_action")
        self.disconnect_action = QtWidgets.QAction(MainWindow)
        self.disconnect_action.setCheckable(True)
        self.disconnect_action.setObjectName("disconnect_action")
        self.add_action = QtWidgets.QAction(MainWindow)
        self.add_action.setCheckable(True)
        self.add_action.setObjectName("add_action")
        self.delete_action = QtWidgets.QAction(MainWindow)
        self.delete_action.setCheckable(True)
        self.delete_action.setObjectName("delete_action")
        self.database_menu.addAction(self.connect_action)
        self.database_menu.addAction(self.disconnect_action)
        self.table_menu.addAction(self.add_action)
        self.table_menu.addAction(self.delete_action)
        self.menubar.addAction(self.database_menu.menuAction())
        self.menubar.addAction(self.table_menu.menuAction())

        self.retranslateUi(MainWindow)
        self.searchTabWidget.setCurrentIndex(0)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Exemplo n.º 18
0
    def setupUi(self, ConversionWindow):
        ConversionWindow.setObjectName("ConversionWindow")
        ConversionWindow.resize(800, 400)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            ConversionWindow.sizePolicy().hasHeightForWidth())
        ConversionWindow.setSizePolicy(sizePolicy)
        ConversionWindow.setMinimumSize(QtCore.QSize(800, 400))
        ConversionWindow.setMaximumSize(QtCore.QSize(800, 400))
        self.centralwidget = QtWidgets.QWidget(ConversionWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setEnabled(True)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setMinimumSize(QtCore.QSize(0, 89))
        self.label.setMaximumSize(QtCore.QSize(16777215, 89))
        self.label.setSizeIncrement(QtCore.QSize(0, 0))
        self.label.setBaseSize(QtCore.QSize(0, 0))
        self.label.setPixmap(QtGui.QPixmap(":/resources/logo.png"))
        self.label.setScaledContents(False)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setWordWrap(False)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        self.tabWidget.setTabPosition(QtWidgets.QTabWidget.North)
        self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded)
        self.tabWidget.setObjectName("tabWidget")
        self.temp_tab = QtWidgets.QWidget()
        self.temp_tab.setObjectName("temp_tab")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.temp_tab)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.label_2 = QtWidgets.QLabel(self.temp_tab)
        self.label_2.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName("label_2")
        self.gridLayout_3.addWidget(self.label_2, 0, 0, 1, 1)
        self.temp_input = QtWidgets.QLineEdit(self.temp_tab)
        self.temp_input.setMinimumSize(QtCore.QSize(150, 0))
        self.temp_input.setMaximumSize(QtCore.QSize(200, 16777215))
        self.temp_input.setInputMask("")
        self.temp_input.setText("")
        self.temp_input.setObjectName("temp_input")
        self.gridLayout_3.addWidget(self.temp_input, 0, 1, 1, 1)
        self.temp_input_combo = QtWidgets.QComboBox(self.temp_tab)
        self.temp_input_combo.setMinimumSize(QtCore.QSize(125, 0))
        self.temp_input_combo.setObjectName("temp_input_combo")
        self.temp_input_combo.addItem("")
        self.temp_input_combo.addItem("")
        self.temp_input_combo.addItem("")
        self.gridLayout_3.addWidget(self.temp_input_combo, 0, 2, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.temp_tab)
        self.label_3.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName("label_3")
        self.gridLayout_3.addWidget(self.label_3, 0, 3, 1, 1)
        self.temp_output = QtWidgets.QLineEdit(self.temp_tab)
        self.temp_output.setMinimumSize(QtCore.QSize(150, 0))
        self.temp_output.setMaximumSize(QtCore.QSize(200, 16777215))
        self.temp_output.setObjectName("temp_output")
        self.gridLayout_3.addWidget(self.temp_output, 0, 4, 1, 1)
        self.temp_output_combo = QtWidgets.QComboBox(self.temp_tab)
        self.temp_output_combo.setMinimumSize(QtCore.QSize(125, 0))
        self.temp_output_combo.setObjectName("temp_output_combo")
        self.temp_output_combo.addItem("")
        self.temp_output_combo.addItem("")
        self.temp_output_combo.addItem("")
        self.gridLayout_3.addWidget(self.temp_output_combo, 0, 5, 1, 1)
        self.splitter = QtWidgets.QSplitter(self.temp_tab)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.convert_temp = QtWidgets.QPushButton(self.splitter)
        self.convert_temp.setMaximumSize(QtCore.QSize(100, 25))
        self.convert_temp.setObjectName("convert_temp")
        self.clear_temp = QtWidgets.QPushButton(self.splitter)
        self.clear_temp.setMaximumSize(QtCore.QSize(100, 25))
        self.clear_temp.setObjectName("clear_temp")
        self.gridLayout_3.addWidget(self.splitter, 1, 2, 1, 3)
        self.tabWidget.addTab(self.temp_tab, "")
        self.mass_tab = QtWidgets.QWidget()
        self.mass_tab.setObjectName("mass_tab")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.mass_tab)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.label_6 = QtWidgets.QLabel(self.mass_tab)
        self.label_6.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_6.setObjectName("label_6")
        self.gridLayout_2.addWidget(self.label_6, 0, 0, 1, 1)
        self.mass_input = QtWidgets.QLineEdit(self.mass_tab)
        self.mass_input.setMinimumSize(QtCore.QSize(150, 0))
        self.mass_input.setMaximumSize(QtCore.QSize(200, 16777215))
        self.mass_input.setInputMask("")
        self.mass_input.setText("")
        self.mass_input.setObjectName("mass_input")
        self.gridLayout_2.addWidget(self.mass_input, 0, 1, 1, 1)
        self.mass_input_combo = QtWidgets.QComboBox(self.mass_tab)
        self.mass_input_combo.setMinimumSize(QtCore.QSize(125, 0))
        self.mass_input_combo.setObjectName("mass_input_combo")
        self.mass_input_combo.addItem("")
        self.mass_input_combo.addItem("")
        self.mass_input_combo.addItem("")
        self.gridLayout_2.addWidget(self.mass_input_combo, 0, 2, 1, 1)
        self.label_7 = QtWidgets.QLabel(self.mass_tab)
        self.label_7.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignTrailing
                                  | QtCore.Qt.AlignVCenter)
        self.label_7.setObjectName("label_7")
        self.gridLayout_2.addWidget(self.label_7, 0, 3, 1, 1)
        self.mass_output = QtWidgets.QLineEdit(self.mass_tab)
        self.mass_output.setMinimumSize(QtCore.QSize(150, 0))
        self.mass_output.setMaximumSize(QtCore.QSize(200, 16777215))
        self.mass_output.setObjectName("mass_output")
        self.gridLayout_2.addWidget(self.mass_output, 0, 4, 1, 1)
        self.mass_output_combo = QtWidgets.QComboBox(self.mass_tab)
        self.mass_output_combo.setMinimumSize(QtCore.QSize(125, 0))
        self.mass_output_combo.setObjectName("mass_output_combo")
        self.mass_output_combo.addItem("")
        self.mass_output_combo.addItem("")
        self.mass_output_combo.addItem("")
        self.gridLayout_2.addWidget(self.mass_output_combo, 0, 5, 1, 1)
        self.splitter_3 = QtWidgets.QSplitter(self.mass_tab)
        self.splitter_3.setOrientation(QtCore.Qt.Horizontal)
        self.splitter_3.setObjectName("splitter_3")
        self.convert_mass = QtWidgets.QPushButton(self.splitter_3)
        self.convert_mass.setMaximumSize(QtCore.QSize(100, 25))
        self.convert_mass.setObjectName("convert_mass")
        self.clear_mass = QtWidgets.QPushButton(self.splitter_3)
        self.clear_mass.setMaximumSize(QtCore.QSize(100, 25))
        self.clear_mass.setObjectName("clear_mass")
        self.gridLayout_2.addWidget(self.splitter_3, 1, 2, 1, 3)
        self.tabWidget.addTab(self.mass_tab, "")
        self.gridLayout.addWidget(self.tabWidget, 1, 0, 1, 1)
        self.tabWidget.raise_()
        self.label.raise_()
        ConversionWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(ConversionWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 22))
        self.menubar.setObjectName("menubar")
        ConversionWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(ConversionWindow)
        self.statusbar.setObjectName("statusbar")
        ConversionWindow.setStatusBar(self.statusbar)

        self.retranslateUi(ConversionWindow)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(ConversionWindow)
Exemplo n.º 19
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 480)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        font = QtGui.QFont()
        font.setPointSize(12)
        self.tabWidget.setFont(font)
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
        self.startbutton_easy = QtWidgets.QPushButton(self.tab)
        self.startbutton_easy.setGeometry(QtCore.QRect(30, 280, 151, 71))
        self.startbutton_easy.clicked.connect(self.startbutton_easy_clicked)
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.startbutton_easy.setFont(font)
        self.startbutton_easy.setStyleSheet("background-color: rgb(0, 255, 0);")
        self.startbutton_easy.setObjectName("startbutton_easy")
        self.stopbutton_easy = QtWidgets.QPushButton(self.tab)
        self.stopbutton_easy.setGeometry(QtCore.QRect(230, 280, 151, 71))
        self.stopbutton_easy.clicked.connect(self.stopbutton_easy_clicked)
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.stopbutton_easy.setFont(font)
        self.stopbutton_easy.setStyleSheet("background-color: rgb(255, 0, 0);")
        self.stopbutton_easy.setObjectName("stopbutton_easy")
        self.button_prog1 = QtWidgets.QPushButton(self.tab)
        self.button_prog1.setGeometry(QtCore.QRect(30, 60, 120, 75))
        self.button_prog1.setObjectName("button_prog1")
        self.button_prog1.clicked.connect(self.program1)
        self.button_prog3 = QtWidgets.QPushButton(self.tab)
        self.button_prog3.setGeometry(QtCore.QRect(370, 60, 120, 75))
        self.button_prog3.setObjectName("button_prog3")
        self.button_prog3.clicked.connect(self.program3)
        self.button_prog4 = QtWidgets.QPushButton(self.tab)
        self.button_prog4.setGeometry(QtCore.QRect(540, 60, 120, 75))
        self.button_prog4.setObjectName("button_prog4")
        self.button_prog4.clicked.connect(self.program4)
        self.textBrowser_progselected = QtWidgets.QTextBrowser(self.tab)
        self.textBrowser_progselected.setGeometry(QtCore.QRect(170, 190, 256, 41))
        self.textBrowser_progselected.setObjectName("textBrowser_progselected")
        self.label_progselected = QtWidgets.QLabel(self.tab)
        self.label_progselected.setGeometry(QtCore.QRect(30, 200, 151, 16))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.label_progselected.setFont(font)
        self.label_progselected.setObjectName("label_progselected")
        self.button_prog2 = QtWidgets.QPushButton(self.tab)
        self.button_prog2.setGeometry(QtCore.QRect(200, 60, 120, 75))
        self.button_prog2.setObjectName("button_prog2")
        self.button_prog2.clicked.connect(self.program2)
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.layoutWidget = QtWidgets.QWidget(self.tab_2)
        self.layoutWidget.setGeometry(QtCore.QRect(10, 60, 531, 161))
        self.layoutWidget.setObjectName("layoutWidget")
        self.horizontalLayout_sliders = QtWidgets.QHBoxLayout(self.layoutWidget)
        self.horizontalLayout_sliders.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_sliders.setObjectName("horizontalLayout_sliders")

        self.slider_heave = QtWidgets.QSlider(self.layoutWidget)
        self.slider_heave.setOrientation(QtCore.Qt.Vertical)
        self.slider_heave.setObjectName("slider_heave")
        self.slider_heave.setMinimum(0)
        self.slider_heave.setMaximum(10)
        self.slider_heave.valueChanged.connect(self.heave_changed)
        self.horizontalLayout_sliders.addWidget(self.slider_heave)

        self.slider_surge = QtWidgets.QSlider(self.layoutWidget)
        self.slider_surge.setOrientation(QtCore.Qt.Vertical)
        self.slider_surge.setObjectName("slider_surge")
        self.slider_surge.setMinimum(0)
        self.slider_surge.setMaximum(10)
        self.slider_surge.valueChanged.connect(self.surge_changed)
        self.horizontalLayout_sliders.addWidget(self.slider_surge)

        self.slider_sway = QtWidgets.QSlider(self.layoutWidget)
        self.slider_sway.setOrientation(QtCore.Qt.Vertical)
        self.slider_sway.setObjectName("slider_sway")
        self.slider_sway.setMinimum(0)
        self.slider_sway.setMaximum(10)
        self.slider_sway.valueChanged.connect(self.sway_changed)
        self.horizontalLayout_sliders.addWidget(self.slider_sway)

        self.slider_roll = QtWidgets.QSlider(self.layoutWidget)
        self.slider_roll.setOrientation(QtCore.Qt.Vertical)
        self.slider_roll.setObjectName("slider_roll")
        self.slider_roll.setMinimum(0)
        self.slider_roll.setMaximum(10)
        self.slider_roll.valueChanged.connect(self.roll_changed)
        self.horizontalLayout_sliders.addWidget(self.slider_roll)

        self.slider_pitch = QtWidgets.QSlider(self.layoutWidget)
        self.slider_pitch.setOrientation(QtCore.Qt.Vertical)
        self.slider_pitch.setObjectName("slider_pitch")
        self.slider_pitch.setMinimum(0)
        self.slider_pitch.setMaximum(10)
        self.slider_pitch.valueChanged.connect(self.pitch_changed)
        self.horizontalLayout_sliders.addWidget(self.slider_pitch)

        self.slider_yaw = QtWidgets.QSlider(self.layoutWidget)
        self.slider_yaw.setOrientation(QtCore.Qt.Vertical)
        self.slider_yaw.setObjectName("slider_yaw")
        self.slider_yaw.setMinimum(0)
        self.slider_yaw.setMaximum(10)
        self.slider_yaw.valueChanged.connect(self.yaw_changed)
        self.horizontalLayout_sliders.addWidget(self.slider_yaw)

        self.label_yaw = QtWidgets.QLabel(self.tab_2)
        self.label_yaw.setGeometry(QtCore.QRect(460, 230, 41, 16))
        self.label_yaw.setObjectName("label_yaw")
        self.label_rotfreq_value = QtWidgets.QLabel(self.tab_2)
        self.label_rotfreq_value.setGeometry(QtCore.QRect(690, 20, 31, 25))
        font = QtGui.QFont()
        font.setPointSize(15)
        self.label_rotfreq_value.setFont(font)
        self.label_rotfreq_value.setObjectName("label_rotfreq_value")
        self.label_sway = QtWidgets.QLabel(self.tab_2)
        self.label_sway.setGeometry(QtCore.QRect(220, 230, 51, 16))
        self.label_sway.setObjectName("label_sway")
        self.stopbutton_advanced = QtWidgets.QPushButton(self.tab_2)
        self.stopbutton_advanced.setGeometry(QtCore.QRect(230, 280, 151, 71))
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.stopbutton_advanced.setFont(font)
        self.stopbutton_advanced.setAutoFillBackground(False)
        self.stopbutton_advanced.setStyleSheet("background-color: rgb(255, 0, 0);")
        self.stopbutton_advanced.setObjectName("stopbutton_advanced")
        self.stopbutton_advanced.clicked.connect(self.stopbutton_advanced_clicked)
        self.label_surge_value = QtWidgets.QLabel(self.tab_2)
        self.label_surge_value.setGeometry(QtCore.QRect(150, 20, 30, 25))
        font = QtGui.QFont()
        font.setPointSize(15)
        self.label_surge_value.setFont(font)
        self.label_surge_value.setObjectName("label_surge_value")
        self.label_freq = QtWidgets.QLabel(self.tab_2)
        self.label_freq.setGeometry(QtCore.QRect(580, 230, 90, 20))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.label_freq.setFont(font)
        self.label_freq.setObjectName("label_freq")
        self.label_heave_value = QtWidgets.QLabel(self.tab_2)
        self.label_heave_value.setGeometry(QtCore.QRect(70, 20, 30, 25))
        font = QtGui.QFont()
        font.setPointSize(15)
        self.label_heave_value.setFont(font)
        self.label_heave_value.setObjectName("label_heave_value")
        self.label_sway_value = QtWidgets.QLabel(self.tab_2)
        self.label_sway_value.setGeometry(QtCore.QRect(220, 20, 30, 25))
        font = QtGui.QFont()
        font.setPointSize(15)
        self.label_sway_value.setFont(font)
        self.label_sway_value.setObjectName("label_sway_value")
        self.layoutWidget_2 = QtWidgets.QWidget(self.tab_2)
        self.layoutWidget_2.setGeometry(QtCore.QRect(580, 60, 171, 161))
        self.layoutWidget_2.setObjectName("layoutWidget_2")
        self.horizontalLayout_sliders2 = QtWidgets.QHBoxLayout(self.layoutWidget_2)
        self.horizontalLayout_sliders2.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_sliders2.setObjectName("horizontalLayout_sliders2")
        self.slider_transfreq = QtWidgets.QSlider(self.layoutWidget_2)
        self.slider_transfreq.setOrientation(QtCore.Qt.Vertical)
        self.slider_transfreq.setObjectName("slider_transfreq")
        self.slider_transfreq.setMinimum(1)
        self.slider_transfreq.setMaximum(10)
        self.slider_transfreq.valueChanged.connect(self.transfreq_changed)
        self.horizontalLayout_sliders2.addWidget(self.slider_transfreq)
        self.slider_rotfreq = QtWidgets.QSlider(self.layoutWidget_2)
        self.slider_rotfreq.setOrientation(QtCore.Qt.Vertical)
        self.slider_rotfreq.setObjectName("slider_rotfreq")
        self.slider_rotfreq.setMinimum(1)
        self.slider_rotfreq.setMaximum(10)
        self.slider_rotfreq.valueChanged.connect(self.rotfreq_changed)
        self.horizontalLayout_sliders2.addWidget(self.slider_rotfreq)
        self.label_speed = QtWidgets.QLabel(self.tab_2)
        self.label_speed.setGeometry(QtCore.QRect(680, 230, 70, 20))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.label_speed.setFont(font)
        self.label_speed.setObjectName("label_speed")
        self.textBrowser_status = QtWidgets.QTextBrowser(self.tab_2)
        self.textBrowser_status.setGeometry(QtCore.QRect(520, 280, 241, 71))
        self.textBrowser_status.setObjectName("textBrowser_status")
        self.label_yaw_value = QtWidgets.QLabel(self.tab_2)
        self.label_yaw_value.setGeometry(QtCore.QRect(470, 20, 30, 25))
        font = QtGui.QFont()
        font.setPointSize(15)
        self.label_yaw_value.setFont(font)
        self.label_yaw_value.setObjectName("label_yaw_value")
        self.label_pitch_value = QtWidgets.QLabel(self.tab_2)
        self.label_pitch_value.setGeometry(QtCore.QRect(380, 20, 30, 25))
        font = QtGui.QFont()
        font.setPointSize(15)
        self.label_pitch_value.setFont(font)
        self.label_pitch_value.setObjectName("label_pitch_value")
        self.label_transfreq_value = QtWidgets.QLabel(self.tab_2)
        self.label_transfreq_value.setGeometry(QtCore.QRect(620, 20, 31, 25))
        font = QtGui.QFont()
        font.setPointSize(15)
        self.label_transfreq_value.setFont(font)
        self.label_transfreq_value.setObjectName("label_transfreq_value")
        self.label_heave = QtWidgets.QLabel(self.tab_2)
        self.label_heave.setGeometry(QtCore.QRect(45, 230, 60, 20))
        self.label_heave.setObjectName("label_heave")
        self.label_surge = QtWidgets.QLabel(self.tab_2)
        self.label_surge.setGeometry(QtCore.QRect(125, 230, 61, 16))
        self.label_surge.setObjectName("label_surge")
        self.label_roll = QtWidgets.QLabel(self.tab_2)
        self.label_roll.setGeometry(QtCore.QRect(300, 230, 41, 16))
        self.label_roll.setObjectName("label_roll")
        self.startbutton_advanced = QtWidgets.QPushButton(self.tab_2)
        self.startbutton_advanced.setGeometry(QtCore.QRect(30, 280, 151, 71))
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.startbutton_advanced.setFont(font)
        self.startbutton_advanced.setAutoFillBackground(False)
        self.startbutton_advanced.setStyleSheet("background-color: rgb(0, 255, 0);")
        self.startbutton_advanced.setObjectName("startbutton_advanced")
        self.startbutton_advanced.clicked.connect(self.startbutton_advanced_clicked)
        self.start_active = 0
        self.label_roll_value = QtWidgets.QLabel(self.tab_2)
        self.label_roll_value.setGeometry(QtCore.QRect(300, 20, 30, 25))
        font = QtGui.QFont()
        font.setPointSize(15)
        self.label_roll_value.setFont(font)
        self.label_roll_value.setObjectName("label_roll_value")
        self.label_pitch = QtWidgets.QLabel(self.tab_2)
        self.label_pitch.setGeometry(QtCore.QRect(370, 230, 61, 16))
        self.label_pitch.setObjectName("label_pitch")
        self.label_status = QtWidgets.QLabel(self.tab_2)
        self.label_status.setGeometry(QtCore.QRect(430, 310, 90, 20))
        self.label_status.setObjectName("label_status")
        self.tabWidget.addTab(self.tab_2, "")
        self.horizontalLayout.addWidget(self.tabWidget)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 26))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Exemplo n.º 20
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(400, 400)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")

        self.label_6 = QtWidgets.QLabel(self.centralwidget)
        self.label_6.setGeometry(QtCore.QRect(0, 20, 400, 100))
        font = QtGui.QFont()
        font.setFamily("Tahoma")
        font.setPointSize(24)
        font.setBold(True)
        font.setWeight(75)
        #self.label_6.setFont(font)
        #self.label_6.setTextFormat(QtCore.Qt.AutoText)
        self.label_6.setScaledContents(False)
        self.label_6.setAlignment(QtCore.Qt.AlignCenter)
        self.label_6.setObjectName("label_6")
        self.label_6.setPixmap(QtGui.QPixmap("images/logoblue.png"))

        self.widget_5 = QtWidgets.QWidget(self.centralwidget)
        self.widget_5.setGeometry(QtCore.QRect(0, 130, 400, 170))
        self.widget_5.setObjectName("widget_5")


                #--------------------------HOW COME THESE I NEED URL(); AND NOT IN POKERUI LABEL 11 & 12 ----------------------------------------
        self.widget_5.setStyleSheet("background-image: url(images/result_border.png);")

        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.widget_5)
        self.verticalLayout_2.setContentsMargins(20, 10, 20, 20)
        self.verticalLayout_2.setObjectName("verticalLayout_2")

        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(8)
        font.setBold(True)
        self.label_7 = QtWidgets.QLabel(self.widget_5)
        self.label_7.setEnabled(True)
        self.label_7.setGeometry(QtCore.QRect(10, 0, 380, 30))
        self.label_7.setAlignment(QtCore.Qt.AlignCenter)
        self.label_7.setObjectName("label_7")
        self.verticalLayout_2.addWidget(self.label_7)
        self.label_7.setStyleSheet("background-image: url();")
        self.label_7.setFont(font)

        self.label_8 = QtWidgets.QLabel(self.widget_5)
        self.label_8.setEnabled(True)
        self.label_8.setGeometry(QtCore.QRect(10, 40, 380, 60))
        self.label_8.setAlignment(QtCore.Qt.AlignCenter)
        self.label_8.setObjectName("label_8")
        self.verticalLayout_2.addWidget(self.label_8)
        self.label_8.setStyleSheet("background-image: url();")
        self.label_8.setFont(font)

        self.label_9 = QtWidgets.QLabel(self.widget_5)
        self.label_9.setEnabled(True)
        self.label_9.setGeometry(QtCore.QRect(10, 110, 380, 60))
        self.label_9.setAlignment(QtCore.Qt.AlignCenter)
        self.label_9.setObjectName("label_9")
        self.verticalLayout_2.addWidget(self.label_9)
        self.label_9.setStyleSheet("background-image: url();")
        self.label_9.setFont(font)

        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(56, 302, 72, 96))
        self.label.setObjectName("label")
        self.label.setPixmap(QtGui.QPixmap("images/blue.png"))
        self.label_2 = QtWidgets.QLabel(self.centralwidget)
        self.label_2.setGeometry(QtCore.QRect(128, 302, 72, 96))
        self.label_2.setObjectName("label_2")
        self.label_2.setPixmap(QtGui.QPixmap("images/blue.png"))
        self.label_3 = QtWidgets.QLabel(self.centralwidget)
        self.label_3.setGeometry(QtCore.QRect(200, 302, 72, 96))
        self.label_3.setObjectName("label_3")
        self.label_3.setPixmap(QtGui.QPixmap("images/blue.png"))
        self.label_4 = QtWidgets.QLabel(self.centralwidget)
        self.label_4.setGeometry(QtCore.QRect(272, 302, 72, 96))
        self.label_4.setObjectName("label_4")
        self.label_4.setPixmap(QtGui.QPixmap("images/blue.png"))
        
        self.images = []
        self.images.append(self.label)
        self.images.append(self.label_2)
        self.images.append(self.label_3)
        self.images.append(self.label_4)
        self.colors = ["blue", "red", "yellow", "green", "purple"]

        MainWindow.setCentralWidget(self.centralwidget)
        #self.statusbar = QtWidgets.QStatusBar(MainWindow)
        #self.statusbar.setObjectName("statusbar")
        #MainWindow.setStatusBar(self.statusbar)

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

            #animate about screen
        self.animate()
Exemplo n.º 21
0
    def __init__(self, manager, dock, expurl):
        super().__init__()

        self.manager = manager
        self.expurl = expurl

        self.setColumnCount(3)
        self.header().setStretchLastSection(False)
        if hasattr(self.header(), "setSectionResizeMode"):
            set_resize_mode = self.header().setSectionResizeMode
        else:
            set_resize_mode = self.header().setResizeMode
        set_resize_mode(0, QtWidgets.QHeaderView.ResizeToContents)
        set_resize_mode(1, QtWidgets.QHeaderView.Stretch)
        set_resize_mode(2, QtWidgets.QHeaderView.ResizeToContents)
        self.header().setVisible(False)
        self.setSelectionMode(self.NoSelection)
        self.setHorizontalScrollMode(self.ScrollPerPixel)
        self.setVerticalScrollMode(self.ScrollPerPixel)

        self.setStyleSheet("QTreeWidget {background: " +
                           self.palette().midlight().color().name() + " ;}")

        self.viewport().installEventFilter(_WheelFilter(self.viewport()))

        self._bg_gradient = QtGui.QLinearGradient(
            0, 0, 0,
            QtGui.QFontMetrics(self.font()).lineSpacing())
        self._bg_gradient.setColorAt(0, self.palette().base().color())
        self._bg_gradient.setColorAt(1, self.palette().midlight().color())

        self._save_timer = QtCore.QTimer(self)
        self._save_timer.timeout.connect(self._save_to_argument)

        self._param_entries = OrderedDict()
        self._groups = dict()
        self._arg_to_widgets = dict()
        self._override_items = dict()

        def icon_path(name):
            return os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                "icons", name)

        self._add_override_icon = QtGui.QIcon(icon_path("list-add-32.png"))
        self._remove_override_icon = QtGui.QIcon(
            icon_path("list-remove-32.png"))
        self._randomise_scan_icon = QtGui.QIcon(
            icon_path("media-playlist-shuffle-32.svg"))
        self._default_value_icon = self.style().standardIcon(
            QtWidgets.QStyle.SP_BrowserReload)
        self._disable_scans_icon = self.style().standardIcon(
            QtWidgets.QStyle.SP_DialogResetButton)

        self._arguments = self.manager.get_submission_arguments(self.expurl)
        ndscan_params, vanilla_args = _try_extract_ndscan_params(
            self._arguments)

        if not ndscan_params:
            self.addTopLevelItem(
                QtWidgets.QTreeWidgetItem(
                    ["Error: Parameter metadata not found."]))
        else:
            self._ndscan_params = ndscan_params

            self.override_separator = None

            self._build_shortened_fqns()

            for fqn, path in ndscan_params["always_shown"]:
                self._make_param_items(fqn, path, True)

            for name, argument in vanilla_args.items():
                self._make_vanilla_argument_item(name, argument)

            self.override_separator = self._make_line_separator()

            self._make_add_override_prompt_item()
            self._set_override_line_idle()

            for ax in ndscan_params["scan"]["axes"]:
                self._make_override_item(ax["fqn"], ax["path"])

            for fqn, overrides in ndscan_params["overrides"].items():
                for o in overrides:
                    self._make_override_item(fqn, o["path"])

            self._make_line_separator()

            scan_options_group = self._make_group_header_item("Scan options")
            self.addTopLevelItem(scan_options_group)

            #

            num_repeats_container = QtWidgets.QWidget()
            num_repeats_layout = QtWidgets.QHBoxLayout()
            num_repeats_container.setLayout(num_repeats_layout)

            num_repeats_label = QtWidgets.QLabel("Number of repeats: ")
            num_repeats_layout.addWidget(num_repeats_label)
            num_repeats_layout.setStretchFactor(num_repeats_label, 0)

            self.num_repeats_box = QtWidgets.QSpinBox()
            self.num_repeats_box.setMinimum(1)
            self.num_repeats_box.setMaximum(
                2**16)  # A gratuitous, but hopefully generous restriction
            self.num_repeats_box.setValue(ndscan_params["scan"].get(
                "num_repeats", 1))
            num_repeats_layout.addWidget(self.num_repeats_box)
            num_repeats_layout.setStretchFactor(self.num_repeats_box, 0)

            num_repeats_layout.addStretch()

            num_repeats_item = QtWidgets.QTreeWidgetItem()
            scan_options_group.addChild(num_repeats_item)
            self.setItemWidget(num_repeats_item, 1, num_repeats_container)

            #

            no_axis_container = QtWidgets.QWidget()
            no_axis_layout = QtWidgets.QHBoxLayout()
            no_axis_container.setLayout(no_axis_layout)

            no_axis_label = QtWidgets.QLabel("No-axis mode: ")
            no_axis_layout.addWidget(no_axis_label)
            no_axis_layout.setStretchFactor(no_axis_label, 0)

            self.no_axes_box = QtWidgets.QComboBox()
            self.no_axes_box.addItems([m.value for m in NoAxesMode])
            mode = NoAxesMode[ndscan_params["scan"].get(
                "no_axes_mode", "single")]
            self.no_axes_box.setCurrentText(mode.value)
            no_axis_layout.addWidget(self.no_axes_box)
            no_axis_layout.setStretchFactor(self.no_axes_box, 0)

            no_axis_layout.addStretch()

            no_axis_item = QtWidgets.QTreeWidgetItem()
            scan_options_group.addChild(no_axis_item)
            self.setItemWidget(no_axis_item, 1, no_axis_container)

            #

            randomise_globally_container = QtWidgets.QWidget()
            randomise_globally_layout = QtWidgets.QHBoxLayout()
            randomise_globally_container.setLayout(randomise_globally_layout)

            randomise_globally_label = QtWidgets.QLabel(
                "Randomise point order across axes: ")
            randomise_globally_layout.addWidget(randomise_globally_label)
            randomise_globally_layout.setStretchFactor(
                randomise_globally_label, 0)

            self.randomise_globally_box = QtWidgets.QCheckBox()
            self.randomise_globally_box.setChecked(ndscan_params["scan"].get(
                "randomise_order_globally", False))
            randomise_globally_layout.addWidget(self.randomise_globally_box)
            randomise_globally_layout.setStretchFactor(
                self.randomise_globally_box, 1)

            randomise_globally_item = QtWidgets.QTreeWidgetItem()
            scan_options_group.addChild(randomise_globally_item)
            self.setItemWidget(randomise_globally_item, 1,
                               randomise_globally_container)

        buttons_item = QtWidgets.QTreeWidgetItem()
        self.addTopLevelItem(buttons_item)
        buttons_item.setFirstColumnSpanned(True)
        recompute_arguments = QtWidgets.QPushButton("Recompute all arguments")
        recompute_arguments.setIcon(self._default_value_icon)
        recompute_arguments.clicked.connect(dock._recompute_arguments_clicked)

        load_hdf5 = QtWidgets.QPushButton("Load HDF5")
        load_hdf5.setIcon(QtWidgets.QApplication.style().standardIcon(
            QtWidgets.QStyle.SP_DialogOpenButton))
        load_hdf5.clicked.connect(dock._load_hdf5_clicked)

        disable_scans = QtWidgets.QPushButton("Disable all scans")
        disable_scans.setIcon(self._disable_scans_icon)
        disable_scans.clicked.connect(self.disable_all_scans)
        disable_scans.setShortcut(QtCore.Qt.CTRL + QtCore.Qt.Key_R)

        buttons = LayoutWidget()
        buttons.addWidget(recompute_arguments, col=1)
        buttons.addWidget(load_hdf5, col=2)
        buttons.addWidget(disable_scans, col=3)
        buttons.layout.setColumnStretch(0, 1)
        buttons.layout.setColumnStretch(1, 0)
        buttons.layout.setColumnStretch(2, 0)
        buttons.layout.setColumnStretch(3, 0)
        buttons.layout.setColumnStretch(4, 1)
        self.setItemWidget(buttons_item, 0, buttons)
Exemplo n.º 22
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(600, 400)
        MainWindow.setMinimumSize(QtCore.QSize(600, 400))
        MainWindow.setMaximumSize(QtCore.QSize(600, 400))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("../Gui/Resources/logo_svg.svg"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.btn_reset = QtWidgets.QPushButton(self.centralwidget)
        self.btn_reset.setGeometry(QtCore.QRect(130, 330, 351, 31))
        font = QtGui.QFont()
        font.setFamily("Helvetica")
        font.setPointSize(10)
        self.btn_reset.setFont(font)
        self.btn_reset.setStyleSheet("QPushButton {\n"
                                     "background-color: rgb(255, 176, 6);\n"
                                     "border: 1.2px solid #ff9d07;\n"
                                     "outline: none;}\n"
                                     "\n"
                                     "QPushButton:hover{\n"
                                     "background-color: rgb(255, 157, 7);\n"
                                     "outline: none;\n"
                                     "border: none;\n"
                                     "}\n"
                                     "\n"
                                     "QPushButton:pressed{\n"
                                     "background-color: rgb(254, 140, 8);\n"
                                     "outline: none;\n"
                                     "border: none;\n"
                                     "}\n"
                                     "\n"
                                     "\n"
                                     "")
        self.btn_reset.setObjectName("btnReset")
        self.layoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.layoutWidget.setGeometry(QtCore.QRect(130, 50, 351, 111))
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.layoutWidget)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.lbl_verification_2 = QtWidgets.QLabel(self.layoutWidget)
        font = QtGui.QFont()
        font.setFamily("Helvetica")
        font.setPointSize(26)
        self.lbl_verification_2.setFont(font)
        self.lbl_verification_2.setStyleSheet("")
        self.lbl_verification_2.setAlignment(QtCore.Qt.AlignCenter)
        self.lbl_verification_2.setObjectName("lbl_verification_2")
        self.verticalLayout_2.addWidget(self.lbl_verification_2)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(self.layoutWidget)
        font = QtGui.QFont()
        font.setFamily("Calibri")
        font.setPointSize(10)
        self.label.setFont(font)
        self.label.setStyleSheet("")
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.label_2 = QtWidgets.QLabel(self.layoutWidget)
        font = QtGui.QFont()
        font.setFamily("Calibri")
        font.setPointSize(10)
        self.label_2.setFont(font)
        self.label_2.setStyleSheet("")
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2.setObjectName("label_2")
        self.verticalLayout.addWidget(self.label_2)
        self.verticalLayout_2.addLayout(self.verticalLayout)
        self.layoutWidget1 = QtWidgets.QWidget(self.centralwidget)
        self.layoutWidget1.setGeometry(QtCore.QRect(130, 164, 353, 141))
        self.layoutWidget1.setObjectName("layoutWidget1")
        self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.layoutWidget1)
        self.verticalLayout_6.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.lbl_error = QtWidgets.QLabel(self.layoutWidget1)
        font = QtGui.QFont()
        font.setFamily("Calibri")
        font.setPointSize(9)
        self.lbl_error.setFont(font)
        self.lbl_error.setStyleSheet("")
        self.lbl_error.setText("")
        self.lbl_error.setAlignment(QtCore.Qt.AlignCenter)
        self.lbl_error.setObjectName("lbl_error")
        self.verticalLayout_6.addWidget(self.lbl_error)
        self.verticalLayout_5 = QtWidgets.QVBoxLayout()
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.lbl_newpass = QtWidgets.QLabel(self.layoutWidget1)
        font = QtGui.QFont()
        font.setFamily("Calibri")
        font.setPointSize(11)
        self.lbl_newpass.setFont(font)
        self.lbl_newpass.setStyleSheet("")
        self.lbl_newpass.setObjectName("lbl_newpass")
        self.verticalLayout_3.addWidget(self.lbl_newpass)
        self.txtNewPass = QtWidgets.QLineEdit(self.layoutWidget1)
        self.txtNewPass.setMinimumSize(QtCore.QSize(347, 31))
        self.txtNewPass.setMaximumSize(QtCore.QSize(347, 31))
        font = QtGui.QFont()
        font.setFamily("Helvetica")
        font.setPointSize(9)
        self.txtNewPass.setFont(font)
        self.txtNewPass.setStyleSheet("padding-left:4px;")
        self.txtNewPass.setEchoMode(QtWidgets.QLineEdit.Password)
        self.txtNewPass.setObjectName("txtNewPass")
        self.verticalLayout_3.addWidget(self.txtNewPass)
        self.verticalLayout_5.addLayout(self.verticalLayout_3)
        self.verticalLayout_4 = QtWidgets.QVBoxLayout()
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.lbl_confirmPass = QtWidgets.QLabel(self.layoutWidget1)
        font = QtGui.QFont()
        font.setFamily("Calibri")
        font.setPointSize(11)
        self.lbl_confirmPass.setFont(font)
        self.lbl_confirmPass.setStyleSheet("")
        self.lbl_confirmPass.setObjectName("lbl_confirmPass")
        self.verticalLayout_4.addWidget(self.lbl_confirmPass)
        self.txtConfirmPass = QtWidgets.QLineEdit(self.layoutWidget1)
        self.txtConfirmPass.setMinimumSize(QtCore.QSize(247, 31))
        self.txtConfirmPass.setMaximumSize(QtCore.QSize(347, 31))
        font = QtGui.QFont()
        font.setFamily("Helvetica")
        font.setPointSize(9)
        self.txtConfirmPass.setFont(font)
        self.txtConfirmPass.setStyleSheet("padding-left:4px;")
        self.txtConfirmPass.setEchoMode(QtWidgets.QLineEdit.Password)
        self.txtConfirmPass.setObjectName("txtConfirmPass")
        self.verticalLayout_4.addWidget(self.txtConfirmPass)
        self.verticalLayout_5.addLayout(self.verticalLayout_4)
        self.verticalLayout_6.addLayout(self.verticalLayout_5)
        MainWindow.setCentralWidget(self.centralwidget)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
        MainWindow.setTabOrder(self.txtConfirmPass, self.btn_reset)
Exemplo n.º 23
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(533, 505)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.citra = QtWidgets.QLabel(self.centralwidget)
        self.citra.setGeometry(QtCore.QRect(150, 100, 224, 224))
        self.citra.setStyleSheet("")
        self.citra.setText("")
        self.citra.setPixmap(QtGui.QPixmap("noimage.png"))
        self.citra.setScaledContents(True)
        self.citra.setObjectName("citra")
        self.bPredict = QtWidgets.QPushButton(self.centralwidget)
        self.bPredict.setGeometry(QtCore.QRect(220, 390, 75, 23))
        self.bPredict.setStyleSheet("font-size:15px;")
        self.bPredict.setObjectName("bPredict")
        self.bOpen = QtWidgets.QPushButton(self.centralwidget)
        self.bOpen.setGeometry(QtCore.QRect(220, 340, 75, 23))
        self.bOpen.setObjectName("bOpen")
        self.judul = QtWidgets.QLabel(self.centralwidget)
        self.judul.setGeometry(QtCore.QRect(100, 20, 311, 31))
        self.judul.setStyleSheet("font-size: 20px;")
        self.judul.setAlignment(QtCore.Qt.AlignCenter)
        self.judul.setObjectName("judul")
        self.frame = QtWidgets.QFrame(self.centralwidget)
        self.frame.setGeometry(QtCore.QRect(20, 80, 491, 291))
        self.frame.setAutoFillBackground(False)
        self.frame.setStyleSheet("border: 1px solid #aaaaaa;\n"
"background-color:#dddddd;")
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.frame_2 = QtWidgets.QFrame(self.centralwidget)
        self.frame_2.setGeometry(QtCore.QRect(20, 379, 491, 81))
        self.frame_2.setAutoFillBackground(False)
        self.frame_2.setStyleSheet("border: 1px solid #aaaaaa;\n"
"background-color:#dddddd;")
        self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.hasil = QtWidgets.QLabel(self.frame_2)
        self.hasil.setGeometry(QtCore.QRect(190, 50, 95, 16))
        self.hasil.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.hasil.setStyleSheet("font-size:15px;")
        self.hasil.setAlignment(QtCore.Qt.AlignCenter)
        self.hasil.setObjectName("hasil")
        self.frame.raise_()
        self.frame_2.raise_()
        self.citra.raise_()
        self.bPredict.raise_()
        self.bOpen.raise_()
        self.judul.raise_()
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 533, 21))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.fname = ""
        self.bOpen.clicked.connect(self.openF) #event buat klik open file
        self.bPredict.clicked.connect(self.predict)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Exemplo n.º 24
0
 def _getFunctions(self):
     p = QtGui.QOpenGLVersionProfile()
     p.setVersion(2, 0)
     self.gl = self.ctx.versionFunctions(p)
     if not self.gl:
         raise Exception("Couldn't get access to OpenGL function")
Exemplo n.º 25
0
	def setupUi(self, MainWindow): #Ui setup
		# local variables
		self.avail_points = 1000
		self.used_points = 0
		self.totalcount = 0
		self.batsmencount = 0
		self.bowlerscount = 0
		self.alrdscount = 0
		self.wicketerscount = 0
		self.a = []  # bowler names list
		self.b = []  #  batsman nameslist
		self.c = []   # allrounder names list
		self.d = []  #wicketer names list
		self.selectlist = []	# selectedplayer's list

		MainWindow.setObjectName("MainWindow")
		MainWindow.resize(789, 728)
		palette = QtGui.QPalette()
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
		brush = QtGui.QBrush(QtGui.QColor(127, 127, 127))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
		brush = QtGui.QBrush(QtGui.QColor(170, 170, 170))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
		brush = QtGui.QBrush(QtGui.QColor(127, 127, 127))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
		brush = QtGui.QBrush(QtGui.QColor(170, 170, 170))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush)
		brush = QtGui.QBrush(QtGui.QColor(127, 127, 127))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
		brush = QtGui.QBrush(QtGui.QColor(127, 127, 127))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
		brush = QtGui.QBrush(QtGui.QColor(170, 170, 170))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
		brush = QtGui.QBrush(QtGui.QColor(127, 127, 127))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
		brush = QtGui.QBrush(QtGui.QColor(127, 127, 127))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush)
		MainWindow.setPalette(palette)
		font = QtGui.QFont()
		font.setFamily("Bookman Old Style")
		font.setPointSize(9)
		font.setBold(True)
		font.setItalic(True)
		font.setWeight(69)
		MainWindow.setFont(font)
		self.centralwidget = QtWidgets.QWidget(MainWindow)
		self.centralwidget.setObjectName("centralwidget")
		self.team_name = QtWidgets.QLabel(self.centralwidget)
		self.team_name.setGeometry(QtCore.QRect(620, 230, 91, 25))
		font = QtGui.QFont()
		font.setFamily("DejaVu Sans")
		font.setPointSize(12)
		font.setBold(True)
		font.setItalic(False)
		font.setWeight(69)
		self.team_name.setFont(font)
		self.team_name.setStyleSheet("")
		self.team_name.setObjectName("team_name")
		self.line = QtWidgets.QFrame(self.centralwidget)
		self.line.setGeometry(QtCore.QRect(9, 40, 769, 16))
		self.line.setFrameShape(QtWidgets.QFrame.HLine)
		self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
		self.line.setObjectName("line")
		self.line_2 = QtWidgets.QFrame(self.centralwidget)
		self.line_2.setGeometry(QtCore.QRect(9, 134, 769, 16))
		self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
		self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
		self.line_2.setObjectName("line_2")
		self.line_3 = QtWidgets.QFrame(self.centralwidget)
		self.line_3.setGeometry(QtCore.QRect(9, 210, 769, 16))
		self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
		self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
		self.line_3.setObjectName("line_3")
		self.label = QtWidgets.QLabel(self.centralwidget)
		self.label.setGeometry(QtCore.QRect(9, 219, 16, 16))
		font = QtGui.QFont()
		font.setFamily("Bookman Old Style")
		font.setPointSize(9)
		font.setBold(True)
		font.setItalic(True)
		font.setWeight(69)
		self.label.setFont(font)
		self.label.setText("")
		self.label.setObjectName("label")
		self.widget = QtWidgets.QWidget(self.centralwidget)
		self.widget.setGeometry(QtCore.QRect(10, 160, 761, 41))
		self.widget.setObjectName("widget")
		self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.widget)
		self.horizontalLayout_5.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
		self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0)
		self.horizontalLayout_5.setObjectName("horizontalLayout_5")
		self.Totalplayers = QtWidgets.QLabel(self.widget)
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setPointSize(11)
		font.setBold(True)
		font.setItalic(False)
		font.setWeight(69)
		self.Totalplayers.setFont(font)
		self.Totalplayers.setIndent(30)
		self.Totalplayers.setObjectName("Totalplayers")
		self.horizontalLayout_5.addWidget(self.Totalplayers)
		self.points_available = QtWidgets.QLabel(self.widget)
		font = QtGui.QFont()
		font.setFamily("Bookman Old Style")
		font.setPointSize(11)
		font.setBold(True)
		font.setItalic(True)
		font.setWeight(69)
		self.points_available.setFont(font)
		self.points_available.setIndent(-10)
		self.points_available.setObjectName("points_available")
		self.horizontalLayout_5.addWidget(self.points_available)
		self.TeamName = QtWidgets.QLabel(self.widget)
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setPointSize(11)
		font.setBold(True)
		font.setItalic(False)
		font.setWeight(69)
		self.TeamName.setFont(font)
		self.TeamName.setIndent(100)
		self.TeamName.setObjectName("TeamName")
		self.horizontalLayout_5.addWidget(self.TeamName)
		self.points_used = QtWidgets.QLabel(self.widget)
		font = QtGui.QFont()
		font.setFamily("Bookman Old Style")
		font.setPointSize(11)
		font.setBold(True)
		font.setItalic(True)
		font.setWeight(69)
		self.points_used.setFont(font)
		self.points_used.setIndent(60)
		self.points_used.setObjectName("points_used")
		self.horizontalLayout_5.addWidget(self.points_used)
		self.label_2 = QtWidgets.QLabel(self.centralwidget)
		self.label_2.setGeometry(QtCore.QRect(480, 220, 131, 41))
		font = QtGui.QFont()
		font.setPointSize(13)
		font.setItalic(False)
		self.label_2.setFont(font)
		self.label_2.setObjectName("label_2")
		self.label_3 = QtWidgets.QLabel(self.centralwidget)
		self.label_3.setGeometry(QtCore.QRect(16, 259, 211, 31))
		self.label_3.setObjectName("label_3")
		self.label_4 = QtWidgets.QLabel(self.centralwidget)
		self.label_4.setGeometry(QtCore.QRect(400, 260, 211, 31))
		self.label_4.setObjectName("label_4")
		self.label_5 = QtWidgets.QLabel(self.centralwidget)
		self.label_5.setGeometry(QtCore.QRect(40, 10, 711, 31))
		sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
		sizePolicy.setHorizontalStretch(0)
		sizePolicy.setVerticalStretch(0)
		sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
		self.label_5.setSizePolicy(sizePolicy)
		font = QtGui.QFont()
		font.setPointSize(16)
		font.setItalic(False)
		self.label_5.setFont(font)
		self.label_5.setFrameShape(QtWidgets.QFrame.Box)
		self.label_5.setAlignment(QtCore.Qt.AlignCenter)
		self.label_5.setObjectName("label_5")
		self.availablelist = QtWidgets.QListWidget(self.centralwidget)
		self.availablelist.setGeometry(QtCore.QRect(10, 290, 361, 381))
		self.availablelist.setStyleSheet("color: rgb(0, 0, 0);background-color: rgb(240, 240, 240);")
		self.availablelist.setObjectName("availablelist")
		self.selectedlist = QtWidgets.QListWidget(self.centralwidget)
		self.selectedlist.setGeometry(QtCore.QRect(390, 290, 381, 381))
		palette = QtGui.QPalette()
		brush = QtGui.QBrush(QtGui.QColor(3, 190, 159))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
		brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
		brush = QtGui.QBrush(QtGui.QColor(85, 127, 127))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
		brush = QtGui.QBrush(QtGui.QColor(113, 170, 170))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush)
		brush = QtGui.QBrush(QtGui.QColor(3, 190, 159))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush)
		brush = QtGui.QBrush(QtGui.QColor(3, 190, 159))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
		brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
		brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush)
		brush = QtGui.QBrush(QtGui.QColor(3, 190, 159))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
		brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
		brush = QtGui.QBrush(QtGui.QColor(85, 127, 127))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
		brush = QtGui.QBrush(QtGui.QColor(113, 170, 170))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush)
		brush = QtGui.QBrush(QtGui.QColor(3, 190, 159))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
		brush = QtGui.QBrush(QtGui.QColor(3, 190, 159))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
		brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
		brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush)
		brush = QtGui.QBrush(QtGui.QColor(3, 190, 159))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
		brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
		brush = QtGui.QBrush(QtGui.QColor(85, 127, 127))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
		brush = QtGui.QBrush(QtGui.QColor(113, 170, 170))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
		brush = QtGui.QBrush(QtGui.QColor(3, 190, 159))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
		brush = QtGui.QBrush(QtGui.QColor(3, 190, 159))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
		brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
		brush = QtGui.QBrush(QtGui.QColor(240, 240, 240))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush)
		brush = QtGui.QBrush(QtGui.QColor(170, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush)
		self.selectedlist.setPalette(palette)
		self.selectedlist.setStyleSheet("color: rgb(0, 0, 0);background-color: rgb(240, 240, 240);")
		self.selectedlist.setObjectName("selectedlist")
		self.batradio = QtWidgets.QRadioButton(self.centralwidget)
		self.batradio.setEnabled(False)
		self.batradio.setGeometry(QtCore.QRect(10, 240, 69, 21))
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setPointSize(9)
		font.setBold(True)
		font.setWeight(69)
		self.batradio.setFont(font)
		self.batradio.setTabletTracking(False)
		self.batradio.setAcceptDrops(False)
		self.batradio.setToolTipDuration(20)
		self.batradio.setStyleSheet("Batmans")
		self.batradio.setObjectName("batradio")
		self.wkradio = QtWidgets.QRadioButton(self.centralwidget)
		self.wkradio.setEnabled(False)
		self.wkradio.setGeometry(QtCore.QRect(70, 240, 120, 21))
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setPointSize(9)
		font.setBold(True)
		font.setItalic(False)
		font.setWeight(69)
		self.wkradio.setFont(font)
		self.wkradio.setObjectName("wkradio")
		self.arradio = QtWidgets.QRadioButton(self.centralwidget)
		self.arradio.setEnabled(False)
		self.arradio.setGeometry(QtCore.QRect(130, 240, 100, 21))
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setPointSize(9)
		font.setBold(True)
		font.setItalic(False)
		font.setWeight(69)
		self.arradio.setFont(font)
		self.arradio.setChecked(False)
		self.arradio.setObjectName("arradio")
		self.bowlradio = QtWidgets.QRadioButton(self.centralwidget)
		self.bowlradio.setEnabled(False)
		self.bowlradio.setGeometry(QtCore.QRect(200, 240, 79, 21))
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setPointSize(9)
		font.setBold(True)
		font.setItalic(False)
		font.setWeight(69)
		self.bowlradio.setFont(font)
		self.bowlradio.setObjectName("bowlradio")
		self.Batsman = QtWidgets.QLabel(self.centralwidget)
		self.Batsman.setGeometry(QtCore.QRect(10, 50, 126, 41))
		palette = QtGui.QPalette()
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 212, 212))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
		brush = QtGui.QBrush(QtGui.QColor(233, 233, 233))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
		brush = QtGui.QBrush(QtGui.QColor(106, 106, 106))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
		brush = QtGui.QBrush(QtGui.QColor(141, 141, 141))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 212, 212))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush)
		brush = QtGui.QBrush(QtGui.QColor(233, 233, 233))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 212, 212))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
		brush = QtGui.QBrush(QtGui.QColor(233, 233, 233))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
		brush = QtGui.QBrush(QtGui.QColor(106, 106, 106))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
		brush = QtGui.QBrush(QtGui.QColor(141, 141, 141))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 212, 212))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush)
		brush = QtGui.QBrush(QtGui.QColor(233, 233, 233))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush)
		brush = QtGui.QBrush(QtGui.QColor(106, 106, 106))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 212, 212))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
		brush = QtGui.QBrush(QtGui.QColor(233, 233, 233))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
		brush = QtGui.QBrush(QtGui.QColor(106, 106, 106))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
		brush = QtGui.QBrush(QtGui.QColor(141, 141, 141))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
		brush = QtGui.QBrush(QtGui.QColor(106, 106, 106))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
		brush = QtGui.QBrush(QtGui.QColor(106, 106, 106))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 212, 212))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 212, 212))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush)
		brush = QtGui.QBrush(QtGui.QColor(212, 212, 212))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush)
		brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
		brush.setStyle(QtCore.Qt.SolidPattern)
		palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush)
		self.Batsman.setPalette(palette)
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setPointSize(10)
		font.setBold(True)
		font.setItalic(False)
		font.setWeight(69)
		self.Batsman.setFont(font)
		self.Batsman.setIndent(1)
		self.Batsman.setObjectName("Batsman")
		self.Bowlers = QtWidgets.QLabel(self.centralwidget)
		self.Bowlers.setGeometry(QtCore.QRect(370, 110, 110, 17))
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setPointSize(10)
		font.setBold(True)
		font.setItalic(False)
		font.setWeight(69)
		self.Bowlers.setFont(font)
		self.Bowlers.setObjectName("Bowlers")
		self.alrcount = QtWidgets.QLabel(self.centralwidget)
		self.alrcount.setGeometry(QtCore.QRect(500, 60, 31, 17))
		font = QtGui.QFont()
		font.setFamily("Bookman Old Style")
		font.setPointSize(10)
		font.setBold(True)
		font.setItalic(True)
		font.setWeight(69)
		self.alrcount.setFont(font)
		self.alrcount.setIndent(10)
		self.alrcount.setObjectName("alrcount")
		self.bowlcount = QtWidgets.QLabel(self.centralwidget)
		self.bowlcount.setGeometry(QtCore.QRect(480, 110, 31, 17))
		font = QtGui.QFont()
		font.setFamily("Bookman Old Style")
		font.setPointSize(10)
		font.setBold(True)
		font.setItalic(True)
		font.setWeight(69)
		self.bowlcount.setFont(font)
		self.bowlcount.setIndent(10)
		self.bowlcount.setObjectName("bowlcount")
		self.batcount = QtWidgets.QLabel(self.centralwidget)
		self.batcount.setGeometry(QtCore.QRect(130, 60, 21, 17))
		font = QtGui.QFont()
		font.setFamily("Bookman Old Style")
		font.setPointSize(10)
		font.setBold(True)
		font.setItalic(True)
		font.setWeight(69)
		self.batcount.setFont(font)
		self.batcount.setObjectName("batcount")
		self.Allrounder = QtWidgets.QLabel(self.centralwidget)
		self.Allrounder.setGeometry(QtCore.QRect(370, 60, 123, 17))
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setPointSize(10)
		font.setBold(True)
		font.setItalic(False)
		font.setWeight(69)
		self.Allrounder.setFont(font)
		self.Allrounder.setObjectName("Allrounder")
		self.Wicketkeeepr = QtWidgets.QLabel(self.centralwidget)
		self.Wicketkeeepr.setGeometry(QtCore.QRect(20, 110, 139, 17))
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setPointSize(10)
		font.setBold(True)
		font.setItalic(False)
		font.setWeight(69)
		self.Wicketkeeepr.setFont(font)
		self.Wicketkeeepr.setObjectName("Wicketkeeepr")
		self.wicketcount = QtWidgets.QLabel(self.centralwidget)
		self.wicketcount.setGeometry(QtCore.QRect(160, 110, 31, 17))
		font = QtGui.QFont()
		font.setFamily("Bookman Old Style")
		font.setPointSize(10)
		font.setBold(True)
		font.setItalic(True)
		font.setWeight(69)
		self.wicketcount.setFont(font)
		self.wicketcount.setIndent(10)
		self.wicketcount.setObjectName("wicketcount")
		self.line.raise_()
		self.line_2.raise_()
		self.line_3.raise_()
		self.label.raise_()
		self.batradio.raise_()
		self.wkradio.raise_()
		self.arradio.raise_()
		self.bowlradio.raise_()
		self.label_2.raise_()
		self.label_3.raise_()
		self.label_4.raise_()
		self.label_5.raise_()
		self.team_name.raise_()
		MainWindow.setCentralWidget(self.centralwidget)
		self.menubar = QtWidgets.QMenuBar(MainWindow)
		self.menubar.setGeometry(QtCore.QRect(0, 0, 789, 20))
		self.menubar.setObjectName("menubar")
		self.menuManage_Teams = QtWidgets.QMenu(self.menubar)
		font = QtGui.QFont()
		font.setFamily("Sans")
		font.setBold(True)
		font.setWeight(69)
		self.menuManage_Teams.setFont(font)
		self.menuManage_Teams.setObjectName("menuManage_Teams")
		MainWindow.setMenuBar(self.menubar)
		self.statusbar = QtWidgets.QStatusBar(MainWindow)
		self.statusbar.setObjectName("statusbar")
		MainWindow.setStatusBar(self.statusbar)
		self.new_team = QtWidgets.QAction(MainWindow)
		font = QtGui.QFont()
		font.setFamily("DejaVu Sans")
		font.setBold(False)
		font.setWeight(50)
		self.new_team.setFont(font)
		self.new_team.setProperty("shortcutVisibleInContextMenu", True)
		self.new_team.setObjectName("new_team")
		self.new_team.triggered.connect(self.file_new)
		self.open_team = QtWidgets.QAction(MainWindow)
		font = QtGui.QFont()
		font.setFamily("DejaVu Sans")
		font.setBold(False)
		font.setWeight(50)
		self.open_team.setFont(font)
		self.open_team.setProperty("shortcutVisibleInContextMenu", True)
		self.open_team.setObjectName("open_team")
		self.open_team.triggered.connect(self.open_file)
		self.save_team = QtWidgets.QAction(MainWindow)
		font = QtGui.QFont()
		font.setFamily("DejaVu Sans")
		font.setBold(False)
		font.setWeight(50)
		self.save_team.setFont(font)
		self.save_team.setProperty("shortcutVisibleInContextMenu", True)
		self.save_team.setObjectName("save_team")
		self.save_team.triggered.connect(self.file_save)
		self.evaluate_team = QtWidgets.QAction(MainWindow)
		font = QtGui.QFont()
		font.setFamily("DejaVu Sans")
		font.setBold(False)
		font.setWeight(50)
		self.evaluate_team.setFont(font)
		self.evaluate_team.setProperty("shortcutVisibleInContextMenu", True)
		self.evaluate_team.setObjectName("evaluate_team")
		self.evaluate_team.triggered.connect(self.eval_file)
		self.actionQuit = QtWidgets.QAction(MainWindow)
		font = QtGui.QFont()
		font.setFamily("DejaVu Sans")
		font.setBold(False)
		font.setWeight(50)
		self.actionQuit.setFont(font)
		self.actionQuit.setProperty("shortcutVisibleInContextMenu", True)
		self.actionQuit.setObjectName("actionQuit")
		self.actionQuit.triggered.connect(lambda: quit())
		self.menuManage_Teams.addAction(self.new_team)
		self.menuManage_Teams.addAction(self.open_team)
		self.menuManage_Teams.addAction(self.evaluate_team)
		self.menuManage_Teams.addAction(self.save_team)
		self.menuManage_Teams.addAction(self.actionQuit)
		self.menubar.addAction(self.menuManage_Teams.menuAction())

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

		# Click responses
		self.availablelist.itemDoubleClicked.connect(self.transfer1)
		self.selectedlist.itemDoubleClicked.connect(self.transfer2)
		self.stats = {}
		self.new_screen.savename.clicked.connect(self.namechange)
		self.batradio.clicked.connect(self.load_names)
		self.wkradio.clicked.connect(self.load_names)
		self.bowlradio.clicked.connect(self.load_names)
		self.arradio.clicked.connect(self.load_names)
Exemplo n.º 26
0
    def setupUi(self, Form):
        """控件位置"""
        Form.setObjectName("Form")
        Form.resize(299, 241)
        self.horizontalLayoutWidget_2 = QtWidgets.QWidget(Form)
        self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(10, 10, 277, 78))
        self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2)
        self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtWidgets.QLabel(self.horizontalLayoutWidget_2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.comboBox_2 = QtWidgets.QComboBox(self.horizontalLayoutWidget_2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.comboBox_2.setFont(font)
        self.comboBox_2.setObjectName("comboBox_2")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.horizontalLayout.addWidget(self.comboBox_2)
        self.horizontalLayout_2.addLayout(self.horizontalLayout)
        self.label_2 = QtWidgets.QLabel(self.horizontalLayoutWidget_2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout_2.addWidget(self.label_2, 0, QtCore.Qt.AlignLeft)
        self.comboBox = QtWidgets.QComboBox(self.horizontalLayoutWidget_2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.comboBox.setFont(font)
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.horizontalLayout_2.addWidget(self.comboBox)
        self.formLayoutWidget = QtWidgets.QWidget(Form)
        self.formLayoutWidget.setGeometry(QtCore.QRect(10, 110, 160, 56))
        self.formLayoutWidget.setObjectName("formLayoutWidget")
        self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget)
        self.formLayout.setContentsMargins(0, 0, 0, 0)
        self.formLayout.setObjectName("formLayout")
        self.label_3 = QtWidgets.QLabel(self.formLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_3)
        self.label_4 = QtWidgets.QLabel(self.formLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_4)
        self.lineEdit = QtWidgets.QLineEdit(self.formLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.lineEdit.setFont(font)
        self.lineEdit.setObjectName("lineEdit")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit)
        self.lineEdit_2 = QtWidgets.QLineEdit(self.formLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.lineEdit_2.setFont(font)
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.lineEdit_2)
        self.formLayoutWidget_2 = QtWidgets.QWidget(Form)
        self.formLayoutWidget_2.setGeometry(QtCore.QRect(10, 170, 160, 56))
        self.formLayoutWidget_2.setObjectName("formLayoutWidget_2")
        self.formLayout_2 = QtWidgets.QFormLayout(self.formLayoutWidget_2)
        self.formLayout_2.setContentsMargins(0, 0, 0, 0)
        self.formLayout_2.setObjectName("formLayout_2")
        self.label_6 = QtWidgets.QLabel(self.formLayoutWidget_2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.label_6.setFont(font)
        self.label_6.setObjectName("label_6")
        self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_6)
        self.label_5 = QtWidgets.QLabel(self.formLayoutWidget_2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.label_5.setFont(font)
        self.label_5.setObjectName("label_5")
        self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_5)
        self.lineEdit_3 = QtWidgets.QLineEdit(self.formLayoutWidget_2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.lineEdit_3.setFont(font)
        self.lineEdit_3.setObjectName("lineEdit_3")
        self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit_3)
        self.lineEdit_4 = QtWidgets.QLineEdit(self.formLayoutWidget_2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(12)
        self.lineEdit_4.setFont(font)
        self.lineEdit_4.setObjectName("lineEdit_4")
        self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.lineEdit_4)
        self.pushButton = QtWidgets.QPushButton(Form)
        self.pushButton.setGeometry(QtCore.QRect(220, 110, 51, 41))
        font = QtGui.QFont()
        font.setFamily("黑体")
        font.setPointSize(12)
        self.pushButton.setFont(font)
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtWidgets.QPushButton(Form)
        self.pushButton_2.setGeometry(QtCore.QRect(220, 180, 51, 41))
        font = QtGui.QFont()
        font.setFamily("黑体")
        font.setPointSize(12)
        self.pushButton_2.setFont(font)
        self.pushButton_2.setObjectName("pushButton_2")

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Exemplo n.º 27
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1038, 904)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.layoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.layoutWidget.setGeometry(QtCore.QRect(0, 0, 1031, 851))
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(self.layoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        self.label.setFont(font)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        self.tableWidget = QtWidgets.QTableWidget(self.layoutWidget)
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setColumnCount(0)
        self.tableWidget.setRowCount(0)
        self.verticalLayout.addWidget(self.tableWidget)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.listWidget = QtWidgets.QListWidget(self.layoutWidget)
        self.listWidget.setObjectName("listWidget")
        self.verticalLayout.addWidget(self.listWidget)
        self.gridLayout_2 = QtWidgets.QGridLayout()
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.label_3 = QtWidgets.QLabel(self.layoutWidget)
        font = QtGui.QFont()
        font.setPointSize(18)
        self.label_3.setFont(font)
        self.label_3.setAlignment(QtCore.Qt.AlignCenter)
        self.label_3.setObjectName("label_3")
        self.gridLayout_2.addWidget(self.label_3, 1, 0, 1, 1)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.pushButton_2 = QtWidgets.QPushButton(self.layoutWidget)
        self.pushButton_2.setObjectName("pushButton_2")
        self.horizontalLayout_3.addWidget(self.pushButton_2)
        self.pushButton_3 = QtWidgets.QPushButton(self.layoutWidget)
        self.pushButton_3.setObjectName("pushButton_3")
        self.horizontalLayout_3.addWidget(self.pushButton_3)
        self.pushButton = QtWidgets.QPushButton(self.layoutWidget)
        self.pushButton.setObjectName("pushButton")
        self.horizontalLayout_3.addWidget(self.pushButton)
        self.gridLayout_2.addLayout(self.horizontalLayout_3, 0, 0, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout_2)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.tableWidget_2 = QtWidgets.QTableWidget(self.layoutWidget)
        self.tableWidget_2.setObjectName("tableWidget_2")
        self.tableWidget_2.setColumnCount(0)
        self.tableWidget_2.setRowCount(0)
        self.verticalLayout.addWidget(self.tableWidget_2)
        self.listWidget_2 = QtWidgets.QListWidget(self.layoutWidget)
        self.listWidget_2.setObjectName("listWidget_2")
        self.verticalLayout.addWidget(self.listWidget_2)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1038, 26))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(464, 356)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(0, 20, 461, 41))
        font = QtGui.QFont()
        font.setPointSize(24)
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self.centralwidget)
        self.label_2.setGeometry(QtCore.QRect(60, 110, 101, 31))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.label_3 = QtWidgets.QLabel(self.centralwidget)
        self.label_3.setGeometry(QtCore.QRect(60, 150, 101, 31))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.label_4 = QtWidgets.QLabel(self.centralwidget)
        self.label_4.setGeometry(QtCore.QRect(60, 190, 101, 31))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.SogiaoducCombobox = QtWidgets.QComboBox(self.centralwidget)
        self.SogiaoducCombobox.setGeometry(QtCore.QRect(190, 110, 201, 31))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.SogiaoducCombobox.setFont(font)
        self.SogiaoducCombobox.setObjectName("SogiaoducCombobox")
        self.MahocbaText = QtWidgets.QLineEdit(self.centralwidget)
        self.MahocbaText.setGeometry(QtCore.QRect(190, 150, 201, 31))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.MahocbaText.setFont(font)
        self.MahocbaText.setObjectName("MahocbaText")
        self.TenhocsinhText = QtWidgets.QLineEdit(self.centralwidget)
        self.TenhocsinhText.setGeometry(QtCore.QRect(190, 190, 201, 31))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.TenhocsinhText.setFont(font)
        self.TenhocsinhText.setObjectName("TenhocsinhText")
        self.TimButton = QtWidgets.QPushButton(self.centralwidget)
        self.TimButton.setGeometry(QtCore.QRect(180, 260, 101, 31))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.TimButton.setFont(font)
        self.TimButton.setAutoFillBackground(False)
        self.TimButton.setObjectName("TimButton")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 464, 26))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Exemplo n.º 29
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1920, 1080)
        MainWindow.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(215,196,187, 255), stop:1 rgba(215,196,187, 255));")
        MainWindow.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(560, 260, 761, 351))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.rest1 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.rest1.setMaximumSize(QtCore.QSize(16777215, 80))
        self.rest1.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 255, 255, 180), stop:1 rgba(255, 255, 255, 180));")
        self.rest1.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.rest1.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.rest1.setText("")
        self.rest1.setObjectName("rest1")
        self.gridLayout.addWidget(self.rest1, 0, 1, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_2.setEnabled(True)
        self.label_2.setLocale(QtCore.QLocale(QtCore.QLocale.Dzongkha, QtCore.QLocale.Bhutan))
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
        self.label = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label.setMaximumSize(QtCore.QSize(200, 16777215))
        self.label.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
        self.rest3 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.rest3.setMaximumSize(QtCore.QSize(16777215, 80))
        self.rest3.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255,255,255,180), stop:1 rgba(255,255,255,180));")
        self.rest3.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.rest3.setText("")
        self.rest3.setObjectName("rest3")
        self.gridLayout.addWidget(self.rest3, 2, 1, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_3.setLocale(QtCore.QLocale(QtCore.QLocale.Embu, QtCore.QLocale.Kenya))
        self.label_3.setAlignment(QtCore.Qt.AlignCenter)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
        self.rest2 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.rest2.setMaximumSize(QtCore.QSize(16777215, 80))
        self.rest2.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255, 255, 255, 180), stop:1 rgba(255, 255, 255, 180));")
        self.rest2.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.rest2.setText("")
        self.rest2.setObjectName("rest2")
        self.gridLayout.addWidget(self.rest2, 1, 1, 1, 1)
        self.label_4 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_4.setLocale(QtCore.QLocale(QtCore.QLocale.Dzongkha, QtCore.QLocale.Bhutan))
        self.label_4.setAlignment(QtCore.Qt.AlignCenter)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
        self.rest4 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.rest4.setMaximumSize(QtCore.QSize(16777215, 80))
        self.rest4.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255,255,255,180), stop:1 rgba(255,255,255,180));")
        self.rest4.setLocale(QtCore.QLocale(QtCore.QLocale.Dzongkha, QtCore.QLocale.Bhutan))
        self.rest4.setText("")
        self.rest4.setObjectName("rest4")
        self.gridLayout.addWidget(self.rest4, 3, 1, 1, 1)
        self.label_7 = QtWidgets.QLabel(self.centralwidget)
        self.label_7.setGeometry(QtCore.QRect(980, 230, 111, 21))
        self.label_7.setObjectName("label_7")
        self.verticalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(560, 620, 761, 61))
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.rest30_1 = QtWidgets.QLabel(self.verticalLayoutWidget)
        self.rest30_1.setEnabled(True)
        self.rest30_1.setMaximumSize(QtCore.QSize(16777215, 80))
        self.rest30_1.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255,255,255,180), stop:1 rgba(255,255,255,180));")
        self.rest30_1.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.rest30_1.setText("")
        self.rest30_1.setObjectName("rest30_1")
        self.verticalLayout.addWidget(self.rest30_1)
        self.label_10 = QtWidgets.QLabel(self.centralwidget)
        self.label_10.setGeometry(QtCore.QRect(890, 760, 101, 31))
        self.label_10.setAlignment(QtCore.Qt.AlignCenter)
        self.label_10.setObjectName("label_10")
        self.verticalLayoutWidget_2 = QtWidgets.QWidget(self.centralwidget)
        self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(560, 800, 761, 181))
        self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_2)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.rest30_3 = QtWidgets.QLabel(self.verticalLayoutWidget_2)
        self.rest30_3.setMaximumSize(QtCore.QSize(16777215, 80))
        self.rest30_3.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255,255,255,180), stop:1 rgba(255,255,255,180));")
        self.rest30_3.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.rest30_3.setText("")
        self.rest30_3.setObjectName("rest30_3")
        self.verticalLayout_2.addWidget(self.rest30_3)
        self.rest30_2 = QtWidgets.QLabel(self.verticalLayoutWidget_2)
        self.rest30_2.setMaximumSize(QtCore.QSize(16777215, 80))
        self.rest30_2.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(255,255,255,180), stop:1 rgba(255,255,255,180));")
        self.rest30_2.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.rest30_2.setText("")
        self.rest30_2.setObjectName("rest30_2")
        self.verticalLayout_2.addWidget(self.rest30_2)
        self.menu = QtWidgets.QComboBox(self.centralwidget)
        self.menu.setGeometry(QtCore.QRect(1440, 340, 151, 31))
        self.menu.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.menu.setObjectName("menu")
        self.menu.addItem("")
        self.menu.addItem("")
        self.menu.addItem("")
        self.menu.addItem("")
        self.menu.addItem("")
        self.menu.addItem("")
        self.add = QtWidgets.QPushButton(self.centralwidget)
        self.add.setGeometry(QtCore.QRect(1590, 340, 113, 32))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setBold(True)
        font.setWeight(75)
        self.add.setFont(font)
        self.add.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.add.setObjectName("add")
        self.frame = QtWidgets.QFrame(self.centralwidget)
        self.frame.setGeometry(QtCore.QRect(1420, 270, 291, 191))
        self.frame.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,0, 255), stop:1 rgba(0,0,0, 255));")
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.add.raise_()
        self.frame.raise_()
        self.gridLayoutWidget.raise_()
        self.label_7.raise_()
        self.verticalLayoutWidget.raise_()
        self.label_10.raise_()
        self.verticalLayoutWidget_2.raise_()
        self.menu.raise_()
        self.add.raise_()
        self.rest30_3.raise_()
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1920, 22))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Exemplo n.º 30
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(586, 304)
        MainWindow.setStyleSheet("background-color: qlineargradient(spread:pad, x1:0, y1:0.352, x2:1, y2:0.716, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(67, 67, 67, 255));")
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setStyleSheet("")
        self.centralwidget.setObjectName("centralwidget")
        self.Shecan = QtWidgets.QPushButton(self.centralwidget)
        self.Shecan.setGeometry(QtCore.QRect(20, 30, 101, 31))
        font = QtGui.QFont()
        font.setFamily("Fira Code")
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.Shecan.setFont(font)
        self.Shecan.setStyleSheet("background-color: rgba(255, 255, 255, 0);\n"
"color: qlineargradient(spread:pad, x1:0.489, y1:1, x2:0.5, y2:0, stop:0 rgba(142, 158, 171, 255), stop:0.244318 rgba(238, 242, 243, 255));")
        self.Shecan.setObjectName("Shecan")
        self.Begzar = QtWidgets.QPushButton(self.centralwidget)
        self.Begzar.setGeometry(QtCore.QRect(20, 100, 101, 31))
        font = QtGui.QFont()
        font.setFamily("Fira Code")
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.Begzar.setFont(font)
        self.Begzar.setStyleSheet("background-color: rgba(255, 255, 255, 0);\n"
"color: qlineargradient(spread:pad, x1:0.489, y1:1, x2:0.5, y2:0, stop:0 rgba(142, 158, 171, 255), stop:0.244318 rgba(238, 242, 243, 255));")
        self.Begzar.setObjectName("Begzar")
        self.RiotPlus = QtWidgets.QPushButton(self.centralwidget)
        self.RiotPlus.setGeometry(QtCore.QRect(20, 170, 101, 31))
        font = QtGui.QFont()
        font.setFamily("Fira Code")
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.RiotPlus.setFont(font)
        self.RiotPlus.setStyleSheet("background-color: rgba(255, 255, 255, 0);\n"
"color: qlineargradient(spread:pad, x1:0.489, y1:1, x2:0.5, y2:0, stop:0 rgba(142, 158, 171, 255), stop:0.244318 rgba(238, 242, 243, 255));")
        self.RiotPlus.setObjectName("RiotPlus")
        self.Disconnect = QtWidgets.QPushButton(self.centralwidget)
        self.Disconnect.setGeometry(QtCore.QRect(20, 240, 101, 31))
        font = QtGui.QFont()
        font.setFamily("Fira Code")
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.Disconnect.setFont(font)
        self.Disconnect.setStyleSheet("background-color: rgba(255, 255, 255, 0);\n"
"color: qlineargradient(spread:pad, x1:0.489, y1:1, x2:0.5, y2:0, stop:0 rgba(142, 158, 171, 255), stop:0.244318 rgba(238, 242, 243, 255));")
        self.Disconnect.setObjectName("Disconnect")
        self.frame = QtWidgets.QFrame(self.centralwidget)
        self.frame.setGeometry(QtCore.QRect(20, 25, 100, 41))
        self.frame.setStyleSheet("border-radius:5px;\n"
"background-color: qlineargradient(spread:pad, x1:0.057, y1:0.420455, x2:1, y2:0.693, stop:0 rgba(54, 0, 51, 255), stop:1 rgba(11, 135, 147, 255));")
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.frame_2 = QtWidgets.QFrame(self.centralwidget)
        self.frame_2.setGeometry(QtCore.QRect(19, 94, 100, 41))
        self.frame_2.setStyleSheet("border-radius:5px;\n"
"background-color: qlineargradient(spread:pad, x1:0.057, y1:0.420455, x2:1, y2:0.693, stop:0 rgba(54, 0, 51, 255), stop:1 rgba(11, 135, 147, 255));")
        self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.frame_3 = QtWidgets.QFrame(self.centralwidget)
        self.frame_3.setGeometry(QtCore.QRect(20, 163, 100, 41))
        self.frame_3.setStyleSheet("border-radius:5px;\n"
"background-color: qlineargradient(spread:pad, x1:0.057, y1:0.420455, x2:1, y2:0.693, stop:0 rgba(54, 0, 51, 255), stop:1 rgba(11, 135, 147, 255));")
        self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_3.setObjectName("frame_3")
        self.frame_4 = QtWidgets.QFrame(self.centralwidget)
        self.frame_4.setGeometry(QtCore.QRect(21, 235, 100, 41))
        self.frame_4.setStyleSheet("border-radius:5px;\n"
"background-color: qlineargradient(spread:pad, x1:0.057, y1:0.420455, x2:1, y2:0.693, stop:0 rgba(54, 0, 51, 255), stop:1 rgba(11, 135, 147, 255));")
        self.frame_4.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_4.setObjectName("frame_4")
        self.frame_5 = QtWidgets.QFrame(self.centralwidget)
        self.frame_5.setGeometry(QtCore.QRect(10, 0, 121, 301))
        self.frame_5.setStyleSheet("border-radius:10px;")
        self.frame_5.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_5.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_5.setObjectName("frame_5")
        self.Status = QtWidgets.QLabel(self.centralwidget)
        self.Status.setGeometry(QtCore.QRect(260, 140, 221, 81))
        font = QtGui.QFont()
        font.setFamily("Fira Code")
        font.setPointSize(20)
        self.Status.setFont(font)
        self.Status.setStyleSheet("background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(0, 255, 127);")
        self.Status.setObjectName("Status")
        self.frame_6 = QtWidgets.QFrame(self.centralwidget)
        self.frame_6.setGeometry(QtCore.QRect(139, 259, 441, 41))
        self.frame_6.setStyleSheet("border-radius:20px;\n"
"background-color: qlineargradient(spread:pad, x1:0, y1:0.653, x2:0.977, y2:0.573864, stop:0 rgba(187, 43, 39, 255), stop:1 rgba(21, 101, 192, 255));")
        self.frame_6.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_6.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_6.setObjectName("frame_6")
        self.label = QtWidgets.QLabel(self.frame_6)
        self.label.setGeometry(QtCore.QRect(10, 10, 421, 21))
        font = QtGui.QFont()
        font.setFamily("Dima Web")
        font.setPointSize(13)
        font.setBold(False)
        font.setWeight(50)
        self.label.setFont(font)
        self.label.setStyleSheet("background-color: rgba(255, 255, 255, 0);\n"
"color: rgb(255, 255, 255);")
        self.label.setObjectName("label")
        self.frame_5.raise_()
        self.frame_4.raise_()
        self.frame_3.raise_()
        self.frame_2.raise_()
        self.frame.raise_()
        self.Shecan.raise_()
        self.Begzar.raise_()
        self.RiotPlus.raise_()
        self.Disconnect.raise_()
        self.Status.raise_()
        self.frame_6.raise_()
        self.Shecan.clicked.connect(self.setdns1)
        self.Begzar.clicked.connect(self.setdns2)
        self.RiotPlus.clicked.connect(self.setdns3)
        self.Disconnect.clicked.connect(self.setdns4)
        MainWindow.setCentralWidget(self.centralwidget)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Exemplo n.º 31
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1146, 664)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.toolbarWidget = QtWidgets.QWidget(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolbarWidget.sizePolicy().hasHeightForWidth())
        self.toolbarWidget.setSizePolicy(sizePolicy)
        self.toolbarWidget.setMinimumSize(QtCore.QSize(0, 0))
        self.toolbarWidget.setObjectName("toolbarWidget")
        self.horizontalLayout_8 = QtWidgets.QHBoxLayout(self.toolbarWidget)
        self.horizontalLayout_8.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
        self.horizontalLayout_8.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
        self.visualizationComboBox = QtWidgets.QComboBox(self.toolbarWidget)
        self.visualizationComboBox.setObjectName("visualizationComboBox")
        self.visualizationComboBox.addItem("")
        self.visualizationComboBox.addItem("")
        self.visualizationComboBox.addItem("")
        self.visualizationComboBox.addItem("")
        self.horizontalLayout_8.addWidget(self.visualizationComboBox)
        spacerItem = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_8.addItem(spacerItem)
        self.stackedWidget = QtWidgets.QStackedWidget(self.toolbarWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.stackedWidget.sizePolicy().hasHeightForWidth())
        self.stackedWidget.setSizePolicy(sizePolicy)
        self.stackedWidget.setObjectName("stackedWidget")
        self.rasterPage = QtWidgets.QWidget()
        self.rasterPage.setObjectName("rasterPage")
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.rasterPage)
        self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.label_2 = QtWidgets.QLabel(self.rasterPage)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout_5.addWidget(self.label_2)
        self.sortRasterComboBox = QtWidgets.QComboBox(self.rasterPage)
        self.sortRasterComboBox.setObjectName("sortRasterComboBox")
        self.sortRasterComboBox.addItem("")
        self.sortRasterComboBox.addItem("")
        self.horizontalLayout_5.addWidget(self.sortRasterComboBox)
        self.dimConductanceCheckBox = QtWidgets.QCheckBox(self.rasterPage)
        self.dimConductanceCheckBox.setObjectName("dimConductanceCheckBox")
        self.horizontalLayout_5.addWidget(self.dimConductanceCheckBox)
        self.rowCountLabel = QtWidgets.QLabel(self.rasterPage)
        self.rowCountLabel.setObjectName("rowCountLabel")
        self.horizontalLayout_5.addWidget(self.rowCountLabel)
        self.rasterRowCountSlider = QtWidgets.QSlider(self.rasterPage)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.rasterRowCountSlider.sizePolicy().hasHeightForWidth())
        self.rasterRowCountSlider.setSizePolicy(sizePolicy)
        self.rasterRowCountSlider.setMinimumSize(QtCore.QSize(200, 0))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.rasterRowCountSlider.setFont(font)
        self.rasterRowCountSlider.setMinimum(2)
        self.rasterRowCountSlider.setMaximum(120)
        self.rasterRowCountSlider.setOrientation(QtCore.Qt.Horizontal)
        self.rasterRowCountSlider.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.rasterRowCountSlider.setTickInterval(0)
        self.rasterRowCountSlider.setObjectName("rasterRowCountSlider")
        self.horizontalLayout_5.addWidget(self.rasterRowCountSlider)
        self.horizontalLayout_5.setStretch(4, 1)
        self.stackedWidget.addWidget(self.rasterPage)
        self.flashingSpikePage = QtWidgets.QWidget()
        self.flashingSpikePage.setObjectName("flashingSpikePage")
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.flashingSpikePage)
        self.horizontalLayout_6.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.speedLabel_2 = QtWidgets.QLabel(self.flashingSpikePage)
        self.speedLabel_2.setObjectName("speedLabel_2")
        self.horizontalLayout_6.addWidget(self.speedLabel_2)
        self.flashingSpikeTimescaleComboBox = QtWidgets.QComboBox(self.flashingSpikePage)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.flashingSpikeTimescaleComboBox.sizePolicy().hasHeightForWidth())
        self.flashingSpikeTimescaleComboBox.setSizePolicy(sizePolicy)
        self.flashingSpikeTimescaleComboBox.setObjectName("flashingSpikeTimescaleComboBox")
        self.flashingSpikeTimescaleComboBox.addItem("")
        self.flashingSpikeTimescaleComboBox.addItem("")
        self.flashingSpikeTimescaleComboBox.addItem("")
        self.flashingSpikeTimescaleComboBox.addItem("")
        self.flashingSpikeTimescaleComboBox.addItem("")
        self.flashingSpikeTimescaleComboBox.addItem("")
        self.flashingSpikeTimescaleComboBox.addItem("")
        self.flashingSpikeTimescaleComboBox.addItem("")
        self.horizontalLayout_6.addWidget(self.flashingSpikeTimescaleComboBox)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_6.addItem(spacerItem1)
        self.horizontalLayout_6.setStretch(1, 1)
        self.stackedWidget.addWidget(self.flashingSpikePage)
        self.analogPage = QtWidgets.QWidget()
        self.analogPage.setObjectName("analogPage")
        self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.analogPage)
        self.horizontalLayout_7.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
        self.scaleLabel = QtWidgets.QLabel(self.analogPage)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.scaleLabel.sizePolicy().hasHeightForWidth())
        self.scaleLabel.setSizePolicy(sizePolicy)
        self.scaleLabel.setObjectName("scaleLabel")
        self.horizontalLayout_7.addWidget(self.scaleLabel)
        self.analogScaleSpinBox = QtWidgets.QDoubleSpinBox(self.analogPage)
        self.analogScaleSpinBox.setDecimals(0)
        self.analogScaleSpinBox.setMinimum(1.0)
        self.analogScaleSpinBox.setMaximum(20000.0)
        self.analogScaleSpinBox.setSingleStep(20.0)
        self.analogScaleSpinBox.setProperty("value", 150.0)
        self.analogScaleSpinBox.setObjectName("analogScaleSpinBox")
        self.horizontalLayout_7.addWidget(self.analogScaleSpinBox)
        self.showSpikesCheckBox = QtWidgets.QCheckBox(self.analogPage)
        self.showSpikesCheckBox.setObjectName("showSpikesCheckBox")
        self.horizontalLayout_7.addWidget(self.showSpikesCheckBox)
        self.grayConductanceCheckBox = QtWidgets.QCheckBox(self.analogPage)
        self.grayConductanceCheckBox.setChecked(False)
        self.grayConductanceCheckBox.setObjectName("grayConductanceCheckBox")
        self.horizontalLayout_7.addWidget(self.grayConductanceCheckBox)
        self.filterCheckBox = QtWidgets.QCheckBox(self.analogPage)
        self.filterCheckBox.setObjectName("filterCheckBox")
        self.horizontalLayout_7.addWidget(self.filterCheckBox)
        self.filterLowSpinBox = QtWidgets.QDoubleSpinBox(self.analogPage)
        self.filterLowSpinBox.setKeyboardTracking(False)
        self.filterLowSpinBox.setMaximum(50000.0)
        self.filterLowSpinBox.setProperty("value", 200.0)
        self.filterLowSpinBox.setObjectName("filterLowSpinBox")
        self.horizontalLayout_7.addWidget(self.filterLowSpinBox)
        self.label = QtWidgets.QLabel(self.analogPage)
        self.label.setObjectName("label")
        self.horizontalLayout_7.addWidget(self.label)
        self.filterHighSpinBox = QtWidgets.QDoubleSpinBox(self.analogPage)
        self.filterHighSpinBox.setKeyboardTracking(False)
        self.filterHighSpinBox.setMaximum(50000.0)
        self.filterHighSpinBox.setProperty("value", 4000.0)
        self.filterHighSpinBox.setObjectName("filterHighSpinBox")
        self.horizontalLayout_7.addWidget(self.filterHighSpinBox)
        self.stackedWidget.addWidget(self.analogPage)
        self.conductionPage = QtWidgets.QWidget()
        self.conductionPage.setObjectName("conductionPage")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.conductionPage)
        self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem2)
        self.stackedWidget.addWidget(self.conductionPage)
        self.horizontalLayout_8.addWidget(self.stackedWidget)
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_8.addItem(spacerItem3)
        self.horizontalLayout_8.setStretch(3, 1)
        self.verticalLayout_2.addWidget(self.toolbarWidget)
        self.mainLayout = QtWidgets.QVBoxLayout()
        self.mainLayout.setObjectName("mainLayout")
        self.widget = QtWidgets.QWidget(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.widget.sizePolicy().hasHeightForWidth())
        self.widget.setSizePolicy(sizePolicy)
        self.widget.setMinimumSize(QtCore.QSize(0, 200))
        self.widget.setObjectName("widget")
        self.mainLayout.addWidget(self.widget)
        self.verticalLayout_2.addLayout(self.mainLayout)
        self.verticalLayout_2.setStretch(1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusBar = MEAViewerStatusBar(MainWindow)
        self.statusBar.setObjectName("statusBar")
        MainWindow.setStatusBar(self.statusBar)
        self.toolBar = QtWidgets.QToolBar(MainWindow)
        self.toolBar.setMovable(False)
        self.toolBar.setFloatable(False)
        self.toolBar.setObjectName("toolBar")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.actionSave_to_Spreadsheet = QtWidgets.QAction(MainWindow)
        self.actionSave_to_Spreadsheet.setEnabled(False)
        self.actionSave_to_Spreadsheet.setObjectName("actionSave_to_Spreadsheet")
        self.actionOpen = QtWidgets.QAction(MainWindow)
        self.actionOpen.setObjectName("actionOpen")
        self.actionDefault = QtWidgets.QAction(MainWindow)
        self.actionDefault.setObjectName("actionDefault")
        self.actionAnalog_Waveform = QtWidgets.QAction(MainWindow)
        self.actionAnalog_Waveform.setObjectName("actionAnalog_Waveform")
        self.actionRaster = QtWidgets.QAction(MainWindow)
        self.actionRaster.setObjectName("actionRaster")
        self.actionFlashingSpikes = QtWidgets.QAction(MainWindow)
        self.actionFlashingSpikes.setObjectName("actionFlashingSpikes")
        self.actionAnalogGrid = QtWidgets.QAction(MainWindow)
        self.actionAnalogGrid.setObjectName("actionAnalogGrid")

        self.retranslateUi(MainWindow)
        self.stackedWidget.setCurrentIndex(3)
        self.visualizationComboBox.currentIndexChanged['int'].connect(self.stackedWidget.setCurrentIndex)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Exemplo n.º 32
0
 def __init__(self):
     QtWidgets.QMainWindow.__init__(self)
     uic.loadUi('windows/window.ui', self)
     self.pushButton.clicked.connect(self.main_def)
     self.button1 = QtGui.button('Button 1')
     pixmap = QPixmap("photo-75491.gif.png")
Exemplo n.º 33
0
def _backProjectInternal(imgPlane, inputImage, center, sizes, outputDimensions,
                         gl):

    if inputImage.isNull():
        raise Exception("Input image is not valid")

    lrbt = [
        center[0] - sizes[0] / 2.0, center[0] + sizes[0] / 2.0,
        center[1] - sizes[1] / 2.0, center[1] + sizes[1] / 2.0
    ]
    outputWH = [outputDimensions[0], outputDimensions[1]]

    from grale.constants import ANGLE_ARCSEC

    texCoords, texCoordBuf = _getCoords(inputImage.width(),
                                        inputImage.height(), 0, 1, 0, 1,
                                        lambda x: x)
    bpCoords, bpCoordBuf = _getCoords(
        inputImage.width(), inputImage.height(), *lrbt, lambda x: imgPlane.
        traceThetaApproximately(x * ANGLE_ARCSEC) / ANGLE_ARCSEC)

    fb = QtGui.QOpenGLFramebufferObject(*outputWH)
    if not fb.bind():
        raise Exception("Coudln't bind framebuffer")

    texture = QtGui.QOpenGLTexture(QtGui.QOpenGLTexture.Target2D)
    if not texture.create():
        raise Exception("Unable to create texture")

    texture.bind()
    texture.setData(inputImage)

    prog = QtGui.QOpenGLShaderProgram()
    prog.addShaderFromSourceCode(
        QtGui.QOpenGLShader.Vertex, """
        attribute vec2 a_texcoord;
        attribute vec2 a_bpcoord;
        varying vec2 v_tpos;
        uniform vec2 u_xy0, u_xy1;

        void main()
        {
            v_tpos = a_texcoord;

            vec2 diff = u_xy1-u_xy0;
            gl_Position = vec4(2.0*(a_bpcoord-u_xy0)/diff-1.0, 0, 1);
        }
        """)

    prog.addShaderFromSourceCode(
        QtGui.QOpenGLShader.Fragment, """
        uniform sampler2D u_tex;
        varying vec2 v_tpos;

        void main()
        {
            vec4 c = texture2D(u_tex, v_tpos);
            gl_FragColor = c;
        }
    """)
    if not prog.link():
        raise Exception("Unable to link program")
    prog.bind()

    bpCoords = bpCoords.reshape((-1, 2))
    minX, minY, maxX, maxY = bpCoords[:, 0].min(), bpCoords[:, 1].min(
    ), bpCoords[:, 0].max(), bpCoords[:, 1].max()
    print("minMax", minX, minY, maxX, maxY)

    prog.setUniformValue("u_xy0", QtCore.QPointF(minX, minY))
    prog.setUniformValue("u_xy1", QtCore.QPointF(maxX, maxY))

    bpLoc = prog.attributeLocation("a_bpcoord")
    texLoc = prog.attributeLocation("a_texcoord")

    texCoordBuf.bind()
    prog.setAttributeBuffer(texLoc, gl.GL_FLOAT, 0, 2)
    prog.enableAttributeArray(texLoc)

    bpCoordBuf.bind()
    prog.setAttributeBuffer(bpLoc, gl.GL_FLOAT, 0, 2)
    prog.enableAttributeArray(bpLoc)

    gl.glViewport(0, 0, fb.width(), fb.height())
    gl.glClearColor(0, 0, 0, 0)
    gl.glClear(gl.GL_COLOR_BUFFER_BIT)
    gl.glDrawArrays(gl.GL_TRIANGLES, 0, texCoords.shape[0] // 2)

    gl.glFinish()
    print("glGetError =", gl.glGetError())

    img = fb.toImage()
    if img.isNull():
        raise Exception("Unable to get image from framebuffer")

    return img, [minX, minY], [maxX, maxY]
Exemplo n.º 34
0
def _trace(imgPlane, srcImage, srcCenter, srcSizes, outputDimensions,
           subSample, imgBL, imgTR, gl):

    #print("_trace", srcCenter, srcSizes)
    from grale.constants import ANGLE_ARCSEC

    ri = imgPlane.getRenderInfo()
    bl, tr = np.array(ri["bottomleft"]), np.array(ri["topright"])
    mapNumX, mapNumY = ri["xpoints"], ri["ypoints"]

    imgBL = bl / ANGLE_ARCSEC if imgBL is None else imgBL
    imgTR = tr / ANGLE_ARCSEC if imgTR is None else imgTR

    fb = QtGui.QOpenGLFramebufferObject(*outputDimensions)
    if not fb.bind():
        raise Exception("Couldn't bind framebuffer")

    #imgPlaneRect = _getImagePlaneRect(imgPlane)

    eps = 0
    mapTexData = np.empty([mapNumY, mapNumX, 2], dtype=np.double)
    mapTexData[:, :, 0], mapTexData[:, :, 1] = np.meshgrid(
        np.linspace(bl[0] + eps, tr[0] - eps, mapNumX),
        np.linspace(bl[1] + eps, tr[1] - eps, mapNumY))

    mapTexData = (imgPlane.traceThetaApproximately(mapTexData) /
                  ANGLE_ARCSEC).astype(np.float32).reshape((-1, ))

    GL_TEXTURE0 = 0x84C0
    GL_TEXTURE_2D = 0x0DE1
    GL_TEXTURE_MAG_FILTER = 0x2800
    GL_TEXTURE_MIN_FILTER = 0x2801
    GL_LINEAR = 0x2601
    GL_TEXTURE_WRAP_S = 0x2802
    GL_TEXTURE_WRAP_T = 0x2803
    GL_CLAMP_TO_EDGE = 0x812F
    GL_RG32F = 0x8230
    GL_RG = 0x8227
    GL_FLOAT = 0x1406

    mapTexture = gl.glGenTextures(1)
    gl.glActiveTexture(GL_TEXTURE0)
    gl.glBindTexture(GL_TEXTURE_2D, mapTexture)
    gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
    gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
    gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)
    gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)

    #b = mapTexData.tobytes()
    #import array
    #a = array.array("f")
    #a.frombytes(b)
    #gl.glTexImage2D(GL_TEXTURE_2D, 0, GL_RG32F, mapNumX, mapNumY, 0, GL_RG, GL_FLOAT, a)
    gl.glTexImage2D(GL_TEXTURE_2D, 0, GL_RG32F, mapNumX, mapNumY, 0, GL_RG,
                    GL_FLOAT, mapTexData)

    srcTexture = QtGui.QOpenGLTexture(QtGui.QOpenGLTexture.Target2D)
    if not srcTexture.create():
        raise Exception("Unable to create texture")

    srcTexture.bind(1)
    srcTexture.setWrapMode(QtGui.QOpenGLTexture.ClampToEdge)
    srcTexture.setData(srcImage)

    #print("1 glGetError =", gl.glGetError())

    prog = QtGui.QOpenGLShaderProgram()
    prog.addShaderFromSourceCode(
        QtGui.QOpenGLShader.Vertex, """
		precision highp float;

		attribute vec2 a_position;
		varying vec2 v_xy;

		void main()
		{
            v_xy = (a_position+1.0)/2.0;
			gl_Position = vec4(a_position.xy, 0, 1);
		}
        """)

    prog.addShaderFromSourceCode(
        QtGui.QOpenGLShader.Fragment, """
		precision highp float;

		uniform sampler2D u_mapTexture;
		uniform sampler2D u_srcTexture;
		uniform vec2 u_srcBottomLeft;
		uniform vec2 u_srcTopRight;
		uniform vec2 u_imgBottomLeft;
		uniform vec2 u_imgTopRight;
		uniform vec2 u_mapBottomLeft;
		uniform vec2 u_mapTopRight;
        uniform vec2 u_dstart;
        uniform vec2 u_substep;
        uniform vec2 u_mapNumXY;
		varying vec2 v_xy;

        vec4 getSrcPixelValue(vec2 xyArcsec)
        {{
            vec2 xySrcArea = xyArcsec-u_srcBottomLeft;
            xySrcArea /= (u_srcTopRight-u_srcBottomLeft);

            if (all(greaterThanEqual(xySrcArea, vec2(0.0,0.0))) && all(lessThanEqual(xySrcArea, vec2(1.0,1.0))))
                return texture2D(u_srcTexture, xySrcArea);

            return vec4(0.0, 0.0, 0.0, 0.0);
        }}

        vec2 traceTheta(vec2 xyArcsec)
        {{
            vec2 xyRel = (xyArcsec - u_mapBottomLeft)/(u_mapTopRight-u_mapBottomLeft);
            vec2 xyPt = (xyRel*(u_mapNumXY-1) + 0.5)/u_mapNumXY;
            return texture2D(u_mapTexture, xyPt).xy;
        }}

		void main()
		{{
            vec4 c = vec4(0,0,0,0);
            float y = v_xy.y + u_dstart.y;
            
            for (int i = 0 ; i < {subSample} ; i++)
            {{
                float x = v_xy.x + u_dstart.x;
                
                for (int j = 0 ; j < {subSample} ; j++)
                {{
                    vec2 xyArcsecImgPlane = vec2(x,y)*(u_imgTopRight-u_imgBottomLeft) + u_imgBottomLeft;
                    vec2 xyArcsecSrcPlane = traceTheta(xyArcsecImgPlane);

                    c += getSrcPixelValue(xyArcsecSrcPlane);

                    x += u_substep.x;
                }}

                y += u_substep.y;
            }}
            gl_FragColor = c/({subSample}*{subSample});
		}}
    """.format(subSample=subSample))
    if not prog.link():
        raise Exception("Unable to link program")
    prog.bind()

    #print("1 glGetError =", gl.glGetError())

    coords = np.array([-1, -1, -1, 1, 1, -1, 1, 1], dtype=np.float32)

    buf = QtGui.QOpenGLBuffer(QtGui.QOpenGLBuffer.VertexBuffer)
    if not buf.create():
        raise Exception("Couldn't create buffer")

    buf.bind()
    buf.setUsagePattern(QtGui.QOpenGLBuffer.StaticDraw)
    buf.allocate(coords, coords.shape[0] * 4)

    posLoc = prog.attributeLocation("a_position")
    prog.setAttributeBuffer(posLoc, gl.GL_FLOAT, 0, 2)
    prog.enableAttributeArray(posLoc)

    subStepWidth, subStepHeight = [(1.0 / subSample) / outputDimensions[i]
                                   for i in range(2)]
    dStart = [(0.5 / subSample - 0.5) / outputDimensions[i] for i in range(2)]

    prog.setUniformValue("u_mapTexture", 0)
    prog.setUniformValue("u_imgBottomLeft", QtCore.QPointF(imgBL[0], imgBL[1]))
    prog.setUniformValue("u_imgTopRight", QtCore.QPointF(imgTR[0], imgTR[1]))
    prog.setUniformValue(
        "u_mapBottomLeft",
        QtCore.QPointF(bl[0] / ANGLE_ARCSEC, bl[1] / ANGLE_ARCSEC))
    prog.setUniformValue(
        "u_mapTopRight",
        QtCore.QPointF(tr[0] / ANGLE_ARCSEC, tr[1] / ANGLE_ARCSEC))
    prog.setUniformValue("u_mapNumXY", QtCore.QPointF(mapNumX, mapNumY))
    prog.setUniformValue("u_srcTexture", 1)
    prog.setUniformValue(
        "u_srcBottomLeft",
        QtCore.QPointF(srcCenter[0] - srcSizes[0] / 2,
                       srcCenter[1] - srcSizes[1] / 2))
    prog.setUniformValue(
        "u_srcTopRight",
        QtCore.QPointF(srcCenter[0] + srcSizes[0] / 2,
                       srcCenter[1] + srcSizes[1] / 2))
    prog.setUniformValue("u_dstart", QtCore.QPointF(dStart[0], dStart[1]))
    prog.setUniformValue("u_substep",
                         QtCore.QPointF(subStepWidth, subStepHeight))

    gl.glViewport(0, 0, fb.width(), fb.height())
    gl.glClearColor(0, 0, 0, 0)
    gl.glClear(gl.GL_COLOR_BUFFER_BIT)
    gl.glDrawArrays(gl.GL_TRIANGLE_STRIP, 0, coords.shape[0] // 2)

    gl.glFinish()
    gl.glDeleteTextures(1, [mapTexture])
    #print("glGetError =", gl.glGetError())

    img = fb.toImage()
    if img.isNull():
        raise Exception("Unable to get image from framebuffer")

    gl.glFinish()
    #print("2 glGetError =", gl.glGetError())

    return img
import pyqtgraph


class ExampleApp(QtGui.QMainWindow, ui_sine_scroll.Ui_MainWindow):
    def __init__(self, parent=None):
        pyqtgraph.setConfigOption('background', 'w')  #before loading widget
        super(ExampleApp, self).__init__(parent)
        self.setupUi(self)
        self.btnAdd.clicked.connect(self.update)
        self.grPlot.plotItem.showGrid(True, True, 0.7)

    def update(self):
        t1 = time.clock()
        points = 100  #number of data points
        X = np.arange(points)
        Y = np.sin(np.arange(points) / points * 3 * np.pi + time.time())
        C = pyqtgraph.hsvColor(time.time() / 5 % 1, alpha=.5)
        pen = pyqtgraph.mkPen(color=C, width=10)
        self.grPlot.plot(X, Y, pen=pen, clear=True)
        print("update took %.02f ms" % ((time.clock() - t1) * 1000))
        if self.chkMore.isChecked():
            QtCore.QTimer.singleShot(1, self.update)  # QUICKLY repeat


if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    form = ExampleApp()
    form.show()
    form.update()  #start with something
    app.exec_()
    print("DONE")
Exemplo n.º 36
0
 def __init__(self):
     super().__init__()
     self.setStyleSheet("QMainWindow {background-image: url(images/about.png);}")
     self.setWindowIcon(QtGui.QIcon('images/icon.png'))
Exemplo n.º 37
0
class MainWindow(BaseForm):   #主窗口

    childs={}                   #现存的子窗口
    initial={}                  #初始化数据
    apps=None                   #子窗口类
    ui_text=None
    ui_file=None
    def __init__(self):         #初始化函化
        super().__init__()
        self.gui=QtGui(self.ui_file)
        self.gui.setup_UI(self,name='mainwindow',text=self.ui_text,apps=self.apps)
        self.init()
        self.widget.move((qApp.desktop().width()-self.widget.width())/2,
                (qApp.desktop().height()-self.widget.height())/2)
        self.widget.show()
        
    def create_widget(self,name):  #创建子窗口的主控件
        cls=self.childclasses.get(name)
        if cls is None:
            p=name.split('.')
            m=__import__('.'.join(p[:-1]),fromlist=p[-1:])
            cls=getattr(m,p[-1])
            self.childclasses[name]=cls
        if cls:
            return cls()
    @classmethod
    def run(cls):
        QtGui.main(cls)

    def init(self):    #初始化
        super().init()
        self.mdiarea.subWindowActivated.connect(self.child_changed)
        self.childclasses={}
        
    def child_closeed(self,child):  #子窗口被关闭
        names=[name for name in self.childs if self.childs[name]==child]
        [self.childs.pop(name) for name in names]
        
    def child_changed(self):        #激活的子窗口变化
        child=self.mdiarea.activeSubWindow()
        self['title']='%s [%s]'%(self.title,child.windowTitle()) if child is not None else self.title
        
    def add_child(self,name=None,initial=None,submit=False): #添加子窗口
        child=self.childs.get(name)                 #从存在的子窗口中查找,如存在则激活
        if child:
            self.mdiarea.setActiveSubWindow(child)
            widget=child.widget().owner
        else:
            widget=self.create_widget(name)
            ui_text=widget.ui_text if hasattr(widget,'ui_text') else None
            window_name=name.split('.')[-1].lower()
            self.gui.setup_UI(widget,window_name,text=ui_text)
            widget.init()
            child=self.mdiarea.addSubWindow(widget.widget)
            child.setAttribute(Qt.WA_DeleteOnClose)
            child.destroyed.connect(self.child_closeed)
            self.childs[name]=child
            x=(self.mdiarea.width()-child.width())/2
            y=(self.mdiarea.height()-child.height())/2
            child.move(x,y)
            widget.owner=child
            child.show()
        if initial:
            widget.update(initial)
        if submit:
            widget.submit()
        return widget
Exemplo n.º 38
0
 def getImage(self):
     global imgName
     oImg = QFileDialog().getOpenFileName(None,"Open Image", "", "Image Files (*.png *.jpg *.bmp)")
     imgName = oImg[0]
     jpg = QtGui.QPixmap(imgName).scaled(150, 150)
     self.originalImg.setPixmap(jpg)
Exemplo n.º 39
0
        self.ui.exec_()

    def perform_send_message(self):
        user = self.ui.userEdit.text()
        email = self.ui.emailEdit.text()
        subject = self.ui.subjectEdit.text()
        message = self.ui.messageEdit.text()
        print(user+'\n'+email+'\n'+subject+'\n'+message)
        ej.sendMessage(user, email, subject, message)        
               
if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    login = Login_UI()
    if login.exec_() == QtWidgets.QDialog.Accepted:
        mainApp = MainApp()
        mainApp.setWindowIcon(QtGui.QIcon('res/icon.png'))
        mainApp.show()
        
        try:
            Companies.update_company_information()
        except:
            QMessageBox.about(mainApp, "No Connection", "You must be connected to the Internet in order to get accurate data.")
        
        #This will continuously pull from the API and push all the data into the cache
        updater = UpdaterThread.UpdaterThread(1, "updater")
        updater.daemon = True
        updater.start()

        ret = app.exec_()
        sys.exit(ret)
Exemplo n.º 40
0
 def init(self, app, datamanager):
     super().init(app, datamanager)
     self._app = app
     self.mapScene = QtWidgets.QGraphicsScene()
     self.mapScene.setBackgroundBrush(QtGui.QBrush(QtGui.QColor.fromRgb(0,0,0)))
     self.mapColor = QtGui.QColor.fromRgb(20,255,23)
     # Init graphics view
     self.COLORTABLE=[]
     for i in range(256): self.COLORTABLE.append(QtGui.qRgb(i/4,i,i/2))
     self.mapView = self.widget.graphicsView
     self.mapView.setScene(self.mapScene)
     self.mapView.setMouseTracking(True)
     self.mapView.centerOn(0, 0)
     self.mapView.viewport().installEventFilter(self)
     self.dataManager = datamanager
     # Add map graphics
     self.mapItem = MapGraphicsItem(self)
     self.signalSetZoomLevel.connect(self.mapItem.setZoomLevel)
     self.signalSetColor.connect(self.mapItem.setColor)
     self.mapEnabledFlag = False
     # Add player marker
     self.playerMarker = PlayerMarker(self,self.controller.imageFactory, self.mapColor)
     self._connectMarker(self.playerMarker)
     # Init zoom slider
     self.widget.mapZoomSlider.setMinimum(-100)
     self.widget.mapZoomSlider.setMaximum(100)
     self.widget.mapZoomSlider.setValue(0)
     self.widget.mapZoomSlider.setSingleStep(5)
     self.widget.mapZoomSlider.valueChanged.connect(self._slotZoomSliderTriggered)
     # Init zoom Spinbox
     self.widget.mapZoomSpinbox.setMinimum(self.MAPZOOM_SCALE_MIN*100.0)
     self.widget.mapZoomSpinbox.setMaximum(self.MAPZOOM_SCALE_MAX*100.0)
     self.widget.mapZoomSpinbox.setValue(100.0)
     self.widget.mapZoomSpinbox.setSingleStep(10.0)
     self.widget.mapZoomSpinbox.valueChanged.connect(self._slotZoomSpinTriggered)
     self.signalSetZoomLevel.connect(self.saveZoom)
     if self._app.settings.value('localmapwidget/zoom'):
         self.mapZoomLevel = float(self._app.settings.value('localmapwidget/zoom'))
         if self.mapZoomLevel == 1.0:
             sliderValue = 0
         elif self.mapZoomLevel > 1.0:
             sliderValue = (self.mapZoomLevel/self.MAPZOOM_SCALE_MAX)*100.0
         else:
             sliderValue = -(self.MAPZOOM_SCALE_MIN/self.mapZoomLevel)*100.0
         self.widget.mapZoomSlider.blockSignals(True)
         self.widget.mapZoomSlider.setValue(sliderValue)
         self.widget.mapZoomSlider.blockSignals(False)
         self.widget.mapZoomSpinbox.blockSignals(True)
         self.widget.mapZoomSpinbox.setValue(self.mapZoomLevel*100.0)
         self.widget.mapZoomSpinbox.blockSignals(False)        
         self.signalSetZoomLevel.emit(self.mapZoomLevel, 0, 0)
     # Init Enable Checkbox
     self.widget.enableCheckbox.stateChanged.connect(self._slotEnableMapTriggered)
     self.widget.enableCheckbox.setChecked(bool(int(self._app.settings.value('localmapwidget/enabled', 0))))
     # Init SaveTo Button
     self.widget.saveToButton.clicked.connect(self._slotSaveToTriggered)
     # Init fps spinner
     self.mapFPS = int(self._app.settings.value('localmapwidget/fps', 5))
     self.widget.fpsSpinBox.setValue(self.mapFPS)
     self.mapReqTimer.setInterval(int(1000/self.mapFPS))
     self.mapReqTimer.timeout.connect(self._slotSendMapReq)
     self.widget.fpsSpinBox.valueChanged.connect(self._slotFpsSpinnerTriggered)
     # Init Splitter
     settings.setSplitterState(self.widget.splitter, self._app.settings.value('localmapwidget/splitterState', None))
     self.widget.splitter.splitterMoved.connect(self._slotSplitterMoved)
     # Init PyPipboy stuff
     from .controller import MapCoordinates
     self.mapCoords = MapCoordinates()
     self.datamanager = datamanager
     self.pipMapObject = None
     self.pipMapWorldObject = None
     self.pipColor = None
     self.pipWorldQuests = None
     self.pipMapQuestsItems = dict()
     #self._signalPipWorldQuestsUpdated.connect(self._slotPipWorldQuestsUpdated)
     #self._signalPipWorldLocationsUpdated.connect(self._slotPipWorldLocationsUpdated)
     self.datamanager.registerRootObjectListener(self._onRootObjectEvent)
     self.dataManager.registerLocalMapListener(self._onLocalMapUpdate)
     self._signalMapUpdate.connect(self._slotMapUpdate)