Example #1
0
    def __init__(self):
        super(MyWindow, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.pushButton.clicked.connect(self.button_clicked)
        self.ui.lineEdit.returnPressed.connect(self.button_clicked)
Example #2
0
 def __init__(self):
     QMainWindow.__init__(self)
     self._topLablesTest = ('Question', 'Answer')
     self._topLabelsStructure = ('Node id', 'Childs')
     self._testList = [
     ]  # keeps questions and answers on it, for displaing it in the future
     self._structureList = [
     ]  # keeps nods and its childs, for displaing it in the future
     self._entryNode = 0  # start node
     self._idLevel = 0
     self._finalAnswer = ''
     self._answerValuesList = []
     Answer.msg = QMessageBox()
     Answer.answers = self._answerValuesList
     Node.dialog = NodeDialog()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.ui.tbw_test.setColumnCount(2)
     self.ui.tbw_structure.setColumnCount(2)
     self.ui.tbw_test.setHorizontalHeaderLabels(self._topLablesTest)
     self.ui.tbw_structure.setHorizontalHeaderLabels(
         self._topLabelsStructure)
     self.ui.btn_run.clicked.connect(self.run)
     self.ui.btn_save.clicked.connect(self.save)
     self.ui.btn_upload.clicked.connect(self.upload)
     self.ui.btn_makefile.clicked.connect(self.makeFile)
     self.ui.btn_clear.clicked.connect(self.clear)
     self.ui.btn_nodereset.clicked.connect(self.addNode)
     self.ui.btn_answerreset.clicked.connect(self.addAnswer)
Example #3
0
class MainForm(QMainWindow):
    """Basic Calculator app"""
    def __init__(self):
        super(MainForm, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.btn_calculate.clicked.connect(self.calculation)

    def calculation(self):
        result = ""

        for i in range(4):
            if i == 0:
                result += str(
                    int(self.ui.num1_input.text()) +
                    int(self.ui.num2_input.text())) + "\n"
            if i == 1:
                result += str(
                    int(self.ui.num1_input.text()) -
                    int(self.ui.num2_input.text())) + "\n"
            if i == 2:
                result += str(
                    int(self.ui.num1_input.text()) *
                    int(self.ui.num2_input.text())) + "\n"
            if i == 3:
                result += str(
                    int(self.ui.num1_input.text()) /
                    int(self.ui.num2_input.text())) + "\n"

            self.ui.result_show.setText(result)
Example #4
0
 def __init__(self):
     super(guiMan, self).__init__()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.ui.label_4.setStyleSheet("""font: bold italic;color: #d4f1f4;""")
     self.ui.label_6.setStyleSheet("""font: bold italic;color: #d4f1f4;""")
     self.ui.pushButton_2.setStyleSheet(
         "background-color: #75e6da;"
         """font: bold italic;color: black;""")
     self.ui.pushButton_3.setStyleSheet(
         "background-color: #75e6da;"
         """font: bold italic;color: black;""")
     self.ui.groupBox.setStyleSheet("""font: bold italic;color: #d4f1f4;""")
     self.ui.label_9.setStyleSheet("""font: bold italic;color: #d4f1f4;""")
     self.ui.centralwidget.setStyleSheet("background-color: #05445e;")
     self.ui.textEdit.setStyleSheet("background-color: white;")
     self.ui.textEdit_2.setStyleSheet("background-color: white;")
     self.ui.textEdit_3.setStyleSheet("background-color: white;")
     self.ui.lineEdit.setStyleSheet("background-color: white;"
                                    """font:  ubuntu;color: black;""")
     self.ui.lineEdit_2.setStyleSheet("background-color: white;"
                                      """font:  ubuntu;color: black;""")
     self.ui.pushButton.setStyleSheet("background-color: #189ab4;")
     self.ui.progressBar.hide()
     self.ui.pushButton_3.hide()
     self.ui.progressBar.reset()
     self.ui.lineEdit.setReadOnly(1)
     self.ui.pushButton_2.setShortcut('Ctrl+O')
     self.ui.pushButton_2.clicked.connect(self.file_open)
     self.ui.pushButton.clicked.connect(self.translate)
     self.ui.pushButton_3.clicked.connect(self.file_save)
Example #5
0
    def __init__(self):
        super(mywindow, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.pushButton.clicked.connect(self.formatString)
        self.ui.SortWordInLineCheckBox.clicked.connect(self.ChangeWidgetState)
    def __init__(self, app):
        super().__init__()

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

        self.model = Model(self)

        self.ui.treeView.setModel(self.model)
        self.ui.treeView.setItemDelegate(Delegate())
        self.ui.treeView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
        self.ui.treeView.customContextMenuRequested.connect(self.contextMenu)
        self.ui.pushButton.clicked.connect(self.insertRow)
        self.ui.pushButton_2.clicked.connect(self.delItem)

        ini_file = Path('settings.ini')
        if ini_file.exists():
            config = configparser.ConfigParser()
            config.read(ini_file)
            columns = []
            for option in ['column' + str(i) for i in range(1000)]:
                if not config.has_option('columns', option):
                    continue
                columns.append(config.get('columns', option))
            self.model.addColumns(columns)
Example #7
0
class MainWindow(QMainWindow):
    u"""Entire gui stuff goes here."""
    def __init__(self):
        super(MainWindow, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.pushButton_1.clicked.connect(
            lambda name: self.get_directory_name(self.ui.lineEdit_1
                                                 ))  # Diamond Edition Exe
        self.ui.pushButton_2.clicked.connect(
            lambda name: self.get_directory_name(
                self.ui.lineEdit_2))  # Local directory for diamond
        self.ui.pushButton_3.clicked.connect(
            lambda name: self.get_directory_name(self.ui.lineEdit_3))  # EE exe
        self.ui.pushButton_4.clicked.connect(
            lambda name: self.get_directory_name(self.ui.lineEdit_4
                                                 ))  # Local directory for EE
        self.ui.pushButton_5.clicked.connect(
            lambda name: self.get_directory_name(self.ui.lineEdit_5
                                                 ))  # NWNTool dir

    def get_directory_name(self, placeholder):
        dialog = QFileDialog()
        dialog.setFileMode(QFileDialog.FileMode.Directory)
        path = dialog.getExistingDirectory(self, "Select Directory")
        placeholder.setText(path)
        logger.debug(f"Set Text {path} for {placeholder}")
Example #8
0
File: main.py Project: Aioki/db_bot
    def __init__(self, database: DBClass):

        # ---------- Init ----------------------------------------------------------------------------------------------
        super(mywindow, self).__init__()
        self.__db = database
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.sl_updSubjectList()
        self.loadAllSchedule()
        self.loadTeacher_Analytic()
        self.ui.dateTimeEdit_FreeAuditorium.setDateTime(datetime.datetime.now())

        # ========== Connect ===========================================================================================
        # ---------- couple --------------------------------------------------------------------------------------------
        self.ui.btn_upd.clicked.connect(self.sl_updSubjectList)
        self.ui.btn_save.clicked.connect(self.sl_saveSubject)
        self.ui.btn_del.clicked.connect(self.sl_deleteSubject)
        self.ui.listWidget_subject.itemDoubleClicked.connect(self.sl_changeSubject)
        # ---------- Schedule ------------------------------------------------------------------------------------------
        self.ui.cb_timeCouple.currentIndexChanged.connect(self.sl_changeTimeCouple)
        self.ui.cb_numCourse.currentIndexChanged.connect(self.sl_changeNumCourse)
        self.ui.cb_numGroup.currentIndexChanged.connect(self.sl_changeNumGroup)
        self.ui.cb_nameCouple.currentIndexChanged.connect(self.sl_changeNameCouple)
        self.ui.cb_dormitory.currentIndexChanged.connect(self.sl_changeDormitory)
        self.ui.cb_auditorium.currentIndexChanged.connect(self.sl_changeAuditorium)
        self.ui.btn_addSchedule.clicked.connect(self.sl_addSchedule)
        self.ui.btn_cancelSchedule.clicked.connect(self.sl_cancelSchedule)
        self.ui.btn_saveSchedule.clicked.connect(self.sl_saveSchedule)
        self.ui.btn_refreshShedule.clicked.connect(self.sl_refreshSchedule)
        # ---------- Analytic ------------------------------------------------------------------------------------------
        self.ui.btn_calcAvg.clicked.connect(self.sl_calcAvgCoupleTeacher)
        self.ui.btn_getFreeAuditorium.clicked.connect(self.sl_getFreeAuditorium)
Example #9
0
 def __init__(self):
     #Iniciar el objeto QMainWindow
     QMainWindow.__init__(self)
     self.obj_form_main = Ui_MainWindow()
     self.obj_form_main.setupUi(self)
     self.obj_form_main.actionALTA_ASOCIADO.triggered.connect(
         self.ALTA_ASOCIADO)
     self.obj_form_main.actionACTUALIZACI_N_ASOCIADO.triggered.connect(
         self.ACTUALIZACI_N_ASOCIADO)
     self.obj_form_main.actionMOVIMIENTOS.triggered.connect(
         self.MOVIMIENTOS)
     self.obj_form_main.actionALTA_COOPERATIVA.triggered.connect(
         self.ALTA_COOPERATIVA)
     self.obj_form_main.actionC_A.triggered.connect(self.nomina_cargos)
     self.obj_form_main.actionACTAS.triggered.connect(self.ACTAS)
     self.obj_form_main.boton_modulo_asociados.clicked.connect(
         self.ALTA_ASOCIADO)
     self.obj_form_main.boton_modulo_capital.clicked.connect(
         self.ACTUALIZACI_N_ASOCIADO)
     self.obj_form_main.boton_modulo_contable.clicked.connect(
         self.MOVIMIENTOS)
     self.obj_form_main.boton_modulo_coope.clicked.connect(
         self.ALTA_COOPERATIVA)
     self.obj_form_main.boton_modulo_notas.clicked.connect(self.ACTAS)
     self.obj_form_main.boton_modulo_cargos.clicked.connect(
         self.nomina_cargos)
     self.obj_form_main.actionLISTA_DE_ASOCIADOS.triggered.connect(
         self.LISTA_DE_ASOCIADOS)
Example #10
0
    def __init__(self):
        super(MainWindow, self).__init__()
        #ui
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.comboBox_dict.addItems(dicts)
        #signal
        self.ui.pushButton_create.clicked.connect(self.createBoard)
        self.ui.pushButton_save.clicked.connect(self.saveBoard)
        self.ui.pushButton_open.clicked.connect(self.OpenImages)
        self.ui.tableView.clicked.connect(self.showImg)  #列表图片显示
        self.ui.pushButton_calib.clicked.connect(self.calib)
        self.ui.pushButton_saveParameter.clicked.connect(self.saveParameter)
        self.ui.pushButton_output.clicked.connect(self.saveCameraGroup)
        self.ui.pushButton_clear.clicked.connect(self.clearGroup)
        self.ui.listView_Camera.clicked.connect(self.showCamera)
        #property
        self.model = QStandardItemModel()  #tab 1
        self.cameraListModel = QStringListModel()  #tab 2
        self.cameraLists = []
        self.ui.listView_Camera.setModel(self.cameraListModel)

        self.caliber = None
        self.cameraGroup = CameraGroup.CameraGroup()

        #other
        self.calibBoard = CharucoBoard.ChessBoard()
        self.board = None
        self.boardType = 0
Example #11
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        # Connect the Buttons
        QtCore.QObject.connect(self.ui.selectFileButton,
                               QtCore.SIGNAL("clicked()"), self.selectFile)
        QtCore.QObject.connect(self.ui.convertButton,
                               QtCore.SIGNAL("clicked()"), self.convert)

        # Connect the Radio Buttons
        QtCore.QObject.connect(self.ui.androidHDRadioButton,
                               QtCore.SIGNAL("toggled(bool)"),
                               self.androidHDSelected)
        QtCore.QObject.connect(self.ui.androidQHDRadioButton,
                               QtCore.SIGNAL("toggled(bool)"),
                               self.androidqHDSelected)
        QtCore.QObject.connect(self.ui.appleHDRadioButton,
                               QtCore.SIGNAL("toggled(bool)"),
                               self.appleHDSelected)
        QtCore.QObject.connect(self.ui.appleFullHDRadioButton,
                               QtCore.SIGNAL("toggled(bool)"),
                               self.appleFullHDSelected)

        # Draw Images
        self.drawImages()

        #Setup Process
        self.process = QtCore.QProcess(self)
        QtCore.QObject.connect(self.process, QtCore.SIGNAL("finished(int)"),
                               self.processCompleted)
        QtCore.QObject.connect(self.process,
                               QtCore.SIGNAL("readyReadStandardError()"),
                               self.readStdError)
Example #12
0
class MainWindow_main(QMainWindow):
    def __init__(self):
        super(MainWindow_main, self).__init__()
        self.ui = Ui_MainWindow_main()
        self.ui.setupUi(self)
        self.stock = None
        self.portfolio = None
        self.initUI()

    def initUI(self):
        self.ui.button_stocks.clicked.connect(self.stocks)
        self.ui.button_portfolio.clicked.connect(self.portfolio_fun)

    def stocks(self):
        self.stock = Stocks()
        self.stock.setWindowTitle("Stocker")
        self.stock.setWindowIcon(QtGui.QIcon("images\portfolio.png"))
        self.stock.show()
        self.close()

    def portfolio_fun(self):
        self.portfolio = Portfolio()
        self.portfolio.setWindowTitle("Stocker")
        self.portfolio.setWindowIcon(QtGui.QIcon("images\portfolio.png"))
        self.portfolio.show()
        self.close()
    def __init__(self, app):
        super().__init__()
        self.app = app
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.pushButton_start.clicked.connect(self.calicurate)
        self.ui.pushButton_count.clicked.connect(self.calicurateCount)
        self.springCalculate = SpringCalculate(self.app, self.ui)

        # iniファイル読み込み
        self.inifile = configparser.ConfigParser()
        self.inifile.read('setting.ini', encoding='utf8')

        # テーブルビュー設定
        self.model = {}
        keys = ['d', 'stepedConditions', 'g', 'force', 'result']
        tableViews = [self.ui.tableView_d, self.ui.tableView_conditions_steped, self.ui.tableView_g, self.ui.tableView_force, self.ui.tableView_result]
        for key, tableView in zip(keys, tableViews):
            self.model[key] = Model()
            self.model[key].addColumns( self.inifile.get(key, 'columns').split(',') )
            self.model[key].addItems( [ [ j for j in i.split(',') ] for i in self.inifile.get(key, 'datas').splitlines() ] )
            self.model[key].rows = self.inifile.get(key, 'rows').split(',')
            tableView.setModel( self.model[key] )
            tableView.setItemDelegate( Delegate() )
        
        # 結果テーブルビューはソートを有効
        self.proxyModel = QtCore.QSortFilterProxyModel()
        self.proxyModel.setSourceModel(self.model['result'])
        self.proxyModel.sort(-1, QtCore.Qt.AscendingOrder)
        self.proxyModel.setFilterKeyColumn(1)
        self.ui.tableView_result.setModel(self.proxyModel)
        self.ui.tableView_result.setSortingEnabled(True)
Example #14
0
    def __init__(self, parent=None):
        QMainWindow.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.pushButton.clicked.connect(self.updateText)
        self.setStyleSheet(open('Obit.qss').read())
Example #15
0
class Window(QMainWindow):
    def __init__(self):
        super().__init__()
        self.initUI()
        self.connectSignalsAndSlots()
        self.show()

    def initUI(self):
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)


# pushButton, pushButton_2, pushButton_3, pushButton_4, label_3, lcdNumber_2, label_2

    def connectSignalsAndSlots(self):
        self.ui.pushButton.clicked.connect(self.onClicked(self.ui.pushButton))
        self.ui.pushButton_2.clicked.connect(
            self.onClicked(self.ui.pushButton_2))
        self.ui.pushButton_3.clicked.connect(
            self.onClicked(self.ui.pushButton_3))
        self.ui.pushButton_4.clicked.connect(
            self.onClicked(self.ui.pushButton_4))

    def onClicked(self, button):
        pass
    def __init__(self,singleton,singleton_idusu):
        #Iniciar el objeto QMainWindow
        QMainWindow.__init__(self)
        self.obj_form_main = Ui_MainWindow()
        self.obj_form_main.setupUi(self)
        self.obj_form_main.actionEmpresa.triggered.connect(self.empresanuevo12)
        self.obj_form_main.actionEmpresaActualizar.triggered.connect(self.empresa_actualizar12)
        self.obj_form_main.action_alta_cliente_nuevo.triggered.connect(self.Agregar_cliente)
        self.obj_form_main.action_cliente_actualizar.triggered.connect(self.Actualizar_cliente)
        self.obj_form_main.action_buscar_cliente.triggered.connect(self.buscar_clientes)
        self.obj_form_main.action_credito_agregar_nuevo.triggered.connect(self.credito_nuevo)
        self.obj_form_main.actionCobradores.triggered.connect(self.cobradores)
        self.obj_form_main.actionREPORTE_DE_CUOTAS.triggered.connect(self.REPORTE_DE_CUOTAS)
        self.obj_form_main.actionCOBRAR_CUOTAS.triggered.connect(self.Cuotas)
        self.obj_form_main.actionEgresos.triggered.connect(self.egresos)
        self.obj_form_main.actionIngresos.triggered.connect(self.ingresos_diarios)
        self.obj_form_main.actionCALCULADOR.triggered.connect(self.CALCULADOR)
        self.obj_form_main.actionHISTORIAL_GARANTE.triggered.connect(self.garante_historial12)
        self.obj_form_main.actionUsu.triggered.connect(self.usuario)
        self.obj_form_main.actionUsu_Act.triggered.connect(self.usuario_actualizar)
        self.obj_form_main.actionGenerador_punitorios.triggered.connect(self.Punitorios)
        #self.obj_form_main.actionGenerador_punitorios.triggered.connect(self.Buscar_apellido)

        self.obj_form_main.actionBuscar_apellido.triggered.connect(self.Buscar_apellido)
        self.obj_form_main.actionReparar_Cuotas.triggered.connect(self.reparar_cta)
        self.obj_form_main.actionHist_cred_y_ctas.triggered.connect(self.credito_buscar_estado)
        self.obj_form_main.actionRefinanciar.triggered.connect(self.refinanciar)
        self.obj_form_main.actionCalcular_Creditos.triggered.connect(self.CALCULADOR)
        self.obj_form_main.actionReporte_deuda_cliente.triggered.connect(self.Reporte_deuda_cliente)


        self.singleton =singleton
        self.singleton_idusu =singleton_idusu
Example #17
0
 def __init__(self, parent=None):
     QtWidgets.QWidget.__init__(self, parent)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     # default column size
     self.ui.wifiTable.setColumnCount(4)
     self.ui.wifiTable.insertRow(self.ui.wifiTable.rowCount())
     # initialize headers of table
     header1 = QTableWidgetItem("name")
     header2 = QTableWidgetItem("address")
     header3 = QTableWidgetItem("quality")
     header4 = QTableWidgetItem("security")
     # set headers
     self.ui.wifiTable.setHorizontalHeaderItem(0, header1)
     self.ui.wifiTable.setHorizontalHeaderItem(1, header2)
     self.ui.wifiTable.setHorizontalHeaderItem(2, header3)
     self.ui.wifiTable.setHorizontalHeaderItem(3, header4)
     # settings for table items
     self.ui.wifiTable.setSelectionBehavior(QAbstractItemView.SelectRows)
     headers = self.ui.wifiTable.horizontalHeader()
     headers.setStretchLastSection(True)
     # set 0 rows as default
     self.ui.wifiTable.setRowCount(0)
     # connecting eject button
     self.ui.connectButton.clicked.connect(self.connect)
     self.ui.pingButton.clicked.connect(self.ping)
Example #18
0
class query_window(QtWidgets.QMainWindow):
    def __init__(self):
        QtWidgets.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.loginButton.clicked.connect(self.query_formula)
        # 给button 的 点击动作绑定一个事件处理函数
        self.ui.lineEdit_2.returnPressed.connect(self.log_returnPressed)

    def query_formula(self):
        # 此处编写具体的业务逻辑
        self.login()

    def log_returnPressed(self):
        self.login()

    def login(self):
        name = self.ui.lineEdit.text()
        passwd = self.ui.lineEdit_2.text()
        # if name == "admin" and passwd == "admin":
        if 1 == 1:
            QMessageBox.information(self, '密码正确', '点击确认进去软件')
            win_main.show()
            self.close()

        else:
            QMessageBox.critical(self, '错误', '用户名或密码错误')
Example #19
0
	def __init__(self):

		super(mywindow, self).__init__()
		print(session.evaluate('''Directory[]'''))
		self.imageQuestion = False
		self.setFixedSize(1200,700)
		self.ui = Ui_MainWindow()
		self.ui.setupUi(self)
		self.white = False
		self.textcolor = "white"
		self.bg = self.palette().window().color()
		self.cl = (self.bg.redF(),self.bg.greenF(), self.bg.blueF()) # Makes the color of the textbox the same as the app
		if self.cl[0] > 0.5 and self.cl[1] > 0.5 and self.cl[2] >0.5:
			self.white = True
			self.textcolor = "black"

		# https://stackoverflow.com/questions/41247109/pyqt-how-to-switch-widgets-in-qstackedwidget
		# We can set up button functionality here instead.
		self.ui.toMainMenu.clicked.connect(self.refreshMenu)
		# then at either point regenerate the question by running the function

		# self.whatever.clicked.connect(self.newQuestion)
		self.ui.toMainMenu_2.clicked.connect(self.refreshMenu)
		self.ui.toMainMenu_3.clicked.connect(self.refreshMenu)

		self.ui.toSettings.clicked.connect(self.refreshSettings)

		self.ui.toQuestion.clicked.connect(self.newQuestion)
		self.ui.toQuestion_2.clicked.connect(self.deleteOldQuestion)

		self.ui.toAnswer.clicked.connect(lambda : self.ui.stackedWidget.setCurrentIndex(3))
		self.ui.difficultybox.addItems(["Easy","Normal","Hard"])
		topics=session.evaluate('''Keys[questionRepo["Easy"]]''')
		self.ui.topicbox.addItems(list(topics))
Example #20
0
 def __init__(self):
     super(mywindow, self).__init__()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.ui.open_login_screen.triggered.connect(self.login_button_clicked)
     self.ui.pushButton_contract_insert.clicked.connect(
         self.contract_insert_clicked)
     self.ui.pushButton_supplier_insert.clicked.connect(
         self.supplier_insert_clicked)
     self.ui.pushButton_product_insert.clicked.connect(
         self.product_insert_clicked)
     self.ui.pushButton_supplier_update.clicked.connect(
         self.supplier_update_clicked)
     self.ui.pushButton_contract_update.clicked.connect(
         self.contract_update_clicked)
     self.ui.pushButton_product_update.clicked.connect(
         self.product_update_clicked)
     self.ui.pushButton_contract_delete.clicked.connect(
         self.contract_delete_clicked)
     self.ui.pushButton_supplier_delete.clicked.connect(
         self.supplier_delete_clicked)
     self.ui.pushButton_product_delete.clicked.connect(
         self.product_delete_clicked)
     self.ui.show_db.triggered.connect(self.show_db)
     self.ui.open_procedure_1.triggered.connect(self.proced_1)
     self.ui.pushButton_legal_insert.clicked.connect(
         self.legal_insert_clicked)
     self.ui.pushButton_private_insert.clicked.connect(
         self.private_insert_clicked)
     self.ui.pushButton_legal_delete.clicked.connect(
         self.legal_delete_clicked)
     self.ui.pushButton_private_delete.clicked.connect(
         self.private_delete_clicked)
Example #21
0
class mywindow(QMainWindow):
    def __init__(self):
        super(mywindow, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.pushButton.clicked.connect(self.formatString)
        self.ui.SortWordInLineCheckBox.clicked.connect(self.ChangeWidgetState)

    def ChangeWidgetState(self):
        self.ui.widget.setEnabled(
            bool(self.ui.SortWordInLineCheckBox.isChecked()))

    def formatString(self):
        strFmt = StringFormatter(self.ui.InputLineEdit.text())

        if self.ui.DeleteWordShortestThanCheckBox.isChecked():
            strFmt.DeleteWordsShortestThat(self.ui.spinBox.value())

        if self.ui.ExchangeSymbolsCheckBox.isChecked():
            strFmt.MaskDecimal()

        if self.ui.InsertWhitespaceCheckBox.isChecked():
            strFmt.InsertWhiteSpace()

        if self.ui.SortWordInLineCheckBox.isChecked():
            if self.ui.radioButtonSortBySize.isChecked():
                strFmt.SortWordBySize()

            if self.ui.radioButtonSortByLexicographic.isChecked():
                strFmt.SortLexycographic()

        self.ui.OutputLineEdit.setText(strFmt.getText())
    def __init__(self):
        super(ApplicationWindow, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        # Window Title
        self.setWindowTitle("Urban Remote Control")


        # Timer init  
        # calling ( readData ) every 1000 milliseconds
        self.timer = QtCore.QTimer()
        # Camera Streaming with 30 FPS (ceil(1000/30))
        self.timer.setInterval(16)
        self.timer.start()
        self.timer.timeout.connect(self.readData)

        # Socket connection ( client )
        self.context = zmq.Context()
        self.socket = self.context.socket(zmq.PAIR)
        self.socket.connect("tcp://127.0.0.1:5000")  # local host
        # self.socket.connect("tcp://192.168.214.246:8888")  # mobile hotspot

        # Push buttons commands
        self.ui.arrow_up.clicked.connect(lambda: self.sendData("w"))
        self.ui.arrow_down.clicked.connect(lambda: self.sendData("s"))
        self.ui.arrow_left.clicked.connect(lambda: self.sendData("a"))
        self.ui.arrow_right.clicked.connect(lambda: self.sendData("d"))

        # Setting Shortcuts for Pushbuttons
        self.ui.arrow_up.setShortcut(QtGui.QKeySequence(Qt.Key_Up))
        self.ui.arrow_down.setShortcut(QtGui.QKeySequence(Qt.Key_Down))
        self.ui.arrow_left.setShortcut(QtGui.QKeySequence(Qt.Key_Left))
        self.ui.arrow_right.setShortcut(QtGui.QKeySequence(Qt.Key_Right))
Example #23
0
class Login(QMainWindow):
    """Dialog."""

    def __init__(self, parent=None):
        QMainWindow.__init__(self)
        self.main_ui = Ui_MainWindow()
        self.main_ui.setupUi(self)
Example #24
0
 def __init__(self, parent=None):
     QtWidgets.QWidget.__init__(self, parent)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     #"Name": None, "GUID": None, "HardwareID": None, "Manufacture": None, "Provider": None,"Description": None, "sys file": None, "Device Path": None
     self.ui.deviceTable.setColumnCount(8)
     self.ui.deviceTable.insertRow(self.ui.deviceTable.rowCount())
     # initialize headers of table
     header1 = QTableWidgetItem("Name")
     header2 = QTableWidgetItem("GUID")
     header3 = QTableWidgetItem("HardwareID")
     header4 = QTableWidgetItem("Manufacture")
     header5 = QTableWidgetItem("Provider")
     header6 = QTableWidgetItem("Description")
     header7 = QTableWidgetItem("Sys files")
     header8 = QTableWidgetItem("Device Path")
     # set headers
     self.ui.deviceTable.setHorizontalHeaderItem(0, header1)
     self.ui.deviceTable.setHorizontalHeaderItem(1, header2)
     self.ui.deviceTable.setHorizontalHeaderItem(2, header3)
     self.ui.deviceTable.setHorizontalHeaderItem(3, header4)
     self.ui.deviceTable.setHorizontalHeaderItem(4, header5)
     self.ui.deviceTable.setHorizontalHeaderItem(5, header6)
     self.ui.deviceTable.setHorizontalHeaderItem(6, header7)
     self.ui.deviceTable.setHorizontalHeaderItem(7, header8)
     # settings for table items
     self.ui.deviceTable.setSelectionBehavior(QAbstractItemView.SelectRows)
     headers = self.ui.deviceTable.horizontalHeader()
     headers.setStretchLastSection(True)
     # set 0 rows as default
     self.ui.deviceTable.setRowCount(0)
     # connecting buttons
     self.ui.enableButton.clicked.connect(self.enableCur)
     self.ui.disableButton.clicked.connect(self.disableCur)
    def __init__(self):
        # Initialise super class which contains the UI components
        super(PEMachineLearning, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.show()
        # Create a figure on which we can plot grpahs
        self.figure = Figure()
        self.elbow_figure = Figure()
        # Create a canvas on the figure
        self.canvas = FigureCanvas(self.figure)
        self.elbow_canvas = FigureCanvas(self.elbow_figure)

        self.ui.cluster_spin_box.setMinimum(2)
        # Assign events to button clicks
        self.ui.directory_browse_button.clicked.connect(self.set_binary_path)
        self.ui.refresh_cluster.clicked.connect(self.cluster_plot)
        self.ui.refresh_silhouette.clicked.connect(self.populate_table)
        self.ui.refresh_elbow.clicked.connect(self.elbow)

        # Assign box layouts to frames which will hold the canvas and figure components
        layout = QtWidgets.QVBoxLayout(self.ui.clustering_frame)
        layout.addWidget(self.canvas)
        layout = QtWidgets.QVBoxLayout(self.ui.elbow_frame)
        layout.addWidget(self.elbow_canvas)

        # Show headers
        self.ui.silhouette_table.horizontalHeader().show()
Example #26
0
 def __init__(self):
     QtWidgets.QMainWindow.__init__(self)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.ui.loginButton.clicked.connect(self.query_formula)
     # 给button 的 点击动作绑定一个事件处理函数
     self.ui.lineEdit_2.returnPressed.connect(self.log_returnPressed)
Example #27
0
    def __init__(self):
        super(mywindow, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.textLabel = QtWidgets.QLabel(self)
        self.ui.sizeLabel = QtWidgets.QLabel(self)

        self.ui.statusbar.addPermanentWidget(self.ui.textLabel, 60)
        self.ui.statusbar.addPermanentWidget(self.ui.sizeLabel, 40)

        self.ui.textLabel.setText("text")
        self.ui.sizeLabel.setText("size")

        self.ui.ExitAction.triggered.connect(self.ExitAction)
        self.ui.OpenAction.triggered.connect(self.OpenAction)
        self.ui.ExportAction.triggered.connect(self.ExportAction)
        self.ui.AddLogAction.triggered.connect(self.AddInLogAction)
        self.ui.ViewAction.triggered.connect(self.ViewAction)

        if not os.path.exists("script18.log"):
            QMessageBox.question(
                self, "Внимание!",
                "Файл лога не найден!\nБудет создан автоматически.",
                QMessageBox.Ok, QMessageBox.Ok)

            f = open("script18.log", 'wt')
            f.close()
Example #28
0
    def __init__(self, parent=None):
        super(ControlMainWindow, self).__init__(parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.actionNew.triggered.connect(self.new)
        self.ui.actionOpen.triggered.connect(self.open)
        self.ui.actionSave.triggered.connect(self.save)

        def next_frame():
            self.change_frame(1)

        self.ui.button_next.clicked.connect(next_frame)

        def previous_frame():
            self.change_frame(-1)

        self.ui.button_previous.clicked.connect(previous_frame)

        self.tree_view_model = None
        self.ui.tree_view.clicked[QtCore.QModelIndex].connect(self.select_anim)
        self.sprite = None
        self.selected_animation = None
        self.current_frame = 0
        if ARGS.infile:
            self.load_yd(ARGS.infile.name)
Example #29
0
class Editor(QtGui.QMainWindow):

    def __init__(self):
        super(Editor, self).__init__()
        self.ui=Ui_MainWindow()
        self.ui.setupUi(self)
        self.show()
Example #30
0
 def __init__(self, title="Default", parent=None):
     super(pyPict, self).__init__(parent)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.listeMots = TxtToList("listeMots.txt")
     self.ui.Mot_Suivant.clicked.connect(self.displayWord)
     self.ui.edit_List.clicked.connect(self.openListe)
Example #31
0
    def __init__(self):
        super().__init__(parent=None)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.flines_num.valueChanged.connect(self.ui.flines.changeNum)
        self.ui.diameter.valueChanged.connect(self.ui.flines.changeDia)
        self.ui.line_width.valueChanged.connect(self.ui.flines.changeWidth)
        self.ui.rgb_r.valueChanged.connect(self.ui.flines.changeR)
        self.ui.rgb_g.valueChanged.connect(self.ui.flines.changeG)
        self.ui.rgb_b.valueChanged.connect(self.ui.flines.changeB)
        self.ui.x_rot.valueChanged.connect(self.ui.flines.RotX)
        self.ui.y_rot.valueChanged.connect(self.ui.flines.RotY)
        self.ui.z_rot.valueChanged.connect(self.ui.flines.RotZ)
        self.ui.check_coor.stateChanged.connect(self.ui.flines.showcoor)

        self.ui.model.buttonClicked.connect(self.ui.solar.changeModel)
        self.ui.showplanet.buttonClicked.connect(self.changeShow)
        self.ui.x_slolar.valueChanged.connect(self.ui.solar.changeX)
        self.ui.y_slolar.valueChanged.connect(self.ui.solar.changeY)
        self.ui.z_slolar.valueChanged.connect(self.ui.solar.changeZ)
        self.ui.showtrack.stateChanged.connect(self.ui.solar.showTrack)
        self.ui.colortrack.stateChanged.connect(self.ui.solar.colorTrack)
        self.ui.projection.buttonClicked.connect(self.ui.solar.changeProject)
        self.ui.fovy.valueChanged.connect(self.ui.solar.changeFovy)
        self.ui.stop.clicked.connect(self.play)
        self.isplay = True
        self.ui.flag.stateChanged.connect(self.ui.solar.changeFlag)

        self.ui.about.triggered.connect(self.about)
        self.ui.description.triggered.connect(self.description)
        self.ui.open.triggered.connect(self.open)
Example #32
0
class ControlMainWindow(QtGui.QMainWindow):
    def __init__(self, parent=None):
        super(ControlMainWindow, self).__init__(parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.exit_button.clicked.connect(self.CloseProgram)

    @QtCore.Slot()
    def CloseProgram(self):
        sys.exit()
Example #33
0
class ScriptRunnerMainWindow(QtGui.QMainWindow):
    """
    This class initializes the main window for Script Runner
    """

    def __init__(self):
        """
        Set up the user interface from Designer.
        """
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
Example #34
0
class MyWindowClass(QtGui.QMainWindow):
    def __init__(self, parent=None):
        QtGui.QMainWindow.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        QtCore.QObject.connect(self.ui.StartButton, QtCore.SIGNAL('clicked()'), self.doFitting)
        QtCore.QObject.connect(self.ui.fileDialog, QtCore.SIGNAL('clicked()'), self.showFileInput)
        
    

    def doFitting(self):
        #t = np.arange(1.0, 5.0, 0.01)
        #s = np.sin(2*np.pi*t)
        #self.ui.xplot.canvas.ax.plot(t, s)
        #self.ui.xplot.canvas.draw()

        filename = self.ui.fileOutput.toPlainText()
        self.ui.FitResultsSummary.setPlainText("These are fitting results")
        self.ui.ErrorMessages.setPlainText("")
        try: 
            data = file1.make_numpyarray(filename)
        except:
            self.ui.ErrorMessages.setPlainText("Something went wrong with fitting")
            return None
        fit1 = file1.fit_axis(data,0)
        report = fit_report(fit1[2])
        self.ui.FitResultsSummary.append(report)
        
        # rotating by 90 degrees on the other axis doesn't work well yet
        #t = np.arange(1.0, 5.0, 0.01)
        #s = np.sin(2*np.pi*t)
        #self.myplot = self.ui.yplot.canvas.ax.plot(t, s)
        #self.rotated = ndimage.rotate(self.myplot,90)
        #self.rotated.draw()

        self.ui.BeamDisplay.canvas.ax.pcolorfast(data)
        self.ui.BeamDisplay.canvas.draw()

    def showFileInput(self):

        fname = QtGui.QFileDialog.getOpenFileName(self, 'Open file', 
                '/home/Oleksiy/Desktop/PythonCode')
        self.ui.fileOutput.setText(fname)



    def keyPressEvent(self, e):
        
        if e.key() == QtCore.Qt.Key_Escape:
            self.close()
Example #35
0
class ClientWindow(QtGui.QMainWindow):
    Image = 'kukeliku.png'
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.firstCard.setPixmap(QtGui.QPixmap(self.Image))

        self.ui.firstCard = NewLabel(self)
        self.ui.firstCard.move(0,0)
        QtCore.QObject.connect(self.ui.firstCard, QtCore.SIGNAL("clicked()"), self.fix)

    def fix(self):
        self.ui.label.setText('Suck it')
Example #36
0
class MainWindow(QtGui.QMainWindow):
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.actionQuit.triggered.connect(QtCore.QCoreApplication.instance().quit)
        self.ui.pkgList.itemClicked.connect(self._showPackageDetail)
        self.ui.installedBtn.clicked.connect(self._showInstalled)
        self.ui.availableBtn.clicked.connect(self._showAvailable)
        self.ui.karmaWidget.hide()
        #menu = QtGui.QMenu(self)
        #menu.addAction("Description")
        #menu.addAction("Comments")
        #menu.addAction("Related packages")
        #menu.addAction("Test cases")
        #menu.activated.connect(self._showPage)
        #self.ui.moreBtn.setMenu(menu)

    def _showInstalled(self):
        self.ui.availableBtn.setChecked(False)

    def _showAvailable(self):
        self.ui.installedBtn.setChecked(False)

    def _switchView(self, n):
        if not self.ui.pkgDetailWidget.isHidden():
            if n == -10: # XXX weird values
                self.ui.karmaWidget.show()
            elif n == -11:
                self.ui.karmaWidget.hide()

    #def _showPage(self, n):
        # TODO setCurrentIndex
    #    self.ui.descPage.hide()
    #    self.ui.commentPage.hide()
    #    self.ui.relatedPkgPage.hide()
    #    self.ui.testCasePage.hide()
    #    pages = {-5:self.ui.descPage, -6:self.ui.commentPage, -7:self.ui.relatedPkgPage, -8:self.ui.testCasePage} # XXX weird values
    #    pages[n].show() # XXX KeyError

    def _showPackageDetail(self, item):
        if self.ui.installedBtn.isChecked():
            self.ui.karmaWidget.show()
        else:
            self.ui.karmaWidget.hide()

        self._setData(item)

    def _setData(self, item):
        self.ui.pkgNameLabel.setText(item.text())
Example #37
0
class Main(QtGui.QMainWindow):
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.systemInformation()
    
    def systemInformation(self):
        subprocess.call('ps -ef > processlist.txt', shell=True)

       
        with open('processlist.txt', 'r') as processList:
            lines = processList.read().split('\n')
            
            firstLine = lines[0].split()[::-1]
            
            model = QtGui.QStandardItemModel(2,3,self)
          
            increment = 0
            first = True
            for line in lines:
                
                line = line.split()
                fullCMD = ''
                size = len(line)
                incrementor = 7
                while incrementor < size:
                    fullCMD = fullCMD + ' ' + line.pop(-1)
                    incrementor = incrementor + 1
                
                line.append(fullCMD)
                
                line = line[::-1]
                
                columnIncrement = 0
                for column in line:
                    if first:
                        model.setHorizontalHeaderItem(columnIncrement, QtGui.QStandardItem(column))
                    else:
                        model.setItem(increment, columnIncrement, QtGui.QStandardItem(column))
                    
                    columnIncrement = columnIncrement + 1
                
                if first:
                    first = False
                else:
                    increment = increment + 1
 
            self.ui.tableView.setModel(model)
Example #38
0
 def __init__(self):
     """
     Set up the user interface from Designer.
     """
     QtGui.QMainWindow.__init__(self)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
Example #39
0
 def __init__(self):
     super(MainWindow, self).__init__()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.connect_signals()
     self.cont = 0
     self.title = self.windowTitle()
Example #40
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.have_auth = False
        self.have_mess = False

        ###############
        ##### set up signals/slots
        ###############

        ##### menu items

        # use the trick from http://eli.thegreenplace.net/2011/04/25/passing-extra-arguments-to-pyqt-slot
        # to use same callback for two menu items
        self.ui.actionImport_auth.triggered.connect(lambda: self.importData("auth"))
        self.ui.actionImport_messy.triggered.connect(lambda: self.importData("messy"))
        self.ui.actionRun_matching.triggered.connect(self.runMatching)
        self.ui.actionExport_CSV.triggered.connect(self.exportCSV)
        self.ui.actionPreferences.triggered.connect(self.setPreferences)
        self.ui.actionQuit.triggered.connect(QtCore.QCoreApplication.instance().quit)

        ##### GUI elements

        self.ui.match_table.currentCellChanged.connect(self.updateTopHits)
        self.ui.tophit_list.itemDoubleClicked.connect(self.clickAssign)
        self.ui.createAuthority_button.clicked.connect(self.createAuth)
        self.ui.deleteAuthority_button.clicked.connect(self.deleteMatch)

        ###### default preferences

        self.cutoffs = {"lev": 10, "damlev": 10, "jaro": 0.6, "jarowink": 0.6, "mrac": 9999}
        self.display_similarity = True
Example #41
0
    def __init__(self, args, parent=None):
        super(MainWindow, self).__init__(parent)
        self.timeoutFunction = None
        self.staticAlertMessage = ""
        self.timeoutLength = 15
     
        self.openfile = None
        self.filename = "UNKNOWN FILE"

        # Store Ui() as class variable self.ui
        self.ui = Ui()
        self.ui.setupUi(self)
        self.setWindowTitle('Qif') 

        self.ui.accountsWidget.setStatusTip("Accounts")
        self.ui.accountsWidget.setFrameShape(PySide.QtGui.QFrame.Box)
        self.ui.accountsWidget.installEventFilter(self)
        self.ui.accountsWidget.itemDoubleClicked.connect(self.doubleClickAccount)
        self.ui.accountsWidget.itemClicked.connect(self.singleClickAccount)
        #print self.ui.accountsWidget.__dict__.keys()

        self.ui.totalsAccounts.setStatusTip("Account Totals")
        self.ui.totalsAccounts.setFrameShape(PySide.QtGui.QFrame.Box)
        self.ui.totalsAccounts.installEventFilter(self)

        self.ui.categoriesWidget.setStatusTip("Spending/Saving Categories")
        self.ui.categoriesWidget.setFrameShape(PySide.QtGui.QFrame.Box)
        self.ui.categoriesWidget.installEventFilter(self)
        self.ui.categoriesWidget.itemDoubleClicked.connect(self.doubleClickCategory)
        self.ui.categoriesWidget.itemClicked.connect(self.singleClickCategory)

        self.ui.totalsCategories.setStatusTip("Category Totals")
        self.ui.totalsCategories.setFrameShape(PySide.QtGui.QFrame.Box)
        self.ui.totalsCategories.installEventFilter(self)

        self.ui.textEdit.setStatusTip("File Editor")
        self.ui.textEdit.setFrameShape(PySide.QtGui.QFrame.Box)
        self.ui.textEdit.installEventFilter(self)
        self.ui.textEdit.setAcceptRichText(False)
        
        wincol = self.palette().color(QPalette.Window); 
        self.ui.lineEdit.setStyleSheet("background-color: %s;"%wincol.name())
        self.ui.lineEdit.setStatusTip("Command Line")
        self.ui.lineEdit.installEventFilter(self)

        self.ui.centralWidget.installEventFilter(self)

        self.history = History()
        
        # read in settings to determine whether we should use single click or not.
        #self.ui.actionSingleClickToOpen.setChecked(True)
        self.ui.actionSaveFile.triggered.connect(self.saveOpenFile)

        # read in settings to determine if there's a working directory:
        root = "." # use this as a guess for root directory
        self.rootdir, self.YYYY, self.mm = getrootYYYYmm(args, root)
        self.showAll()

        self.ui.centralWidget.setFocus(QtCore.Qt.OtherFocusReason)
Example #42
0
    def __init__(self):
        super().__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.pushButton_led.clicked.connect(self.run_led_demo)
        self.ui.pushButton_buzzer.clicked.connect(self.run_buzzer_demo)
        self.ui.pushButton_move.clicked.connect(self.run_move_demo)
Example #43
0
 def __init__(self, parent=None):
     QtGui.QMainWindow.__init__(self, parent)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     QtCore.QObject.connect(self.ui.StartButton, QtCore.SIGNAL('clicked()'), self.doFitting_stream)
     QtCore.QObject.connect(self.ui.fitFromFile, QtCore.SIGNAL('clicked()'), self.doFitting_file)
     QtCore.QObject.connect(self.ui.fileDialog, QtCore.SIGNAL('clicked()'), self.showFileInput)
     QtCore.QObject.connect(self.ui.PauseButton, QtCore.SIGNAL('clicked()'), self.close)
Example #44
0
class webwindow(QtWidgets.QMainWindow):
    """
        Class that is derived from the mainWindow.ui file
        which defines the browser window.
    """
    def __init__(self, parent=None):
        """
            Web browser constructor.
            Sets the event handlers, as well as loading the UI
            from the mainWindow.ui file.
        """
        super(webwindow, self).__init__(parent)
        self.ui = Ui_MainWindow()  # define the UI
        self.ui.setupUi(self)

        homeurl = "http://www.google.com"
        self.ui.lineEdit.setText(homeurl)  # set the homepage

        #load the home page after
        self.ui.webView.setUrl(QtCore.QUrl(homeurl))

        # tell the browser we want to handle the link clicking ourselves
        self.ui.webView.page().setLinkDelegationPolicy(QtWebKitWidgets.QWebPage.DelegateAllLinks)

        # hook up the url bar to RETURN KEYPRESS and GO button
        self.ui.pushButton.clicked.connect(self.change_page)
        self.ui.lineEdit.returnPressed.connect(self.change_page)
        self.ui.webView.linkClicked.connect(self.clicked_link)

    def change_page(self):
        """
            Change page event handler (what happens when the html page changes)
        """
        url = self.ui.lineEdit.text()
        print(url)
        self.ui.webView.setUrl(QtCore.QUrl(url))

    def clicked_link(self, url):
        """
            Overrides the original clickedlink handler
        """
        self.ui.webView.setUrl(QtCore.QUrl(url))
        self.ui.lineEdit.clear()
        self.ui.lineEdit.insert(url.toString())
        self.ui.lineEdit.home(False)
Example #45
0
 def __init__(self, parent=None):
     super(MainWindow, self).__init__(parent)
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.ui.actionQuit.triggered.connect(QtCore.QCoreApplication.instance().quit)
     self.ui.pkgList.itemClicked.connect(self._showPackageDetail)
     self.ui.installedBtn.clicked.connect(self._showInstalled)
     self.ui.availableBtn.clicked.connect(self._showAvailable)
     self.ui.karmaWidget.hide()
Example #46
0
    def __init__(self):

        super(MainWindow, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.set_listeners()
        self.load_animals()
        self.load_types()
        self.create_folder()
Example #47
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.firstCard.setPixmap(QtGui.QPixmap(self.Image))

        self.ui.firstCard = NewLabel(self)
        self.ui.firstCard.move(0,0)
        QtCore.QObject.connect(self.ui.firstCard, QtCore.SIGNAL("clicked()"), self.fix)
Example #48
0
	def __init__(self):
		super(MainWidget, self).__init__()
		self.ui = Ui_MainWindow()
		self.ui.setupUi(self)
		self.initialize()
		self.controller = Controller(self)
		self.event_connect()
		self.tab_list = ['Manga', 'Image']
		self.current_tab = self.tab_list[0]
		self.button_mapper = {}
Example #49
0
	def __init__(self, application, parent=None):
		super(MainWindow, self).__init__(parent)
		self.app = application
		self.ui = Ui_MainWindow()
		self.ui.setupUi(self)
		
		self.ui.openButton.clicked.connect(self.open_file)
		self.ui.incGainBtn.clicked.connect(self.increase_gain)
		self.ui.decGainBtn.clicked.connect(self.decrease_gain)
		self.ui.copyButton.clicked.connect(self.copy_selections)
Example #50
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)

        # Load UI
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self._connect_signals_to_slots()

        # Initialize attributes
        self.open_repos = {}
Example #51
0
    def __init__(self, peaks, *args):
        self.peaks = peaks

        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.findPeakButton.clicked.connect(self.findPeaksCallback)
        self.ui.fileButton.clicked.connect(self.loadFileCallback)
        self.ui.saveButton.clicked.connect(self.savePeaksCallback)
class QTTest(QMainWindow): 
	def __init__(self,pandaCallback): 
		QMainWindow.__init__(self)
		self.ui = Ui_MainWindow()
		self.ui.setupUi(self)
		
		#fills widget with found models on dataset folder
		self.fillPool()
		
		self.setWidgetEvents()
		
		# this basically creates an idle task
		self.timer = QTimer(self)
		self.connect( self.timer, SIGNAL("timeout()"), pandaCallback )
		self.timer.start(0)
		
		self.tp = TerrainPool(self.ui.terrainPool, self.ui.createTerrainButton, self.ui.modifyTerrainButton)
		
		self.ui.actionPPL.triggered.connect(myEventHandler.togglePerPixelLighting)
		self.ui.actionAmbientOcclusion.triggered.connect(myEventHandler.toggleAmbientOcclusion)
		self.ui.actionToonShading.triggered.connect(myEventHandler.toggleToonShading)
		
	def setWidgetEvents(self):
		self.ui.eggPool.itemDoubleClicked.connect(self.sendNewModel)
		self.ui.treeWidget.itemDoubleClicked.connect(self.toolTriggered)
	
	'''
	gui requests will be broadcasted
	'''
	def toolTriggered(self, item, column):
		print "broadcasting: ", item.text(0)
		messenger.send(item.text(0).__str__())
	
	def fillPool(self):
		self.ui.eggPool.clear()
		files = Utilities.getFilesIn("dataset")
		for e in files:
			self.ui.eggPool.addItem(e)
	
	def sendNewModel(self,item):
		filepath = str(item.text())  #casting due to compatibility issues
		messenger.send("addobject", [filepath])
Example #53
0
    def __init__(self):
        super(demoBoard, self).__init__()

        #set up the user interface from designer
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        
        self.ui.getTemp.clicked.connect(self.getTemperature)
        self.ui.getPre.clicked.connect(self.getPressure)
        self.ui.displayText.clicked.connect(self.displayText)
        self.ui.setCfg.clicked.connect(self.setConfiguration)
Example #54
0
class MyMainWindow(QtGui.QMainWindow):
    def __init__(self):
        super().__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.ui.pushButton_led.clicked.connect(self.run_led_demo)
        self.ui.pushButton_buzzer.clicked.connect(self.run_buzzer_demo)
        self.ui.pushButton_move.clicked.connect(self.run_move_demo)

    def run_led_demo(self):
        dialog = led_demo.LedDemo(self.ui.lineEdit_serialId.text())
        dialog.exec()

    def run_buzzer_demo(self):
        dialog = buzzer_demo.BuzzerDemo(self.ui.lineEdit_serialId.text())
        dialog.exec()

    def run_move_demo(self):
        dialog = move_demo.MoveDemo(self.ui.lineEdit_serialId.text())
        dialog.exec()
Example #55
0
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.actionOpen.triggered.connect(self.openComicFile)
        #self.ui.actionZoom_In.triggered.connect(self.zoomIn)
        #self.ui.actionZoom_Out.triggered.connect(self.zoomOut)
        #self.ui.actionFit_to_Window.triggered.connect(self.fitToWindow)
        self.ui.actionFull_Screen.triggered.connect(self.fullScreen)
        self.ui.pagesList.currentItemChanged.connect(self.displayPage)

        self.openComicFile()
class ScriptRunnerMainWindow(QtGui.QMainWindow):
    """
    This class initializes the main window for Script Runner
    """

    def __init__(self):
        """
        Set up the user interface from Designer.
        """
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.settings = QtCore.QSettings()

    def closeEvent(self, event):
        self.settings.setValue("ScriptRunner/geometry", self.saveGeometry())
        #settings.setValue("ScriptRunner/window_state", self.saveState())
        #self.closeEvent(event)

    def moveEvent(self, event):
        self.settings.setValue("ScriptRunner/geometry", self.saveGeometry())
Example #57
0
    def __init__(self):
    #Sets up the UI
        super(Main, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.load_products_by_search()
        self.load_brands()
        self.load_products()
        self.set_listeners()
        self.bar()
        self.show()
	print("durr")
Example #58
0
      def __init__(self, parent=None):
            QtGui.QWidget.__init__(self, parent)
            self.ui = Ui_MainWindow()
            self.ui.setupUi(self)

            self.thread = QtranslateThread()
            self.thread.processDone.connect(self.showTranslatedText)
            self.thread.isTranslating.connect(self.setStatus)


            QtCore.QObject.connect(self.ui.actionTranslate, QtCore.SIGNAL("activated()"), self.Translate)
            QtCore.QObject.connect(self.ui.actionAbout, QtCore.SIGNAL("activated()"), self.About)
Example #59
0
    def __init__(self, repo, options, parent=None):
        QtGui.QMainWindow.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.repo = repo
        self.options = options

        self.createConfigurationWidget()
        self.createLayout()

        # initialize stuff
        self.splitChanged(split_list.index(self.options.split))  # fetch + redraw