Пример #1
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 600)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        MainWindow.setFont(font)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/pic/icon.png"), QtGui.QIcon.Normal,
                       QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(self.centralwidget)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        font.setPointSize(16)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.tableWidget = QtWidgets.QTableWidget(self.centralwidget)
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setColumnCount(0)
        self.tableWidget.setRowCount(0)
        self.verticalLayout.addWidget(self.tableWidget)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 23))
        self.menubar.setObjectName("menubar")
        self.menu_file = QtWidgets.QMenu(self.menubar)
        self.menu_file.setObjectName("menu_file")
        self.menu_edit = QtWidgets.QMenu(self.menubar)
        self.menu_edit.setEnabled(True)
        self.menu_edit.setObjectName("menu_edit")
        self.menu_settings = QtWidgets.QMenu(self.menubar)
        self.menu_settings.setObjectName("menu_settings")
        MainWindow.setMenuBar(self.menubar)
        self.action_new = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_new.setFont(font)
        self.action_new.setObjectName("action_new")
        self.action_open = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_open.setFont(font)
        self.action_open.setObjectName("action_open")
        self.action_about_this = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_about_this.setFont(font)
        self.action_about_this.setObjectName("action_about_this")
        self.action_add_passwd = QtWidgets.QAction(MainWindow)
        self.action_add_passwd.setEnabled(False)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_add_passwd.setFont(font)
        self.action_add_passwd.setObjectName("action_add_passwd")
        self.action_change_passwd = QtWidgets.QAction(MainWindow)
        self.action_change_passwd.setEnabled(False)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_change_passwd.setFont(font)
        self.action_change_passwd.setObjectName("action_change_passwd")
        self.action_del_passwd = QtWidgets.QAction(MainWindow)
        self.action_del_passwd.setEnabled(False)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_del_passwd.setFont(font)
        self.action_del_passwd.setObjectName("action_del_passwd")
        self.action_language_default = QtWidgets.QAction(MainWindow)
        self.action_language_default.setCheckable(True)
        self.action_language_default.setChecked(True)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_language_default.setFont(font)
        self.action_language_default.setObjectName("action_language_default")
        self.action_zh_cn = QtWidgets.QAction(MainWindow)
        self.action_zh_cn.setCheckable(True)
        self.action_zh_cn.setText("简体中文")
        self.action_zh_cn.setIconText("简体中文")
        self.action_zh_cn.setToolTip("简体中文")
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_zh_cn.setFont(font)
        self.action_zh_cn.setObjectName("action_zh_cn")
        self.action_import_from_csv = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_import_from_csv.setFont(font)
        self.action_import_from_csv.setObjectName("action_import_from_csv")
        self.action_export_as_csv = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_export_as_csv.setFont(font)
        self.action_export_as_csv.setObjectName("action_export_as_csv")
        self.action_save = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_save.setFont(font)
        self.action_save.setObjectName("action_save")
        self.action_change_db_title = QtWidgets.QAction(MainWindow)
        self.action_change_db_title.setEnabled(False)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_change_db_title.setFont(font)
        self.action_change_db_title.setObjectName("action_change_db_title")
        self.action_about_qt = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_about_qt.setFont(font)
        self.action_about_qt.setObjectName("action_about_qt")
        self.action_import_from_execl = QtWidgets.QAction(MainWindow)
        self.action_import_from_execl.setObjectName("action_import_from_execl")
        self.action_export_as_execl = QtWidgets.QAction(MainWindow)
        self.action_export_as_execl.setObjectName("action_export_as_execl")
        self.action_add_row = QtWidgets.QAction(MainWindow)
        self.action_add_row.setEnabled(False)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_add_row.setFont(font)
        self.action_add_row.setObjectName("action_add_row")
        self.action_del_row = QtWidgets.QAction(MainWindow)
        self.action_del_row.setEnabled(False)
        font = QtGui.QFont()
        font.setFamily("Microsoft YaHei UI")
        self.action_del_row.setFont(font)
        self.action_del_row.setObjectName("action_del_row")
        self.action_add_column = QtWidgets.QAction(MainWindow)
        self.action_add_column.setEnabled(False)
        self.action_add_column.setObjectName("action_add_column")
        self.action_del_column = QtWidgets.QAction(MainWindow)
        self.action_del_column.setEnabled(False)
        self.action_del_column.setObjectName("action_del_column")
        self.menu_file.addAction(self.action_new)
        self.menu_file.addAction(self.action_open)
        self.menu_file.addAction(self.action_save)
        self.menu_edit.addAction(self.action_add_row)
        self.menu_edit.addAction(self.action_del_row)
        self.menu_edit.addAction(self.action_add_column)
        self.menu_edit.addAction(self.action_del_column)
        self.menu_edit.addAction(self.action_change_db_title)
        self.menu_settings.addAction(self.action_about_this)
        self.menu_settings.addAction(self.action_about_qt)
        self.menubar.addAction(self.menu_file.menuAction())
        self.menubar.addAction(self.menu_edit.menuAction())
        self.menubar.addAction(self.menu_settings.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #2
0
    def __init__(self, parent=None):
        super(CreateInterface, self).__init__(parent)
        
        '''Window settings'''
        self.setFixedSize(1050,600)
        self.setWindowTitle("JaSONx")
        scriptDir = os.path.dirname(os.path.realpath(__file__))
        self.setWindowIcon(QtGui.QIcon(scriptDir + os.path.sep + 'image\\logo.png'))
        
        '''Font settings'''
        font = QtGui.QFont()
        font.setPointSize(13)
        fontToolbar = QtGui.QFont()
        fontToolbar.setPointSize(10)
        self.setFont(font)
        
        '''Label settings'''
        self.label = QtWidgets.QLabel()
        self.image_label = QtWidgets.QLabel()
        self.label.setText("Files JSON created!")
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.image_label.setAlignment(QtCore.Qt.AlignCenter)
        self.image_label.setPixmap(QtGui.QPixmap('image\\logo.png'))
        
        '''Button settings'''
        self.buttonMain = QtWidgets.QPushButton("Main")
        self.buttonMain.setStyleSheet("background-color: #8b0000; color: white; height:50; border-radius:10")
        self.buttonMain.setFont(font)
        self.buttonMain.clicked.connect(self.on_pushButton_clicked)
        
        self.buttonActivateThing = QtWidgets.QPushButton("Activate Things")
        self.buttonActivateThing.setStyleSheet("background-color: orange; color: white; height:50; border-radius:10")
        self.buttonActivateThing.setFont(font)
        self.buttonActivateThing.clicked.connect(self.activate_thing)
        
        self.buttonExcel = QtWidgets.QPushButton("Create file Excel")
        self.buttonExcel.setStyleSheet("background-color: green; color: white; height:50; border-radius:10")
        self.buttonExcel.setFont(font)
        self.buttonExcel.clicked.connect(self.create_excel)
        
        '''Horizontal layout'''
        hbox = QtWidgets.QHBoxLayout()
        hbox.addWidget(self.buttonExcel)
        hbox.addWidget(self.buttonActivateThing)
        
        '''Vertical layout'''
        vbox = QtWidgets.QVBoxLayout()
        vbox.addWidget(self.image_label)
        vbox.addWidget(self.label)
        vbox.addLayout(hbox)
        vbox.addWidget(self.buttonMain)
        
        '''Layout QWidget'''
        layout = QtWidgets.QWidget()
        layout.setLayout(vbox)
        
        '''Layout QMainWindow'''
        self.setCentralWidget(layout)
        
        '''Toolbar'''
        toolbar = self.addToolBar('Toolbar')
        toolbar.setMovable(False)
        toolbar.setIconSize(QtCore.QSize(40,40))
        toolbar.setFont(fontToolbar)
        toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
        
        '''Icon toolbar'''
        '''Back application'''
        back_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "icon","backicon.png")), 'Back', self)
        back_act.setShortcut('Ctrl+B')
        back_act.setStatusTip('Return to main Interface')
        
        '''Act toolbar'''
        toolbar.addAction(back_act)

        
        '''Toolbar triggered'''
        back_act.triggered.connect(self.returnFirstInterface)
Пример #3
0
    def __init__(self, parent=None):
        super(MainInterface, self).__init__(parent)
        
        '''Window settings'''
        self.setWindowTitle("JaSONx - version 2.2.1")
        self.setFixedSize(1050,600) 
        scriptDir = os.path.dirname(os.path.realpath(__file__))
        self.setWindowIcon(QtGui.QIcon(scriptDir + os.path.sep + 'image\\logo.png'))
       
        '''Font settings'''
        font = QtGui.QFont()
        font.setPointSize(13)
        fontToolbar = QtGui.QFont()
        fontToolbar.setPointSize(10)
        self.setFont(font)
        
        '''Label settings'''
        self.title_label = QtWidgets.QLabel()
        self.user_name_label = QtWidgets.QLabel()
        self.password_label = QtWidgets.QLabel()
        self.match_group_value_label = QtWidgets.QLabel()
        self.combo_box_hierarchy_label = QtWidgets.QLabel()
        self.gateway_id_label = QtWidgets.QLabel()
        self.combo_box_environment_prefix_label = QtWidgets.QLabel()
        self.title_label.setAlignment(QtCore.Qt.AlignCenter)
        
        '''Label text'''
        self.title_label.setPixmap(QtGui.QPixmap('image\\title.png'))
        self.user_name_label.setText("Username: "******"Password: "******"Hierarchy: ")
        self.gateway_id_label.setText("Gateway id: ") 
        self.combo_box_environment_prefix_label.setText("Environment prefix: ")
        
        '''Textbox settings'''
        self.user_name_text = QtWidgets.QLineEdit(self)
        self.password_text = QtWidgets.QLineEdit(self) 

        
        '''Combobox settings'''
        self.combo_box_hierarchy = QtWidgets.QComboBox()
        self.combo_box_hierarchy.addItems(utility.getListHierarchy())
        
        self.combo_box_environment_prefix = QtWidgets.QComboBox()
        self.combo_box_environment_prefix.addItems(utility.readFileJSON(os.path.join(os.path.realpath (''), "configuration\\environmentPrefixConfiguration.json")))
    
        self.combo_box_gateway_id = QtWidgets.QComboBox()
        self.combo_box_gateway_id.addItems(utility.readFileJSON(os.path.join(os.path.realpath (''), "configuration\\gatewayIdConfiguration.json")))
    
    
        '''Button settings'''
        self.button = QtWidgets.QPushButton("Send data")
        self.button.setStyleSheet("background-color: #8b0000; color: white; height:50; border-radius:10")
        self.button.setFont(font)
        self.button.clicked.connect(self.on_pushButton_clicked)
           
        '''Grid layout'''
        grid = QtWidgets.QGridLayout()  
        grid.addWidget(self.user_name_label, 0, 0)
        grid.addWidget(self.user_name_text, 0, 1)  
        grid.addWidget(self.password_label, 1, 0)
        grid.addWidget(self.password_text, 1, 1)
        grid.addWidget(self.gateway_id_label, 2, 0)
        grid.addWidget(self.combo_box_gateway_id, 2, 1)
        grid.addWidget(self.combo_box_environment_prefix_label, 3, 0)
        grid.addWidget(self.combo_box_environment_prefix, 3, 1)
        grid.addWidget(self.combo_box_hierarchy_label, 4, 0)
        grid.addWidget(self.combo_box_hierarchy, 4, 1)
        
        '''Vertical layout'''
        vbox = QtWidgets.QVBoxLayout()
        vbox.addWidget(self.title_label)
        vbox.addLayout(grid)
        vbox.addWidget(self.button)
        
        '''Layout QWidget'''
        layout = QtWidgets.QWidget()
        layout.setLayout(vbox)
        
        '''Layout QMainWindow'''
        self.setCentralWidget(layout)
        
        '''TOOLBAR'''
        toolbar = self.addToolBar('Toolbar')
        toolbar.setMovable(False)
        toolbar.setIconSize(QtCore.QSize(40,40))
        toolbar.setFont(fontToolbar)
        toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
        
        '''Icon toolbar'''
        '''Exit application'''
        exit_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "icon","exiticon.png")), 'Close', self)
        exit_act.setShortcut('Ctrl+Q')
        exit_act.setStatusTip('Close application')
        
        '''Add Hierarchy xml'''
        add_xml_hierarchy_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "icon","xmlicon.png")), 'Add Hierarchy', self)
        add_xml_hierarchy_act.setShortcut('Ctrl+H')
        add_xml_hierarchy_act.setStatusTip('Add Hierarchy XML')
        
        '''Add template json'''
        add_json_template_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "icon","jsonicon.png")), 'Add Template', self)
        add_json_template_act.setShortcut('Ctrl+T')
        add_json_template_act.setStatusTip('Add JSON Template')
        
        '''Refresh application'''
        refresh_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "icon","refreshicon.png")), 'Refresh', self)
        refresh_act.setShortcut('Ctrl+R')
        refresh_act.setStatusTip('Refresh application')
        
        '''Add evironment prefix'''
        add_environment_prefix_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "icon","addlisticon.png")), 'Add environment prefix', self)
        add_environment_prefix_act.setShortcut('Ctrl+P')
        add_environment_prefix_act.setStatusTip('Add environment prefix')
        
        '''Add gateway id'''
        add_gateway_id_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "icon","addlisticon.png")), 'Add gateway id', self)
        add_gateway_id_act.setShortcut('Ctrl+Y')
        add_gateway_id_act.setStatusTip('Add gateway id')
        
        
        '''xCELL'''
        xCell_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "xcell.png")), 'xCell', self)
        xCell_act.setShortcut('Ctrl+L')
        xCell_act.setStatusTip('Open xCELL Interface')
        
        '''acThing'''
        acThing_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "acthing.png")), 'acThing', self)
        acThing_act.setShortcut('Ctrl+I')
        acThing_act.setStatusTip('Open acThing Interface')
        
        '''ACTION TOOLBAR'''
        toolbar.addAction(exit_act)
        toolbar.addSeparator()
        toolbar.addSeparator()
        toolbar.addAction(add_xml_hierarchy_act)  
        toolbar.addAction(add_json_template_act)
        toolbar.addAction(add_environment_prefix_act)
        toolbar.addAction(add_gateway_id_act)
        toolbar.addAction(refresh_act)
        toolbar.addSeparator()
        toolbar.addSeparator()
        toolbar.addAction(xCell_act)
        toolbar.addSeparator()
        toolbar.addSeparator()
        toolbar.addAction(acThing_act)
        
        
        '''TOOOLBAR TRIGGERED'''
        exit_act.triggered.connect(self.closeFunction)
        add_xml_hierarchy_act.triggered.connect(self.addHierarchy)
        add_json_template_act.triggered.connect(self.addJsonTemplate)
        refresh_act.triggered.connect(self.refreshWindow)
        add_environment_prefix_act.triggered.connect(self.addEnvironmentPrefix)
        add_gateway_id_act.triggered.connect(self.addGatewayId)
        xCell_act.triggered.connect(self.openXcellInterface) 
        acThing_act.triggered.connect(self.openAcThingInterface)
        
        
        '''MENU SETTINGS'''
        '''Configuration Json path'''
        configJsonPathAct = QtWidgets.QAction(QtGui.QIcon('exit.png'), 'Json Path Configuration', self)        
        configJsonPathAct.setShortcut('Ctrl+J')
        configJsonPathAct.setStatusTip('')
        configJsonPathAct.triggered.connect(self.changePathJsonFile)

        '''Configuration Hierarchy path'''
        configHierarchyPathAct = QtWidgets.QAction(QtGui.QIcon('exit.png'), 'Hierarchy Path Configuration', self)        
        configHierarchyPathAct.setShortcut('Ctrl+X')
        configHierarchyPathAct.setStatusTip('')
        configHierarchyPathAct.triggered.connect(self.changePathHierarchy)
        
        '''Configuration Excel path'''
        configExcelPathAct = QtWidgets.QAction(QtGui.QIcon('exit.png'), 'Excel Path Configuration', self)        
        configExcelPathAct.setShortcut('Ctrl+E')
        configExcelPathAct.setStatusTip('')
        configExcelPathAct.triggered.connect(self.changePathExcel)
        
        '''Reset paths default'''
        resetPathAct = QtWidgets.QAction(QtGui.QIcon('exit.png'), 'Reset Path to Default', self)        
        resetPathAct.setShortcut('Ctrl+D')
        resetPathAct.setStatusTip('')
        resetPathAct.triggered.connect(self.resetDefaultPath)
        
        '''Refresh template configuration'''
        refreshTemplateConfigAct = QtWidgets.QAction(QtGui.QIcon('exit.png'), 'Refresh template configuration', self)        
        refreshTemplateConfigAct.setShortcut('Ctrl+C')
        refreshTemplateConfigAct.setStatusTip('')
        refreshTemplateConfigAct.triggered.connect(self.refreshTemplateConfiguration)
        
        '''User Guide'''
        UserGuideAct = QtWidgets.QAction(QtGui.QIcon('exit.png'), 'Open User Guide', self)        
        UserGuideAct.setShortcut('Ctrl+G')
        UserGuideAct.setStatusTip('')
        UserGuideAct.triggered.connect(self.openUserGuide)

        '''Add bar menu'''
        menubar = self.menuBar()
        
        '''Menu path population'''
        fileMenu = menubar.addMenu('&Change Path')
        fileMenu.addAction(configJsonPathAct)
        fileMenu.addAction(configHierarchyPathAct)
        fileMenu.addAction(configExcelPathAct)
        fileMenu.addAction(resetPathAct) 
        
        '''Menu template configuration'''
        fileMenu2 = menubar.addMenu('&Refresh Template Configuration')
        fileMenu2.addAction(refreshTemplateConfigAct)
        
        '''Menu Info - User Guide'''
        fileMenu3 = menubar.addMenu('&Info')
        fileMenu3.addAction(UserGuideAct)
Пример #4
0
    def setupUi(self, wdgDerivativesReport):
        wdgDerivativesReport.setObjectName("wdgDerivativesReport")
        wdgDerivativesReport.setProperty("modal", False)
        wdgDerivativesReport.resize(981, 781)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(wdgDerivativesReport)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.lbl = QtWidgets.QLabel(wdgDerivativesReport)
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.lbl.setFont(font)
        self.lbl.setAlignment(QtCore.Qt.AlignCenter)
        self.lbl.setObjectName("lbl")
        self.verticalLayout.addWidget(self.lbl)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.wyData = wdgYear(wdgDerivativesReport)
        self.wyData.setObjectName("wyData")
        self.horizontalLayout.addWidget(self.wyData)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.tab = QtWidgets.QTabWidget(wdgDerivativesReport)
        self.tab.setTabsClosable(True)
        self.tab.setObjectName("tab")
        self.tab_4 = QtWidgets.QWidget()
        self.tab_4.setObjectName("tab_4")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.tab_4)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.mqtwTotal = mqtw(self.tab_4)
        self.mqtwTotal.setObjectName("mqtwTotal")
        self.verticalLayout_3.addWidget(self.mqtwTotal)
        self.tab.addTab(self.tab_4, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.tab_2)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.wdgIOHSLong = wdgInvestmentOperationHistoricalSelector(self.tab_2)
        self.wdgIOHSLong.setObjectName("wdgIOHSLong")
        self.verticalLayout_2.addWidget(self.wdgIOHSLong)
        self.wdgIOHSShort = wdgInvestmentOperationHistoricalSelector(self.tab_2)
        self.wdgIOHSShort.setObjectName("wdgIOHSShort")
        self.verticalLayout_2.addWidget(self.wdgIOHSShort)
        self.textBrowser = QtWidgets.QTextBrowser(self.tab_2)
        self.textBrowser.setOpenExternalLinks(True)
        self.textBrowser.setObjectName("textBrowser")
        self.verticalLayout_2.addWidget(self.textBrowser)
        self.horizontalLayout_2.addLayout(self.verticalLayout_2)
        self.tab.addTab(self.tab_2, "")
        self.verticalLayout.addWidget(self.tab)
        self.horizontalLayout_3.addLayout(self.verticalLayout)
        self.actionShowAdjustments = QtWidgets.QAction(wdgDerivativesReport)
        self.actionShowAdjustments.setObjectName("actionShowAdjustments")

        self.retranslateUi(wdgDerivativesReport)
        self.tab.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(wdgDerivativesReport)
Пример #5
0
    def __init__(self, parent=None):
        super(ACThingMainInterface, self).__init__(parent)
        
        '''Window settings'''
        self.setWindowTitle("actTHING")
        self.setFixedSize(1050,600) 
        scriptDir = os.path.dirname(os.path.realpath(__file__))
        self.setWindowIcon(QtGui.QIcon(scriptDir + os.path.sep + 'image\\acthing.png'))

        '''Font settings'''
        font = QtGui.QFont()
        font.setPointSize(13)
        fontToolbar = QtGui.QFont()
        fontToolbar.setPointSize(10)
        self.setFont(font)
        
        '''Button settings'''
        self.button = QtWidgets.QPushButton("Activate Things")
        self.button.setStyleSheet("background-color: orange; color: white; height:50; border-radius:10")
        self.button.setFont(font)
        
        '''Create list file .json'''
        self.list_file_json = utility.createListFile(os.path.join(JaSONx.jsonPath,JaSONx.name_file_hierarchy), ".json")
        
        '''Layout settings'''
        grid = QtWidgets.QGridLayout()   
        self.table = QtWidgets.QTableWidget()   
        self.table.setFont(font)               
        self.table.setRowCount(len(self.list_file_json))
        self.table.setColumnCount(1)
        self.table.setHorizontalHeaderLabels(["File JSON"])
        self.table.setColumnWidth(0,1000)

        '''Grid Layout'''
        grid.addWidget(self.table, 0, 0)
        grid.addWidget(self.button, 1, 0)
        
        '''Layout QWidget'''
        layout = QtWidgets.QWidget()
        layout.setLayout(grid)
        
        '''Layout QMainWindow'''
        self.setCentralWidget(layout)
        
        '''Toolbar'''
        toolbar = self.addToolBar('Toolbar')
        toolbar.setMovable(False)
        toolbar.setIconSize(QtCore.QSize(40,40))
        toolbar.setFont(fontToolbar)
        toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
        
        '''Icon toolbar'''
        '''Back application'''
        back_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "icon","backicon.png")), 'Back', self)
        back_act.setShortcut('Ctrl+B')
        back_act.setStatusTip('Return to main Interface')
        
        '''Act toolbar'''
        toolbar.addAction(back_act)

        
        '''Toolbar triggered'''
        back_act.triggered.connect(self.returnFirstInterface)
  
        '''Table settings'''
        count = 0
        for file in self.list_file_json:
            self.table.setItem(count,0,QtWidgets.QTableWidgetItem(file))
            count +=1
            
        '''Button clicked'''
        self.button.clicked.connect(self.on_pushButton_clicked)
    def setupUi(self, FaceRecApp):
        FaceRecApp.setObjectName("FaceRecApp")
        FaceRecApp.resize(886, 653)
        icon = QtGui.QIcon.fromTheme("camera-video")
        FaceRecApp.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(FaceRecApp)
        self.centralwidget.setObjectName("centralwidget")
        self.viewFinderPage = QtWidgets.QWidget(self.centralwidget)
        self.viewFinderPage.setGeometry(QtCore.QRect(20, 60, 661, 501))
        self.viewFinderPage.setAutoFillBackground(False)
        self.viewFinderPage.setObjectName("viewFinderPage")
        self.gridLayout = QtWidgets.QGridLayout(self.viewFinderPage)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.cameraSurface = QtWidgets.QLabel(self.viewFinderPage)
        self.cameraSurface.setMinimumSize(QtCore.QSize(640, 480))
        self.cameraSurface.setMaximumSize(QtCore.QSize(640, 480))
        self.cameraSurface.setFrameShape(QtWidgets.QFrame.Box)
        self.cameraSurface.setText("")
        self.cameraSurface.setObjectName("cameraSurface")
        self.gridLayout.addWidget(self.cameraSurface, 0, 1, 1, 1)
        self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox.setGeometry(QtCore.QRect(720, 160, 121, 281))
        self.groupBox.setObjectName("groupBox")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox)
        self.verticalLayout.setObjectName("verticalLayout")
        self.startButton = QtWidgets.QPushButton(self.groupBox)
        self.startButton.setObjectName("startButton")
        self.verticalLayout.addWidget(self.startButton)
        self.pauseButton = QtWidgets.QPushButton(self.groupBox)
        self.pauseButton.setObjectName("pauseButton")
        self.verticalLayout.addWidget(self.pauseButton)
        spacerItem = QtWidgets.QSpacerItem(20, 40,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.stopButton = QtWidgets.QPushButton(self.groupBox)
        self.stopButton.setObjectName("stopButton")
        self.verticalLayout.addWidget(self.stopButton)
        self.splitter = QtWidgets.QSplitter(self.centralwidget)
        self.splitter.setGeometry(QtCore.QRect(690, 80, 181, 27))
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.label = QtWidgets.QLabel(self.splitter)
        self.label.setObjectName("label")
        self.faceRegistrySelect = QtWidgets.QComboBox(self.splitter)
        self.faceRegistrySelect.setObjectName("faceRegistrySelect")
        FaceRecApp.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(FaceRecApp)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 886, 27))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuDevices = QtWidgets.QMenu(self.menubar)
        self.menuDevices.setObjectName("menuDevices")
        self.menuView = QtWidgets.QMenu(self.menubar)
        self.menuView.setObjectName("menuView")
        FaceRecApp.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(FaceRecApp)
        self.statusbar.setObjectName("statusbar")
        FaceRecApp.setStatusBar(self.statusbar)
        self.actionExit = QtWidgets.QAction(FaceRecApp)
        self.actionExit.setObjectName("actionExit")
        self.actionStartCamera = QtWidgets.QAction(FaceRecApp)
        self.actionStartCamera.setObjectName("actionStartCamera")
        self.actionStopCamera = QtWidgets.QAction(FaceRecApp)
        self.actionStopCamera.setObjectName("actionStopCamera")
        self.actionRegisterFaces = QtWidgets.QAction(FaceRecApp)
        self.actionRegisterFaces.setObjectName("actionRegisterFaces")
        self.actionViewFaceRegistry = QtWidgets.QAction(FaceRecApp)
        self.actionViewFaceRegistry.setObjectName("actionViewFaceRegistry")
        self.actionAddAlbum = QtWidgets.QAction(FaceRecApp)
        self.actionAddAlbum.setObjectName("actionAddAlbum")
        self.actionDeleteAlbum = QtWidgets.QAction(FaceRecApp)
        self.actionDeleteAlbum.setObjectName("actionDeleteAlbum")
        self.menuFile.addAction(self.actionRegisterFaces)
        self.menuFile.addAction(self.actionAddAlbum)
        self.menuFile.addAction(self.actionDeleteAlbum)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionExit)
        self.menuView.addAction(self.actionViewFaceRegistry)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuView.menuAction())
        self.menubar.addAction(self.menuDevices.menuAction())
        self.label.setBuddy(self.faceRegistrySelect)

        self.retranslateUi(FaceRecApp)
        self.startButton.clicked.connect(FaceRecApp.start)
        self.pauseButton.clicked.connect(FaceRecApp.pause)
        self.stopButton.clicked.connect(FaceRecApp.stop)
        self.actionRegisterFaces.triggered.connect(FaceRecApp.register_faces)
        self.actionAddAlbum.triggered.connect(FaceRecApp.create_registry)
        self.actionViewFaceRegistry.triggered.connect(FaceRecApp.view_registry)
        self.actionExit.triggered.connect(FaceRecApp.close)
        self.actionDeleteAlbum.triggered.connect(FaceRecApp.delete_registry)
        self.faceRegistrySelect.currentIndexChanged['QString'].connect(
            FaceRecApp.set_current_registry)
        QtCore.QMetaObject.connectSlotsByName(FaceRecApp)
Пример #7
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(882, 435)
        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(170, 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(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(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(170, 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(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(0, 0, 0, 128))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.PlaceholderText,
                         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(170, 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(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(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(170, 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(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(0, 0, 0, 128))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive,
                         QtGui.QPalette.PlaceholderText, brush)
        brush = QtGui.QBrush(QtGui.QColor(85, 127, 127))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(170, 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(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(85, 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(85, 127, 127))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText,
                         brush)
        brush = QtGui.QBrush(QtGui.QColor(170, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(170, 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(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)
        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled,
                         QtGui.QPalette.PlaceholderText, brush)
        MainWindow.setPalette(palette)

        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")

        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(40, 100, 351, 161))
        self.label.setText("")
        self.label.setPixmap(QtGui.QPixmap("git-logo.png"))
        self.label.setScaledContents(True)
        self.label.setWordWrap(False)
        self.label.setObjectName("label")
        self.Creating = QtWidgets.QTabWidget(self.centralwidget)
        self.Creating.setEnabled(True)
        self.Creating.setGeometry(QtCore.QRect(440, 40, 371, 311))
        self.Creating.setMinimumSize(QtCore.QSize(371, 0))
        self.Creating.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        self.Creating.setObjectName("Creating")
        self.Create_New = QtWidgets.QWidget()
        self.Create_New.setObjectName("Create_New")
        self.label_2 = QtWidgets.QLabel(self.Create_New)
        self.label_2.setGeometry(QtCore.QRect(70, 50, 241, 71))
        font = QtGui.QFont()
        font.setPointSize(12)

        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")

        self.BCreateNew = QtWidgets.QPushButton(self.Create_New)

        self.BCreateNew.setGeometry(QtCore.QRect(260, 240, 93, 28))
        self.BCreateNew.setObjectName("BCreateNew")
        self.Creating.addTab(self.Create_New, "new")
        self.Clone_Local = QtWidgets.QWidget()
        self.Clone_Local.setObjectName("Clone_Local")
        self.label_3 = QtWidgets.QLabel(self.Clone_Local)
        self.label_3.setGeometry(QtCore.QRect(80, 50, 241, 71))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.lineEdit = QtWidgets.QLineEdit(self.Clone_Local)
        self.lineEdit.setGeometry(QtCore.QRect(30, 130, 321, 22))
        self.lineEdit.setObjectName("lineEdit")
        self.pushButton = QtWidgets.QPushButton(self.Clone_Local)
        self.pushButton.setGeometry(QtCore.QRect(260, 240, 93, 28))
        self.pushButton.setObjectName("pushButton")
        self.Creating.addTab(self.Clone_Local, "")
        self.Clone_Link = QtWidgets.QWidget()
        self.Clone_Link.setObjectName("Clone_Link")
        self.pushButton_2 = QtWidgets.QPushButton(self.Clone_Link)
        self.pushButton_2.setGeometry(QtCore.QRect(260, 240, 93, 28))
        self.pushButton_2.setObjectName("pushButton_2")
        self.label_4 = QtWidgets.QLabel(self.Clone_Link)
        self.label_4.setGeometry(QtCore.QRect(80, 50, 241, 71))
        font = QtGui.QFont()
        font.setPointSize(12)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.lineEdit_2 = QtWidgets.QLineEdit(self.Clone_Link)
        self.lineEdit_2.setGeometry(QtCore.QRect(30, 130, 321, 22))
        self.lineEdit_2.setText("")
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.Creating.addTab(self.Clone_Link, "")
        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, 882, 26))
        self.menuBar.setObjectName("menuBar")
        MainWindow.setMenuBar(self.menuBar)
        self.actionCreate_New_Repo = QtWidgets.QAction(MainWindow)
        self.actionCreate_New_Repo.setObjectName("actionCreate_New_Repo")
        self.actionClone_From_Location = QtWidgets.QAction(MainWindow)
        self.actionClone_From_Location.setObjectName(
            "actionClone_From_Location")
        self.actionClone_From_Link = QtWidgets.QAction(MainWindow)
        self.actionClone_From_Link.setObjectName("actionClone_From_Link")

        self.retranslateUi(MainWindow)
        self.Creating.setCurrentIndex(1)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #8
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(800, 600)
        MainWindow.setMaximumSize(QtCore.QSize(800, 635))
        font = QtGui.QFont()
        font.setPointSize(14)
        font.setBold(False)
        font.setWeight(50)
        MainWindow.setFont(font)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(60, 140, 431, 381))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.lineEdit_row1 = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.lineEdit_row1.setObjectName("lineEdit_row1")
        self.gridLayout.addWidget(self.lineEdit_row1, 1, 1, 1, 1)
        self.lineEdit_2 = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.gridLayout.addWidget(self.lineEdit_2, 2, 1, 1, 1)
        self.label_4 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.label = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
        self.lineEdit_1 = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.lineEdit_1.setObjectName("lineEdit_1")
        self.gridLayout.addWidget(self.lineEdit_1, 0, 1, 1, 1)
        self.lineEdit_row2 = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.lineEdit_row2.setObjectName("lineEdit_row2")
        self.gridLayout.addWidget(self.lineEdit_row2, 3, 1, 1, 1)
        self.gridLayoutWidget_2 = QtWidgets.QWidget(self.centralwidget)
        self.gridLayoutWidget_2.setGeometry(QtCore.QRect(520, 140, 221, 381))
        self.gridLayoutWidget_2.setObjectName("gridLayoutWidget_2")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.gridLayoutWidget_2)
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.btn_clear = QtWidgets.QPushButton(self.gridLayoutWidget_2)
        self.btn_clear.setObjectName("btn_clear")
        self.gridLayout_2.addWidget(self.btn_clear, 0, 0, 1, 1)
        self.btn_dot = QtWidgets.QPushButton(self.gridLayoutWidget_2)
        self.btn_dot.setObjectName("btn_dot")
        self.gridLayout_2.addWidget(self.btn_dot, 4, 0, 1, 1)
        self.btn_t = QtWidgets.QPushButton(self.gridLayoutWidget_2)
        self.btn_t.setObjectName("btn_t")
        self.gridLayout_2.addWidget(self.btn_t, 3, 0, 1, 1)
        self.btn_det = QtWidgets.QPushButton(self.gridLayoutWidget_2)
        self.btn_det.setObjectName("btn_det")
        self.gridLayout_2.addWidget(self.btn_det, 1, 0, 1, 1)
        self.btn_inv = QtWidgets.QPushButton(self.gridLayoutWidget_2)
        self.btn_inv.setObjectName("btn_inv")
        self.gridLayout_2.addWidget(self.btn_inv, 2, 0, 1, 1)
        self.btn_eigvalue = QtWidgets.QPushButton(self.gridLayoutWidget_2)
        self.btn_eigvalue.setObjectName("btn_eigvalue")
        self.gridLayout_2.addWidget(self.btn_eigvalue, 6, 0, 1, 1)
        self.btn_solve = QtWidgets.QPushButton(self.gridLayoutWidget_2)
        self.btn_solve.setObjectName("btn_solve")
        self.gridLayout_2.addWidget(self.btn_solve, 5, 0, 1, 1)
        self.btn_var = QtWidgets.QPushButton(self.gridLayoutWidget_2)
        self.btn_var.setObjectName("btn_var")
        self.gridLayout_2.addWidget(self.btn_var, 7, 0, 1, 1)
        self.label_5 = QtWidgets.QLabel(self.centralwidget)
        self.label_5.setGeometry(QtCore.QRect(60, 480, 351, 61))
        self.label_5.setObjectName("label_5")
        self.horizontalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
        self.horizontalLayoutWidget.setGeometry(QtCore.QRect(60, 10, 681, 131))
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(
            self.horizontalLayoutWidget)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.textEdit_result1 = QtWidgets.QTextEdit(
            self.horizontalLayoutWidget)
        self.textEdit_result1.setObjectName("textEdit_result1")
        self.horizontalLayout.addWidget(self.textEdit_result1)
        self.textEdit_result2 = QtWidgets.QTextEdit(
            self.horizontalLayoutWidget)
        self.textEdit_result2.setObjectName("textEdit_result2")
        self.horizontalLayout.addWidget(self.textEdit_result2)
        self.label_6 = QtWidgets.QLabel(self.centralwidget)
        self.label_6.setGeometry(QtCore.QRect(540, 560, 54, 12))
        self.label_6.setObjectName("label_6")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 23))
        self.menubar.setObjectName("menubar")
        self.menuHelp = QtWidgets.QMenu(self.menubar)
        self.menuHelp.setObjectName("menuHelp")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionAbout = QtWidgets.QAction(MainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.menuHelp.addAction(self.actionAbout)
        self.menubar.addAction(self.menuHelp.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #9
0
    def initialise_menu_bar(self):
        """Set up the menu bar options."""
        # Set up options to change SLAM type.
        slam_type_menu = self.menuBar().addMenu('SLAM Type')
        slam_type_ag = QtWidgets.QActionGroup(self, exclusive=True)
        slam_type_scan_matching = slam_type_ag.addAction(
            QtWidgets.QAction('Scan Matching', self, checkable=True))
        slam_type_hough = slam_type_ag.addAction(
            QtWidgets.QAction('Hough Landmarks', self, checkable=True))
        slam_type_ransac = slam_type_ag.addAction(
            QtWidgets.QAction('RANSAC Landmarks', self, checkable=True))
        slam_type_naive = slam_type_ag.addAction(
            QtWidgets.QAction('Naive', self, checkable=True))
        slam_type_scan_matching.triggered.connect(
            lambda x: self.set_slam_type(SlamMode.SCAN_MATCHING))
        slam_type_hough.triggered.connect(
            lambda x: self.set_slam_type(LandmarkMode.HOUGH))
        slam_type_ransac.triggered.connect(
            lambda x: self.set_slam_type(LandmarkMode.RANSAC))
        slam_type_naive.triggered.connect(
            lambda x: self.set_slam_type(SlamMode.NAIVE))
        slam_type_menu.addAction(slam_type_scan_matching)
        slam_type_menu.addAction(slam_type_hough)
        slam_type_menu.addAction(slam_type_ransac)
        slam_type_menu.addAction(slam_type_naive)
        self.menuBar().addMenu(slam_type_menu)

        # Set up miscellaneous options.
        options_menu = QtWidgets.QMenu("Options", self)
        options_automatic = QtWidgets.QAction("Automatic",
                                              options_menu,
                                              checkable=True)
        options_automatic.triggered.connect(self.set_automatic)
        options_menu.addAction(options_automatic)
        self.menuBar().addMenu(options_menu)

        # Set up options for the display.
        display_menu = QtWidgets.QMenu("Display Mode", self)
        display_ag = QtWidgets.QActionGroup(self, exclusive=True)
        display_map = display_ag.addAction(
            QtWidgets.QAction('Map Distribution', self, checkable=True))
        display_prob = display_ag.addAction(
            QtWidgets.QAction('Probability Distribution', self,
                              checkable=True))
        display_map.triggered.connect(
            lambda x: self.set_map_mode(MapMode.DIST))
        display_prob.triggered.connect(
            lambda x: self.set_map_mode(MapMode.PROB))
        display_menu.addAction(display_map)
        display_menu.addAction(display_prob)
        self.menuBar().addMenu(display_menu)

        # Set up options for how the robot is followed.
        tracking_menu = QtWidgets.QMenu("Tracking Mode", self)
        tracking_ag = QtWidgets.QActionGroup(self, exclusive=True)
        tracking_free = tracking_ag.addAction(
            QtWidgets.QAction('Free', self, checkable=True))
        tracking_adjusted = tracking_ag.addAction(
            QtWidgets.QAction('Adjusted Robot', self, checkable=True))
        tracking_raw = tracking_ag.addAction(
            QtWidgets.QAction('Raw Robot', self, checkable=True))
        tracking_free.triggered.connect(
            lambda x: self.set_tracking_mode(TrackingMode.FREE))
        tracking_adjusted.triggered.connect(
            lambda x: self.set_tracking_mode(TrackingMode.ADJUSTED))
        tracking_raw.triggered.connect(
            lambda x: self.set_tracking_mode(TrackingMode.STATE))
        tracking_menu.addAction(tracking_raw)
        tracking_menu.addAction(tracking_free)
        tracking_menu.addAction(tracking_adjusted)
        self.menuBar().addMenu(tracking_menu)

        # Set up the map display mode.
        map_menu = QtWidgets.QMenu("Map Display Mode", self)
        map_ag = QtWidgets.QActionGroup(self, exclusive=True)
        map_local = map_ag.addAction(
            QtWidgets.QAction('Local', self, checkable=True))
        map_global = map_ag.addAction(
            QtWidgets.QAction('Global', self, checkable=True))
        map_local.triggered.connect(
            lambda x: self.set_display_mode(self.grid.view_mode.LOCAL))
        map_global.triggered.connect(
            lambda x: self.set_display_mode(self.grid.view_mode.ADJUSTED))
        map_menu.addAction(map_local)
        map_menu.addAction(map_global)
        self.menuBar().addMenu(map_menu)

        # Set up the probability display mode.
        probability_menu = QtWidgets.QMenu("Probability Mode", self)
        probability_ag = QtWidgets.QActionGroup(self, exclusive=True)
        probability_prior = probability_ag.addAction(
            QtWidgets.QAction('Prior Probabilities', self, checkable=True))
        probability_slam = probability_ag.addAction(
            QtWidgets.QAction('SLAM Probabilities', self, checkable=True))
        probability_combined = probability_ag.addAction(
            QtWidgets.QAction('Combined Probabilities', self, checkable=True))
        probability_prior.triggered.connect(
            lambda x: self.set_probability_mode(self.grid.probability_mode.
                                                PRIOR_PROBABILITIES))
        probability_slam.triggered.connect(lambda x: self.set_probability_mode(
            self.grid.probability_mode.SLAM_PROBABILITIES))
        probability_combined.triggered.connect(
            lambda x: self.set_probability_mode(self.grid.probability_mode.
                                                COMBINED_PROBABILITIES))
        probability_menu.addAction(probability_prior)
        probability_menu.addAction(probability_slam)
        probability_menu.addAction(probability_combined)
        self.menuBar().addMenu(probability_menu)

        # Set up the probability slider.
        probability_slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
        probability_slider.setMinimum(0)
        probability_slider.setMaximum(100)
        probability_slider.setValue(50)
        probability_slider.setTickPosition(QtWidgets.QSlider.TicksBelow)
        probability_slider.setTickInterval(5)
        probability_slider.valueChanged.connect(self.set_probability_alpha)

        # Add the slider, status bar and title.
        self.statusBar.addWidget(probability_slider)
        self.setWindowTitle("SLAM")
        self.setStatusBar(self.statusBar)
Пример #10
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(870, 650)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/main_gui/logo"), QtGui.QIcon.Normal,
                       QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        MainWindow.setTabShape(QtWidgets.QTabWidget.Rounded)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.centralwidget.sizePolicy().hasHeightForWidth())
        self.centralwidget.setSizePolicy(sizePolicy)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setContentsMargins(3, 0, 3, 0)
        self.verticalLayout_2.setSpacing(0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.splitter = QtWidgets.QSplitter(self.centralwidget)
        self.splitter.setOrientation(QtCore.Qt.Vertical)
        self.splitter.setObjectName("splitter")
        self.MainTabs = QtWidgets.QTabWidget(self.splitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(
            self.MainTabs.sizePolicy().hasHeightForWidth())
        self.MainTabs.setSizePolicy(sizePolicy)
        self.MainTabs.setObjectName("MainTabs")
        self.fitModelTab = QtWidgets.QWidget()
        self.fitModelTab.setObjectName("fitModelTab")
        self.MainTabs.addTab(self.fitModelTab, "")
        self.generateBrainMaskTab = QtWidgets.QWidget()
        self.generateBrainMaskTab.setObjectName("generateBrainMaskTab")
        self.MainTabs.addTab(self.generateBrainMaskTab, "")
        self.generateROIMaskTab = QtWidgets.QWidget()
        self.generateROIMaskTab.setObjectName("generateROIMaskTab")
        self.MainTabs.addTab(self.generateROIMaskTab, "")
        self.generateProtocolTab = QtWidgets.QWidget()
        self.generateProtocolTab.setObjectName("generateProtocolTab")
        self.MainTabs.addTab(self.generateProtocolTab, "")
        self.viewResultsTab = QtWidgets.QWidget()
        self.viewResultsTab.setObjectName("viewResultsTab")
        self.MainTabs.addTab(self.viewResultsTab, "")
        self.loggingTextBox = QtWidgets.QPlainTextEdit(self.splitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.loggingTextBox.sizePolicy().hasHeightForWidth())
        self.loggingTextBox.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setFamily("Droid Sans Mono")
        self.loggingTextBox.setFont(font)
        self.loggingTextBox.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.loggingTextBox.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.loggingTextBox.setVerticalScrollBarPolicy(
            QtCore.Qt.ScrollBarAsNeeded)
        self.loggingTextBox.setHorizontalScrollBarPolicy(
            QtCore.Qt.ScrollBarAsNeeded)
        self.loggingTextBox.setLineWrapMode(QtWidgets.QPlainTextEdit.NoWrap)
        self.loggingTextBox.setReadOnly(True)
        self.loggingTextBox.setPlainText("")
        self.loggingTextBox.setTabStopWidth(80)
        self.loggingTextBox.setObjectName("loggingTextBox")
        self.verticalLayout_2.addWidget(self.splitter)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(-1, 0, 8, -1)
        self.horizontalLayout.setSpacing(8)
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.executionStatusLabel = QtWidgets.QLabel(self.centralwidget)
        self.executionStatusLabel.setObjectName("executionStatusLabel")
        self.horizontalLayout.addWidget(self.executionStatusLabel)
        self.executionStatusIcon = QtWidgets.QLabel(self.centralwidget)
        self.executionStatusIcon.setObjectName("executionStatusIcon")
        self.horizontalLayout.addWidget(self.executionStatusIcon)
        self.verticalLayout_2.addLayout(self.horizontalLayout)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 870, 27))
        self.menubar.setObjectName("menubar")
        self.menuMenu = QtWidgets.QMenu(self.menubar)
        self.menuMenu.setObjectName("menuMenu")
        self.menuHelp = QtWidgets.QMenu(self.menubar)
        self.menuHelp.setObjectName("menuHelp")
        MainWindow.setMenuBar(self.menubar)
        self.actionExit = QtWidgets.QAction(MainWindow)
        self.actionExit.setObjectName("actionExit")
        self.action_RuntimeSettings = QtWidgets.QAction(MainWindow)
        self.action_RuntimeSettings.setObjectName("action_RuntimeSettings")
        self.actionAbout = QtWidgets.QAction(MainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.action_GetExampleData = QtWidgets.QAction(MainWindow)
        self.action_GetExampleData.setObjectName("action_GetExampleData")
        self.menuMenu.addAction(self.action_RuntimeSettings)
        self.menuMenu.addSeparator()
        self.menuMenu.addAction(self.actionExit)
        self.menuHelp.addAction(self.action_GetExampleData)
        self.menuHelp.addAction(self.actionAbout)
        self.menubar.addAction(self.menuMenu.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())

        self.retranslateUi(MainWindow)
        self.MainTabs.setCurrentIndex(0)
        self.actionExit.triggered.connect(MainWindow.close)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #11
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(682, 665)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.csvpath_input = QtWidgets.QLineEdit(self.centralwidget)
        self.csvpath_input.setGeometry(QtCore.QRect(130, 40, 441, 21))
        self.csvpath_input.setText("")
        self.csvpath_input.setObjectName("csvpath_input")
        self.csvpath = QtWidgets.QLabel(self.centralwidget)
        self.csvpath.setGeometry(QtCore.QRect(70, 40, 71, 20))
        self.csvpath.setObjectName("csvpath")
        self.path_open = QtWidgets.QToolButton(self.centralwidget)
        self.path_open.setGeometry(QtCore.QRect(570, 40, 41, 22))
        self.path_open.setObjectName("path_open")
        self.log = QtWidgets.QTextBrowser(self.centralwidget)
        self.log.setGeometry(QtCore.QRect(20, 160, 641, 141))
        self.log.setObjectName("log")
        signals.connect(self.on_text_changed)
        self.start_button = QtWidgets.QPushButton(self.centralwidget)
        self.start_button.setGeometry(QtCore.QRect(250, 130, 80, 23))
        self.start_button.setObjectName("start_button")
        self.stop_button = QtWidgets.QPushButton(self.centralwidget)
        self.stop_button.setGeometry(QtCore.QRect(350, 130, 80, 23))
        self.stop_button.setObjectName("stop_button")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(20, 310, 57, 15))
        font = QtGui.QFont()
        font.setPointSize(11)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.csvpath_2 = QtWidgets.QLabel(self.centralwidget)
        self.csvpath_2.setGeometry(QtCore.QRect(80, 70, 51, 20))
        self.csvpath_2.setObjectName("csvpath_2")
        self.csvpath_output = QtWidgets.QLineEdit(self.centralwidget)
        self.csvpath_output.setGeometry(QtCore.QRect(130, 70, 441, 21))
        self.csvpath_output.setText("")
        self.csvpath_output.setObjectName("csvpath_output")
        self.output = QtWidgets.QTableView(self.centralwidget)
        self.output.setGeometry(QtCore.QRect(20, 331, 641, 291))
        self.output.setObjectName("output")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 682, 20))
        self.menubar.setObjectName("menubar")
        self.menu = QtWidgets.QMenu(self.menubar)
        self.menu.setObjectName("menu")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setEnabled(True)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionExit = QtWidgets.QAction(MainWindow)
        self.actionExit.setObjectName("actionExit")
        self.actionOpen = QtWidgets.QAction(MainWindow)
        self.actionOpen.setObjectName("actionOpen")
        self.actionAbout = QtWidgets.QAction(MainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.menu.addAction(self.actionOpen)
        self.menu.addAction(self.actionAbout)
        self.menu.addSeparator()
        self.menu.addAction(self.actionExit)
        self.menubar.addAction(self.menu.menuAction())

        # ==============================================================================
        # Importnant parts
        self.retranslateUi(MainWindow)
        self.path_open.clicked.connect(self.file_opener)  # Open button
        self.actionOpen.triggered.connect(self.file_opener)  # Open in menu
        self.actionExit.triggered.connect(self.exit_program)  # Exit in menu
        self.start_button.clicked.connect(self.thread_start)  # Start button
        self.stop_button.clicked.connect(self.thread_stop)  # Stop button
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
        self.start_button.setEnabled(False)
    def setupUi(self, ArithmeticExpression):
        ArithmeticExpression.setObjectName("ArithmeticExpression")
        ArithmeticExpression.resize(630, 337)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("GUI/favicon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        ArithmeticExpression.setWindowIcon(icon)
        ArithmeticExpression.setStyleSheet("")
        self.centralwidget = QtWidgets.QWidget(ArithmeticExpression)
        self.centralwidget.setObjectName("centralwidget")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.centralwidget)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setMinimumSize(QtCore.QSize(0, 40))
        font = QtGui.QFont()
        font.setFamily("Yu Gothic UI")
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setStyleSheet("color: rgb(70, 141, 212);")
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.line = QtWidgets.QFrame(self.centralwidget)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout.addWidget(self.line)
        self.resultText = QtWidgets.QPlainTextEdit(self.centralwidget)
        font = QtGui.QFont()
        font.setFamily("Yu Gothic UI")
        font.setPointSize(14)
        font.setBold(False)
        font.setItalic(False)
        font.setWeight(50)
        self.resultText.setFont(font)
        self.resultText.setStyleSheet("color: rgb(39, 80, 120);")
        self.resultText.setObjectName("resultText")
        self.verticalLayout.addWidget(self.resultText)
        self.line_7 = QtWidgets.QFrame(self.centralwidget)
        self.line_7.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_7.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_7.setObjectName("line_7")
        self.verticalLayout.addWidget(self.line_7)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.horizontalLayout.addLayout(self.verticalLayout)
        self.line_3 = QtWidgets.QFrame(self.centralwidget)
        self.line_3.setFrameShape(QtWidgets.QFrame.VLine)
        self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_3.setObjectName("line_3")
        self.horizontalLayout.addWidget(self.line_3)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.label_2 = QtWidgets.QLabel(self.centralwidget)
        self.label_2.setMinimumSize(QtCore.QSize(0, 40))
        font = QtGui.QFont()
        font.setFamily("Yu Gothic UI")
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_2.setFont(font)
        self.label_2.setStyleSheet("color: rgb(60, 121, 182);")
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2.setObjectName("label_2")
        self.verticalLayout_2.addWidget(self.label_2)
        self.line_2 = QtWidgets.QFrame(self.centralwidget)
        self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_2.setObjectName("line_2")
        self.verticalLayout_2.addWidget(self.line_2)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.label_3 = QtWidgets.QLabel(self.centralwidget)
        font = QtGui.QFont()
        font.setFamily("Yu Gothic UI")
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_3.setFont(font)
        self.label_3.setStyleSheet("color: rgb(60, 121, 182);")
        self.label_3.setObjectName("label_3")
        self.horizontalLayout_3.addWidget(self.label_3)
        self.numberText = QtWidgets.QTextEdit(self.centralwidget)
        self.numberText.setMaximumSize(QtCore.QSize(16777215, 35))
        font = QtGui.QFont()
        font.setFamily("Yu Gothic UI")
        font.setPointSize(14)
        font.setItalic(False)
        self.numberText.setFont(font)
        self.numberText.setStyleSheet("color: rgb(38, 78, 117);")
        self.numberText.setObjectName("numberText")
        self.horizontalLayout_3.addWidget(self.numberText)
        self.verticalLayout_2.addLayout(self.horizontalLayout_3)
        self.line_4 = QtWidgets.QFrame(self.centralwidget)
        self.line_4.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_4.setObjectName("line_4")
        self.verticalLayout_2.addWidget(self.line_4)
        spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem1)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.label_4 = QtWidgets.QLabel(self.centralwidget)
        font = QtGui.QFont()
        font.setFamily("Yu Gothic UI")
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_4.setFont(font)
        self.label_4.setStyleSheet("color: rgb(60, 121, 182);")
        self.label_4.setObjectName("label_4")
        self.horizontalLayout_4.addWidget(self.label_4)
        self.baseFromSpinBox = QtWidgets.QSpinBox(self.centralwidget)
        self.baseFromSpinBox.setMaximumSize(QtCore.QSize(100, 16777215))
        font = QtGui.QFont()
        font.setPointSize(14)
        self.baseFromSpinBox.setFont(font)
        self.baseFromSpinBox.setStyleSheet("color: rgb(43, 88, 132);")
        self.baseFromSpinBox.setMinimum(2)
        self.baseFromSpinBox.setMaximum(36)
        self.baseFromSpinBox.setObjectName("baseFromSpinBox")
        self.horizontalLayout_4.addWidget(self.baseFromSpinBox)
        self.verticalLayout_2.addLayout(self.horizontalLayout_4)
        self.line_5 = QtWidgets.QFrame(self.centralwidget)
        self.line_5.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_5.setObjectName("line_5")
        self.verticalLayout_2.addWidget(self.line_5)
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.label_5 = QtWidgets.QLabel(self.centralwidget)
        font = QtGui.QFont()
        font.setFamily("Yu Gothic UI")
        font.setPointSize(10)
        font.setBold(True)
        font.setWeight(75)
        self.label_5.setFont(font)
        self.label_5.setStyleSheet("color: rgb(60, 121, 182);")
        self.label_5.setObjectName("label_5")
        self.horizontalLayout_5.addWidget(self.label_5)
        self.baseToSpinBox = QtWidgets.QSpinBox(self.centralwidget)
        self.baseToSpinBox.setMinimumSize(QtCore.QSize(20, 0))
        self.baseToSpinBox.setMaximumSize(QtCore.QSize(100, 16777215))
        font = QtGui.QFont()
        font.setPointSize(14)
        self.baseToSpinBox.setFont(font)
        self.baseToSpinBox.setStyleSheet("color: rgb(43, 88, 132);")
        self.baseToSpinBox.setMinimum(2)
        self.baseToSpinBox.setMaximum(36)
        self.baseToSpinBox.setObjectName("baseToSpinBox")
        self.horizontalLayout_5.addWidget(self.baseToSpinBox)
        self.verticalLayout_2.addLayout(self.horizontalLayout_5)
        self.line_6 = QtWidgets.QFrame(self.centralwidget)
        self.line_6.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_6.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_6.setObjectName("line_6")
        self.verticalLayout_2.addWidget(self.line_6)
        spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem2)
        self.findExpressionButton = QtWidgets.QCommandLinkButton(self.centralwidget)
        self.findExpressionButton.setStyleSheet("")
        self.findExpressionButton.setObjectName("findExpressionButton")
        self.verticalLayout_2.addWidget(self.findExpressionButton)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        self.horizontalLayout_2.addLayout(self.horizontalLayout)
        ArithmeticExpression.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(ArithmeticExpression)
        self.statusbar.setObjectName("statusbar")
        ArithmeticExpression.setStatusBar(self.statusbar)
        self.actionInputs = QtWidgets.QAction(ArithmeticExpression)
        self.actionInputs.setObjectName("actionInputs")
        self.actionParametres = QtWidgets.QAction(ArithmeticExpression)
        self.actionParametres.setObjectName("actionParametres")
        self.actionSolution = QtWidgets.QAction(ArithmeticExpression)
        self.actionSolution.setObjectName("actionSolution")

        self.retranslateUi(ArithmeticExpression)
        QtCore.QMetaObject.connectSlotsByName(ArithmeticExpression)
Пример #13
0
    def create_ui(self):
        """Set up the user interface, signals & slots
        """
        self.widget = QtWidgets.QWidget(self)
        self.setCentralWidget(self.widget)

        self.videoframe = QtWidgets.QFrame()

        self.palette = self.videoframe.palette()
        self.palette.setColor(QtGui.QPalette.Window, QtGui.QColor(0, 0, 0))
        self.videoframe.setPalette(self.palette)
        self.videoframe.setAutoFillBackground(True)

        # Create the time display
        self.timelabel = QtWidgets.QLabel("00:00:00", self)

        # Create the position slider (QSlider)
        self.positionslider = QtWidgets.QSlider(QtCore.Qt.Horizontal, self)
        self.positionslider.setToolTip("Position")
        self.positionslider.setMaximum(1000)
        self.positionslider.sliderMoved.connect(self.set_position)
        self.positionslider.valueChanged.connect(self.update_time_label)

        # Create the "previous frame" button
        self.previousframe = QtWidgets.QPushButton()
        self.previousframe.setFixedWidth(25)
        self.previousframe.setIcon(self.style().standardIcon(
            QtWidgets.QStyle.SP_MediaSkipBackward))
        self.previousframe.clicked.connect(self.on_previous_frame)

        # Create the play button and connect it to the play/pause function
        self.playbutton = QtWidgets.QPushButton()
        self.playbutton.setFixedWidth(40)
        self.playbutton.setIcon(self.style().standardIcon(
            QtWidgets.QStyle.SP_MediaPlay))
        self.playbutton.clicked.connect(self.play_pause)

        # Create the "next frame" button
        self.nextframe = QtWidgets.QPushButton()
        self.nextframe.setFixedWidth(25)
        self.nextframe.setIcon(self.style().standardIcon(
            QtWidgets.QStyle.SP_MediaSkipForward))
        self.nextframe.clicked.connect(self.on_next_frame)

        # Create the "Playback rate" label
        self.pb_rate_label = QtWidgets.QLabel(
            "Playback rate: {}x".format(self.mediaplayer.get_rate()), self)

        # Create the "decrease playback rate" button
        self.decr_pb_rate = QtWidgets.QPushButton()
        self.decr_pb_rate.setFixedWidth(30)
        self.decr_pb_rate.setIcon(self.style().standardIcon(
            QtWidgets.QStyle.SP_MediaSeekBackward))
        self.decr_pb_rate.clicked.connect(self.decr_mov_play_rate)

        # Create the stop button and connect it to the stop function
        self.stopbutton = QtWidgets.QPushButton()
        self.stopbutton.setFixedWidth(30)
        self.stopbutton.setIcon(self.style().standardIcon(
            QtWidgets.QStyle.SP_MediaStop))
        self.stopbutton.clicked.connect(self.stop)

        # Create the "increase playback rate" button
        self.incr_pb_rate = QtWidgets.QPushButton()
        self.incr_pb_rate.setFixedWidth(30)
        self.incr_pb_rate.setIcon(self.style().standardIcon(
            QtWidgets.QStyle.SP_MediaSeekForward))
        self.incr_pb_rate.clicked.connect(self.incr_mov_play_rate)

        self.top_control_box = QtWidgets.QHBoxLayout()

        # Add the time and position slider to the 1st controls layout
        self.top_control_box.addWidget(self.timelabel)
        self.top_control_box.addWidget(self.positionslider)

        self.bottom_control_box = QtWidgets.QHBoxLayout()

        # Add the buttons to the 2nd controls layout
        self.bottom_control_box.addWidget(self.previousframe)
        self.bottom_control_box.addWidget(self.playbutton)
        self.bottom_control_box.addWidget(self.nextframe)
        self.bottom_control_box.addWidget(self.pb_rate_label)
        self.bottom_control_box.addWidget(self.decr_pb_rate)
        self.bottom_control_box.addWidget(self.stopbutton)
        self.bottom_control_box.addWidget(self.incr_pb_rate)

        self.vboxlayout = QtWidgets.QVBoxLayout()

        self.vboxlayout.addWidget(self.videoframe)
        self.vboxlayout.addLayout(self.top_control_box)
        self.vboxlayout.addLayout(self.bottom_control_box)

        self.widget.setLayout(self.vboxlayout)

        menu_bar = self.menuBar()

        # File menu
        file_menu = menu_bar.addMenu("File")

        # Create submenu to start new processes from file menu
        new_menu = QtWidgets.QMenu("Launch", self)
        file_menu.addMenu(new_menu)
        new_plot_action = QtWidgets.QAction("New Plot Window", self)
        new_video_action = QtWidgets.QAction("New Video", self)
        new_menu.addAction(new_plot_action)
        new_menu.addAction(new_video_action)
        new_plot_action.triggered.connect(on_new_plot)
        new_video_action.triggered.connect(on_new_video)

        # Create actions to load a new media file and to close the app
        open_action = QtWidgets.QAction("Load Video", self)
        close_action = QtWidgets.QAction("Close App", self)
        file_menu.addAction(open_action)
        file_menu.addAction(close_action)
        open_action.triggered.connect(self.open_file)
        close_action.triggered.connect(sys.exit)
Пример #14
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(897, 507)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.folders = QtWidgets.QScrollArea(self.centralwidget)
        self.folders.setGeometry(QtCore.QRect(10, 50, 181, 401))
        self.folders.setWidgetResizable(True)
        self.folders.setObjectName("folders")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 177, 397))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.folders.setWidget(self.scrollAreaWidgetContents)
        self.mail = QtWidgets.QScrollArea(self.centralwidget)
        self.mail.setGeometry(QtCore.QRect(200, 10, 681, 201))
        self.mail.setWidgetResizable(True)
        self.mail.setObjectName("mail")
        self.scrollAreaWidgetContents_2 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_2.setGeometry(
            QtCore.QRect(0, 0, 677, 197))
        self.scrollAreaWidgetContents_2.setObjectName(
            "scrollAreaWidgetContents_2")
        self.mail.setWidget(self.scrollAreaWidgetContents_2)
        self.message = QtWidgets.QScrollArea(self.centralwidget)
        self.message.setGeometry(QtCore.QRect(200, 220, 681, 231))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(
            self.message.sizePolicy().hasHeightForWidth())
        self.message.setSizePolicy(sizePolicy)
        self.message.setWidgetResizable(True)
        self.message.setObjectName("message")
        self.scrollAreaWidgetContents_3 = QtWidgets.QWidget()
        self.scrollAreaWidgetContents_3.setGeometry(
            QtCore.QRect(0, 0, 677, 227))
        self.scrollAreaWidgetContents_3.setObjectName(
            "scrollAreaWidgetContents_3")
        self.message.setWidget(self.scrollAreaWidgetContents_3)
        self.pushButton = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton.setGeometry(QtCore.QRect(10, 10, 81, 34))
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_2.setGeometry(QtCore.QRect(90, 10, 101, 34))
        self.pushButton_2.setObjectName("pushButton_2")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 897, 30))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionAbout = QtWidgets.QAction(MainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.actionSettings = QtWidgets.QAction(MainWindow)
        self.actionSettings.setObjectName("actionSettings")
        self.menuFile.addAction(self.actionAbout)
        self.menuFile.addAction(self.actionSettings)
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #15
0
    def create_actions(self):
        """
        Setup an action that can be associated with menus, buttons, shortcuts and taskbars.
        Anything action that is initiated by interacting with the user interface (as opposed
        to clicking directly in a window is setup here.
        """
        #
        # Root is where the application exists in the directory structure.
        #
        root = QtCore.QFileInfo(__file__).absolutePath()

        self.exitAction = QtWidgets.QAction("E&xit",
                                            self,
                                            shortcut="Ctrl+Q",
                                            statusTip="Exit the application",
                                            triggered=self.quit)

        self.newAction = QtWidgets.QAction(
            QtGui.QIcon(root +
                        '/icons/new.png'),  # Note that icon is optional.
            "&New",
            self,
            shortcut=QtGui.QKeySequence.
            New,  #Some shortcuts are defined by the OS.
            statusTip="Start a new fractal",
            triggered=self.new)

        self.openAction = QtWidgets.QAction(
            QtGui.QIcon(root + '/icons/open.png'),
            "&Open",
            self,
            shortcut=QtGui.QKeySequence.Open,
            statusTip="Open a previous fractal",
            triggered=self.open)

        self.saveAction = QtWidgets.QAction(
            QtGui.QIcon(root + '/icons/save.png'),
            "&Save",
            self,
            shortcut=QtGui.QKeySequence.Save,
            statusTip="Save the current fractal",
            triggered=self.save)

        self.saveAsAction = QtWidgets.QAction(
            "Save &As",
            self,
            shortcut=QtGui.QKeySequence.SaveAs,
            statusTip="Save the current fractal under a new name",
            triggered=self.save_as)

        self.aboutAction = QtWidgets.QAction(
            "&About",
            self,
            statusTip="More information about the program",
            triggered=self.about)

        #
        # Not all actions are available at all times. This is how you set that.
        #
        self.openAction.setEnabled(False)
        self.saveAction.setEnabled(False)
        self.saveAsAction.setEnabled(False)
Пример #16
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(546, 526)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.centralwidHL = QtWidgets.QHBoxLayout(self.centralwidget)
        self.centralwidHL.setObjectName("centralwidHL")
        self.leftVS = QtWidgets.QSplitter(self.centralwidget)
        self.leftVS.setOrientation(QtCore.Qt.Vertical)
        self.leftVS.setObjectName("leftVS")
        self.topleftTB = QtWidgets.QToolBox(self.leftVS)
        self.topleftTB.setStyleSheet("#topleftTB{background-color:yellow;}")
        self.topleftTB.setObjectName("topleftTB")
        self.page_databases = QtWidgets.QWidget()
        self.page_databases.setGeometry(QtCore.QRect(0, 0, 248, 182))
        self.page_databases.setObjectName("page_databases")
        self.page_databasesVL = QtWidgets.QVBoxLayout(self.page_databases)
        self.page_databasesVL.setObjectName("page_databasesVL")
        self.databasesTV = QtWidgets.QTreeView(self.page_databases)
        self.databasesTV.setObjectName("databasesTV")
        self.page_databasesVL.addWidget(self.databasesTV)
        self.topleftTB.addItem(self.page_databases, "")
        self.page_datapackages = QtWidgets.QWidget()
        self.page_datapackages.setGeometry(QtCore.QRect(0, 0, 248, 182))
        self.page_datapackages.setObjectName("page_datapackages")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.page_datapackages)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.datapackagesTV = QtWidgets.QTreeView(self.page_datapackages)
        self.datapackagesTV.setObjectName("datapackagesTV")
        self.verticalLayout_2.addWidget(self.datapackagesTV)
        self.topleftTB.addItem(self.page_datapackages, "")
        self.page_sessions = QtWidgets.QWidget()
        self.page_sessions.setGeometry(QtCore.QRect(0, 0, 248, 182))
        self.page_sessions.setObjectName("page_sessions")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.page_sessions)
        self.verticalLayout.setObjectName("verticalLayout")
        self.sessionsTV = QtWidgets.QTreeView(self.page_sessions)
        self.sessionsTV.setObjectName("sessionsTV")
        self.verticalLayout.addWidget(self.sessionsTV)
        self.topleftTB.addItem(self.page_sessions, "")
        self.botleftW = QtWidgets.QWidget(self.leftVS)
        self.botleftW.setStyleSheet("#botleftW{background-color:green;}")
        self.botleftW.setObjectName("botleftW")
        self.botleftVL = QtWidgets.QVBoxLayout(self.botleftW)
        self.botleftVL.setContentsMargins(3, 3, 3, 3)
        self.botleftVL.setObjectName("botleftVL")
        self.datatreeTV = VnTreeView(self.botleftW)
        self.datatreeTV.setObjectName("datatreeTV")
        self.botleftVL.addWidget(self.datatreeTV)
        self.centralwidHL.addWidget(self.leftVS)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 546, 25))
        self.menubar.setObjectName("menubar")
        self.menuDatabase = QtWidgets.QMenu(self.menubar)
        self.menuDatabase.setObjectName("menuDatabase")
        self.menuMetadata = QtWidgets.QMenu(self.menubar)
        self.menuMetadata.setObjectName("menuMetadata")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.miscDW = QtWidgets.QDockWidget(MainWindow)
        self.miscDW.setFeatures(QtWidgets.QDockWidget.AllDockWidgetFeatures)
        self.miscDW.setAllowedAreas(QtCore.Qt.RightDockWidgetArea)
        self.miscDW.setObjectName("miscDW")
        self.dockWidgetContents = QtWidgets.QWidget()
        self.dockWidgetContents.setObjectName("dockWidgetContents")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.dockWidgetContents)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.metdatalist = MetadataList(self.dockWidgetContents)
        self.metdatalist.setObjectName("metdatalist")
        self.verticalLayout_4.addWidget(self.metdatalist)
        self.miscDW.setWidget(self.dockWidgetContents)
        MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.miscDW)
        self.actionOpen_database = QtWidgets.QAction(MainWindow)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/resources/resources/fileopen.png"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionOpen_database.setIcon(icon)
        self.actionOpen_database.setObjectName("actionOpen_database")
        self.actionQuit = QtWidgets.QAction(MainWindow)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(
            QtGui.QPixmap(":/resources/resources/system-shutdown.svg"),
            QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionQuit.setIcon(icon1)
        self.actionQuit.setObjectName("actionQuit")
        self.actionExtract_metadata = QtWidgets.QAction(MainWindow)
        self.actionExtract_metadata.setObjectName("actionExtract_metadata")
        self.menuDatabase.addAction(self.actionOpen_database)
        self.menuDatabase.addSeparator()
        self.menuDatabase.addAction(self.actionQuit)
        self.menuMetadata.addAction(self.actionExtract_metadata)
        self.menubar.addAction(self.menuDatabase.menuAction())
        self.menubar.addAction(self.menuMetadata.menuAction())

        self.retranslateUi(MainWindow)
        self.topleftTB.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #17
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(489, 107)
        Form.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("custom_icons/stopwatch.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon.addPixmap(QtGui.QPixmap("custom_icons/stopwatch.ico"), QtGui.QIcon.Normal, QtGui.QIcon.On)
        Form.setWindowIcon(icon)
        self.tabWidget = QtWidgets.QTabWidget(Form)
        self.tabWidget.setGeometry(QtCore.QRect(0, 0, 491, 131))
        self.tabWidget.setObjectName("tabWidget")
        self.tbMain = QtWidgets.QWidget()
        self.tbMain.setObjectName("tbMain")
        self.btRefresh = QtWidgets.QPushButton(self.tbMain)
        self.btRefresh.setGeometry(QtCore.QRect(450, 10, 22, 22))
        self.btRefresh.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap("custom_icons/arrow_refresh.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.btRefresh.setIcon(icon1)
        self.btRefresh.setObjectName("btRefresh")
        self.btStart = QtWidgets.QPushButton(self.tbMain)
        self.btStart.setGeometry(QtCore.QRect(320, 50, 71, 23))
        self.btStart.setObjectName("btStart")
        self.cmbWorkItems = QtWidgets.QComboBox(self.tbMain)
        self.cmbWorkItems.setGeometry(QtCore.QRect(10, 10, 431, 22))
        self.cmbWorkItems.setMouseTracking(False)
        self.cmbWorkItems.setObjectName("cmbWorkItems")
        self.btStop = QtWidgets.QPushButton(self.tbMain)
        self.btStop.setGeometry(QtCore.QRect(400, 50, 71, 23))
        self.btStop.setObjectName("btStop")
        self.tabWidget.addTab(self.tbMain, "")
        self.tbConfiguration = QtWidgets.QWidget()
        self.tbConfiguration.setObjectName("tbConfiguration")
        self.lToken = QtWidgets.QLineEdit(self.tbConfiguration)
        self.lToken.setGeometry(QtCore.QRect(60, 10, 321, 20))
        self.lToken.setObjectName("lToken")
        self.lQuery = QtWidgets.QLineEdit(self.tbConfiguration)
        self.lQuery.setGeometry(QtCore.QRect(60, 40, 321, 20))
        self.lQuery.setObjectName("lQuery")
        self.lbToken = QtWidgets.QLabel(self.tbConfiguration)
        self.lbToken.setGeometry(QtCore.QRect(10, 10, 41, 20))
        self.lbToken.setObjectName("lbToken")
        self.lbQuery = QtWidgets.QLabel(self.tbConfiguration)
        self.lbQuery.setGeometry(QtCore.QRect(10, 40, 41, 20))
        self.lbQuery.setObjectName("lbQuery")
        self.btSave = QtWidgets.QPushButton(self.tbConfiguration)
        self.btSave.setGeometry(QtCore.QRect(400, 10, 71, 23))
        self.btSave.setObjectName("btSave")
        self.tabWidget.addTab(self.tbConfiguration, "")
        self.actionStart = QtWidgets.QAction(Form)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap("custom_icons/stopwatch_start.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionStart.setIcon(icon2)
        self.actionStart.setObjectName("actionStart")
        self.actionStop = QtWidgets.QAction(Form)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap("custom_icons/stopwatch_finish.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionStop.setIcon(icon3)
        self.actionStop.setObjectName("actionStop")
        self.actionExit = QtWidgets.QAction(Form)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap("custom_icons/stop.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionExit.setIcon(icon4)
        self.actionExit.setObjectName("actionExit")

        self.retranslateUi(Form)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(Form)
Пример #18
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.setWindowModality(QtCore.Qt.WindowModal)
        MainWindow.resize(1170, 808)
        MainWindow.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        MainWindow.setAcceptDrops(False)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/ico/logo.ico"),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon.addPixmap(QtGui.QPixmap(":/icons/ico/logo.ico"),
                       QtGui.QIcon.Normal, QtGui.QIcon.On)
        icon.addPixmap(QtGui.QPixmap(":/icons/ico/logo.ico"),
                       QtGui.QIcon.Disabled, QtGui.QIcon.Off)
        icon.addPixmap(QtGui.QPixmap(":/icons/ico/logo.ico"),
                       QtGui.QIcon.Disabled, QtGui.QIcon.On)
        MainWindow.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.centralwidget)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox.setMinimumSize(QtCore.QSize(500, 0))
        self.groupBox.setMaximumSize(QtCore.QSize(600, 16777215))
        self.groupBox.setObjectName("groupBox")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.groupBox)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.verticalLayout_6 = QtWidgets.QVBoxLayout()
        self.verticalLayout_6.setSizeConstraint(
            QtWidgets.QLayout.SetMinimumSize)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.groupBox_2 = QtWidgets.QGroupBox(self.groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.groupBox_2.sizePolicy().hasHeightForWidth())
        self.groupBox_2.setSizePolicy(sizePolicy)
        self.groupBox_2.setObjectName("groupBox_2")
        self.verticalLayoutWidget = QtWidgets.QWidget(self.groupBox_2)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(9, 19, 481, 321))
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(
            self.verticalLayoutWidget)
        self.verticalLayout_2.setSizeConstraint(
            QtWidgets.QLayout.SetMaximumSize)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.files_tableWidget = QtWidgets.QTableWidget(
            self.verticalLayoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.files_tableWidget.sizePolicy().hasHeightForWidth())
        self.files_tableWidget.setSizePolicy(sizePolicy)
        self.files_tableWidget.setMinimumSize(QtCore.QSize(380, 200))
        self.files_tableWidget.setAcceptDrops(True)
        self.files_tableWidget.setDragEnabled(True)
        self.files_tableWidget.setDragDropMode(
            QtWidgets.QAbstractItemView.DropOnly)
        self.files_tableWidget.setHorizontalScrollMode(
            QtWidgets.QAbstractItemView.ScrollPerItem)
        self.files_tableWidget.setRowCount(0)
        self.files_tableWidget.setColumnCount(2)
        self.files_tableWidget.setObjectName("files_tableWidget")
        item = QtWidgets.QTableWidgetItem()
        self.files_tableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.files_tableWidget.setHorizontalHeaderItem(1, item)
        self.files_tableWidget.horizontalHeader().setVisible(True)
        self.files_tableWidget.horizontalHeader().setCascadingSectionResizes(
            False)
        self.files_tableWidget.horizontalHeader().setDefaultSectionSize(180)
        self.files_tableWidget.horizontalHeader().setHighlightSections(True)
        self.files_tableWidget.horizontalHeader().setSortIndicatorShown(False)
        self.files_tableWidget.verticalHeader().setVisible(False)
        self.verticalLayout_2.addWidget(self.files_tableWidget)
        self.verticalLayout_6.addWidget(self.groupBox_2)
        self.verticalLayout_4.addLayout(self.verticalLayout_6)
        self.groupBox_4 = QtWidgets.QGroupBox(self.groupBox)
        self.groupBox_4.setObjectName("groupBox_4")
        self.gridLayoutWidget = QtWidgets.QWidget(self.groupBox_4)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 20, 481, 321))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.label = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label.setMinimumSize(QtCore.QSize(40, 0))
        self.label.setMaximumSize(QtCore.QSize(40, 16777215))
        self.label.setObjectName("label")
        self.horizontalLayout_3.addWidget(self.label)
        self.classifier_comboBox = QtWidgets.QComboBox(self.gridLayoutWidget)
        self.classifier_comboBox.setObjectName("classifier_comboBox")
        self.classifier_comboBox.addItem("")
        self.horizontalLayout_3.addWidget(self.classifier_comboBox)
        self.classifier_property_pushButton = QtWidgets.QPushButton(
            self.gridLayoutWidget)
        self.classifier_property_pushButton.setMinimumSize(QtCore.QSize(75, 0))
        self.classifier_property_pushButton.setObjectName(
            "classifier_property_pushButton")
        self.horizontalLayout_3.addWidget(self.classifier_property_pushButton,
                                          0, QtCore.Qt.AlignRight)
        self.create_classifier_pushButton = QtWidgets.QPushButton(
            self.gridLayoutWidget)
        self.create_classifier_pushButton.setMinimumSize(QtCore.QSize(75, 0))
        self.create_classifier_pushButton.setObjectName(
            "create_classifier_pushButton")
        self.horizontalLayout_3.addWidget(self.create_classifier_pushButton, 0,
                                          QtCore.Qt.AlignRight)
        self.show_test_pushButton = QtWidgets.QPushButton(
            self.gridLayoutWidget)
        self.show_test_pushButton.setObjectName("show_test_pushButton")
        self.horizontalLayout_3.addWidget(self.show_test_pushButton)
        self.gridLayout.addLayout(self.horizontalLayout_3, 2, 0, 1, 1)
        self.optionButtonsLayout = QtWidgets.QHBoxLayout()
        self.optionButtonsLayout.setObjectName("optionButtonsLayout")
        self.xButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.xButton.setEnabled(False)
        self.xButton.setObjectName("xButton")
        self.optionButtonsLayout.addWidget(self.xButton)
        self.yButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.yButton.setEnabled(False)
        self.yButton.setObjectName("yButton")
        self.optionButtonsLayout.addWidget(self.yButton)
        self.cButton = QtWidgets.QPushButton(self.gridLayoutWidget)
        self.cButton.setEnabled(False)
        self.cButton.setObjectName("cButton")
        self.optionButtonsLayout.addWidget(self.cButton)
        self.gridLayout.addLayout(self.optionButtonsLayout, 1, 0, 1, 1)
        self.options_tableWidget = QtWidgets.QTableWidget(
            self.gridLayoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.options_tableWidget.sizePolicy().hasHeightForWidth())
        self.options_tableWidget.setSizePolicy(sizePolicy)
        self.options_tableWidget.setMinimumSize(QtCore.QSize(300, 100))
        self.options_tableWidget.setAcceptDrops(True)
        self.options_tableWidget.setDragEnabled(True)
        self.options_tableWidget.setDragDropMode(
            QtWidgets.QAbstractItemView.DropOnly)
        self.options_tableWidget.setSelectionMode(
            QtWidgets.QAbstractItemView.SingleSelection)
        self.options_tableWidget.setHorizontalScrollMode(
            QtWidgets.QAbstractItemView.ScrollPerItem)
        self.options_tableWidget.setRowCount(0)
        self.options_tableWidget.setColumnCount(2)
        self.options_tableWidget.setObjectName("options_tableWidget")
        item = QtWidgets.QTableWidgetItem()
        self.options_tableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.options_tableWidget.setHorizontalHeaderItem(1, item)
        self.options_tableWidget.horizontalHeader().setVisible(True)
        self.options_tableWidget.horizontalHeader().setCascadingSectionResizes(
            False)
        self.options_tableWidget.horizontalHeader().setDefaultSectionSize(180)
        self.options_tableWidget.horizontalHeader().setHighlightSections(True)
        self.options_tableWidget.horizontalHeader().setSortIndicatorShown(
            False)
        self.options_tableWidget.verticalHeader().setVisible(False)
        self.gridLayout.addWidget(self.options_tableWidget, 0, 0, 1, 1)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout_4.addWidget(self.label_2)
        self.train_checkBox = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.train_checkBox.setChecked(True)
        self.train_checkBox.setObjectName("train_checkBox")
        self.horizontalLayout_4.addWidget(self.train_checkBox)
        self.test_checkBox = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.test_checkBox.setChecked(False)
        self.test_checkBox.setObjectName("test_checkBox")
        self.horizontalLayout_4.addWidget(self.test_checkBox)
        self.result_checkBox = QtWidgets.QCheckBox(self.gridLayoutWidget)
        self.result_checkBox.setObjectName("result_checkBox")
        self.horizontalLayout_4.addWidget(self.result_checkBox)
        self.gridLayout.addLayout(self.horizontalLayout_4, 3, 0, 1, 1)
        self.verticalLayout_4.addWidget(self.groupBox_4)
        self.verticalLayout_3.addWidget(self.groupBox)
        self.horizontalLayout.addLayout(self.verticalLayout_3)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_3.setObjectName("groupBox_3")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.groupBox_3)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.plotter = QtWebEngineWidgets.QWebEngineView(self.groupBox_3)
        self.plotter.setMinimumSize(QtCore.QSize(600, 400))
        self.plotter.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.plotter.setObjectName("plotter")
        self.verticalLayout_5.addWidget(self.plotter)
        self.verticalLayout.addWidget(self.groupBox_3)
        self.horizontalLayout.addLayout(self.verticalLayout)
        self.horizontalLayout_2.addLayout(self.horizontalLayout)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1170, 23))
        self.menubar.setObjectName("menubar")
        self.menu_File = QtWidgets.QMenu(self.menubar)
        self.menu_File.setObjectName("menu_File")
        self.menu_Edit = QtWidgets.QMenu(self.menubar)
        self.menu_Edit.setObjectName("menu_Edit")
        self.menu_View = QtWidgets.QMenu(self.menubar)
        self.menu_View.setObjectName("menu_View")
        self.menu_Settings = QtWidgets.QMenu(self.menubar)
        self.menu_Settings.setObjectName("menu_Settings")
        self.menu_Help = QtWidgets.QMenu(self.menubar)
        self.menu_Help.setObjectName("menu_Help")
        self.menu_Data = QtWidgets.QMenu(self.menubar)
        self.menu_Data.setObjectName("menu_Data")
        self.menuset_current_item_as = QtWidgets.QMenu(self.menu_Data)
        self.menuset_current_item_as.setEnabled(False)
        self.menuset_current_item_as.setObjectName("menuset_current_item_as")
        self.menuset_current_file_as = QtWidgets.QMenu(self.menu_Data)
        self.menuset_current_file_as.setEnabled(False)
        self.menuset_current_file_as.setObjectName("menuset_current_file_as")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionClassifier_Help = QtWidgets.QAction(MainWindow)
        self.actionClassifier_Help.setObjectName("actionClassifier_Help")
        self.action_New = QtWidgets.QAction(MainWindow)
        self.action_New.setObjectName("action_New")
        self.action_Open = QtWidgets.QAction(MainWindow)
        self.action_Open.setObjectName("action_Open")
        self.action_Save = QtWidgets.QAction(MainWindow)
        self.action_Save.setObjectName("action_Save")
        self.actionSave_As = QtWidgets.QAction(MainWindow)
        self.actionSave_As.setObjectName("actionSave_As")
        self.action_Undo = QtWidgets.QAction(MainWindow)
        self.action_Undo.setObjectName("action_Undo")
        self.action_Redo = QtWidgets.QAction(MainWindow)
        self.action_Redo.setObjectName("action_Redo")
        self.actionCut = QtWidgets.QAction(MainWindow)
        self.actionCut.setObjectName("actionCut")
        self.actionCopy = QtWidgets.QAction(MainWindow)
        self.actionCopy.setObjectName("actionCopy")
        self.actionPaste = QtWidgets.QAction(MainWindow)
        self.actionPaste.setObjectName("actionPaste")
        self.actionDelete = QtWidgets.QAction(MainWindow)
        self.actionDelete.setObjectName("actionDelete")
        self.action_Exit = QtWidgets.QAction(MainWindow)
        self.action_Exit.setObjectName("action_Exit")
        self.actionset_Y = QtWidgets.QAction(MainWindow)
        self.actionset_Y.setObjectName("actionset_Y")
        self.actionset_C = QtWidgets.QAction(MainWindow)
        self.actionset_C.setObjectName("actionset_C")
        self.actionset_X_2 = QtWidgets.QAction(MainWindow)
        self.actionset_X_2.setObjectName("actionset_X_2")
        self.actionset_Y_2 = QtWidgets.QAction(MainWindow)
        self.actionset_Y_2.setObjectName("actionset_Y_2")
        self.actionx = QtWidgets.QAction(MainWindow)
        self.actionx.setObjectName("actionx")
        self.actionset_x = QtWidgets.QAction(MainWindow)
        self.actionset_x.setCheckable(True)
        self.actionset_x.setObjectName("actionset_x")
        self.actionset_y = QtWidgets.QAction(MainWindow)
        self.actionset_y.setCheckable(True)
        self.actionset_y.setObjectName("actionset_y")
        self.actionset_c = QtWidgets.QAction(MainWindow)
        self.actionset_c.setCheckable(True)
        self.actionset_c.setObjectName("actionset_c")
        self.actionset_train = QtWidgets.QAction(MainWindow)
        self.actionset_train.setCheckable(True)
        self.actionset_train.setObjectName("actionset_train")
        self.actionset_test = QtWidgets.QAction(MainWindow)
        self.actionset_test.setCheckable(True)
        self.actionset_test.setObjectName("actionset_test")
        self.menu_File.addAction(self.action_New)
        self.menu_File.addAction(self.action_Open)
        self.menu_File.addSeparator()
        self.menu_File.addAction(self.action_Save)
        self.menu_File.addAction(self.actionSave_As)
        self.menu_File.addSeparator()
        self.menu_File.addAction(self.action_Exit)
        self.menu_Edit.addAction(self.action_Undo)
        self.menu_Edit.addAction(self.action_Redo)
        self.menu_Edit.addSeparator()
        self.menu_Edit.addAction(self.actionCut)
        self.menu_Edit.addAction(self.actionCopy)
        self.menu_Edit.addAction(self.actionPaste)
        self.menu_Edit.addAction(self.actionDelete)
        self.menu_Help.addAction(self.actionClassifier_Help)
        self.menuset_current_item_as.addAction(self.actionset_x)
        self.menuset_current_item_as.addAction(self.actionset_y)
        self.menuset_current_item_as.addAction(self.actionset_c)
        self.menuset_current_file_as.addAction(self.actionset_train)
        self.menuset_current_file_as.addAction(self.actionset_test)
        self.menu_Data.addAction(self.menuset_current_item_as.menuAction())
        self.menu_Data.addAction(self.menuset_current_file_as.menuAction())
        self.menubar.addAction(self.menu_File.menuAction())
        self.menubar.addAction(self.menu_Edit.menuAction())
        self.menubar.addAction(self.menu_View.menuAction())
        self.menubar.addAction(self.menu_Data.menuAction())
        self.menubar.addAction(self.menu_Settings.menuAction())
        self.menubar.addAction(self.menu_Help.menuAction())

        self.retranslateUi(MainWindow)
        self.action_Exit.triggered.connect(MainWindow.close)
        self.files_tableWidget.cellDoubleClicked['int', 'int'].connect(
            MainWindow.on_file_dblclicked)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #19
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(635, 625)
        font = QtGui.QFont()
        font.setPointSize(10)
        MainWindow.setFont(font)
        MainWindow.setAcceptDrops(True)
        icon = QtGui.QIcon()
        icon.addPixmap(
            QtGui.QPixmap("my_gui/../../.designer/backup/camera.ico"),
            QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setAcceptDrops(True)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox_table = QtWidgets.QGroupBox(self.centralwidget)
        font = QtGui.QFont()
        font.setPointSize(11)
        self.groupBox_table.setFont(font)
        self.groupBox_table.setObjectName("groupBox_table")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.groupBox_table)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.checkBox_subfolders = QtWidgets.QCheckBox(self.groupBox_table)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.checkBox_subfolders.setFont(font)
        self.checkBox_subfolders.setObjectName("checkBox_subfolders")
        self.horizontalLayout.addWidget(self.checkBox_subfolders)
        self.button_clear = QtWidgets.QPushButton(self.groupBox_table)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.button_clear.sizePolicy().hasHeightForWidth())
        self.button_clear.setSizePolicy(sizePolicy)
        self.button_clear.setMinimumSize(QtCore.QSize(80, 25))
        self.button_clear.setMaximumSize(QtCore.QSize(80, 25))
        font = QtGui.QFont()
        font.setPointSize(11)
        self.button_clear.setFont(font)
        self.button_clear.setObjectName("button_clear")
        self.horizontalLayout.addWidget(self.button_clear)
        self.verticalLayout_5.addLayout(self.horizontalLayout)
        self.table_files = QtWidgets.QTableWidget(self.groupBox_table)
        self.table_files.setEnabled(True)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.table_files.sizePolicy().hasHeightForWidth())
        self.table_files.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.table_files.setFont(font)
        self.table_files.setAcceptDrops(True)
        self.table_files.setEditTriggers(
            QtWidgets.QAbstractItemView.NoEditTriggers)
        self.table_files.setObjectName("table_files")
        self.table_files.setColumnCount(3)
        self.table_files.setRowCount(10)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setVerticalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setVerticalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setVerticalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setVerticalHeaderItem(3, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setVerticalHeaderItem(4, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setVerticalHeaderItem(5, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setVerticalHeaderItem(6, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setVerticalHeaderItem(7, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setVerticalHeaderItem(8, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setVerticalHeaderItem(9, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setHorizontalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setItem(0, 1, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_files.setItem(2, 1, item)
        self.table_files.horizontalHeader().setStretchLastSection(True)
        self.table_files.verticalHeader().setVisible(True)
        self.table_files.verticalHeader().setDefaultSectionSize(35)
        self.table_files.verticalHeader().setStretchLastSection(True)
        self.verticalLayout_5.addWidget(self.table_files)
        self.verticalLayout.addWidget(self.groupBox_table)
        self.groupBox_modify_date = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_modify_date.setEnabled(True)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.groupBox_modify_date.setFont(font)
        self.groupBox_modify_date.setCheckable(True)
        self.groupBox_modify_date.setChecked(False)
        self.groupBox_modify_date.setObjectName("groupBox_modify_date")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(
            self.groupBox_modify_date)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.horizontalLayout_shift = QtWidgets.QHBoxLayout()
        self.horizontalLayout_shift.setObjectName("horizontalLayout_shift")
        self.label_shift = QtWidgets.QLabel(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_shift.sizePolicy().hasHeightForWidth())
        self.label_shift.setSizePolicy(sizePolicy)
        self.label_shift.setObjectName("label_shift")
        self.horizontalLayout_shift.addWidget(self.label_shift)
        self.verticalLayout_years = QtWidgets.QVBoxLayout()
        self.verticalLayout_years.setObjectName("verticalLayout_years")
        self.label_years = QtWidgets.QLabel(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_years.sizePolicy().hasHeightForWidth())
        self.label_years.setSizePolicy(sizePolicy)
        self.label_years.setAlignment(QtCore.Qt.AlignBottom
                                      | QtCore.Qt.AlignLeading
                                      | QtCore.Qt.AlignLeft)
        self.label_years.setObjectName("label_years")
        self.verticalLayout_years.addWidget(self.label_years)
        self.spinBox_years = QtWidgets.QSpinBox(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.MinimumExpanding,
            QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.spinBox_years.sizePolicy().hasHeightForWidth())
        self.spinBox_years.setSizePolicy(sizePolicy)
        self.spinBox_years.setMinimum(-100)
        self.spinBox_years.setMaximum(100)
        self.spinBox_years.setObjectName("spinBox_years")
        self.verticalLayout_years.addWidget(self.spinBox_years)
        self.horizontalLayout_shift.addLayout(self.verticalLayout_years)
        self.verticalLayout_months = QtWidgets.QVBoxLayout()
        self.verticalLayout_months.setObjectName("verticalLayout_months")
        self.label_months = QtWidgets.QLabel(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_months.sizePolicy().hasHeightForWidth())
        self.label_months.setSizePolicy(sizePolicy)
        self.label_months.setAlignment(QtCore.Qt.AlignBottom
                                       | QtCore.Qt.AlignLeading
                                       | QtCore.Qt.AlignLeft)
        self.label_months.setObjectName("label_months")
        self.verticalLayout_months.addWidget(self.label_months)
        self.spinBox_months = QtWidgets.QSpinBox(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.MinimumExpanding,
            QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.spinBox_months.sizePolicy().hasHeightForWidth())
        self.spinBox_months.setSizePolicy(sizePolicy)
        self.spinBox_months.setMinimum(-11)
        self.spinBox_months.setMaximum(11)
        self.spinBox_months.setObjectName("spinBox_months")
        self.verticalLayout_months.addWidget(self.spinBox_months)
        self.horizontalLayout_shift.addLayout(self.verticalLayout_months)
        self.verticalLayout_days = QtWidgets.QVBoxLayout()
        self.verticalLayout_days.setObjectName("verticalLayout_days")
        self.label_days = QtWidgets.QLabel(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_days.sizePolicy().hasHeightForWidth())
        self.label_days.setSizePolicy(sizePolicy)
        self.label_days.setAlignment(QtCore.Qt.AlignBottom
                                     | QtCore.Qt.AlignLeading
                                     | QtCore.Qt.AlignLeft)
        self.label_days.setObjectName("label_days")
        self.verticalLayout_days.addWidget(self.label_days)
        self.spinBox_days = QtWidgets.QSpinBox(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.MinimumExpanding,
            QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.spinBox_days.sizePolicy().hasHeightForWidth())
        self.spinBox_days.setSizePolicy(sizePolicy)
        self.spinBox_days.setMinimum(-30)
        self.spinBox_days.setMaximum(30)
        self.spinBox_days.setObjectName("spinBox_days")
        self.verticalLayout_days.addWidget(self.spinBox_days)
        self.horizontalLayout_shift.addLayout(self.verticalLayout_days)
        self.verticalLayout_hours = QtWidgets.QVBoxLayout()
        self.verticalLayout_hours.setObjectName("verticalLayout_hours")
        self.label_hours = QtWidgets.QLabel(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_hours.sizePolicy().hasHeightForWidth())
        self.label_hours.setSizePolicy(sizePolicy)
        self.label_hours.setAlignment(QtCore.Qt.AlignBottom
                                      | QtCore.Qt.AlignLeading
                                      | QtCore.Qt.AlignLeft)
        self.label_hours.setObjectName("label_hours")
        self.verticalLayout_hours.addWidget(self.label_hours)
        self.spinBox_hours = QtWidgets.QSpinBox(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.MinimumExpanding,
            QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.spinBox_hours.sizePolicy().hasHeightForWidth())
        self.spinBox_hours.setSizePolicy(sizePolicy)
        self.spinBox_hours.setMinimum(-23)
        self.spinBox_hours.setMaximum(23)
        self.spinBox_hours.setObjectName("spinBox_hours")
        self.verticalLayout_hours.addWidget(self.spinBox_hours)
        self.horizontalLayout_shift.addLayout(self.verticalLayout_hours)
        self.verticalLayout_minutes = QtWidgets.QVBoxLayout()
        self.verticalLayout_minutes.setObjectName("verticalLayout_minutes")
        self.label_minutes = QtWidgets.QLabel(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_minutes.sizePolicy().hasHeightForWidth())
        self.label_minutes.setSizePolicy(sizePolicy)
        self.label_minutes.setAlignment(QtCore.Qt.AlignBottom
                                        | QtCore.Qt.AlignLeading
                                        | QtCore.Qt.AlignLeft)
        self.label_minutes.setObjectName("label_minutes")
        self.verticalLayout_minutes.addWidget(self.label_minutes)
        self.spinBox_minutes = QtWidgets.QSpinBox(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.MinimumExpanding,
            QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.spinBox_minutes.sizePolicy().hasHeightForWidth())
        self.spinBox_minutes.setSizePolicy(sizePolicy)
        self.spinBox_minutes.setMinimum(-59)
        self.spinBox_minutes.setMaximum(59)
        self.spinBox_minutes.setObjectName("spinBox_minutes")
        self.verticalLayout_minutes.addWidget(self.spinBox_minutes)
        self.horizontalLayout_shift.addLayout(self.verticalLayout_minutes)
        self.verticalLayout_seconds = QtWidgets.QVBoxLayout()
        self.verticalLayout_seconds.setObjectName("verticalLayout_seconds")
        self.label_seconds = QtWidgets.QLabel(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_seconds.sizePolicy().hasHeightForWidth())
        self.label_seconds.setSizePolicy(sizePolicy)
        self.label_seconds.setAlignment(QtCore.Qt.AlignBottom
                                        | QtCore.Qt.AlignLeading
                                        | QtCore.Qt.AlignLeft)
        self.label_seconds.setObjectName("label_seconds")
        self.verticalLayout_seconds.addWidget(self.label_seconds)
        self.spinBox_seconds = QtWidgets.QSpinBox(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.MinimumExpanding,
            QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.spinBox_seconds.sizePolicy().hasHeightForWidth())
        self.spinBox_seconds.setSizePolicy(sizePolicy)
        self.spinBox_seconds.setMinimum(-59)
        self.spinBox_seconds.setMaximum(59)
        self.spinBox_seconds.setObjectName("spinBox_seconds")
        self.verticalLayout_seconds.addWidget(self.spinBox_seconds)
        self.horizontalLayout_shift.addLayout(self.verticalLayout_seconds)
        self.verticalLayout_buttons = QtWidgets.QVBoxLayout()
        self.verticalLayout_buttons.setObjectName("verticalLayout_buttons")
        self.button_simulate = QtWidgets.QPushButton(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.button_simulate.sizePolicy().hasHeightForWidth())
        self.button_simulate.setSizePolicy(sizePolicy)
        self.button_simulate.setMinimumSize(QtCore.QSize(111, 25))
        self.button_simulate.setMaximumSize(QtCore.QSize(111, 25))
        font = QtGui.QFont()
        font.setPointSize(11)
        self.button_simulate.setFont(font)
        self.button_simulate.setObjectName("button_simulate")
        self.verticalLayout_buttons.addWidget(self.button_simulate)
        self.button_modify_date = QtWidgets.QPushButton(
            self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.button_modify_date.sizePolicy().hasHeightForWidth())
        self.button_modify_date.setSizePolicy(sizePolicy)
        self.button_modify_date.setMinimumSize(QtCore.QSize(111, 25))
        self.button_modify_date.setMaximumSize(QtCore.QSize(111, 25))
        font = QtGui.QFont()
        font.setPointSize(11)
        self.button_modify_date.setFont(font)
        self.button_modify_date.setObjectName("button_modify_date")
        self.verticalLayout_buttons.addWidget(self.button_modify_date)
        self.horizontalLayout_shift.addLayout(self.verticalLayout_buttons)
        self.verticalLayout_2.addLayout(self.horizontalLayout_shift)
        self.gridLayout_date_from_name = QtWidgets.QGridLayout()
        self.gridLayout_date_from_name.setObjectName(
            "gridLayout_date_from_name")
        self.label_date_from_name = QtWidgets.QLabel(self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_date_from_name.sizePolicy().hasHeightForWidth())
        self.label_date_from_name.setSizePolicy(sizePolicy)
        self.label_date_from_name.setObjectName("label_date_from_name")
        self.gridLayout_date_from_name.addWidget(self.label_date_from_name, 0,
                                                 0, 1, 1)
        self.button_date_from_name = QtWidgets.QPushButton(
            self.groupBox_modify_date)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.button_date_from_name.sizePolicy().hasHeightForWidth())
        self.button_date_from_name.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setPointSize(11)
        self.button_date_from_name.setFont(font)
        self.button_date_from_name.setObjectName("button_date_from_name")
        self.gridLayout_date_from_name.addWidget(self.button_date_from_name, 0,
                                                 1, 1, 1)
        self.verticalLayout_2.addLayout(self.gridLayout_date_from_name)
        self.verticalLayout.addWidget(self.groupBox_modify_date)
        self.groupBox_rename = QtWidgets.QGroupBox(self.centralwidget)
        font = QtGui.QFont()
        font.setPointSize(11)
        self.groupBox_rename.setFont(font)
        self.groupBox_rename.setFocusPolicy(QtCore.Qt.NoFocus)
        self.groupBox_rename.setObjectName("groupBox_rename")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.groupBox_rename)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.button_rename = QtWidgets.QPushButton(self.groupBox_rename)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.button_rename.sizePolicy().hasHeightForWidth())
        self.button_rename.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setPointSize(12)
        font.setBold(True)
        font.setItalic(False)
        font.setWeight(75)
        self.button_rename.setFont(font)
        self.button_rename.setObjectName("button_rename")
        self.verticalLayout_4.addWidget(self.button_rename)
        self.text_logs = QtWidgets.QTextBrowser(self.groupBox_rename)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.text_logs.sizePolicy().hasHeightForWidth())
        self.text_logs.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.text_logs.setFont(font)
        self.text_logs.setStyleSheet("color: rgb(32, 74, 135);")
        self.text_logs.setObjectName("text_logs")
        self.verticalLayout_4.addWidget(self.text_logs)
        self.verticalLayout.addWidget(self.groupBox_rename)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 635, 21))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuHelp = QtWidgets.QMenu(self.menubar)
        self.menuHelp.setObjectName("menuHelp")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        font = QtGui.QFont()
        font.setPointSize(11)
        self.statusbar.setFont(font)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.action_browse = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.action_browse.setFont(font)
        self.action_browse.setObjectName("action_browse")
        self.action_quit = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.action_quit.setFont(font)
        self.action_quit.setObjectName("action_quit")
        self.action_help = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.action_help.setFont(font)
        self.action_help.setObjectName("action_help")
        self.action_about = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.action_about.setFont(font)
        self.action_about.setObjectName("action_about")
        self.action_settings = QtWidgets.QAction(MainWindow)
        font = QtGui.QFont()
        font.setPointSize(10)
        self.action_settings.setFont(font)
        self.action_settings.setObjectName("action_settings")
        self.menuFile.addAction(self.action_browse)
        self.menuFile.addAction(self.action_settings)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.action_quit)
        self.menuHelp.addAction(self.action_help)
        self.menuHelp.addSeparator()
        self.menuHelp.addAction(self.action_about)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #20
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1075, 623)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.centralwidget)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.display_frame_plot = QtWidgets.QFrame(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.display_frame_plot.sizePolicy().hasHeightForWidth())
        self.display_frame_plot.setSizePolicy(sizePolicy)
        self.display_frame_plot.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.display_frame_plot.setFrameShadow(QtWidgets.QFrame.Raised)
        self.display_frame_plot.setObjectName("display_frame_plot")
        self.horizontalLayout_2.addWidget(self.display_frame_plot)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.disp_label_number_rows = QtWidgets.QLabel(self.centralwidget)
        self.disp_label_number_rows.setObjectName("disp_label_number_rows")
        self.verticalLayout.addWidget(self.disp_label_number_rows)
        self.dispaly_horizontalLayout_widget_selection = QtWidgets.QHBoxLayout(
        )
        self.dispaly_horizontalLayout_widget_selection.setObjectName(
            "dispaly_horizontalLayout_widget_selection")
        self.display_label_cur_wdiget = QtWidgets.QLabel(self.centralwidget)
        self.display_label_cur_wdiget.setObjectName("display_label_cur_wdiget")
        self.dispaly_horizontalLayout_widget_selection.addWidget(
            self.display_label_cur_wdiget)
        self.display_cb_select_widget = QtWidgets.QComboBox(self.centralwidget)
        self.display_cb_select_widget.setObjectName("display_cb_select_widget")
        self.dispaly_horizontalLayout_widget_selection.addWidget(
            self.display_cb_select_widget)
        self.verticalLayout.addLayout(
            self.dispaly_horizontalLayout_widget_selection)
        self.display_stackedWidget_tools = QtWidgets.QStackedWidget(
            self.centralwidget)
        self.display_stackedWidget_tools.setObjectName(
            "display_stackedWidget_tools")
        self.verticalLayout.addWidget(self.display_stackedWidget_tools)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.display_btn_undo = QtWidgets.QPushButton(self.centralwidget)
        self.display_btn_undo.setObjectName("display_btn_undo")
        self.horizontalLayout.addWidget(self.display_btn_undo)
        self.display_btn_redo = QtWidgets.QPushButton(self.centralwidget)
        self.display_btn_redo.setObjectName("display_btn_redo")
        self.horizontalLayout.addWidget(self.display_btn_redo)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.horizontalLayout_2.addLayout(self.verticalLayout)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1075, 21))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionOpen_CSV = QtWidgets.QAction(MainWindow)
        self.actionOpen_CSV.setObjectName("actionOpen_CSV")
        self.actionSave_Plot = QtWidgets.QAction(MainWindow)
        self.actionSave_Plot.setObjectName("actionSave_Plot")
        self.menuFile.addAction(self.actionOpen_CSV)
        self.menuFile.addAction(self.actionSave_Plot)
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #21
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.setWindowModality(QtCore.Qt.ApplicationModal)
        MainWindow.resize(800, 480)
        MainWindow.setMinimumSize(QtCore.QSize(800, 480))
        MainWindow.setMaximumSize(QtCore.QSize(800, 480))
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.logFrame = QtWidgets.QFrame(self.centralwidget)
        self.logFrame.setGeometry(QtCore.QRect(10, 10, 781, 421))
        self.logFrame.setStyleSheet(
            "background-color: qradialgradient(spread:repeat, cx:0.5, cy:0.5, radius:0.7, fx:0.5, fy:0.5, stop:0 rgba(0, 169, 255, 147), stop:0.497326 rgba(0, 0, 0, 147), stop:1 rgba(0, 169, 255, 147));"
        )
        self.logFrame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.logFrame.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.logFrame.setLineWidth(2)
        self.logFrame.setObjectName("logFrame")
        self.weight_edit_log = QtWidgets.QListView(self.logFrame)
        self.weight_edit_log.setGeometry(QtCore.QRect(20, 61, 741, 281))
        self.weight_edit_log.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.weight_edit_log.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.weight_edit_log.setLineWidth(2)
        self.weight_edit_log.setObjectName("weight_edit_log")
        self.home_btn = QtWidgets.QPushButton(self.logFrame)
        self.home_btn.setGeometry(QtCore.QRect(640, 370, 121, 31))
        self.home_btn.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.home_btn.setObjectName("home_btn")
        self.recalibration_btn = QtWidgets.QPushButton(self.logFrame)
        self.recalibration_btn.setGeometry(QtCore.QRect(20, 370, 121, 31))
        self.recalibration_btn.setStyleSheet(
            "background-color: rgb(0, 255, 0);")
        self.recalibration_btn.setObjectName("recalibration_btn")
        self.userlog_lbl = QtWidgets.QLabel(self.logFrame)
        self.userlog_lbl.setGeometry(QtCore.QRect(20, 10, 741, 51))
        font = QtGui.QFont()
        font.setPointSize(11)
        font.setBold(True)
        font.setWeight(75)
        self.userlog_lbl.setFont(font)
        self.userlog_lbl.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.userlog_lbl.setFrameShape(QtWidgets.QFrame.Box)
        self.userlog_lbl.setFrameShadow(QtWidgets.QFrame.Raised)
        self.userlog_lbl.setLineWidth(2)
        self.userlog_lbl.setAlignment(QtCore.Qt.AlignCenter)
        self.userlog_lbl.setWordWrap(True)
        self.userlog_lbl.setObjectName("userlog_lbl")
        self.mainFrame = QtWidgets.QFrame(self.centralwidget)
        self.mainFrame.setGeometry(QtCore.QRect(10, 10, 781, 421))
        self.mainFrame.setAutoFillBackground(False)
        self.mainFrame.setStyleSheet(
            "background-color: qradialgradient(spread:repeat, cx:0.5, cy:0.5, radius:0.7, fx:0.5, fy:0.5, stop:0 rgba(0, 169, 255, 147), stop:0.497326 rgba(0, 0, 0, 147), stop:1 rgba(0, 169, 255, 147));"
        )
        self.mainFrame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.mainFrame.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.mainFrame.setLineWidth(2)
        self.mainFrame.setObjectName("mainFrame")
        self.start_calibration_btn = QtWidgets.QPushButton(self.mainFrame)
        self.start_calibration_btn.setGeometry(QtCore.QRect(270, 170, 221, 81))
        font = QtGui.QFont()
        font.setPointSize(25)
        font.setBold(True)
        font.setWeight(75)
        self.start_calibration_btn.setFont(font)
        self.start_calibration_btn.setStyleSheet(
            "background-color: rgb(0, 170, 0);")
        self.start_calibration_btn.setObjectName("start_calibration_btn")
        self.settings_btn = QtWidgets.QPushButton(self.mainFrame)
        self.settings_btn.setGeometry(QtCore.QRect(720, 1, 61, 61))
        self.settings_btn.setStyleSheet(
            "background-color: rgba(255, 255, 255, 0);\n"
            "background-image: url(:/images/gear.png);")
        self.settings_btn.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/images/gear.png"), QtGui.QIcon.Normal,
                       QtGui.QIcon.Off)
        self.settings_btn.setIcon(icon)
        self.settings_btn.setIconSize(QtCore.QSize(60, 60))
        self.settings_btn.setObjectName("settings_btn")
        self.loadingFrame = QtWidgets.QFrame(self.centralwidget)
        self.loadingFrame.setGeometry(QtCore.QRect(10, 10, 781, 421))
        self.loadingFrame.setStyleSheet(
            "background-color: qradialgradient(spread:repeat, cx:0.5, cy:0.5, radius:0.7, fx:0.5, fy:0.5, stop:0 rgba(0, 169, 255, 147), stop:0.497326 rgba(0, 0, 0, 147), stop:1 rgba(0, 169, 255, 147));"
        )
        self.loadingFrame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.loadingFrame.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.loadingFrame.setLineWidth(2)
        self.loadingFrame.setObjectName("loadingFrame")
        self.calibration_progbar = QtWidgets.QProgressBar(self.loadingFrame)
        self.calibration_progbar.setGeometry(QtCore.QRect(19, 200, 741, 40))
        self.calibration_progbar.setStyleSheet("")
        self.calibration_progbar.setProperty("value", 24)
        self.calibration_progbar.setTextVisible(False)
        self.calibration_progbar.setObjectName("calibration_progbar")
        self.settingFrame = QtWidgets.QFrame(self.centralwidget)
        self.settingFrame.setGeometry(QtCore.QRect(10, 10, 781, 421))
        self.settingFrame.setStyleSheet(
            "background-color: qradialgradient(spread:repeat, cx:0.5, cy:0.5, radius:0.7, fx:0.5, fy:0.5, stop:0 rgba(0, 169, 255, 147), stop:0.497326 rgba(0, 0, 0, 147), stop:1 rgba(0, 169, 255, 147));"
        )
        self.settingFrame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.settingFrame.setFrameShadow(QtWidgets.QFrame.Plain)
        self.settingFrame.setLineWidth(2)
        self.settingFrame.setObjectName("settingFrame")
        self.admin_btn = QtWidgets.QPushButton(self.settingFrame)
        self.admin_btn.setGeometry(QtCore.QRect(700, 10, 61, 21))
        self.admin_btn.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.admin_btn.setObjectName("admin_btn")
        self.get_data_btn = QtWidgets.QPushButton(self.settingFrame)
        self.get_data_btn.setGeometry(QtCore.QRect(310, 380, 161, 31))
        self.get_data_btn.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.get_data_btn.setObjectName("get_data_btn")
        self.back_btn = QtWidgets.QPushButton(self.settingFrame)
        self.back_btn.setGeometry(QtCore.QRect(10, 10, 81, 31))
        self.back_btn.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.back_btn.setObjectName("back_btn")
        self.v_adj_cbox = QtWidgets.QCheckBox(self.settingFrame)
        self.v_adj_cbox.setGeometry(QtCore.QRect(510, 187, 141, 17))
        self.v_adj_cbox.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.v_adj_cbox.setObjectName("v_adj_cbox")
        self.program_mode_lbl = QtWidgets.QLabel(self.settingFrame)
        self.program_mode_lbl.setGeometry(QtCore.QRect(510, 167, 141, 21))
        self.program_mode_lbl.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.program_mode_lbl.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.program_mode_lbl.setAlignment(QtCore.Qt.AlignCenter)
        self.program_mode_lbl.setObjectName("program_mode_lbl")
        self.foam_cbox = QtWidgets.QCheckBox(self.settingFrame)
        self.foam_cbox.setEnabled(False)
        self.foam_cbox.setGeometry(QtCore.QRect(510, 204, 141, 16))
        self.foam_cbox.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.foam_cbox.setObjectName("foam_cbox")
        self.save_cailbration = QtWidgets.QCheckBox(self.settingFrame)
        self.save_cailbration.setEnabled(False)
        self.save_cailbration.setGeometry(QtCore.QRect(510, 220, 141, 16))
        self.save_cailbration.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.save_cailbration.setObjectName("save_cailbration")
        self.sensor_set_btn = QtWidgets.QPushButton(self.settingFrame)
        self.sensor_set_btn.setGeometry(QtCore.QRect(50, 120, 211, 41))
        self.sensor_set_btn.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.sensor_set_btn.setObjectName("sensor_set_btn")
        self.screen_calibrate = QtWidgets.QPushButton(self.settingFrame)
        self.screen_calibrate.setGeometry(QtCore.QRect(50, 240, 211, 41))
        self.screen_calibrate.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.screen_calibrate.setObjectName("screen_calibrate")
        self.variable_adj_btn = QtWidgets.QPushButton(self.settingFrame)
        self.variable_adj_btn.setGeometry(QtCore.QRect(50, 180, 211, 41))
        self.variable_adj_btn.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.variable_adj_btn.setObjectName("variable_adj_btn")
        self.variable_adj_frame = QtWidgets.QFrame(self.centralwidget)
        self.variable_adj_frame.setGeometry(QtCore.QRect(10, 10, 781, 421))
        self.variable_adj_frame.setStyleSheet(
            "background-color: qradialgradient(spread:repeat, cx:0.5, cy:0.5, radius:0.7, fx:0.5, fy:0.5, stop:0 rgba(0, 169, 255, 147), stop:0.497326 rgba(0, 0, 0, 147), stop:1 rgba(0, 169, 255, 147));"
        )
        self.variable_adj_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.variable_adj_frame.setFrameShadow(QtWidgets.QFrame.Plain)
        self.variable_adj_frame.setLineWidth(2)
        self.variable_adj_frame.setObjectName("variable_adj_frame")
        self.program_mode_lbl_3 = QtWidgets.QLabel(self.variable_adj_frame)
        self.program_mode_lbl_3.setGeometry(QtCore.QRect(210, 10, 361, 31))
        self.program_mode_lbl_3.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.program_mode_lbl_3.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.program_mode_lbl_3.setAlignment(QtCore.Qt.AlignCenter)
        self.program_mode_lbl_3.setObjectName("program_mode_lbl_3")
        self.submit_variables = QtWidgets.QPushButton(self.variable_adj_frame)
        self.submit_variables.setGeometry(QtCore.QRect(290, 300, 211, 41))
        self.submit_variables.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.submit_variables.setObjectName("submit_variables")
        self.bep_input_dsbox = QtWidgets.QDoubleSpinBox(
            self.variable_adj_frame)
        self.bep_input_dsbox.setGeometry(QtCore.QRect(290, 160, 71, 41))
        self.bep_input_dsbox.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.bep_input_dsbox.setObjectName("bep_input_dsbox")
        self.label_10 = QtWidgets.QLabel(self.variable_adj_frame)
        self.label_10.setGeometry(QtCore.QRect(80, 170, 191, 21))
        self.label_10.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.label_10.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.label_10.setObjectName("label_10")
        self.den_input_dsbox = QtWidgets.QDoubleSpinBox(
            self.variable_adj_frame)
        self.den_input_dsbox.setGeometry(QtCore.QRect(580, 160, 71, 41))
        self.den_input_dsbox.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.den_input_dsbox.setObjectName("den_input_dsbox")
        self.label_11 = QtWidgets.QLabel(self.variable_adj_frame)
        self.label_11.setGeometry(QtCore.QRect(460, 170, 101, 21))
        self.label_11.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.label_11.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.label_11.setObjectName("label_11")
        self.calibration_ask_frame = QtWidgets.QFrame(self.centralwidget)
        self.calibration_ask_frame.setGeometry(QtCore.QRect(10, 10, 781, 421))
        self.calibration_ask_frame.setStyleSheet(
            "background-color: qradialgradient(spread:repeat, cx:0.5, cy:0.5, radius:0.7, fx:0.5, fy:0.5, stop:0 rgba(0, 169, 255, 147), stop:0.497326 rgba(0, 0, 0, 147), stop:1 rgba(0, 169, 255, 147));"
        )
        self.calibration_ask_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.calibration_ask_frame.setFrameShadow(QtWidgets.QFrame.Plain)
        self.calibration_ask_frame.setLineWidth(2)
        self.calibration_ask_frame.setObjectName("calibration_ask_frame")
        self.lb1_input_sbox = QtWidgets.QSpinBox(self.calibration_ask_frame)
        self.lb1_input_sbox.setGeometry(QtCore.QRect(230, 180, 81, 31))
        self.lb1_input_sbox.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.lb1_input_sbox.setObjectName("lb1_input_sbox")
        self.sensor1_set_btn = QtWidgets.QPushButton(
            self.calibration_ask_frame)
        self.sensor1_set_btn.setGeometry(QtCore.QRect(80, 180, 139, 31))
        self.sensor1_set_btn.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.sensor1_set_btn.setObjectName("sensor1_set_btn")
        self.sensor2_tare_btn = QtWidgets.QPushButton(
            self.calibration_ask_frame)
        self.sensor2_tare_btn.setGeometry(QtCore.QRect(490, 180, 139, 31))
        self.sensor2_tare_btn.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.sensor2_tare_btn.setObjectName("sensor2_tare_btn")
        self.sensor1_tare_btn = QtWidgets.QPushButton(
            self.calibration_ask_frame)
        self.sensor1_tare_btn.setGeometry(QtCore.QRect(80, 180, 139, 31))
        self.sensor1_tare_btn.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.sensor1_tare_btn.setObjectName("sensor1_tare_btn")
        self.sensor2_set_btn = QtWidgets.QPushButton(
            self.calibration_ask_frame)
        self.sensor2_set_btn.setGeometry(QtCore.QRect(490, 180, 139, 31))
        self.sensor2_set_btn.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.sensor2_set_btn.setObjectName("sensor2_set_btn")
        self.lb2_input_sbox = QtWidgets.QSpinBox(self.calibration_ask_frame)
        self.lb2_input_sbox.setGeometry(QtCore.QRect(640, 180, 81, 31))
        self.lb2_input_sbox.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.lb2_input_sbox.setObjectName("lb2_input_sbox")
        self.label_4 = QtWidgets.QLabel(self.calibration_ask_frame)
        self.label_4.setGeometry(QtCore.QRect(230, 150, 81, 21))
        self.label_4.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.label_4.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.label_4.setObjectName("label_4")
        self.submit_calibration = QtWidgets.QPushButton(
            self.calibration_ask_frame)
        self.submit_calibration.setGeometry(QtCore.QRect(290, 300, 211, 41))
        self.submit_calibration.setStyleSheet(
            "background-color: rgb(255, 255, 255);")
        self.submit_calibration.setObjectName("submit_calibration")
        self.label_5 = QtWidgets.QLabel(self.calibration_ask_frame)
        self.label_5.setGeometry(QtCore.QRect(80, 140, 101, 31))
        self.label_5.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.label_5.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.label_5.setObjectName("label_5")
        self.label_6 = QtWidgets.QLabel(self.calibration_ask_frame)
        self.label_6.setGeometry(QtCore.QRect(490, 140, 101, 31))
        self.label_6.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.label_6.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.label_6.setObjectName("label_6")
        self.label_7 = QtWidgets.QLabel(self.calibration_ask_frame)
        self.label_7.setGeometry(QtCore.QRect(640, 150, 81, 21))
        self.label_7.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.label_7.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.label_7.setObjectName("label_7")
        self.sensor2_set_btn.raise_()
        self.lb1_input_sbox.raise_()
        self.sensor1_set_btn.raise_()
        self.sensor2_tare_btn.raise_()
        self.sensor1_tare_btn.raise_()
        self.lb2_input_sbox.raise_()
        self.label_4.raise_()
        self.submit_calibration.raise_()
        self.label_5.raise_()
        self.label_6.raise_()
        self.label_7.raise_()
        self.loadingFrame.raise_()
        self.settingFrame.raise_()
        self.variable_adj_frame.raise_()
        self.logFrame.raise_()
        self.mainFrame.raise_()
        self.calibration_ask_frame.raise_()
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 21))
        self.menubar.setObjectName("menubar")
        self.menuAbout = QtWidgets.QMenu(self.menubar)
        self.menuAbout.setObjectName("menuAbout")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionAbout = QtWidgets.QAction(MainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.actionProcedure = QtWidgets.QAction(MainWindow)
        self.actionProcedure.setObjectName("actionProcedure")
        self.menuAbout.addAction(self.actionAbout)
        self.menuAbout.addAction(self.actionProcedure)
        self.menubar.addAction(self.menuAbout.menuAction())

        self.retranslateUi(MainWindow)
        self.back_btn.clicked.connect(self.settingFrame.hide)
        self.recalibration_btn.clicked.connect(self.loadingFrame.show)
        self.home_btn.clicked.connect(self.logFrame.hide)
        self.recalibration_btn.clicked.connect(self.logFrame.hide)
        self.back_btn.clicked.connect(self.mainFrame.show)
        self.home_btn.clicked.connect(self.mainFrame.show)
        self.start_calibration_btn.clicked.connect(self.mainFrame.hide)
        self.start_calibration_btn.clicked.connect(self.loadingFrame.show)
        self.settings_btn.clicked.connect(self.settingFrame.show)
        self.settings_btn.clicked.connect(self.mainFrame.hide)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #22
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(608, 452)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox.setObjectName("groupBox")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.groupBox)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.current_km_label = QtWidgets.QLCDNumber(self.groupBox)
        self.current_km_label.setMinimumSize(QtCore.QSize(0, 100))
        self.current_km_label.setSegmentStyle(QtWidgets.QLCDNumber.Filled)
        self.current_km_label.setObjectName("current_km_label")
        self.horizontalLayout_3.addWidget(self.current_km_label)
        self.horizontalLayout_4.addLayout(self.horizontalLayout_3)
        self.verticalLayout.addWidget(self.groupBox)
        self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_2.setObjectName("groupBox_2")
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.groupBox_2)
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.tableView = QtWidgets.QTableView(self.groupBox_2)
        self.tableView.setObjectName("tableView")
        self.horizontalLayout_5.addWidget(self.tableView)
        self.horizontalLayout_6.addLayout(self.horizontalLayout_5)
        self.verticalLayout.addWidget(self.groupBox_2)
        self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_3.setObjectName("groupBox_3")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.groupBox_3)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtWidgets.QLabel(self.groupBox_3)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.label_2 = QtWidgets.QLabel(self.groupBox_3)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout.addWidget(self.label_2)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.pause_btn = QtWidgets.QPushButton(self.groupBox_3)
        self.pause_btn.setObjectName("pause_btn")
        self.horizontalLayout.addWidget(self.pause_btn)
        self.new_session_btn = QtWidgets.QPushButton(self.groupBox_3)
        self.new_session_btn.setObjectName("new_session_btn")
        self.horizontalLayout.addWidget(self.new_session_btn)
        self.horizontalLayout_2.addLayout(self.horizontalLayout)
        self.verticalLayout.addWidget(self.groupBox_3)
        self.verticalLayout_2.addLayout(self.verticalLayout)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 608, 26))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionConfigure = QtWidgets.QAction(MainWindow)
        self.actionConfigure.setObjectName("actionConfigure")
        self.menuFile.addAction(self.actionConfigure)
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #23
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(2724, 962)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.textEdit = QtWidgets.QTextEdit(self.centralwidget)
        self.textEdit.setGeometry(QtCore.QRect(180, 40, 1651, 801))
        font = QtGui.QFont()
        font.setFamily("Fira Code")
        font.setPointSize(16)
        self.textEdit.setFont(font)
        self.textEdit.setObjectName("textEdit")
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        self.tabWidget.setGeometry(QtCore.QRect(180, 0, 281, 101))
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.tabWidget.addTab(self.tab_2, "")
        self.treeView = QtWidgets.QTreeView(self.centralwidget)
        self.treeView.setGeometry(QtCore.QRect(20, 40, 141, 801))
        self.treeView.setObjectName("treeView")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 2724, 21))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuPreferences = QtWidgets.QMenu(self.menuFile)
        self.menuPreferences.setObjectName("menuPreferences")
        self.menuEdit = QtWidgets.QMenu(self.menubar)
        self.menuEdit.setObjectName("menuEdit")
        self.menuView = QtWidgets.QMenu(self.menubar)
        self.menuView.setObjectName("menuView")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionNew = QtWidgets.QAction(MainWindow)
        self.actionNew.setObjectName("actionNew")
        self.actionOpen = QtWidgets.QAction(MainWindow)
        self.actionOpen.setObjectName("actionOpen")
        self.actionSave = QtWidgets.QAction(MainWindow)
        self.actionSave.setObjectName("actionSave")
        self.actionSave_As = QtWidgets.QAction(MainWindow)
        self.actionSave_As.setObjectName("actionSave_As")
        self.actionUndo = QtWidgets.QAction(MainWindow)
        self.actionUndo.setObjectName("actionUndo")
        self.actionRedo = QtWidgets.QAction(MainWindow)
        self.actionRedo.setObjectName("actionRedo")
        self.actionCopy = QtWidgets.QAction(MainWindow)
        self.actionCopy.setObjectName("actionCopy")
        self.actionPaste = QtWidgets.QAction(MainWindow)
        self.actionPaste.setObjectName("actionPaste")
        self.actionCut = QtWidgets.QAction(MainWindow)
        self.actionCut.setObjectName("actionCut")
        self.actionFind = QtWidgets.QAction(MainWindow)
        self.actionFind.setObjectName("actionFind")
        self.actionReplace = QtWidgets.QAction(MainWindow)
        self.actionReplace.setObjectName("actionReplace")
        self.actionSettings = QtWidgets.QAction(MainWindow)
        self.actionSettings.setObjectName("actionSettings")
        self.actionKeyboard_Shortcuts = QtWidgets.QAction(MainWindow)
        self.actionKeyboard_Shortcuts.setObjectName("actionKeyboard_Shortcuts")
        self.actionColor_Theme = QtWidgets.QAction(MainWindow)
        self.actionColor_Theme.setObjectName("actionColor_Theme")
        self.actionToggle_Line_Numbers = QtWidgets.QAction(MainWindow)
        self.actionToggle_Line_Numbers.setObjectName(
            "actionToggle_Line_Numbers")
        self.menuPreferences.addAction(self.actionSettings)
        self.menuPreferences.addAction(self.actionKeyboard_Shortcuts)
        self.menuPreferences.addAction(self.actionColor_Theme)
        self.menuFile.addAction(self.actionNew)
        self.menuFile.addAction(self.actionOpen)
        self.menuFile.addAction(self.actionSave)
        self.menuFile.addAction(self.actionSave_As)
        self.menuFile.addAction(self.menuPreferences.menuAction())
        self.menuEdit.addAction(self.actionUndo)
        self.menuEdit.addAction(self.actionRedo)
        self.menuEdit.addAction(self.actionCopy)
        self.menuEdit.addAction(self.actionPaste)
        self.menuEdit.addAction(self.actionCut)
        self.menuEdit.addAction(self.actionFind)
        self.menuEdit.addAction(self.actionReplace)
        self.menuView.addAction(self.actionToggle_Line_Numbers)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuEdit.menuAction())
        self.menubar.addAction(self.menuView.menuAction())

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #24
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.setWindowModality(QtCore.Qt.WindowModal)
        MainWindow.resize(843, 612)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("images/Qt.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        MainWindow.setTabShape(QtWidgets.QTabWidget.Rounded)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        font = QtGui.QFont()
        font.setFamily("Tahoma")
        font.setPointSize(12)
        font.setBold(False)
        font.setWeight(50)
        self.tabWidget.setFont(font)
        self.tabWidget.setObjectName("tabWidget")
        self.tabGrammar = QtWidgets.QWidget()
        self.tabGrammar.setObjectName("tabGrammar")
        self.gridLayout = QtWidgets.QGridLayout(self.tabGrammar)
        self.gridLayout.setObjectName("gridLayout")
        self.textEditGrammar = QtWidgets.QPlainTextEdit(self.tabGrammar)
        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(28)
        font.setBold(True)
        font.setWeight(75)
        self.textEditGrammar.setFont(font)
        self.textEditGrammar.setPlainText("")
        self.textEditGrammar.setObjectName("textEditGrammar")
        self.gridLayout.addWidget(self.textEditGrammar, 0, 0, 1, 1)
        self.tabWidget.addTab(self.tabGrammar, "")
        self.tabResults = QtWidgets.QWidget()
        self.tabResults.setObjectName("tabResults")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.tabResults)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.textResults = QtWebEngineWidgets.QWebEngineView(self.tabResults)
        self.textResults.setObjectName("textResults")
        self.gridLayout_2.addWidget(self.textResults, 0, 0, 1, 1)
        self.tabWidget.addTab(self.tabResults, "")
        self.gridLayout_3.addWidget(self.tabWidget, 0, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 843, 21))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuHelp = QtWidgets.QMenu(self.menubar)
        self.menuHelp.setObjectName("menuHelp")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        font = QtGui.QFont()
        font.setFamily("Tahoma")
        font.setPointSize(12)
        self.statusbar.setFont(font)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.toolBar = QtWidgets.QToolBar(MainWindow)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolBar.sizePolicy().hasHeightForWidth())
        self.toolBar.setSizePolicy(sizePolicy)
        self.toolBar.setMinimumSize(QtCore.QSize(795, 40))
        self.toolBar.setObjectName("toolBar")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.actionNewGrammar = QtWidgets.QAction(MainWindow)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap("images/ui-tab--plus.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionNewGrammar.setIcon(icon1)
        self.actionNewGrammar.setObjectName("actionNewGrammar")
        self.actionSaveGrammar = QtWidgets.QAction(MainWindow)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap("images/disk.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionSaveGrammar.setIcon(icon2)
        self.actionSaveGrammar.setObjectName("actionSaveGrammar")
        self.actionLoadGrammar = QtWidgets.QAction(MainWindow)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap("images/blue-folder-open-document.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionLoadGrammar.setIcon(icon3)
        self.actionLoadGrammar.setObjectName("actionLoadGrammar")
        self.actionExit = QtWidgets.QAction(MainWindow)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap("images/arrow-000.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionExit.setIcon(icon4)
        self.actionExit.setObjectName("actionExit")
        self.actionHowToUse = QtWidgets.QAction(MainWindow)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap("images/lifebuoy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionHowToUse.setIcon(icon5)
        self.actionHowToUse.setObjectName("actionHowToUse")
        self.actionAboutAuthor = QtWidgets.QAction(MainWindow)
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap("images/question.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionAboutAuthor.setIcon(icon6)
        self.actionAboutAuthor.setObjectName("actionAboutAuthor")
        self.actionAboutGrammarAnalyser = QtWidgets.QAction(MainWindow)
        self.actionAboutGrammarAnalyser.setIcon(icon6)
        self.actionAboutGrammarAnalyser.setObjectName("actionAboutGrammarAnalyser")
        self.actionSaveGrammarAs = QtWidgets.QAction(MainWindow)
        icon7 = QtGui.QIcon()
        icon7.addPixmap(QtGui.QPixmap("images/disk--pencil.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionSaveGrammarAs.setIcon(icon7)
        self.actionSaveGrammarAs.setObjectName("actionSaveGrammarAs")
        self.actionAnalyse = QtWidgets.QAction(MainWindow)
        icon8 = QtGui.QIcon()
        icon8.addPixmap(QtGui.QPixmap("images/control.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionAnalyse.setIcon(icon8)
        font = QtGui.QFont()
        font.setPointSize(8)
        self.actionAnalyse.setFont(font)
        self.actionAnalyse.setObjectName("actionAnalyse")
        self.actionQuickAnalyse = QtWidgets.QAction(MainWindow)
        icon9 = QtGui.QIcon()
        icon9.addPixmap(QtGui.QPixmap("images/controlx2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionQuickAnalyse.setIcon(icon9)
        self.actionQuickAnalyse.setObjectName("actionQuickAnalyse")
        self.menuFile.addAction(self.actionNewGrammar)
        self.menuFile.addAction(self.actionLoadGrammar)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionSaveGrammar)
        self.menuFile.addAction(self.actionSaveGrammarAs)
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.actionExit)
        self.menuHelp.addAction(self.actionHowToUse)
        self.menuHelp.addAction(self.actionAboutAuthor)
        self.menuHelp.addAction(self.actionAboutGrammarAnalyser)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())
        self.toolBar.addAction(self.actionAnalyse)
        self.toolBar.addAction(self.actionQuickAnalyse)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionNewGrammar)
        self.toolBar.addAction(self.actionLoadGrammar)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionSaveGrammar)
        self.toolBar.addAction(self.actionSaveGrammarAs)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionHowToUse)

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Пример #25
0
    def __init__(self, parent=None):
        super(XCellMainInterface, self).__init__(parent)
        
        '''Window settings'''
        self.setWindowTitle("xCELL")
        self.setFixedSize(1050,600) 
        scriptDir = os.path.dirname(os.path.realpath(__file__))
        self.setWindowIcon(QtGui.QIcon(scriptDir + os.path.sep + 'image\\xcell.png'))

        
        '''Font settings'''
        font = QtGui.QFont()
        font.setPointSize(13)
        fontToolbar = QtGui.QFont()
        fontToolbar.setPointSize(10)
        self.setFont(font)
        
        '''Label settings'''
        self.title_label = QtWidgets.QLabel()
        self.site_name_label = QtWidgets.QLabel()
        self.json_folder_label = QtWidgets.QLabel()
        self.json_path_label = QtWidgets.QLabel()
        self.title_label.setAlignment(QtCore.Qt.AlignCenter)
        
        '''Label text'''
        self.title_label.setPixmap(QtGui.QPixmap('image\\title2.png'))
        self.site_name_label.setText("Site Name: ")
        self.json_folder_label.setText("Json Folder: ")        
        self.json_path_label.setText(JaSONx.name_file_hierarchy[:JaSONx.name_file_hierarchy.find(".")])
        
        '''Textbox settings'''
        self.site_name_text = QtWidgets.QLineEdit(self) 
        

        '''Button settings'''
        self.button = QtWidgets.QPushButton("Create Excel")
        self.button.setStyleSheet("background-color: green; color: white; height:50; border-radius:10")
        self.button.setFont(font)
        self.button.clicked.connect(self.on_pushButton_clicked)
    
        '''Grid layout'''
        grid = QtWidgets.QGridLayout()  
        grid.addWidget(self.site_name_label, 0, 0)
        grid.addWidget(self.site_name_text, 0, 1)  
        grid.addWidget(self.json_folder_label, 1, 0)
        grid.addWidget(self.json_path_label, 1, 1)
        
        '''Vertical layout'''
        vbox = QtWidgets.QVBoxLayout()
        vbox.addWidget(self.title_label)
        vbox.addLayout(grid)
        vbox.addWidget(self.button)
        
        '''Layout QWidget'''
        layout = QtWidgets.QWidget()
        layout.setLayout(vbox)
        
        '''Layout QMainWindow'''
        self.setCentralWidget(layout)
        
        '''Toolbar'''
        toolbar = self.addToolBar('Toolbar')
        toolbar.setMovable(False)
        toolbar.setIconSize(QtCore.QSize(40,40))
        toolbar.setFont(fontToolbar)
        toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
        
        '''Icon toolbar'''
        '''Back application'''
        back_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "icon","backicon.png")), 'Back', self)
        back_act.setShortcut('Ctrl+B')
        back_act.setStatusTip('Return to main Interface')
        
        '''Act toolbar'''
        toolbar.addAction(back_act)

        
        '''Toolbar triggered'''
        back_act.triggered.connect(self.returnFirstInterface)
Пример #26
0
    def setupUi(self, Python_IEX_GUI):
        Python_IEX_GUI.setObjectName("Python_IEX_GUI")
        Python_IEX_GUI.resize(987, 739)
        Python_IEX_GUI.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
        Python_IEX_GUI.setStyleSheet("background-color: rgb(197, 248, 255);")
        self.centralwidget = QtWidgets.QWidget(Python_IEX_GUI)
        self.centralwidget.setObjectName("centralwidget")
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        self.tabWidget.setGeometry(QtCore.QRect(30, 20, 921, 651))
        self.tabWidget.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
        self.tabWidget.setAutoFillBackground(False)
        self.tabWidget.setObjectName("tabWidget")
        self.tab_user = QtWidgets.QWidget()
        self.tab_user.setObjectName("tab_user")
        self.connection_status = QtWidgets.QLabel(self.tab_user)
        self.connection_status.setGeometry(QtCore.QRect(430, 70, 451, 41))
        self.connection_status.setStyleSheet(
            "font: 75 18pt \"MS Shell Dlg 2\";\n"
            "color: black;")
        self.connection_status.setObjectName("connection_status")
        self.verticalLayoutWidget = QtWidgets.QWidget(self.tab_user)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(50, 200, 281, 151))
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label_5 = QtWidgets.QLabel(self.verticalLayoutWidget)
        self.label_5.setStyleSheet("font: 75 10pt \"MS Shell Dlg 2\";")
        self.label_5.setObjectName("label_5")
        self.verticalLayout.addWidget(self.label_5)
        self.p_token = QtWidgets.QLineEdit(self.verticalLayoutWidget)
        self.p_token.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.p_token.setObjectName("p_token")
        self.verticalLayout.addWidget(self.p_token)
        self.label_6 = QtWidgets.QLabel(self.verticalLayoutWidget)
        self.label_6.setStyleSheet("font: 75 10pt \"MS Shell Dlg 2\";")
        self.label_6.setObjectName("label_6")
        self.verticalLayout.addWidget(self.label_6)
        self.s_token = QtWidgets.QLineEdit(self.verticalLayoutWidget)
        self.s_token.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.s_token.setObjectName("s_token")
        self.verticalLayout.addWidget(self.s_token)
        self.connect_button = QtWidgets.QPushButton(self.verticalLayoutWidget)
        self.connect_button.setStyleSheet(
            "font: 75 10pt \"MS Shell Dlg 2\";\n"
            "background-color: rgb(184, 184, 184);")
        self.connect_button.setObjectName("connect_button")
        self.verticalLayout.addWidget(self.connect_button)
        self.line = QtWidgets.QFrame(self.tab_user)
        self.line.setGeometry(QtCore.QRect(360, 30, 21, 551))
        self.line.setFrameShape(QtWidgets.QFrame.VLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.connection_browser = QtWidgets.QTextBrowser(self.tab_user)
        self.connection_browser.setGeometry(QtCore.QRect(460, 140, 311, 281))
        self.connection_browser.setStyleSheet(
            "background-color: rgb(217, 217, 217);")
        self.connection_browser.setObjectName("connection_browser")
        self.tabWidget.addTab(self.tab_user, "")
        self.tab_daily = QtWidgets.QWidget()
        self.tab_daily.setObjectName("tab_daily")
        self.date_lbl = QtWidgets.QLabel(self.tab_daily)
        self.date_lbl.setGeometry(QtCore.QRect(160, 20, 91, 16))
        self.date_lbl.setObjectName("date_lbl")
        self.get_btn = QtWidgets.QPushButton(self.tab_daily)
        self.get_btn.setGeometry(QtCore.QRect(280, 50, 93, 21))
        self.get_btn.setStyleSheet("border-width: 5px;\n"
                                   "border-color: rgb(12, 255, 20);\n"
                                   "background-color: rgb(246, 254, 255);\n"
                                   "")
        self.get_btn.setObjectName("get_btn")
        self.sym_lbl = QtWidgets.QLabel(self.tab_daily)
        self.sym_lbl.setGeometry(QtCore.QRect(20, 20, 81, 16))
        self.sym_lbl.setObjectName("sym_lbl")
        self.sym_in = QtWidgets.QLineEdit(self.tab_daily)
        self.sym_in.setGeometry(QtCore.QRect(20, 50, 113, 22))
        self.sym_in.setStyleSheet("border-width: 5px;\n"
                                  "border-color: rgb(12, 255, 20);\n"
                                  "background-color: rgb(246, 254, 255);\n"
                                  "")
        self.sym_in.setObjectName("sym_in")
        self.date_in = QtWidgets.QDateEdit(self.tab_daily)
        self.date_in.setGeometry(QtCore.QRect(150, 50, 110, 22))
        self.date_in.setStyleSheet("border-width: 5px;\n"
                                   "border-color: rgb(12, 255, 20);\n"
                                   "background-color: rgb(246, 254, 255);\n"
                                   "")
        self.date_in.setObjectName("date_in")
        self.MplGraph = MplGraph(self.tab_daily)
        self.MplGraph.setGeometry(QtCore.QRect(20, 100, 861, 431))
        self.MplGraph.setStyleSheet("background-color: rgb(170, 170, 170);")
        self.MplGraph.setObjectName("MplGraph")
        self.tabWidget.addTab(self.tab_daily, "")
        self.tab_news = QtWidgets.QWidget()
        self.tab_news.setObjectName("tab_news")
        self.news_browser = QtWidgets.QTextBrowser(self.tab_news)
        self.news_browser.setGeometry(QtCore.QRect(340, 40, 531, 551))
        self.news_browser.setStyleSheet(
            "background-color: rgb(201, 222, 223);")
        self.news_browser.setObjectName("news_browser")
        self.gridLayoutWidget = QtWidgets.QWidget(self.tab_news)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 70, 267, 137))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setHorizontalSpacing(100)
        self.gridLayout.setVerticalSpacing(18)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 0, 1, 1, 1)
        self.news_sym = QtWidgets.QLineEdit(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.news_sym.setFont(font)
        self.news_sym.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.news_sym.setText("")
        self.news_sym.setObjectName("news_sym")
        self.gridLayout.addWidget(self.news_sym, 1, 0, 1, 1)
        self.num_stories = QtWidgets.QSpinBox(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.num_stories.setFont(font)
        self.num_stories.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.num_stories.setMinimum(1)
        self.num_stories.setMaximum(50)
        self.num_stories.setObjectName("num_stories")
        self.gridLayout.addWidget(self.num_stories, 1, 1, 1, 1)
        self.news_button = QtWidgets.QPushButton(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.news_button.setFont(font)
        self.news_button.setStyleSheet("background-color: rgb(176, 176, 176);")
        self.news_button.setObjectName("news_button")
        self.gridLayout.addWidget(self.news_button, 2, 0, 1, 2)
        self.tabWidget.addTab(self.tab_news, "")
        Python_IEX_GUI.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(Python_IEX_GUI)
        self.statusbar.setObjectName("statusbar")
        Python_IEX_GUI.setStatusBar(self.statusbar)
        self.menubar = QtWidgets.QMenuBar(Python_IEX_GUI)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 987, 26))
        self.menubar.setObjectName("menubar")
        self.menuOptions = QtWidgets.QMenu(self.menubar)
        self.menuOptions.setObjectName("menuOptions")
        Python_IEX_GUI.setMenuBar(self.menubar)
        self.actionTrade = QtWidgets.QAction(Python_IEX_GUI)
        self.actionTrade.setObjectName("actionTrade")
        self.actionDie = QtWidgets.QAction(Python_IEX_GUI)
        self.actionDie.setObjectName("actionDie")
        self.menuOptions.addAction(self.actionTrade)
        self.menuOptions.addAction(self.actionDie)
        self.menubar.addAction(self.menuOptions.menuAction())

        self.retranslateUi(Python_IEX_GUI)
        self.tabWidget.setCurrentIndex(2)
        QtCore.QMetaObject.connectSlotsByName(Python_IEX_GUI)
Пример #27
0
    def __init__(self, parent=None):
        super(ViewInterface, self).__init__(parent)
        
        '''Window settings'''
        self.setFixedSize(1050,600)
        self.setWindowTitle("JaSONx")
        scriptDir = os.path.dirname(os.path.realpath(__file__))
        self.setWindowIcon(QtGui.QIcon(scriptDir + os.path.sep + 'image\\logo.png'))
        
        '''Dict -> {meter_name : {meter_model:val , n_measures_sel:val}}'''
        self.dictmeters = JaSONx.createDictMeters()
        
        '''Font settings'''
        font = QtGui.QFont()
        font.setPointSize(13)
        self.setFont(font)
        fontToolbar = QtGui.QFont()
        fontToolbar.setPointSize(10)
        
        '''Button settings'''
        self.button = QtWidgets.QPushButton("Generate JSON")
        self.button.setStyleSheet("background-color: #8b0000; color: white; height:50; border-radius:10")
        self.button.setFont(font)
                       
        '''Table settings'''
        self.table = QtWidgets.QTableWidget()   
        self.table.setFont(font)               
        self.table.setRowCount(len(self.dictmeters))
        self.table.setColumnCount(2)
        self.table.setHorizontalHeaderLabels(['Meter Name', 'Model'])
        
        self.table.setColumnWidth(0,500)
        self.table.setColumnWidth(1,500)

        '''Table triggers'''
        self.table.setEditTriggers(QtWidgets.QTableWidget.NoEditTriggers)

        '''Grid layout'''
        grid = QtWidgets.QGridLayout()  
        grid.addWidget(self.table, 0, 0)
        grid.addWidget(self.button, 1, 0)
        
        '''Layout QWidget'''
        layout = QtWidgets.QWidget()
        layout.setLayout(grid)
        
        '''Layout QMainWindow'''
        self.setCentralWidget(layout)
        
        '''Toolbar'''
        toolbar = self.addToolBar('Toolbar')
        toolbar.setMovable(False)
        toolbar.setIconSize(QtCore.QSize(40,40))
        toolbar.setFont(fontToolbar)
        toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
        
        '''Icon toolbar'''
        '''Back application'''
        back_act = QtWidgets.QAction(QtGui.QIcon(os.path.join(os.path.realpath(''), "image", "icon","backicon.png")), 'Back', self)
        back_act.setShortcut('Ctrl+B')
        back_act.setStatusTip('Return to main Interface')
        
        '''Act toolbar'''
        toolbar.addAction(back_act)

        
        '''Toolbar triggered'''
        back_act.triggered.connect(self.returnFirstInterface)
  
        '''Table population'''
        count = 0  
        for meter, model in self.dictmeters.items():
            self.table.setItem(count,0,QtWidgets.QTableWidgetItem(meter))
            self.table.setItem(count,1,QtWidgets.QTableWidgetItem(model))  
            count +=1
 
        '''Button clicked'''       
        self.button.clicked.connect(self.on_pushButton_clicked)
Пример #28
0
    def __init__(self):
        """initialize window object"""

        super().__init__()

        # connect to database
        self.model_user_data = QtGui.QStandardItemModel()
        self.db_connect = Database()

        # initialize GUI
        self.setObjectName("MainWindow")
        self.resize(860, 618)
        self.setMinimumSize(QtCore.QSize(1060, 818))
        self.setMaximumSize(QtCore.QSize(1060, 818))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(IMAGES_DIR + "icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.setWindowIcon(icon)
        self.setAutoFillBackground(False)
        self.setStyleSheet("background-color: #414053;")
        self.setDocumentMode(False)
        self.setUnifiedTitleAndToolBarOnMac(True)

        self.about_window = AboutWindow()
        self.about_window.setWindowModality(QtCore.Qt.ApplicationModal)

        self.new_user_window = NewUserWindow()
        self.new_user_window.setWindowModality(QtCore.Qt.ApplicationModal)

        self.select_user_window = SelectUserWindow()
        self.select_user_window.setWindowModality(QtCore.Qt.ApplicationModal)

        self.central_widget = QtWidgets.QWidget(self)
        self.central_widget.setObjectName("central_widget")

        self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.central_widget)
        self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(40, 10, 981, 751))
        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.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")

        self.timerInnerLabel = QtWidgets.QLabel(self.horizontalLayoutWidget_2)

        font = QtGui.QFont()
        font.setPointSize(16)

        self.timerInnerLabel.setFont(font)
        self.timerInnerLabel.setStyleSheet("color:white;")
        self.timerInnerLabel.setTextFormat(QtCore.Qt.PlainText)
        self.timerInnerLabel.setAlignment(QtCore.Qt.AlignCenter)
        self.timerInnerLabel.setObjectName("timerInnerLabel")

        self.verticalLayout.addWidget(self.timerInnerLabel)
        spacer_item = QtWidgets.QSpacerItem(20, 15, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        self.verticalLayout.addItem(spacer_item)
        self.timer_text = QtWidgets.QTextEdit(self.horizontalLayoutWidget_2)

        font.setPointSize(14)

        self.timer_text.setFont(font)
        self.timer_text.viewport().setProperty("cursor", QtGui.QCursor(QtCore.Qt.IBeamCursor))
        self.timer_text.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.timer_text.setToolTipDuration(-6)
        self.timer_text.setStyleSheet("background-color: #E0E0E0; color: black; ")
        self.timer_text.setObjectName("timer_text")

        self.verticalLayout.addWidget(self.timer_text)

        self.line_2 = QtWidgets.QFrame(self.horizontalLayoutWidget_2)
        self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_2.setObjectName("line_2")

        self.verticalLayout.addWidget(self.line_2)

        self.timeLabel = QtWidgets.QLabel(self.horizontalLayoutWidget_2)
        self.timeLabel.setStyleSheet("color:white;")
        self.timeLabel.setAlignment(QtCore.Qt.AlignCenter)
        self.timeLabel.setObjectName("timeLabel")

        self.verticalLayout.addWidget(self.timeLabel)

        self.setTime = QtWidgets.QTimeEdit(self.horizontalLayoutWidget_2)
        self.setTime.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor))
        self.setTime.setStyleSheet("color:white;")
        self.setTime.setObjectName("setTime")
        self.setTime.setDisplayFormat("HH:mm:ss")

        self.verticalLayout.addWidget(self.setTime)

        self.soundLabel = QtWidgets.QLabel(self.horizontalLayoutWidget_2)
        self.soundLabel.setStyleSheet("color:white;")
        self.soundLabel.setTextFormat(QtCore.Qt.AutoText)
        self.soundLabel.setAlignment(QtCore.Qt.AlignCenter)
        self.soundLabel.setObjectName("soundLabel")

        self.verticalLayout.addWidget(self.soundLabel)

        self.selectSignal = QtWidgets.QComboBox(self.horizontalLayoutWidget_2)
        self.selectSignal.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.selectSignal.setStyleSheet("color:white;")
        self.selectSignal.setEditable(False)
        self.selectSignal.setObjectName("selectSignal")
        self.selectSignal.addItems(
            [f.replace(".mp3", "") for f in listdir(MUSIC_DIR) if isfile(join(MUSIC_DIR, f))]
        )  # get list of name files from MUSIC_DIR directory

        self.verticalLayout.addWidget(self.selectSignal)

        self.volumeLabel = QtWidgets.QLabel(self.horizontalLayoutWidget_2)
        self.volumeLabel.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.volumeLabel.setStyleSheet("color:white;")
        self.volumeLabel.setAlignment(QtCore.Qt.AlignCenter)
        self.volumeLabel.setObjectName("volumeLabel")

        self.verticalLayout.addWidget(self.volumeLabel)

        self.volume = QtWidgets.QSlider(self.horizontalLayoutWidget_2)
        self.volume.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.volume.setStyleSheet("")
        self.volume.setMinimum(0)
        self.volume.setMaximum(100)
        self.volume.setPageStep(1)
        self.volume.setOrientation(QtCore.Qt.Horizontal)
        self.volume.setInvertedAppearance(False)
        self.volume.setInvertedControls(False)
        self.volume.setObjectName("volume")

        self.verticalLayout.addWidget(self.volume)

        self.line = QtWidgets.QFrame(self.horizontalLayoutWidget_2)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")

        self.verticalLayout.addWidget(self.line)

        self.startButton = QtWidgets.QPushButton(self.horizontalLayoutWidget_2)

        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Maximum)
        size_policy.setHorizontalStretch(0)
        size_policy.setVerticalStretch(0)
        size_policy.setHeightForWidth(self.startButton.sizePolicy().hasHeightForWidth())

        self.startButton.setSizePolicy(size_policy)

        font.setPointSize(16)

        self.startButton.setFont(font)
        self.startButton.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
        self.startButton.setToolTipDuration(-4)
        self.startButton.setStyleSheet("background-color: green; color: white;")
        self.startButton.setDefault(False)
        self.startButton.setObjectName("startButton")
        self.startButton.clicked.connect(self.start_timer)

        self.verticalLayout.addWidget(self.startButton)

        self.horizontalLayout.addLayout(self.verticalLayout)
        self.horizontalLayout_2.addLayout(self.horizontalLayout)
        spacer_item1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacer_item1)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")

        self.timer = QtWidgets.QLabel(self.horizontalLayoutWidget_2)

        font.setFamily("Hack")
        font.setPointSize(48)

        self.timer.setFont(font)
        self.timer.setStyleSheet("color:white;")
        self.timer.setAlignment(QtCore.Qt.AlignCenter)
        self.timer.setObjectName("timer")

        self.verticalLayout_2.addWidget(self.timer)

        font.setPointSize(12)

        self.tableUserData = QtWidgets.QTableView(self.horizontalLayoutWidget_2)
        self.tableUserData.setFont(font)
        self.tableUserData.setStyleSheet("background-color:rgb(211, 215, 207); color: black;")
        self.tableUserData.setSortingEnabled(True)
        self.tableUserData.setObjectName("tableUserData")
        self.tableUserData.horizontalHeader().setStretchLastSection(True)

        self.print_table()

        self.verticalLayout_2.addWidget(self.tableUserData)

        self.horizontalLayout_2.addLayout(self.verticalLayout_2)

        self.setCentralWidget(self.central_widget)

        self.menubar = QtWidgets.QMenuBar(self)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 860, 29))
        self.menubar.setStyleSheet("""color: white;
                                    QMenu {
                                        background-color: rgb(190, 206, 221);
                                        border: 1px solid black;
                                    }""")
        self.menubar.setObjectName("menubar")

        self.users = QtWidgets.QMenu(self.menubar)
        self.users.setObjectName("users")

        self.settings_menu = QtWidgets.QMenu(self.menubar)
        self.settings_menu.setObjectName("settings_menu")

        self.about_menu = QtWidgets.QMenu(self.menubar)
        self.about_menu.setObjectName("about_menu")

        self.about_timetracker = QtWidgets.QAction(QtGui.QIcon(
            IMAGES_DIR + 'about_timetraker.png'),
            'О Timetracker', self)
        self.about_timetracker.setStatusTip('Информация о приложении')
        self.about_timetracker.triggered.connect(self.create_about_window)

        self.about_qt = QtWidgets.QAction(self)
        self.about_qt.setStatusTip("Информация о используемой версии Qt")
        self.about_qt.triggered.connect(lambda: QtWidgets.QMessageBox.aboutQt(self))

        self.about_menu.addAction(self.about_timetracker)
        self.about_menu.addAction(self.about_qt)
        self.setMenuBar(self.menubar)

        self.statusbar = QtWidgets.QStatusBar(self)
        self.statusbar.setObjectName("statusbar")
        self.setStatusBar(self.statusbar)

        self.new_user = QtWidgets.QAction(self)
        self.new_user.setObjectName("new_user")
        self.new_user.setShortcut("Ctrl+N")
        self.new_user.setStatusTip("Создать нового пользователя")
        self.new_user.triggered.connect(self.create_new_user_window)

        self.select_user = QtWidgets.QAction(self)
        self.select_user.setObjectName("select_user")
        self.select_user.setShortcut("Ctrl+O")
        self.select_user.setStatusTip("Выбор текущего пользователя")
        self.select_user.triggered.connect(self.create_select_user_window)

        self.exit = QtWidgets.QAction(self)
        self.exit.setShortcut("Ctrl+Q")
        self.exit.setObjectName("exit")
        self.exit.setStatusTip('Выйти из приложения')
        self.exit.triggered.connect(self.close)

        self.view_action = QtWidgets.QAction(self)
        self.view_action.setObjectName("action")
        self.language_action = QtWidgets.QAction(self)
        self.language_action.setObjectName("language_action")
        self.additionally_action = QtWidgets.QAction(self)
        self.additionally_action.setObjectName("additionally_action")

        self.users.addSeparator()
        self.users.addAction(self.new_user)
        self.users.addSeparator()
        self.users.addAction(self.select_user)
        self.users.addSeparator()
        self.users.addAction(self.exit)

        self.settings_menu.addAction(self.view_action)
        self.settings_menu.addAction(self.language_action)
        self.settings_menu.addAction(self.additionally_action)

        self.menubar.addAction(self.users.menuAction())
        self.menubar.addAction(self.settings_menu.menuAction())
        self.menubar.addAction(self.about_menu.menuAction())

        self.retranslate_ui()
        QtCore.QMetaObject.connectSlotsByName(self)
        self.show()
Пример #29
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1240, 720)

        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")

        self.frameCodigo = QtWidgets.QFrame(self.centralwidget)
        self.frameCodigo.setGeometry(QtCore.QRect(0, 30, 740, 450))
        self.frameCodigo.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frameCodigo.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frameCodigo.setObjectName("frameCodigo")


        self.frame3D = QtWidgets.QFrame(self.centralwidget)
        self.frame3D.setGeometry(QtCore.QRect(740, 30, 495, 425))
        self.frame3D.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame3D.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame3D.setObjectName("frame3D")
        
        self.frameConsola = QtWidgets.QFrame(self.centralwidget)
        self.frameConsola.setGeometry(QtCore.QRect(0, 480, 730, 200))
        self.frameConsola.setAutoFillBackground(True)
        self.frameConsola.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frameConsola.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frameConsola.setObjectName("frameConsola")

        self.scrollDebug = QtWidgets.QScrollArea(self.centralwidget)
        self.scrollDebug.setGeometry(QtCore.QRect(750, 450, 475, 250))
        self.scrollDebug.setWidgetResizable(False)
        self.scrollDebug.setObjectName("scrollDebug")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 520, 300))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.tableWidget = QtWidgets.QTableWidget(self.scrollAreaWidgetContents)
        self.tableWidget.setGeometry(QtCore.QRect(0, 0, 520, 300))
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setColumnCount(0)
        self.tableWidget.setRowCount(0)
        self.scrollDebug.setWidget(self.scrollAreaWidgetContents)

        self.consola = QtWidgets.QPlainTextEdit(self.frameConsola)
        self.consola.setGeometry(QtCore.QRect(10, 0, 890, 200))

        font = QtGui.QFont()
        font.setFamily("Consolas")
        font.setPointSize(11)
        font.setBold(True)
        font.setWeight(75)
        font.setKerning(True)


        font2 = QtGui.QFont()
        font2.setFamily("Consolas")
        font2.setPointSize(13)
        font2.setBold(True)
        font2.setWeight(100)
        font2.setKerning(True)


        self.consola.setFont(font2)
        self.consola.setAutoFillBackground(False)
        #self.consola.setTextFormat(QtCore.Qt.RichText)
        self.consola.setObjectName("consola")
        self.frame = QtWidgets.QFrame(self.centralwidget)
        self.frame.setGeometry(QtCore.QRect(-1, 0, 1001, 31))
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1011, 21))
        self.menubar.setObjectName("menubar")
        self.menuArchivo = QtWidgets.QMenu(self.menubar)
        self.menuArchivo.setObjectName("menuArchivo")
        self.menuPrograma = QtWidgets.QMenu(self.menubar)
        self.menuPrograma.setObjectName("menuPrograma")
        self.menuReportes = QtWidgets.QMenu(self.menubar)
        self.menuReportes.setObjectName("menuReportes")

        self.menuReportes2 = QtWidgets.QMenu(self.menubar)
        self.menuReportes2.setObjectName("menuReportes2")

        self.menuAyuda = QtWidgets.QMenu(self.menubar)
        self.menuAyuda.setObjectName("menuAyuda")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionNuevo = QtWidgets.QAction(MainWindow)
        self.actionNuevo.setObjectName("actionNuevo")
        self.actionArbir = QtWidgets.QAction(MainWindow)
        self.actionArbir.setObjectName("actionArbir")
        self.actionGuardar = QtWidgets.QAction(MainWindow)
        self.actionGuardar.setObjectName("actionGuardar")
        self.actionGuardar_Como = QtWidgets.QAction(MainWindow)
        self.actionGuardar_Como.setObjectName("actionGuardar_Como")
        self.actionCerrrar = QtWidgets.QAction(MainWindow)
        self.actionCerrrar.setObjectName("actionCerrrar")
        self.actionSalir = QtWidgets.QAction(MainWindow)
        self.actionSalir.setObjectName("actionSalir")
        self.actionCopiar = QtWidgets.QAction(MainWindow)
        self.actionCopiar.setObjectName("actionCopiar")
        self.actionPegar = QtWidgets.QAction(MainWindow)
        self.actionPegar.setObjectName("actionPegar")
        self.actionCortar = QtWidgets.QAction(MainWindow)
        self.actionCortar.setObjectName("actionCortar")
        self.actionBuscar = QtWidgets.QAction(MainWindow)
        self.actionBuscar.setObjectName("actionBuscar")
        self.actionReemplazar = QtWidgets.QAction(MainWindow)
        self.actionReemplazar.setObjectName("actionReemplazar")


        self.actionTraducir = QtWidgets.QAction(MainWindow)
        self.actionTraducir.setObjectName("actionTraducir")

        self.actionTraducirOptimizado = QtWidgets.QAction(MainWindow)
        self.actionTraducirOptimizado.setObjectName("actionTraducirOptimizado")

        self.actionEjecutar_Ascendente = QtWidgets.QAction(MainWindow)
        self.actionEjecutar_Ascendente.setObjectName("actionEjecutar_Ascendente")

        self.actionEjecutarOptimizado = QtWidgets.QAction(MainWindow)
        self.actionEjecutarOptimizado.setObjectName("actionEjecutarOptimizado")

        self.actionEjecutarAugus = QtWidgets.QAction(MainWindow)
        self.actionEjecutarAugus.setObjectName("actionEjecutarOptimizado")

        self.actionEjecutar_Paso_a_Paso_Ascendente = QtWidgets.QAction(MainWindow)
        self.actionEjecutar_Paso_a_Paso_Ascendente.setObjectName("actionEjecutar_Paso_a_Paso_Ascendente")

        self.actionTabla_de_Simbolos = QtWidgets.QAction(MainWindow)
        self.actionTabla_de_Simbolos.setObjectName("actionTabla_de_Simbolos")
        self.actionErrores = QtWidgets.QAction(MainWindow)
        self.actionErrores.setObjectName("actionErrores")
        self.actionAST = QtWidgets.QAction(MainWindow)
        self.actionAST.setObjectName("actionAST")
        self.actionGramatical = QtWidgets.QAction(MainWindow)
        self.actionGramatical.setObjectName("actionGramatical")
        self.actionOptmizacion = QtWidgets.QAction(MainWindow)
        self.actionOptmizacion.setObjectName("actionOptmizacion")

        self.actionTabla_de_Simbolos2 = QtWidgets.QAction(MainWindow)
        self.actionTabla_de_Simbolos2.setObjectName("actionTabla_de_Simbolos")
        self.actionErrores2 = QtWidgets.QAction(MainWindow)
        self.actionErrores2.setObjectName("actionErrores")
        self.actionAST2 = QtWidgets.QAction(MainWindow)
        self.actionAST2.setObjectName("actionAST")
        self.actionGramatical2 = QtWidgets.QAction(MainWindow)
        self.actionGramatical2.setObjectName("actionGramatical")

        self.actionAyuda = QtWidgets.QAction(MainWindow)
        self.actionAyuda.setObjectName("actionAyuda")
        self.actionAcercaDe = QtWidgets.QAction(MainWindow)
        self.actionAcercaDe.setObjectName("actionAcercaDe")

        self.menuArchivo.addAction(self.actionNuevo)
        self.menuArchivo.addSeparator()
        self.menuArchivo.addAction(self.actionArbir)
        self.menuArchivo.addAction(self.actionGuardar)
        self.menuArchivo.addAction(self.actionGuardar_Como)
        self.menuArchivo.addSeparator()
        self.menuArchivo.addAction(self.actionCerrrar)
        self.menuArchivo.addAction(self.actionSalir)

        self.menuPrograma.addAction(self.actionEjecutar_Ascendente)
        self.menuPrograma.addAction(self.actionEjecutarOptimizado)
        self.menuPrograma.addSeparator()

        self.menuPrograma.addAction(self.actionTraducir)
        self.menuPrograma.addAction(self.actionTraducirOptimizado)

        self.menuPrograma.addSeparator()
        self.menuPrograma.addAction(self.actionEjecutar_Paso_a_Paso_Ascendente)
        self.menuPrograma.addSeparator()
        self.menuPrograma.addAction(self.actionEjecutarAugus)

        self.menuReportes.addAction(self.actionTabla_de_Simbolos)
        self.menuReportes.addAction(self.actionErrores)
        self.menuReportes.addAction(self.actionAST)
        self.menuReportes.addAction(self.actionGramatical)
        self.menuReportes.addAction(self.actionOptmizacion)


        self.menuReportes2.addAction(self.actionTabla_de_Simbolos2)
        self.menuReportes2.addAction(self.actionErrores2)
        self.menuReportes2.addAction(self.actionAST2)
        self.menuReportes2.addAction(self.actionGramatical2)

        self.menuAyuda.addAction(self.actionAyuda)
        self.menuAyuda.addAction(self.actionAcercaDe)
        self.menubar.addAction(self.menuArchivo.menuAction())
        self.menubar.addAction(self.menuPrograma.menuAction())
        self.menubar.addAction(self.menuReportes.menuAction())
        self.menubar.addAction(self.menuReportes2.menuAction())
        self.menubar.addAction(self.menuAyuda.menuAction())


        self.__myFont = QFont()
        self.__myFont.setPointSize(12)

        #************************************************ REGLAS DEL LENGUAJE MINOR C *****************************************
        self.codigo = QsciScintilla()
        self.codigo.setText("")              
        self.codigo.setLexer(None)           
        self.codigo.setUtf8(True)             
        self.codigo.setFont(self.__myFont)    

        #AJUSTES DE TEXTO
        self.codigo.setWrapMode(QsciScintilla.WrapWord)
        self.codigo.setWrapVisualFlags(QsciScintilla.WrapFlagByText)
        self.codigo.setWrapIndentMode(QsciScintilla.WrapIndentIndented)

        #FIN DE LINEA
        self.codigo.setEolMode(QsciScintilla.EolWindows)
        self.codigo.setEolVisibility(False)

        #SANGRIA
        self.codigo.setIndentationsUseTabs(False)
        self.codigo.setTabWidth(4)
        self.codigo.setIndentationGuides(True)
        self.codigo.setTabIndents(True)
        self.codigo.setAutoIndent(True)

        self.codigo.setCaretForegroundColor(QColor("#ff0000ff"))
        self.codigo.setCaretLineVisible(True)
        self.codigo.setCaretLineBackgroundColor(QColor("#1f0000ff"))
        self.codigo.setCaretWidth(2)

        # MARGENES
        self.codigo.setMarginType(0, QsciScintilla.NumberMargin)
        self.codigo.setMarginWidth(0, "0000")  #con este se puede quitar la linea
        self.codigo.setMarginsForegroundColor(QColor("#ff888888"))

        #SE COLOCAN LAS REGLAS DEL EDITOR
        self.__lexer = QsciLexerCPP(self.codigo)
        self.codigo.setLexer(self.__lexer)

        self.__lyt = QVBoxLayout()
        self.frameCodigo.setLayout(self.__lyt)
        self.__lyt.addWidget(self.codigo)


         #************************************************ REGLAS DEL LENGUAJE AUGUS *****************************************
        self.editor = QsciScintilla()
        self.editor.setText("")              
        self.editor.setLexer(None)           
        self.editor.setUtf8(True)             
        self.editor.setFont(self.__myFont)    

        #AJUSTES DE TEXTO
        self.editor.setWrapMode(QsciScintilla.WrapWord)
        self.editor.setWrapVisualFlags(QsciScintilla.WrapFlagByText)
        self.editor.setWrapIndentMode(QsciScintilla.WrapIndentIndented)

        #FIN DE LINEA
        self.editor.setEolMode(QsciScintilla.EolWindows)
        self.editor.setEolVisibility(False)

        #SANGRIA
        self.editor.setIndentationsUseTabs(False)
        self.editor.setTabWidth(4)
        self.editor.setIndentationGuides(True)
        self.editor.setTabIndents(True)
        self.editor.setAutoIndent(True)

        self.editor.setCaretForegroundColor(QColor("#ff0000ff"))
        self.editor.setCaretLineVisible(True)
        self.editor.setCaretLineBackgroundColor(QColor("#1f0000ff"))
        self.editor.setCaretWidth(2)

        # MARGENES
        self.editor.setMarginType(0, QsciScintilla.NumberMargin)
        self.editor.setMarginWidth(0, "0000")  #con este se puede quitar la linea
        self.editor.setMarginsForegroundColor(QColor("#ff888888"))

        #SE COLOCAN LAS REGLAS DEL EDITOR
        self.__lexer2 = QsciLexerRuby(self.editor)
        self.editor.setLexer(self.__lexer2)

        self.__lyt2 = QVBoxLayout()
        self.frame3D.setLayout(self.__lyt2)
        self.__lyt2.addWidget(self.editor)


        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
        self.actionNuevo.triggered.connect(self.clean)
        self.actionArbir.triggered.connect(self.open)
        self.actionGuardar.triggered.connect(self.save)
        self.actionGuardar_Como.triggered.connect(self.save_as)
        self.actionCerrrar.triggered.connect(self.clear)
        self.actionSalir.triggered.connect(self.exit)
        self.ruta_archivo  = None

        self.actionEjecutar_Ascendente.triggered.connect(self.ejecutar)
        self.actionEjecutarOptimizado.triggered.connect(self.ejecutarOptmizado)

        self.actionTraducir.triggered.connect(self.traducir)
        self.actionTraducirOptimizado.triggered.connect(self.optimizar)

        self.actionEjecutarAugus.triggered.connect(self.ejecutarAugus)

        self.actionEjecutar_Paso_a_Paso_Ascendente.triggered.connect(self.debug)

        self.actionTabla_de_Simbolos.triggered.connect(self.generarTabla)
        self.actionErrores.triggered.connect(self.generarRErrores)
        self.actionGramatical.triggered.connect(self.generarRGramatical)
        self.actionAST.triggered.connect(self.generarAST)
        
        self.actionTabla_de_Simbolos2.triggered.connect(self.generarTabla2)
        self.actionErrores2.triggered.connect(self.generarRErrores2)
        self.actionGramatical2.triggered.connect(self.generarRGramatical2)
        self.actionAST2.triggered.connect(self.generarAST2)

        self.actionOptmizacion.triggered.connect(self.generarReporteOptmizacion)

        self.actionAcercaDe.triggered.connect(self.acercade)
        self.actionAyuda.triggered.connect(self.ayuda)

        self.ts_global = TS.Entorno(None)
        self.ast =  AST.AST([]) 
        self.listado_gramatical = []
        self.instrucciones = []

        self.tableWidget.setRowCount(100)
        self.tableWidget.setColumnCount(3)
        self.tableWidget.setItem(0,0, QTableWidgetItem("No."))
        self.tableWidget.setItem(0,1, QTableWidgetItem("Simbolo"))
        self.tableWidget.setItem(0, 2 , QTableWidgetItem("Valor"))

        self.tableWidget.setColumnWidth(0, 60)
        self.tableWidget.setColumnWidth(1, 160)
        self.tableWidget.setColumnWidth(2, 250)

        self.consola.setStyleSheet("background-color: black;border: 1px solid black;color:green;") 

        self.ejecutor = Ejecutor()
        self.optimizador = Optimizador()
Пример #30
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1057, 731)
        MainWindow.setProperty("р", "")
        self.centralWidget = QtWidgets.QWidget(MainWindow)
        self.centralWidget.setObjectName("centralWidget")
        self.gridLayoutWidget_3 = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget_3.setGeometry(QtCore.QRect(530, 450, 411, 111))
        self.gridLayoutWidget_3.setObjectName("gridLayoutWidget_3")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.gridLayoutWidget_3)
        self.gridLayout_3.setContentsMargins(11, 11, 11, 11)
        self.gridLayout_3.setSpacing(6)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.label_12 = QtWidgets.QLabel(self.gridLayoutWidget_3)
        self.label_12.setObjectName("label_12")
        self.gridLayout_3.addWidget(self.label_12, 1, 0, 1, 1)
        self.label_13 = QtWidgets.QLabel(self.gridLayoutWidget_3)
        self.label_13.setObjectName("label_13")
        self.gridLayout_3.addWidget(self.label_13, 4, 0, 1, 1)
        self.horizontalSlider = QtWidgets.QSlider(self.gridLayoutWidget_3)
        self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider.setObjectName("horizontalSlider")
        self.gridLayout_3.addWidget(self.horizontalSlider, 0, 0, 1, 1)
        self.horizontalSlider_2 = QtWidgets.QSlider(self.gridLayoutWidget_3)
        self.horizontalSlider_2.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider_2.setObjectName("horizontalSlider_2")
        self.gridLayout_3.addWidget(self.horizontalSlider_2, 2, 0, 1, 1)
        self.label_12.raise_()
        self.label_13.raise_()
        self.horizontalSlider_2.raise_()
        self.horizontalSlider.raise_()
        self.gridLayoutWidget_4 = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget_4.setGeometry(QtCore.QRect(530, 560, 211, 81))
        self.gridLayoutWidget_4.setObjectName("gridLayoutWidget_4")
        self.gridLayout_4 = QtWidgets.QGridLayout(self.gridLayoutWidget_4)
        self.gridLayout_4.setContentsMargins(11, 11, 11, 11)
        self.gridLayout_4.setSpacing(6)
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.comboBox = QtWidgets.QComboBox(self.gridLayoutWidget_4)
        self.comboBox.setObjectName("comboBox")
        self.gridLayout_4.addWidget(self.comboBox, 2, 0, 1, 1)
        self.pushButton = QtWidgets.QPushButton(self.gridLayoutWidget_4)
        self.pushButton.setObjectName("pushButton")
        self.gridLayout_4.addWidget(self.pushButton, 1, 0, 1, 1)
        self.graphicsView_2 = CustomWidget1(self.centralWidget)
        self.graphicsView_2.setGeometry(QtCore.QRect(530, 16, 501, 421))
        self.graphicsView_2.setObjectName("graphicsView_2")
        self.graphicsView_3 = CustomWidget2(self.centralWidget)
        self.graphicsView_3.setGeometry(QtCore.QRect(10, 16, 501, 421))
        self.graphicsView_3.setObjectName("graphicsView_3")
        self.gridLayoutWidget = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 460, 121, 79))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setContentsMargins(11, 11, 11, 11)
        self.gridLayout.setSpacing(6)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(self.gridLayoutWidget)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.doubleSpinBox = QtWidgets.QDoubleSpinBox(self.gridLayoutWidget)
        self.doubleSpinBox.setObjectName("doubleSpinBox")
        self.gridLayout.addWidget(self.doubleSpinBox, 1, 0, 1, 1)
        self.gridLayoutWidget_5 = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget_5.setGeometry(QtCore.QRect(10, 540, 121, 61))
        self.gridLayoutWidget_5.setObjectName("gridLayoutWidget_5")
        self.gridLayout_5 = QtWidgets.QGridLayout(self.gridLayoutWidget_5)
        self.gridLayout_5.setContentsMargins(11, 11, 11, 11)
        self.gridLayout_5.setSpacing(6)
        self.gridLayout_5.setObjectName("gridLayout_5")
        self.label_9 = QtWidgets.QLabel(self.gridLayoutWidget_5)
        self.label_9.setObjectName("label_9")
        self.gridLayout_5.addWidget(self.label_9, 0, 0, 1, 1)
        self.gridLayoutWidget_6 = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget_6.setGeometry(QtCore.QRect(740, 560, 201, 81))
        self.gridLayoutWidget_6.setObjectName("gridLayoutWidget_6")
        self.gridLayout_6 = QtWidgets.QGridLayout(self.gridLayoutWidget_6)
        self.gridLayout_6.setContentsMargins(11, 11, 11, 11)
        self.gridLayout_6.setSpacing(6)
        self.gridLayout_6.setObjectName("gridLayout_6")
        self.label_15 = QtWidgets.QLabel(self.gridLayoutWidget_6)
        self.label_15.setObjectName("label_15")
        self.gridLayout_6.addWidget(self.label_15, 1, 0, 1, 1)
        self.label_11 = QtWidgets.QLabel(self.gridLayoutWidget_6)
        self.label_11.setObjectName("label_11")
        self.gridLayout_6.addWidget(self.label_11, 0, 0, 1, 1)
        self.gridLayoutWidget_7 = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget_7.setGeometry(QtCore.QRect(130, 540, 121, 61))
        self.gridLayoutWidget_7.setObjectName("gridLayoutWidget_7")
        self.gridLayout_7 = QtWidgets.QGridLayout(self.gridLayoutWidget_7)
        self.gridLayout_7.setContentsMargins(11, 11, 11, 11)
        self.gridLayout_7.setSpacing(6)
        self.gridLayout_7.setObjectName("gridLayout_7")
        self.label_10 = QtWidgets.QLabel(self.gridLayoutWidget_7)
        self.label_10.setObjectName("label_10")
        self.gridLayout_7.addWidget(self.label_10, 0, 0, 1, 1)
        self.gridLayoutWidget_9 = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget_9.setGeometry(QtCore.QRect(250, 540, 121, 61))
        self.gridLayoutWidget_9.setObjectName("gridLayoutWidget_9")
        self.gridLayout_9 = QtWidgets.QGridLayout(self.gridLayoutWidget_9)
        self.gridLayout_9.setContentsMargins(11, 11, 11, 11)
        self.gridLayout_9.setSpacing(6)
        self.gridLayout_9.setObjectName("gridLayout_9")
        self.label_17 = QtWidgets.QLabel(self.gridLayoutWidget_9)
        self.label_17.setObjectName("label_17")
        self.gridLayout_9.addWidget(self.label_17, 0, 1, 1, 1)
        self.doubleSpinBox_5 = QtWidgets.QDoubleSpinBox(
            self.gridLayoutWidget_9)
        self.doubleSpinBox_5.setObjectName("doubleSpinBox_5")
        self.gridLayout_9.addWidget(self.doubleSpinBox_5, 1, 1, 1, 1)
        self.gridLayoutWidget_2 = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget_2.setGeometry(QtCore.QRect(130, 460, 121, 79))
        self.gridLayoutWidget_2.setObjectName("gridLayoutWidget_2")
        self.gridLayout_8 = QtWidgets.QGridLayout(self.gridLayoutWidget_2)
        self.gridLayout_8.setContentsMargins(11, 11, 11, 11)
        self.gridLayout_8.setSpacing(6)
        self.gridLayout_8.setObjectName("gridLayout_8")
        self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget_2)
        self.label_2.setObjectName("label_2")
        self.gridLayout_8.addWidget(self.label_2, 0, 0, 1, 1)
        self.doubleSpinBox_2 = QtWidgets.QDoubleSpinBox(
            self.gridLayoutWidget_2)
        self.doubleSpinBox_2.setObjectName("doubleSpinBox_2")
        self.gridLayout_8.addWidget(self.doubleSpinBox_2, 1, 0, 1, 1)
        self.gridLayoutWidget_8 = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget_8.setGeometry(QtCore.QRect(250, 460, 121, 79))
        self.gridLayoutWidget_8.setObjectName("gridLayoutWidget_8")
        self.gridLayout_26 = QtWidgets.QGridLayout(self.gridLayoutWidget_8)
        self.gridLayout_26.setContentsMargins(11, 11, 11, 11)
        self.gridLayout_26.setSpacing(6)
        self.gridLayout_26.setObjectName("gridLayout_26")
        self.label_5 = QtWidgets.QLabel(self.gridLayoutWidget_8)
        self.label_5.setObjectName("label_5")
        self.gridLayout_26.addWidget(self.label_5, 0, 0, 1, 1)
        self.doubleSpinBox_3 = QtWidgets.QDoubleSpinBox(
            self.gridLayoutWidget_8)
        self.doubleSpinBox_3.setObjectName("doubleSpinBox_3")
        self.gridLayout_26.addWidget(self.doubleSpinBox_3, 1, 0, 1, 1)
        self.gridLayoutWidget_10 = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget_10.setGeometry(QtCore.QRect(370, 460, 121, 79))
        self.gridLayoutWidget_10.setObjectName("gridLayoutWidget_10")
        self.gridLayout_27 = QtWidgets.QGridLayout(self.gridLayoutWidget_10)
        self.gridLayout_27.setContentsMargins(11, 11, 11, 11)
        self.gridLayout_27.setSpacing(6)
        self.gridLayout_27.setObjectName("gridLayout_27")
        self.label_6 = QtWidgets.QLabel(self.gridLayoutWidget_10)
        self.label_6.setObjectName("label_6")
        self.gridLayout_27.addWidget(self.label_6, 0, 1, 1, 1)
        self.doubleSpinBox_4 = QtWidgets.QDoubleSpinBox(
            self.gridLayoutWidget_10)
        self.doubleSpinBox_4.setObjectName("doubleSpinBox_4")
        self.gridLayout_27.addWidget(self.doubleSpinBox_4, 1, 1, 1, 1)
        self.gridLayoutWidget_11 = QtWidgets.QWidget(self.centralWidget)
        self.gridLayoutWidget_11.setGeometry(QtCore.QRect(370, 540, 121, 61))
        self.gridLayoutWidget_11.setObjectName("gridLayoutWidget_11")
        self.gridLayout_10 = QtWidgets.QGridLayout(self.gridLayoutWidget_11)
        self.gridLayout_10.setContentsMargins(11, 11, 11, 11)
        self.gridLayout_10.setSpacing(6)
        self.gridLayout_10.setObjectName("gridLayout_10")
        self.label_18 = QtWidgets.QLabel(self.gridLayoutWidget_11)
        self.label_18.setObjectName("label_18")
        self.gridLayout_10.addWidget(self.label_18, 0, 0, 1, 1)
        self.doubleSpinBox_6 = QtWidgets.QDoubleSpinBox(
            self.gridLayoutWidget_11)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.doubleSpinBox_6.sizePolicy().hasHeightForWidth())
        self.doubleSpinBox_6.setSizePolicy(sizePolicy)
        self.doubleSpinBox_6.setObjectName("doubleSpinBox_6")
        self.gridLayout_10.addWidget(self.doubleSpinBox_6, 1, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralWidget)
        self.mainToolBar = QtWidgets.QToolBar(MainWindow)
        self.mainToolBar.setObjectName("mainToolBar")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.mainToolBar)
        self.statusBar = QtWidgets.QStatusBar(MainWindow)
        self.statusBar.setObjectName("statusBar")
        MainWindow.setStatusBar(self.statusBar)
        self.actionr = QtWidgets.QAction(MainWindow)
        self.actionr.setObjectName("actionr")

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