Example #1
0
    def init_tabs(self):
        open_gl = PyQtOpenGL(
            parent=self.ui.frame_gl
        )  # create class instance, passing in the tab as parent
        open_gl.setMinimumSize(
            300, 300)  # keep proportions, set to same size as frame
        open_gl.paint_0 = False
        open_gl.paint_1 = False
        open_gl.paint_2 = False
        open_gl.resize_lines = False
        open_gl.paint_rotation = False

        #--------------------------
        self.ui.comboBox.hide()
        self.drop_combo = DragDropCombo(self.MainWindow)
        self.drop_combo.setMinimumSize(QtCore.QSize(141, 0))
        self.ui.horizontalLayout_2.addWidget(self.drop_combo)

        #--------------------------
        self.ui.pushButton.hide()
        #         self.ui.pushButton.setParent(None)  # deleting parent deletes the button
        self.drop_button = DragDropButton('DropButton', self.MainWindow)
        self.drop_button.setMinimumSize(QtCore.QSize(161, 0))
        self.ui.horizontalLayout_2.addWidget(self.drop_button)

        #--------------------------
        self.update_tree()
        self.update_calendar()
        self.update_progressbar()
Example #2
0
    def init_tabs(self):

        #--------------------------
        self.ui.button_stop_animation.clicked.connect(self.stop_animation)
        self.ui.button_start_animation.clicked.connect(self.animate)

        self.ui.toolButton.hide()
        #         self.toolButton = QtWidgets.QToolButton(self.tab_animation)
        #         self.move_toolbutton.setObjectName("toolButton")
        self.move_toolbutton = MoveToolButton(self.ui.tab_animation)
        self.move_toolbutton.setGeometry(QtCore.QRect(330, 20, 25, 19))
        self.move_toolbutton.setAutoFillBackground(True)
        self.move_toolbutton.setText("***")

        #--------------------------
        #         self.create_DB()
        self.ui.button_SQL_view_data.clicked.connect(self.print_data)
        self.model = None
        self.ui.button_SQL_view_data.clicked.connect(self.sql_tableview_model)
        self.ui.button_SQL_add.clicked.connect(self.sql_add_row)
        self.ui.button_SQL_delete.clicked.connect(self.sql_delete_row)

        #--------------------------
        self.ui.button_start_server.clicked.connect(self.start_server)
        # Signals and slots for clients
        self.ui.button_client_1.clicked.connect(self.connect_to_server_1)
        self.ui.lineEdit_client_1.returnPressed.connect(self.send_data_1)
        self.ui.button_client_2.clicked.connect(self.connect_to_server_2)
        self.ui.lineEdit_client_2.returnPressed.connect(self.send_data_2)

        #--------------------------
        open_gl = PyQtOpenGL(
            parent=self.ui.frame_gl
        )  # create class instance, passing in the tab as parent
        open_gl.setMinimumSize(
            300, 300)  # keep proportions, set to same size as frame
        open_gl.paint_0 = False
        open_gl.paint_1 = False
        open_gl.paint_2 = False
        open_gl.resize_lines = False
        open_gl.paint_rotation = False

        #--------------------------
        self.ui.comboBox.hide()
        self.drop_combo = DragDropCombo(self.MainWindow)
        self.drop_combo.setMinimumSize(QtCore.QSize(141, 0))
        self.ui.horizontalLayout_2.addWidget(self.drop_combo)

        #--------------------------
        self.ui.pushButton.hide()
        #         self.ui.pushButton.setParent(None)  # deleting parent deletes the button
        self.drop_button = DragDropButton('DropButton', self.MainWindow)
        self.drop_button.setMinimumSize(QtCore.QSize(161, 0))
        self.ui.horizontalLayout_2.addWidget(self.drop_button)

        #--------------------------
        self.update_tree()
        self.update_calendar()
        self.update_progressbar()
    def __init__(self):
        app = QtWidgets.QApplication(sys.argv)
        
        MainWindow = QtWidgets.QMainWindow()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(MainWindow)   
        #-------------------------- 
        
        open_gl = PyQtOpenGL(parent=self.ui.frame_gl)   # create class instance, passing in the tab as parent
        open_gl.setMinimumSize(300, 300)                # keep proportions, set to same size as frame

        open_gl.paint_0 = True
        open_gl.paint_1 = True
        open_gl.paint_2 = True
        open_gl.resize_lines = True 
#         open_gl.resize_lines = False
        
        open_gl.paint_rotation = True
#         open_gl.paint_rotation = False
       
        
        #-------------------------- 
        self.ui.comboBox.hide()
        self.drop_combo = DragDropCombo(MainWindow)
        self.drop_combo.setMinimumSize(QtCore.QSize(141, 0))
        self.ui.horizontalLayout_2.addWidget(self.drop_combo)
        
        #--------------------------
        self.ui.pushButton.hide()
#         self.ui.pushButton.setParent(None)  # deleting parent deletes the button        
        self.drop_button = DragDropButton('DropButton', MainWindow)
        self.drop_button.setMinimumSize(QtCore.QSize(161, 0))
        self.ui.horizontalLayout_2.addWidget(self.drop_button)

        #--------------------------
        self.update_tree()
        self.update_calendar()
        self.update_progressbar()
                    
        MainWindow.show()
        sys.exit(app.exec_())        
    def init_tabs(self):

        #--------------------------
        self.ui.button_start_server.clicked.connect(self.start_server)
        # Signals and slots for clients
        self.ui.button_client_1.clicked.connect(self.connect_to_server_1)
        self.ui.lineEdit_client_1.returnPressed.connect(self.send_data_1)
        self.ui.button_client_2.clicked.connect(self.connect_to_server_2)
        self.ui.lineEdit_client_2.returnPressed.connect(self.send_data_2)

        #--------------------------
        open_gl = PyQtOpenGL(
            parent=self.ui.frame_gl
        )  # create class instance, passing in the tab as parent
        open_gl.setMinimumSize(
            300, 300)  # keep proportions, set to same size as frame
        open_gl.paint_0 = False
        open_gl.paint_1 = False
        open_gl.paint_2 = False
        open_gl.resize_lines = False
        open_gl.paint_rotation = False

        #--------------------------
        self.ui.comboBox.hide()
        self.drop_combo = DragDropCombo(self.MainWindow)
        self.drop_combo.setMinimumSize(QtCore.QSize(141, 0))
        self.ui.horizontalLayout_2.addWidget(self.drop_combo)

        #--------------------------
        self.ui.pushButton.hide()
        #         self.ui.pushButton.setParent(None)  # deleting parent deletes the button
        self.drop_button = DragDropButton('DropButton', self.MainWindow)
        self.drop_button.setMinimumSize(QtCore.QSize(161, 0))
        self.ui.horizontalLayout_2.addWidget(self.drop_button)

        #--------------------------
        self.update_tree()
        self.update_calendar()
        self.update_progressbar()