Esempio n. 1
0
    def __init__(self):
        super(MainWindow, self).__init__()
        self.organizador = Organizador()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.scene = QGraphicsScene()
        self.ui.graficos.setScene(self.scene)

        self.ui.agregar_inicio_button.clicked.connect(self.agregar_ini)
        self.ui.agregar_final_button.clicked.connect(self.agregar_fin)
        self.ui.mostrar_button.clicked.connect(self.mostrar)
        self.ui.buscar_button.clicked.connect(self.buscar)
        self.ui.mostrar_tabla_button.clicked.connect(self.mostrar_tabla)
        self.ui.dibujar_button.clicked.connect(self.dibujar)
        self.ui.limpiar_button.clicked.connect(self.limpiar)
        self.ui.generar_button.clicked.connect(self.generar)

        self.ui.actionAbrir.triggered.connect(self.abrir_archivo)
        self.ui.actionGuardar.triggered.connect(self.guardar_archivo)
        self.ui.actionGrafo.triggered.connect(self.generar_grafo)
        self.ui.actionRecorrido.triggered.connect(self.recorrido)

        self.ui.id_checkbox.stateChanged.connect(self.ordenar_id)
        self.ui.velocidad_checkbox.stateChanged.connect(self.ordenar_vel)
        self.ui.distancia_checkbox.stateChanged.connect(self.ordenar_dis)
Esempio n. 2
0
    def __init__(self):
        super(MainWindow, self).__init__()

        # Set up the user interface from Designer.
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        # Make some local modifications.
        # self.ui.colorDepthCombo.addItem("2 colors (1 bit per pixel)")

        # Initial stuff
        self.ui.rootX0.setEnabled(False)
        self.ui.rootX1.setEnabled(False)

        # Connect up the buttons.
        self.ui.rootComboBox.activated.connect(self.changeRootMethod)
        self.ui.rootSolveBtn.clicked.connect(self.rootSolve)
        self.ui.interpolationSolveBtn.clicked.connect(self.interpolationSolve)
        self.ui.sysAddBtn.clicked.connect(self.sysAdd)
        self.ui.sysRemoveBtn.clicked.connect(self.sysRemove)
        self.ui.sysSolveBtn.clicked.connect(self.sysSolve)
        self.ui.rootLoadBtn.clicked.connect(self.rootLoadFile)
        self.ui.interpolationLoadBtn.clicked.connect(self.interpolationLoadFile)
        self.ui.sysLoadBtn.clicked.connect(self.sysLoadFile)
        self.meme_count = 0
        self.ui.memeBtn.clicked.connect(self.meme)
        self.ui.memeLabel.setVisible(False)
        self.ui.memeLabel.setPixmap(QPixmap("doge.jpg"))
        self.ui.memeText.setVisible(False)
Esempio n. 3
0
    def __init__(self):
        # Initialize attributes of QtWidgets.QMainWindow
        if 3 > sys.version_info[0]:
            # Python 2
            super(MainWindow, self).__init__()

        else:
            # Python 3
            super().__init__()

        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        # Map labelCanvas pointer to the real instance
        self.labelCanvas = self.ui.labelCanvas

        self.imgList = Images(self.ui.listWidgetImgList)

        # Actions
        self.ui.actionImport.triggered.connect(self.actionImportClickEvt)
        self.ui.actionEdit.triggered.connect(self.actionEditClickEvt)
        self.ui.actionExit.triggered.connect(self.actionExitClickEvt)
        self.ui.listWidgetImgList.currentItemChanged.connect(
            self.actionCurrentItemChangedEvt)
        self.show()
    def __init__(self):
        QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        # MAIN WINDOW LABEL
        QtCore.QTimer.singleShot(1500, lambda: self.ui.label.setText("<strong>THANKS</strong> FOR WATCHING"))
        QtCore.QTimer.singleShot(1500, lambda: self.setStyleSheet("background-color: #222; color: #FFF"))
Esempio n. 5
0
 def __init__(self):
     super(MainWindow, self).__init__()
     self.organizador = Organizador()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.ui.agregar_inicio_button.clicked.connect(self.agregar_ini)
     self.ui.agregar_final_button.clicked.connect(self.agregar_fin)
     self.ui.mostrar_button.clicked.connect(self.mostrar)
Esempio n. 6
0
def main():
    #Setup QtApp
    app = QtGui.QApplication(sys.argv[0])
    ui_mainwindow = Ui_MainWindow()

    main_window = MainWindow(app, ui_mainwindow, viz_config)
    main_window.show()

    sys.exit(app.exec_())
Esempio n. 7
0
 def __init__(self):
     super(MainWindow, self).__init__()
     self.organizador = Organizador()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.ui.agregar_inicio_button.clicked.connect(self.agregar_ini)
     self.ui.agregar_final_button.clicked.connect(self.agregar_fin)
     self.ui.mostrar_button.clicked.connect(self.mostrar)
     self.ui.actionAbrir.triggered.connect(self.abrir_archivo)
     self.ui.actionGuardar.triggered.connect(self.guardar_archivo)
Esempio n. 8
0
    def __init__(self):
        super(MainWindow, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self._thread = QThread()
        self._input_filename = None
        self._p_threaded = None

        self.get_input_filename()
        self.start_thread()
Esempio n. 9
0
    def __init__(self):
        super().__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.actionExit.triggered.connect(QApplication.instance().exit)
        self.ui.actionAbout.triggered.connect(self._on_action_about_triggered)

        self.ui.tableWidget.setColumnCount(5)
        self.ui.tableWidget.setHorizontalHeaderLabels(
            ['Header', 'Author', 'Url', 'Count comments', 'Count likes'])
        self.init_table_widget()
        self.ui.tableWidget.resizeColumnsToContents()
Esempio n. 10
0
    def __init__(self, sysbus, parent=None):
        QtGui.QWidget.__init__(self, parent)

        # Init ourself from the Designer UI
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        # light up the admin interface
        self.admin = AdminInterface(SERVICE, '/org/ganesha/nfsd/admin', sysbus,
                                    self.show_status)
        self.exportmgr = ExportMgr(SERVICE, '/org/ganesha/nfsd/ExportMgr',
                                   sysbus, self.show_status)
        self.clientmgr = ClientMgr(SERVICE, '/org/ganesha/nfsd/ClientMgr',
                                   sysbus, self.show_status)
        self.logmanager = LogManager(SERVICE, sysbus, self.show_status)
        self.logdialog = LogSetDialog(self.logmanager)
        self.show_status.connect(self.status_message)

        # Connect up the ui menubar
        #File
        self.ui.actionDBus_connect.triggered.connect(self.connect_gsh)
        self.ui.actionQuit.triggered.connect(self.quit)
        #Manage
        #Manage->Clients
        self.ui.actionAdd_Client.triggered.connect(self.add_client)
        self.ui.actionRemove_Client.triggered.connect(self.remove_client)
        #Manage->Exports
        self.ui.actionExports.triggered.connect(self.export_mgr)
        #Manage->Log Levels
        self.ui.actionLog_Settings.triggered.connect(self.logsettings)
        #Manage->Admin
        self.ui.actionReset_Grace.triggered.connect(self.reset_grace)
        self.ui.actionShutdown.triggered.connect(self.shutdown)
        self.ui.actionReload.triggered.connect(self.reload)
        #View
        self.ui.actionStatistics.triggered.connect(self.stats)
        self.ui.actionViewExports.triggered.connect(self.view_exports)
        self.ui.actionViewClients.triggered.connect(self.view_clients)
        #Help
        self.ui.actionAbout.triggered.connect(self.help)

        # Dbus data models
        self.exports_show_model = ExportTableModel(self.exportmgr)
        self.clients_show_model = ClientTableModel(self.clientmgr)

        # Tabs, tables, and views
        self.ui.exports.setModel(self.exports_show_model)
        self.ui.exports.resizeColumnsToContents()
        self.ui.exports.verticalHeader().setVisible(False)
        self.ui.clients.setModel(self.clients_show_model)
        self.ui.clients.resizeColumnsToContents()
        self.ui.clients.verticalHeader().setVisible(False)
Esempio n. 11
0
 def __init__(self):
     super(MainWindow, self).__init__()
     self.resize(400, 600)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.layout = QtWidgets.QHBoxLayout(self.ui.main_page)
     self.splitter = QtWidgets.QSplitter(QtCore.Qt.Horizontal)
     self.left_side = LeftSide()
     self.splitter.addWidget(self.left_side)
     self.central_side = CentralSide()
     self.splitter.addWidget(self.central_side)
     self.right_side = RightSide()
     self.splitter.addWidget(self.right_side)
     self.layout.addWidget(self.splitter)
Esempio n. 12
0
 def __init__(self):
     super(MainWindow, self).__init__()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.ui.moodbox.addItems(self.moods)
     self.update_title(False)
     self.ui.all_buttons.setEnabled(False)
     # Dropdown events
     self.ui.actionLoad_episode.triggered.connect(self.load_episode)
     self.ui.actionSave_changes.triggered.connect(self.save_changes)
     self.ui.actionAdd_audio_path.triggered.connect(self.add_audio_path)
     self.ui.actionGenerate_Audacity_labels.triggered.connect(
         lambda: self.export_to_labels(None))
     self.ui.actionExport_dataset.triggered.connect(self.export_dataset)
     self.ui.actionGenerate_Audacity_labels_all_episodes.triggered.connect(
         lambda: self.export_all_labels(None))
     # Previous/next events
     self.ui.button_next.clicked.connect(lambda: self.next_label(False))
     self.ui.button_previous.clicked.connect(lambda: self.next_label(True))
     # Listen/choose events
     self.ui.button_listenorig.clicked.connect(
         lambda: self.listen_to_source(0))
     self.ui.button_listenizo.clicked.connect(
         lambda: self.listen_to_source(1))
     self.ui.button_listenunmix.clicked.connect(
         lambda: self.listen_to_source(2))
     self.ui.button_chooseorig.clicked.connect(
         lambda: self.choose_source(0))
     self.ui.button_chooseizo.clicked.connect(lambda: self.choose_source(1))
     self.ui.button_chooseunmix.clicked.connect(
         lambda: self.choose_source(2))
     # Other events
     self.ui.startbox.valueChanged.connect(lambda: self.update_title(True))
     self.ui.endbox.valueChanged.connect(lambda: self.update_title(True))
     self.ui.characterbox.textChanged.connect(
         lambda: self.update_title(True))
     self.ui.moodbox.currentIndexChanged.connect(
         lambda: self.update_title(True))
     self.ui.transcriptbox.textChanged.connect(
         lambda: self.update_title(True))
     self.ui.radio_clean.clicked.connect(lambda: self.update_title(True))
     self.ui.radio_noisy.clicked.connect(lambda: self.update_title(True))
     self.ui.radio_verynoisy.clicked.connect(
         lambda: self.update_title(True))
     # End of events
     self.scan_for_files()
Esempio n. 13
0
    def __init__(self):
        super(MainWindow, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.next_button.setEnabled(False)
        # self.ui.next_button.clicked.connect(self.goToNext)
        self.ui.next_button.clicked.connect(self.goToNext)
        self.ui.prev_button.setEnabled(False)
        self.ui.prev_button.clicked.connect(self.goToPrev)

        self.page_index = {
            "page_connect": self.ui.stackedWidget.indexOf(self.ui.page_connect),
            "page_system_check": self.ui.stackedWidget.indexOf(self.ui.page_system_check),
            "page_select_subassembly": self.ui.stackedWidget.indexOf(self.ui.page_select_subassembly),
            "page_subassembly_overview": self.ui.stackedWidget.indexOf(self.ui.page_subassembly_overview),
            "page_machine": self.ui.stackedWidget.indexOf(self.ui.page_machine)
        }
        print(self.page_index)

        self.ui.stackedWidget.currentChanged.connect(self.handlePageChange)

        # set connect as first page
        self.ui.stackedWidget.setCurrentIndex(self.page_index['page_connect'])

        # todo: only start after camera connect!
        self.th = CameraThread(self)
        self.th.changePixmap.connect(self.setImage)

        self.setupConnect()

        self.connected_devices = 0

        # system check setup
        self.setup_system_check()


        self.machineThread = MachineThread()
        self.setupMachine()

        # page select subassembly
        self.ui.treeWidget.expandAll()
        self.ui.treeWidget.itemClicked.connect(self.handleTreeSelect)
        self.SelectSubassembly.connect(lambda x: self.ui.selected_status.setText(x))
        self.SelectSubassembly.connect(lambda x: self.ui.selected_status_2.setText(x))
        self.SelectSubassembly.connect(lambda x: self.ui.selected_status_3.setText(x))