def __init__(self, parent=None): # Constructor of the class. super(UApp, self).__init__(parent) # Initialization of the class. UTools.__init__(self) # Initialization of the class # print(self.us1) # with functions and string. self.frame1 = UFrame(self.twid3) # Create the first frame with self.frame1.setLineWidth(3) # parent as third widget. self.frame1.setFrameStyle(6) # Styled panel frame style. self.text_edit = UTextEd(self.frame1) # Text Edit field with self.layfr1 = QtWidgets.QGridLayout() # parent - the first frame. self.layfr1.addWidget(self.text_edit, 0, 0, 1, 1) self.frame1.setLayout(self.layfr1) # Layout for this field. self.frame2 = UFrame(self.twid3) # Second frame with parent. self.frame2.setLineWidth(3) # Sets line width of the frame self.frame2.setFrameStyle(0) # and 0 - style NoFrame. self.frame2.setMaximumWidth(int(self.width() / 3)) self.label1 = ULabel(self.frame2) # Label will be in the second self.label1.setText("User Information") self.label1.setAlignment(QtCore.Qt.AlignCenter) self.line_ed1 = ULineEd(self.frame2) # First line edit. self.line_ed1.setPlaceholderText("Full Name...") self.line_ed2 = ULineEd(self.frame2) # Second for user email. self.line_ed2.setPlaceholderText("Email...") self.line_ed3 = ULineEd(self.frame2) # Third field for input passw. self.line_ed3.setPlaceholderText("Password...") self.line_ed3.setEchoMode(QtWidgets.QLineEdit.Password) self.layfr2 = QtWidgets.QGridLayout() # Adding to the layout. self.layfr2.addWidget(self.label1, 0, 0, 1, 1) self.layfr2.addWidget(self.line_ed1, 1, 0, 1, 1) self.layfr2.addWidget(self.line_ed2, 2, 0, 1, 1) self.layfr2.addWidget(self.line_ed3, 3, 0, 1, 1) self.frame2.setLayout(self.layfr2) # Sets layout to the frame. self.lay1 = QtWidgets.QGridLayout() # Layout for third widget. self.lay1.addWidget(self.frame1, 0, 0, 1, 1) self.lay1.addWidget(self.frame2, 0, 1, 1, 1) self.twid3.setLayout(self.lay1) # Will be represented by grid.
def __init__(self, parent=None): # Constructor of the class. super(UApp, self).__init__(parent) # Initialization of the class. UTools.__init__(self) # Initialization of the tools # print self.us1 # class with functions. self.frame1 = UFrame(self.twid3) # Create the first frame with self.frame1.setLineWidth(3) # parent as third widget. self.frame1.setFrameStyle(6) # Styled panel frame style. self.table = UTabView(self.frame1) # Creation of the table with self.table.setVisible(False) # parent as frame 1 and gets model = UTModel() # data from the model. self.table.setModel(model) # Set model data to the table. self.text_edit = UTextEd(self.frame1) # Text Edit field with self.layfr1 = QtWidgets.QGridLayout() # parent - the first frame. self.layfr1.addWidget(self.table, 0, 0, 1, 1) self.layfr1.addWidget(self.text_edit, 0, 0, 1, 1) self.layfr1.setContentsMargins(0, 0, 0, 0) self.frame1.setLayout(self.layfr1) # layout for this field. self.frame2 = UFrame(self.twid3) # Second frame with parent. self.frame2.setLineWidth(3) # Sets line width of the frame self.frame2.setFrameStyle(0) # and 0 - style No frame. self.frame2.setMaximumWidth(int(self.width()/3)) self.label1 = ULabel(self.frame2) # Label in the second frame. self.label1.setText("User Information") self.label1.setAlignment(QtCore.Qt.AlignCenter) self.combox1 = UComBox(self.frame2) # Adding the combo box. self.combox1.addItems(["Texts", "Table"]) self.combox1.setView(UListV()) # Combo box popup view. self.line_ed1 = ULineEd(self.frame2) # First line edit field. self.line_ed1.setPlaceholderText("Full Name...") self.line_ed2 = ULineEd(self.frame2) # Second that for user email. self.line_ed2.setPlaceholderText("Email...") self.line_ed3 = ULineEd(self.frame2) # Third field for input passw. self.line_ed3.setPlaceholderText("Password...") self.line_ed3.setEchoMode(QtWidgets.QLineEdit.Password) self.push_but1 = UBut1(self.frame2) # Adding the button with text. self.push_but1.setText("Ok") # Adding progress bar with self.progress1 = UProgress(self.frame2) self.progress1.setRange(0, 0) # range (indeterminate mode). self.layfr2_1 = QtWidgets.QGridLayout() self.layfr2_1.addWidget(self.push_but1, 0, 1, 1, 1) self.layfr2_1.addWidget(self.progress1, 1, 0, 1, 2) self.layfr2_1.setSpacing(3) # Spacing for layout - 3 pix. self.layfr2 = QtWidgets.QGridLayout() # Layout for second frame. self.layfr2.addWidget(self.combox1, 0, 0, 1, 1) self.layfr2.addWidget(self.label1, 1, 0, 1, 1) self.layfr2.addWidget(self.line_ed1, 2, 0, 1, 1) self.layfr2.addWidget(self.line_ed2, 3, 0, 1, 1) self.layfr2.addWidget(self.line_ed3, 4, 0, 1, 1) self.layfr2.addLayout(self.layfr2_1, 5, 0, 1, 1) self.layfr2.setSpacing(3) # Sets spacing - 3 pixels. self.layfr2.setContentsMargins(3, 3, 3, 3) self.frame2.setLayout(self.layfr2) # Layout added to frame. self.lay1 = QtWidgets.QGridLayout() # Layout for third widget. self.lay1.addWidget(self.frame1, 0, 0, 1, 1) self.lay1.addWidget(self.frame2, 0, 1, 1, 1) self.twid3.setLayout(self.lay1) # Set layout to the widget. self.mb1.triggered.connect(self.files) self.mb3.triggered.connect(self.options) self.combox1.activated.connect(self.txt_table) self.print_device = QtPrintSupport.QPrinter()
def __init__(self, parent=None): # Constructor of the class. super(UApp, self).__init__(parent) # Initialization of the class. UTools.__init__(self) # Initialization of the tools # print self.us1 # class with functions. self.frame1 = UFrame(self.twid3) # Create the first frame with self.frame1.setLineWidth(3) # parent as third widget. self.frame1.setFrameStyle(6) # Styled panel frame style. self.table = UTabView(self.frame1) # Creation of the table with self.table.setVisible(False) # parent as frame 1 and gets model = UTModel() # data from the model. self.table.setModel(model) # Set model data to the table. self.text_edit = UTextEd(self.frame1) # Text Edit field with self.layfr1 = QtWidgets.QGridLayout() # parent - the first frame. self.layfr1.addWidget(self.table, 0, 0, 1, 1) self.layfr1.addWidget(self.text_edit, 0, 0, 1, 1) self.frame1.setLayout(self.layfr1) # Layout for this field. self.frame2 = UFrame(self.twid3) # Second frame with parent. self.frame2.setLineWidth(3) # Sets line width of the frame self.frame2.setFrameStyle(0) # and 0 - style NoFrame. self.frame2.setMaximumWidth(int(self.width() / 3)) self.label1 = ULabel(self.frame2) # Label in the second frame. self.label1.setText("User Information") self.label1.setAlignment(QtCore.Qt.AlignCenter) self.combox1 = UComBox(self.frame2) # Adding the combo box. self.combox1.addItems(["Texts", "Table"]) self.combox1.setView(UListV()) # Sets combo box popup view. self.line_ed1 = ULineEd(self.frame2) # First line edit. self.line_ed1.setPlaceholderText("Full Name...") self.line_ed2 = ULineEd(self.frame2) # Second that for user email. self.line_ed2.setPlaceholderText("Email...") self.line_ed3 = ULineEd(self.frame2) # Third field for password. self.line_ed3.setPlaceholderText("Password...") self.line_ed3.setEchoMode(QtWidgets.QLineEdit.Password) self.layfr2 = QtWidgets.QGridLayout() # Layout for second frame. self.layfr2.addWidget(self.combox1, 0, 0, 1, 1) self.layfr2.addWidget(self.label1, 1, 0, 1, 1) self.layfr2.addWidget(self.line_ed1, 2, 0, 1, 1) self.layfr2.addWidget(self.line_ed2, 3, 0, 1, 1) self.layfr2.addWidget(self.line_ed3, 4, 0, 1, 1) self.frame2.setLayout(self.layfr2) # Set layout to second frame. self.lay1 = QtWidgets.QGridLayout() # Layout for the third widget. self.lay1.addWidget(self.frame1, 0, 0, 1, 1) self.lay1.addWidget(self.frame2, 0, 1, 1, 1) self.twid3.setLayout(self.lay1) # Layout represented by grid. self.combox1.activated.connect(self.txt_table)
def __init__(self, parent=None): # Constructor of the class. super(UApp, self).__init__(parent) # Initialization of the class. UTools.__init__(self) # Initialization of the tools # print(self.us1) # class with functions. self.apps = QtQuickWidgets.QQuickWidget(self.twid1) self.apps.setSource(QtCore.QUrl("apps.qml")) self.properties = self.apps.rootObject() self.gscene = QtWidgets.QGraphicsScene() self.gview = UGraphView(self.twid2) # Adding of the graphics view self.painter = QtGui.QPainter() # to the tab widget, adding self.gvlay = QtWidgets.QGridLayout() # scene and painter that can self.gvlay.addWidget(self.gview, 0, 0, 1, 1) self.gvlay.setContentsMargins(0, 0, 0, 0) self.twid2.setLayout(self.gvlay) # used, arrange with grid. self.frame1 = UFrame(self.twid3) # Create the first frame with self.frame1.setLineWidth(3) # parent as third widget. self.frame1.setFrameStyle(6) # Styled panel frame style. self.table = UTabView(self.frame1) # Creation of the table with self.table.setVisible(False) # parent as frame 1 and gets model = UTModel() # data from the model. self.table.setModel(model) # Set model data to the table. self.text_edit = UTextEd(self.frame1) # Text Edit field with self.layfr1 = QtWidgets.QGridLayout() # parent - the first frame. self.layfr1.addWidget(self.table, 0, 0, 1, 1) self.layfr1.addWidget(self.text_edit, 0, 0, 1, 1) self.layfr1.setContentsMargins(0, 0, 0, 0) self.frame1.setLayout(self.layfr1) # Layout for this field. self.frame2 = UFrame(self.twid3) # Second Frame with parent. self.frame2.setLineWidth(3) # Sets line width of the frame self.frame2.setFrameStyle(0) # and 0 - style No frame. self.frame2.setMaximumWidth(int(self.width() / 3)) self.label1 = ULabel(self.frame2) # Label for the second frame. self.label1.setText("User Information") self.label1.setAlignment(QtCore.Qt.AlignCenter) self.combox1 = UComBox(self.frame2) # Add the combobox with items. self.combox1.addItems(["Texts", "Table"]) self.combox1.setView(UListV()) # Combo popup list view. self.line_ed1 = ULineEd(self.frame2) # Line edit with placeholder. self.line_ed1.setPlaceholderText("Full Name...") self.line_ed2 = ULineEd(self.frame2) # Second will for user email. self.line_ed2.setPlaceholderText("Email...") self.line_ed3 = ULineEd(self.frame2) # Third field for password, self.line_ed3.setPlaceholderText("Password...") self.line_ed3.setEchoMode(QtWidgets.QLineEdit.Password) self.push_but1 = UBut1(self.frame2) # Adding button with text self.push_but1.setText("Save") # for saving operations. self.push_but2 = UBut1(self.frame2) # Adding button with text self.push_but2.setText("Ok") # for other operations. self.progress1 = UProgress(self.frame2) self.progress1.setRange(0, 0) # Progress bar with range. self.layfr2_1 = QtWidgets.QGridLayout() self.layfr2_1.addWidget(self.push_but1, 0, 0, 1, 1) self.layfr2_1.addWidget(self.push_but2, 0, 1, 1, 1) self.layfr2_1.addWidget(self.progress1, 1, 0, 1, 2) self.layfr2_1.setSpacing(3) # Widgets spacing for layout. self.layfr2 = QtWidgets.QGridLayout() # Second frame`s layout. self.layfr2.addWidget(self.combox1, 0, 0, 1, 1) self.layfr2.addWidget(self.label1, 1, 0, 1, 1) self.layfr2.addWidget(self.line_ed1, 2, 0, 1, 1) self.layfr2.addWidget(self.line_ed2, 3, 0, 1, 1) self.layfr2.addWidget(self.line_ed3, 4, 0, 1, 1) self.layfr2.addLayout(self.layfr2_1, 5, 0, 1, 1) self.layfr2.setSpacing(3) # Spacing between widgets. self.layfr2.setContentsMargins(3, 3, 3, 3) self.frame2.setLayout(self.layfr2) # Set layout to second frame. self.lay1 = QtWidgets.QGridLayout() # Layout for the third tabwid. self.lay1.addWidget(self.frame1, 0, 0, 1, 1) self.lay1.addWidget(self.frame2, 0, 1, 1, 1) self.twid3.setLayout(self.lay1) # Adding frames to tab widget. self.mb1.triggered.connect(self.files) self.mb2.triggered.connect(self.edit) # Calling files, edit, data, self.mb2_1.triggered.connect(self.edit_align) self.mb3.triggered.connect(self.data) # optins, and help function. self.mb4.triggered.connect(self.options) self.mb5.triggered.connect(self.on_help) self.qmlbut1 = self.properties.childItems()[0].childItems()[0] self.qmlbut1.clicked.connect(self.video_camera) self.qmlbut2 = self.properties.childItems()[0].childItems()[1] self.qmlbut2.clicked.connect(self.qml_apps) self.qmlbut3 = self.properties.childItems()[0].childItems()[2] self.qmlbut3.clicked.connect(self.jupyter) self.qmlbut4 = self.properties.childItems()[0].childItems()[3] self.qmlbut4.clicked.connect(self.web_browse) self.combox1.activated.connect(self.txt_table) self.push_but1.clicked.connect(self.save_data) self.push_but2.clicked.connect(self.vis) self.print_device = QtPrintSupport.QPrinter() self.actx = "" # Empty string for actions. self.qapp1 = 0 # Value for the qml button 1. self.qapp2 = 0 # Value for the qml button 2. self.qapp3 = 0 # Value for the qml button 3. self.qapp4 = 0 # Value for the qml button 4. self.pool = QtCore.QThreadPool()
def __init__(self, parent=None): # Constructor of the class. super(UApp, self).__init__(parent) # Initialization of the class. UTools.__init__(self) # Initialization of the print self.us1 # class with functions.
def __init__(self, parent=None): # Constructor of the class. super(UApp, self).__init__(parent) # Initialization of the class. UTools.__init__(self) # Initialization of the
def __init__(self): # Constructor of the class. UTools.__init__(self) # Call the UTools constructor. self.uaps1 = "I am a coder, and I do"
def __init__(self, parent=None): # Constructor of the class. super(UApp, self).__init__(parent) # Initialization of the class. UTools.__init__(self) # Initialization of the tools # print(self.us1) # class with functions. self.apps = QtQuickWidgets.QQuickWidget(self.twid1) self.apps.setSource(QtCore.QUrl("apps.qml")) self.properties = self.apps.rootObject() self.frame1 = UFrame(self.twid3) # Create the first frame with self.frame1.setLineWidth(3) # parent as third widget. self.frame1.setFrameStyle(6) # Styled panel frame style. self.table = UTabView(self.frame1) # Creation of the table with self.table.setVisible(False) # parent as frame 1 and gets model = UTModel() # data from the model. self.table.setModel(model) # Set model data to the table. self.text_edit = UTextEd(self.frame1) # Text Edit field with self.layfr1 = QtWidgets.QGridLayout() # parent - the first frame. self.layfr1.addWidget(self.table, 0, 0, 1, 1) self.layfr1.addWidget(self.text_edit, 0, 0, 1, 1) self.layfr1.setContentsMargins(0, 0, 0, 0) self.frame1.setLayout(self.layfr1) # layout for this field. self.frame2 = UFrame(self.twid3) # Second frame with parent. self.frame2.setLineWidth(3) # Sets line width of the frame self.frame2.setFrameStyle(0) # and 0 - style No frame. self.frame2.setMaximumWidth(int(self.width() / 3)) self.label1 = ULabel(self.frame2) # Label in the second frame. self.label1.setText("User Information") self.label1.setAlignment(QtCore.Qt.AlignCenter) self.combox1 = UComBox(self.frame2) # Adding the combo box. self.combox1.addItems(["Texts", "Table"]) self.combox1.setView(UListV()) # Combo box popup view. self.line_ed1 = ULineEd(self.frame2) # First line edit field. self.line_ed1.setPlaceholderText("Full Name...") self.line_ed2 = ULineEd(self.frame2) # Second that for user email. self.line_ed2.setPlaceholderText("Email...") self.line_ed3 = ULineEd(self.frame2) # Third field for input passw. self.line_ed3.setPlaceholderText("Password...") self.line_ed3.setEchoMode(QtWidgets.QLineEdit.Password) self.push_but1 = UBut1(self.frame2) # Adding the button with text self.push_but1.setText("Save") # For saving operations. self.push_but2 = UBut1(self.frame2) # Adding of the second button. self.push_but2.setText("Ok") # Adding progress bar with self.progress1 = UProgress(self.frame2) self.progress1.setRange(0, 0) # range (indeterminate mode). self.layfr2_1 = QtWidgets.QGridLayout() self.layfr2_1.addWidget(self.push_but1, 0, 0, 1, 1) self.layfr2_1.addWidget(self.push_but2, 0, 1, 1, 1) self.layfr2_1.addWidget(self.progress1, 1, 0, 1, 2) self.layfr2_1.setSpacing(3) # Spacing for layout - 3 pix. self.layfr2 = QtWidgets.QGridLayout() # Layout for second frame. self.layfr2.addWidget(self.combox1, 0, 0, 1, 1) self.layfr2.addWidget(self.label1, 1, 0, 1, 1) self.layfr2.addWidget(self.line_ed1, 2, 0, 1, 1) self.layfr2.addWidget(self.line_ed2, 3, 0, 1, 1) self.layfr2.addWidget(self.line_ed3, 4, 0, 1, 1) self.layfr2.addLayout(self.layfr2_1, 5, 0, 1, 1) self.layfr2.setSpacing(3) # Sets spacing - 3 pixels. self.layfr2.setContentsMargins(3, 3, 3, 3) self.frame2.setLayout(self.layfr2) # Layout added to frame. self.lay1 = QtWidgets.QGridLayout() # Layout for third widget. self.lay1.addWidget(self.frame1, 0, 0, 1, 1) self.lay1.addWidget(self.frame2, 0, 1, 1, 1) self.twid3.setLayout(self.lay1) # Set layout to the widget. self.mb1.triggered.connect(self.files) self.mb3.triggered.connect(self.data) # Connects to the data func. self.mb4.triggered.connect(self.options) self.qmlbut1 = self.properties.childItems()[0].childItems()[0] self.qmlbut1.clicked.connect(self.video_camera) self.qmlbut2 = self.properties.childItems()[0].childItems()[1] self.qmlbut2.clicked.connect(self.qml_apps) self.qmlbut3 = self.properties.childItems()[0].childItems()[2] self.qmlbut3.clicked.connect(self.jupyter) self.qmlbut4 = self.properties.childItems()[0].childItems()[3] self.qmlbut4.clicked.connect(self.web_browse) self.combox1.activated.connect(self.txt_table) self.push_but1.clicked.connect(self.save_data) self.push_but2.clicked.connect(self.long_loop) self.print_device = QtPrintSupport.QPrinter() self.actx = "" # Empty string for actions. self.qapp1 = 0 # Value for the qml button 1. self.qapp2 = 0 # Value for the qml button 2. self.qapp3 = 0 # Value for the qml button 3. self.qapp4 = 0 # Value for the qml button 4.
def __init__(self, parent=None): # Constructor of the class. QtWidgets.QWidget.__init__(self, parent) UTools.__init__(self) # Initialization of the UTools. self.start_qml() # Run the function start_qml.