Ejemplo n.º 1
0
    def __init__(self):
        super(QuickSetTime, self).__init__()
        self.dt_box = QtWidgets.QDateTimeEdit()
        font = QtGui.QFont()
        font.setPointSize(15)
        # self.dt_box.setFont(font) #fixme: 字体太大了
        self.dt_box.setAlignment(QtCore.Qt.AlignCenter)

        dt_sec_hbox = QtWidgets.QHBoxLayout()
        self.dt_sec_l = QtWidgets.QLabel()
        self.dt_sec_l.setText('秒数')
        self.dt_sec_box = QtWidgets.QLineEdit()
        self.dt_sec_b = QtWidgets.QPushButton()
        self.dt_sec_b.setMaximumWidth(50)
        self.dt_sec_b.setText('转换')
        dt_sec_hbox.addWidget(self.dt_sec_l)
        dt_sec_hbox.addWidget(self.dt_sec_box)
        dt_sec_hbox.addWidget(self.dt_sec_b)

        self.read_dt_b = QtWidgets.QPushButton()
        self.read_dt_b.setText('读取')
        self.set_dt_b = QtWidgets.QPushButton()
        self.set_dt_b.setText('设置')
        self.set_current_dt_b = QtWidgets.QPushButton()
        self.set_current_dt_b.setText('设置当前时间')

        hbox = QtWidgets.QHBoxLayout()
        hbox.addWidget(self.read_dt_b)
        hbox.addWidget(self.set_dt_b)
        vbox = QtWidgets.QVBoxLayout(self)
        vbox.addWidget(self.dt_box)
        vbox.addLayout(dt_sec_hbox)
        vbox.addLayout(hbox)
        vbox.addWidget(self.set_current_dt_b)
        vbox.addStretch(1)
Ejemplo n.º 2
0
    def createBottomRightGroupBox(self):
        self.bottomRightGroupBox = QtWidgets.QGroupBox("Group 3")
        self.bottomRightGroupBox.setCheckable(True)
        self.bottomRightGroupBox.setChecked(True)

        lineEdit = QtWidgets.QLineEdit('s3cRe7')
        lineEdit.setEchoMode(QtWidgets.QLineEdit.Password)

        spinBox = QtWidgets.QSpinBox(self.bottomRightGroupBox)
        spinBox.setValue(50)

        dateTimeEdit = QtWidgets.QDateTimeEdit(self.bottomRightGroupBox)
        dateTimeEdit.setDateTime(QtCore.QDateTime.currentDateTime())

        slider = QtWidgets.QSlider(QtCore.Qt.Horizontal,
                                   self.bottomRightGroupBox)
        slider.setValue(40)

        scrollBar = QtWidgets.QScrollBar(QtCore.Qt.Horizontal,
                                         self.bottomRightGroupBox)
        scrollBar.setValue(60)

        dial = QtWidgets.QDial(self.bottomRightGroupBox)
        dial.setValue(30)
        dial.setNotchesVisible(True)

        layout = QtWidgets.QGridLayout()
        layout.addWidget(lineEdit, 0, 0, 1, 2)
        layout.addWidget(spinBox, 1, 0, 1, 2)
        layout.addWidget(dateTimeEdit, 2, 0, 1, 2)
        layout.addWidget(slider, 3, 0)
        layout.addWidget(scrollBar, 4, 0)
        layout.addWidget(dial, 3, 1, 2, 1)
        layout.setRowStretch(5, 1)
        self.bottomRightGroupBox.setLayout(layout)
    def setupUi(self, DatetimeEditor):
        DatetimeEditor.setObjectName("DatetimeEditor")
        DatetimeEditor.resize(400, 300)
        self.verticalLayout = QtWidgets.QVBoxLayout(DatetimeEditor)
        self.verticalLayout.setObjectName("verticalLayout")
        self.layout = QtWidgets.QFormLayout()
        self.layout.setObjectName("layout")
        self.datetime_edit_label = QtWidgets.QLabel(DatetimeEditor)
        self.datetime_edit_label.setObjectName("datetime_edit_label")
        self.layout.setWidget(0, QtWidgets.QFormLayout.LabelRole,
                              self.datetime_edit_label)
        self.edit_layout = QtWidgets.QVBoxLayout()
        self.edit_layout.setObjectName("edit_layout")
        self.datetime_edit = QtWidgets.QDateTimeEdit(DatetimeEditor)
        self.datetime_edit.setCalendarPopup(True)
        self.datetime_edit.setObjectName("datetime_edit")
        self.edit_layout.addWidget(self.datetime_edit)
        self.format_label = QtWidgets.QLabel(DatetimeEditor)
        self.format_label.setObjectName("format_label")
        self.edit_layout.addWidget(self.format_label)
        self.layout.setLayout(0, QtWidgets.QFormLayout.FieldRole,
                              self.edit_layout)
        self.verticalLayout.addLayout(self.layout)

        self.retranslateUi(DatetimeEditor)
        QtCore.QMetaObject.connectSlotsByName(DatetimeEditor)
Ejemplo n.º 4
0
    def create_widgets(self):
        self.info_grp = QtWidgets.QGroupBox("Info")
        self.display_grp = QtWidgets.QGroupBox("Display")
        self.main_widget = QtWidgets.QWidget()
        self.create_button = QtWidgets.QPushButton("Create")
        self.cancel_button = QtWidgets.QPushButton("Cancel")

        # Info
        self.name_lineedit = QtWidgets.QLineEdit(
            self.deadline_widget.deadline.name)
        self.datetime_edit = QtWidgets.QDateTimeEdit()
        self.datetime_edit.setCalendarPopup(1)
        self.datetime_edit.setAccelerated(1)
        self.datetime_edit.setDateTime(self.deadline_widget.deadline.until)
        self.notes_textedit = QtWidgets.QTextEdit(
            self.deadline_widget.deadline.notes)

        # Display
        self.countdown_mode = QtWidgets.QComboBox()
        self.countdown_mode.addItems(
            [member.name for member in list(DisplayEnum)])
        self.interval_wgt = widgets.IntervalWidget(
            label_text="",
            spinbox_value=1,
            combobox_options=[member.name for member in list(IntervalEnum)])
Ejemplo n.º 5
0
    def __init__(self):
        super(NewProfilesStructureDialogue, self).__init__()
        self.setObjectName("self")
        # self.resize(200, 71)
        # self.setMinimumSize(QtCore.QSize(200, 71))
        # self.setMaximumSize(QtCore.QSize(200, 71))
        self.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
        # icon = QtGui.QIcon()
        # icon.addPixmap(QtGui.QPixmap("Icons/Plus-32.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        # self.setWindowIcon(icon)
        self.layout = QtWidgets.QVBoxLayout(self)

        # calendar
        self.calendar = QtWidgets.QDateTimeEdit()
        d = datetime.today()
        self.calendar.setDateTime(QtCore.QDateTime(d.year, 1, 1, 00, 00, 00))

        # number of time steps
        self.steps_spinner = QtWidgets.QSpinBox()
        self.steps_spinner.setMinimum(1)
        self.steps_spinner.setMaximum(9999999)
        self.steps_spinner.setValue(1)

        # time step length
        self.step_length = QtWidgets.QDoubleSpinBox()
        self.step_length.setMinimum(1)
        self.step_length.setMaximum(60)
        self.step_length.setValue(1)

        # units combo box
        self.units = QtWidgets.QComboBox()
        self.units.setModel(get_list_model(['h', 'm', 's']))

        # accept button
        self.accept_btn = QtWidgets.QPushButton()
        self.accept_btn.setText('Accept')
        self.accept_btn.clicked.connect(self.accept_click)

        # labels

        # add all to the GUI
        self.layout.addWidget(QtWidgets.QLabel("Start date"))
        self.layout.addWidget(self.calendar)

        self.layout.addWidget(QtWidgets.QLabel("Number of time steps"))
        self.layout.addWidget(self.steps_spinner)

        self.layout.addWidget(QtWidgets.QLabel("Time step length"))
        self.layout.addWidget(self.step_length)

        self.layout.addWidget(QtWidgets.QLabel("Time units"))
        self.layout.addWidget(self.units)

        self.layout.addWidget(self.accept_btn)

        self.setLayout(self.layout)

        self.setWindowTitle('New profiles structure')
Ejemplo n.º 6
0
    def __init__(self, parent, database_manager):
        QtWidgets.QWidget.__init__(self, parent)
        config = configparser.ConfigParser()
        path = os.path.expanduser('~/Documents/JAM/JAMserver/jam.ini')
        config.read(path)
        self.database_manager = database_manager

        self.table_model = QtGui.QStandardItemModel(3, 10)

        self.table_view = QtWidgets.QTableView()
        self.table_view.setModel(self.table_model)
        self.table_view.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.table_view.setAlternatingRowColors(True)
        v_header = self.table_view.verticalHeader()
        v_header.hide()
        h_header = self.table_view.horizontalHeader()
        h_header.setSectionResizeMode(QtWidgets.QHeaderView.ResizeToContents)

        hbox = QtWidgets.QHBoxLayout()
        start_label = QtWidgets.QLabel('Start: ')
        start_datetime = QtCore.QDateTime.currentDateTime()
        start_datetime.setTime(QtCore.QTime(7, 0))
        self.start_spin = QtWidgets.QDateTimeEdit(start_datetime)
        self.start_spin.setDisplayFormat('dd-MM-yy HH:mm')
        self.start_spin.dateChanged.connect(self.change_end_date)
        end_label = QtWidgets.QLabel('End: ')
        end_datetime = QtCore.QDateTime.currentDateTime()
        end_datetime.setTime(QtCore.QTime(19, 0))
        self.end_spin = QtWidgets.QDateTimeEdit(end_datetime)
        self.end_spin.setDisplayFormat('dd-MM-yy HH:mm')
        populate_btn = QtWidgets.QPushButton('Refresh')
        populate_btn.clicked.connect(self.populate_table)
        hbox.addWidget(start_label)
        hbox.addWidget(self.start_spin)
        hbox.addWidget(end_label)
        hbox.addWidget(self.end_spin)
        hbox.addWidget(populate_btn)

        box_layout = QtWidgets.QVBoxLayout()
        box_layout.addLayout(hbox)
        box_layout.addWidget(self.table_view)
        self.setLayout(box_layout)
        self.show()
        self.populate_table()
Ejemplo n.º 7
0
    def __init__(self, parent=None):
        super(IncomeDialog, self).__init__(parent)
        self.verticalLayout = QtWidgets.QVBoxLayout(self)
        self.verticalLayout.setContentsMargins(8, 8, 8, 8)
        self.dialogNameLabel = DialogNameWidget(self)
        self.dialogNameLabel.setText('Income')
        self.dialogNameLabel.setPointSize(FontSize.dialogNameLabelFontSize())
        self.dialogNameLabel.setAlignment(QtCore.Qt.AlignCenter)

        self.dateLineEdit = QtWidgets.QDateTimeEdit(
            QtCore.QDate(QtCore.QDate.currentDate()), self)
        self.dateLineEdit.setCalendarPopup(True)
        self.dateLineEdit.setStyleSheet('color:black')

        self.informationWidget = QtWidgets.QWidget(self)
        self.informationGridLayout = QtWidgets.QGridLayout(
            self.informationWidget)

        self.verticalLayout.addWidget(self.dialogNameLabel)
        self.verticalLayout.addWidget(self.dateLineEdit)
        self.verticalLayout.addWidget(self.informationWidget)

        self.setWindowTitle('Income')
        self.totalIncomeLabel = QtWidgets.QLabel(self)
        self.totalIncomeLabelText = QtWidgets.QLabel(self)
        self.totalIncomeLabelText.setStyleSheet(
            'background-color:#505050;padding:4px;border-radius:4px')

        self.totalProfitLabel = QtWidgets.QLabel(self)
        self.totalProfitLabelText = QtWidgets.QLabel(self)
        self.totalProfitLabelText.setStyleSheet(
            'background-color:#505050;padding:4px;border-radius:4px')

        self.totalProfitLabel.setText('Total Profit')
        self.totalIncomeLabel.setText('Total Income')

        self.informationGridLayout.addWidget(self.totalIncomeLabel, 0, 0)
        self.informationGridLayout.addWidget(self.totalIncomeLabelText, 0, 1)
        self.informationGridLayout.addWidget(self.totalProfitLabel, 1, 0)
        self.informationGridLayout.addWidget(self.totalProfitLabelText, 1, 1)

        self.__update(self.dateLineEdit.date())
        self.dateLineEdit.dateChanged.connect(self.__update)
Ejemplo n.º 8
0
def take_date_time_s(data_list, table, depth=0):
    """take_date_time_s"""
    offset = 0
    year = int(data_list[0] + data_list[1], 16)
    month = int(data_list[2], 16)
    day = int(data_list[3], 16)
    hour = int(data_list[4], 16)
    minute = int(data_list[5], 16)
    second = int(data_list[6], 16)
    offset += 7

    table_row_num = table.rowCount()
    table.insertRow(table_row_num)
    item = QtWidgets.QTableWidgetItem('date_time_s')
    table.setItem(table_row_num, 0, item)
    dt_w = QtWidgets.QDateTimeEdit()
    dt_read = QtCore.QDateTime(year, month, day, hour, minute, second)
    dt_w.setDateTime(dt_read)
    table.setCellWidget(table_row_num, 1, dt_w)
    return offset
Ejemplo n.º 9
0
Archivo: Test.py Proyecto: CD-LK/Python
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1083, 714)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.OpenFile = QtWidgets.QPushButton(self.centralwidget)
        self.OpenFile.setGeometry(QtCore.QRect(10, 10, 181, 31))
        self.OpenFile.setObjectName("OpenFile")
        self.AnalizFile = QtWidgets.QPushButton(self.centralwidget)
        self.AnalizFile.setGeometry(QtCore.QRect(10, 90, 181, 31))
        self.AnalizFile.setObjectName("AnalizFile")
        self.progressBar = QtWidgets.QProgressBar(self.centralwidget)
        self.progressBar.setGeometry(QtCore.QRect(1040, 10, 31, 691))
        self.progressBar.setProperty("value", 0)
        self.progressBar.setTextVisible(True)
        self.progressBar.setOrientation(QtCore.Qt.Vertical)
        self.progressBar.setInvertedAppearance(False)
        self.progressBar.setObjectName("progressBar")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(1050, 20, 16, 651))
        self.label.setIndent(-2)
        self.label.setObjectName("label")
        self.PathFile = QtWidgets.QLineEdit(self.centralwidget)
        self.PathFile.setGeometry(QtCore.QRect(200, 10, 831, 31))
        self.PathFile.setObjectName("PathFile")
        self.tableWidget = QtWidgets.QTableWidget(self.centralwidget)
        self.tableWidget.setGeometry(QtCore.QRect(200, 50, 831, 651))
        self.tableWidget.setColumnCount(24)
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setRowCount(0)
        self.serchLogin = QtWidgets.QPushButton(self.centralwidget)
        self.serchLogin.setGeometry(QtCore.QRect(10, 170, 181, 31))
        self.serchLogin.setObjectName("serchLogin")
        self.serchData = QtWidgets.QPushButton(self.centralwidget)
        self.serchData.setGeometry(QtCore.QRect(10, 250, 181, 31))
        self.serchData.setObjectName("serchData")
        self.comboBox = QtWidgets.QComboBox(self.centralwidget)
        self.comboBox.setGeometry(QtCore.QRect(10, 130, 181, 31))
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.saveData = QtWidgets.QPushButton(self.centralwidget)
        self.saveData.setGeometry(QtCore.QRect(10, 50, 181, 31))
        self.saveData.setObjectName("saveData")
        self.dateTimeEdit = QtWidgets.QDateTimeEdit(self.centralwidget)
        self.dateTimeEdit.setGeometry(QtCore.QRect(10, 210, 181, 31))
        self.dateTimeEdit.setCurrentSection(QtWidgets.QDateTimeEdit.DaySection)
        self.dateTimeEdit.setObjectName("dateTimeEdit")
        self.OpenFile.raise_()
        self.AnalizFile.raise_()
        self.progressBar.raise_()
        self.PathFile.raise_()
        self.tableWidget.raise_()
        self.serchLogin.raise_()
        self.serchData.raise_()
        self.comboBox.raise_()
        self.saveData.raise_()
        self.label.raise_()
        self.dateTimeEdit.raise_()
        MainWindow.setCentralWidget(self.centralwidget)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 10
0
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(2570, 5000)
        Dialog.setMinimumSize(QtCore.QSize(2570, 5000))
        Dialog.setMaximumSize(QtCore.QSize(2570, 1566))
        self.frame = QtWidgets.QFrame(Dialog)
        self.frame.setGeometry(QtCore.QRect(10, 20, 411, 1341))
        self.frame.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Plain)
        self.frame.setObjectName("frame")
        self.Expected_pushButton_MIT01 = QtWidgets.QPushButton(self.frame)
        self.Expected_pushButton_MIT01.setGeometry(QtCore.QRect(10, 310, 341, 41))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.Expected_pushButton_MIT01.setFont(font)
        self.Expected_pushButton_MIT01.setObjectName("Expected_pushButton_MIT01")
        self.Purpose_pushButton_MIT01 = QtWidgets.QPushButton(self.frame)
        self.Purpose_pushButton_MIT01.setGeometry(QtCore.QRect(10, 190, 341, 41))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.Purpose_pushButton_MIT01.setFont(font)
        self.Purpose_pushButton_MIT01.setAutoFillBackground(True)
        self.Purpose_pushButton_MIT01.setObjectName("Purpose_pushButton_MIT01")
        self.Condition_pushButton_MIT01 = QtWidgets.QPushButton(self.frame)
        self.Condition_pushButton_MIT01.setGeometry(QtCore.QRect(10, 250, 341, 41))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.Condition_pushButton_MIT01.setFont(font)
        self.Condition_pushButton_MIT01.setObjectName("Condition_pushButton_MIT01")
        self.Relation_pushButton_MIT01 = QtWidgets.QPushButton(self.frame)
        self.Relation_pushButton_MIT01.setGeometry(QtCore.QRect(10, 370, 341, 41))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.Relation_pushButton_MIT01.setFont(font)
        self.Relation_pushButton_MIT01.setObjectName("Relation_pushButton_MIT01")
        self.Check_Means_pushButton_MIT01 = QtWidgets.QPushButton(self.frame)
        self.Check_Means_pushButton_MIT01.setGeometry(QtCore.QRect(10, 430, 341, 41))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.Check_Means_pushButton_MIT01.setFont(font)
        self.Check_Means_pushButton_MIT01.setObjectName("Check_Means_pushButton_MIT01")
        self.Decide_Perform_or_not_pushButton_MIT01 = QtWidgets.QPushButton(self.frame)
        self.Decide_Perform_or_not_pushButton_MIT01.setGeometry(QtCore.QRect(10, 490, 341, 41))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.Decide_Perform_or_not_pushButton_MIT01.setFont(font)
        self.Decide_Perform_or_not_pushButton_MIT01.setObjectName("Decide_Perform_or_not_pushButton_MIT01")
        self.Decide_Method_pushButton_MIT01 = QtWidgets.QPushButton(self.frame)
        self.Decide_Method_pushButton_MIT01.setGeometry(QtCore.QRect(10, 550, 341, 41))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.Decide_Method_pushButton_MIT01.setFont(font)
        self.Decide_Method_pushButton_MIT01.setObjectName("Decide_Method_pushButton_MIT01")
        self.Perform_pushButton_MIT01 = QtWidgets.QPushButton(self.frame)
        self.Perform_pushButton_MIT01.setGeometry(QtCore.QRect(10, 610, 341, 41))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.Perform_pushButton_MIT01.setFont(font)
        self.Perform_pushButton_MIT01.setObjectName("Perform_pushButton_MIT01")
        self.End_pushButton_MIT01 = QtWidgets.QPushButton(self.frame)
        self.End_pushButton_MIT01.setGeometry(QtCore.QRect(10, 670, 341, 41))
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.End_pushButton_MIT01.setFont(font)
        self.End_pushButton_MIT01.setObjectName("End_pushButton_MIT01")
        self.frame_5 = QtWidgets.QFrame(self.frame)
        self.frame_5.setGeometry(QtCore.QRect(0, 0, 411, 171))
        self.frame_5.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.frame_5.setFrameShadow(QtWidgets.QFrame.Plain)
        self.frame_5.setObjectName("frame_5")
        self.textBrowser_3 = QtWidgets.QTextBrowser(self.frame_5)
        self.textBrowser_3.setGeometry(QtCore.QRect(10, 90, 181, 61))
        self.textBrowser_3.setObjectName("textBrowser_3")
        self.label = QtWidgets.QLabel(self.frame_5)
        self.label.setGeometry(QtCore.QRect(200, 20, 161, 16))
        self.label.setObjectName("label")
        self.dateTimeEdit = QtWidgets.QDateTimeEdit(self.frame_5)
        self.dateTimeEdit.setGeometry(QtCore.QRect(10, 10, 161, 71))
        self.dateTimeEdit.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.dateTimeEdit.setObjectName("dateTimeEdit")
        self.frame_3 = QtWidgets.QFrame(Dialog)
        self.frame_3.setGeometry(QtCore.QRect(1780, 20, 771, 671))
        self.frame_3.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.frame_3.setFrameShadow(QtWidgets.QFrame.Plain)
        self.frame_3.setObjectName("frame_3")
        self.frame_4 = QtWidgets.QFrame(Dialog)
        self.frame_4.setGeometry(QtCore.QRect(1780, 690, 771, 671))
        self.frame_4.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.frame_4.setFrameShadow(QtWidgets.QFrame.Plain)
        self.frame_4.setObjectName("frame_4")
        self.stackedWidget = QtWidgets.QStackedWidget(Dialog)
        self.stackedWidget.setGeometry(QtCore.QRect(420, 20, 1361, 1341))
        self.stackedWidget.setFocusPolicy(QtCore.Qt.WheelFocus)
        self.stackedWidget.setFrameShape(QtWidgets.QFrame.WinPanel)
        self.stackedWidget.setFrameShadow(QtWidgets.QFrame.Plain)
        self.stackedWidget.setObjectName("stackedWidget")
        self.Main_page = QtWidgets.QWidget()
        self.Main_page.setObjectName("Main_page")
        self.textBrowser_5 = QtWidgets.QTextBrowser(self.Main_page)
        self.textBrowser_5.setGeometry(QtCore.QRect(10, 10, 1341, 61))
        self.textBrowser_5.setObjectName("textBrowser_5")
        self.stackedWidget.addWidget(self.Main_page)
        self.Purpose_page = QtWidgets.QWidget()
        self.Purpose_page.setObjectName("Purpose_page")
        self.textBrowser_2 = QtWidgets.QTextBrowser(self.Purpose_page)
        self.textBrowser_2.setGeometry(QtCore.QRect(10, 10, 1341, 61))
        self.textBrowser_2.setObjectName("textBrowser_2")
        self.textBrowser_4 = QtWidgets.QTextBrowser(self.Purpose_page)
        self.textBrowser_4.setGeometry(QtCore.QRect(10, 80, 1341, 61))
        self.textBrowser_4.setObjectName("textBrowser_4")
        self.stackedWidget.addWidget(self.Purpose_page)
        self.Condition_page = QtWidgets.QWidget()
        self.Condition_page.setObjectName("Condition_page")
        self.textBrowser_6 = QtWidgets.QTextBrowser(self.Condition_page)
        self.textBrowser_6.setGeometry(QtCore.QRect(10, 10, 1341, 61))
        self.textBrowser_6.setObjectName("textBrowser_6")
        self.textBrowser_7 = QtWidgets.QTextBrowser(self.Condition_page)
        self.textBrowser_7.setGeometry(QtCore.QRect(10, 80, 1341, 61))
        self.textBrowser_7.setObjectName("textBrowser_7")
        self.stackedWidget.addWidget(self.Condition_page)
        self.Expected_page = QtWidgets.QWidget()
        self.Expected_page.setObjectName("Expected_page")
        self.textBrowser_8 = QtWidgets.QTextBrowser(self.Expected_page)
        self.textBrowser_8.setGeometry(QtCore.QRect(10, 10, 1341, 61))
        self.textBrowser_8.setObjectName("textBrowser_8")
        self.textBrowser_9 = QtWidgets.QTextBrowser(self.Expected_page)
        self.textBrowser_9.setGeometry(QtCore.QRect(10, 80, 1341, 61))
        self.textBrowser_9.setObjectName("textBrowser_9")
        self.stackedWidget.addWidget(self.Expected_page)
        self.Related_page = QtWidgets.QWidget()
        self.Related_page.setObjectName("Related_page")
        self.textBrowser_10 = QtWidgets.QTextBrowser(self.Related_page)
        self.textBrowser_10.setGeometry(QtCore.QRect(10, 10, 1341, 61))
        self.textBrowser_10.setObjectName("textBrowser_10")
        self.textBrowser_11 = QtWidgets.QTextBrowser(self.Related_page)
        self.textBrowser_11.setGeometry(QtCore.QRect(10, 80, 1341, 61))
        self.textBrowser_11.setObjectName("textBrowser_11")
        self.stackedWidget.addWidget(self.Related_page)
        self.Available_page = QtWidgets.QWidget()
        self.Available_page.setObjectName("Available_page")
        self.textBrowser_12 = QtWidgets.QTextBrowser(self.Available_page)
        self.textBrowser_12.setGeometry(QtCore.QRect(10, 10, 1341, 61))
        self.textBrowser_12.setObjectName("textBrowser_12")
        self.textBrowser_13 = QtWidgets.QTextBrowser(self.Available_page)
        self.textBrowser_13.setGeometry(QtCore.QRect(10, 80, 1341, 61))
        self.textBrowser_13.setObjectName("textBrowser_13")
        self.stackedWidget.addWidget(self.Available_page)
        self.Wether_page = QtWidgets.QWidget()
        self.Wether_page.setObjectName("Wether_page")
        self.textBrowser_14 = QtWidgets.QTextBrowser(self.Wether_page)
        self.textBrowser_14.setGeometry(QtCore.QRect(10, 10, 1341, 61))
        self.textBrowser_14.setObjectName("textBrowser_14")
        self.textBrowser_15 = QtWidgets.QTextBrowser(self.Wether_page)
        self.textBrowser_15.setGeometry(QtCore.QRect(10, 80, 1341, 61))
        self.textBrowser_15.setObjectName("textBrowser_15")
        self.stackedWidget.addWidget(self.Wether_page)
        self.Mean_page = QtWidgets.QWidget()
        self.Mean_page.setObjectName("Mean_page")
        self.textBrowser_16 = QtWidgets.QTextBrowser(self.Mean_page)
        self.textBrowser_16.setGeometry(QtCore.QRect(10, 10, 1341, 61))
        self.textBrowser_16.setObjectName("textBrowser_16")
        self.textBrowser_17 = QtWidgets.QTextBrowser(self.Mean_page)
        self.textBrowser_17.setGeometry(QtCore.QRect(10, 80, 1341, 61))
        self.textBrowser_17.setObjectName("textBrowser_17")
        self.stackedWidget.addWidget(self.Mean_page)
        self.Perform_page = QtWidgets.QWidget()
        self.Perform_page.setObjectName("Perform_page")
        self.textBrowser_18 = QtWidgets.QTextBrowser(self.Perform_page)
        self.textBrowser_18.setGeometry(QtCore.QRect(10, 10, 1341, 61))
        self.textBrowser_18.setObjectName("textBrowser_18")
        self.textBrowser_19 = QtWidgets.QTextBrowser(self.Perform_page)
        self.textBrowser_19.setGeometry(QtCore.QRect(10, 80, 1341, 61))
        self.textBrowser_19.setObjectName("textBrowser_19")
        self.stackedWidget.addWidget(self.Perform_page)
        self.End_page = QtWidgets.QWidget()
        self.End_page.setObjectName("End_page")
        self.textBrowser_20 = QtWidgets.QTextBrowser(self.End_page)
        self.textBrowser_20.setGeometry(QtCore.QRect(10, 10, 1341, 61))
        self.textBrowser_20.setObjectName("textBrowser_20")
        self.textBrowser_21 = QtWidgets.QTextBrowser(self.End_page)
        self.textBrowser_21.setGeometry(QtCore.QRect(10, 80, 1341, 61))
        self.textBrowser_21.setObjectName("textBrowser_21")
        self.stackedWidget.addWidget(self.End_page)

        self.retranslateUi(Dialog)
        self.stackedWidget.setCurrentIndex(1)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
Ejemplo n.º 11
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(711, 590)
        self.textBrowser = QtWidgets.QTextBrowser(Form)
        self.textBrowser.setGeometry(QtCore.QRect(10, 10, 451, 571))
        self.textBrowser.setObjectName("textBrowser")
        self.lcdNumber = QtWidgets.QLCDNumber(Form)
        self.lcdNumber.setGeometry(QtCore.QRect(470, 10, 171, 23))
        self.lcdNumber.setObjectName("lcdNumber")
        self.horizontalSlider = QtWidgets.QSlider(Form)
        self.horizontalSlider.setGeometry(QtCore.QRect(470, 190, 160, 22))
        self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider.setObjectName("horizontalSlider")
        self.verticalSlider = QtWidgets.QSlider(Form)
        self.verticalSlider.setGeometry(QtCore.QRect(670, 50, 22, 160))
        self.verticalSlider.setOrientation(QtCore.Qt.Vertical)
        self.verticalSlider.setObjectName("verticalSlider")
        self.dial = QtWidgets.QDial(Form)
        self.dial.setGeometry(QtCore.QRect(480, 520, 50, 64))
        self.dial.setObjectName("dial")
        self.pushButton = QtWidgets.QPushButton(Form)
        self.pushButton.setGeometry(QtCore.QRect(480, 230, 75, 23))
        self.pushButton.setObjectName("pushButton")
        self.lineEdit = QtWidgets.QLineEdit(Form)
        self.lineEdit.setGeometry(QtCore.QRect(470, 50, 171, 20))
        self.lineEdit.setObjectName("lineEdit")
        self.spinBox = QtWidgets.QSpinBox(Form)
        self.spinBox.setGeometry(QtCore.QRect(470, 80, 171, 22))
        self.spinBox.setObjectName("spinBox")
        self.dateTimeEdit = QtWidgets.QDateTimeEdit(Form)
        self.dateTimeEdit.setGeometry(QtCore.QRect(470, 110, 171, 22))
        self.dateTimeEdit.setObjectName("dateTimeEdit")
        self.doubleSpinBox = QtWidgets.QDoubleSpinBox(Form)
        self.doubleSpinBox.setGeometry(QtCore.QRect(470, 140, 171, 22))
        self.doubleSpinBox.setObjectName("doubleSpinBox")
        self.radioButton = QtWidgets.QRadioButton(Form)
        self.radioButton.setGeometry(QtCore.QRect(480, 270, 82, 17))
        self.radioButton.setObjectName("radioButton")
        self.radioButton_2 = QtWidgets.QRadioButton(Form)
        self.radioButton_2.setGeometry(QtCore.QRect(480, 300, 82, 17))
        self.radioButton_2.setObjectName("radioButton_2")
        self.radioButton_3 = QtWidgets.QRadioButton(Form)
        self.radioButton_3.setGeometry(QtCore.QRect(480, 330, 82, 17))
        self.radioButton_3.setObjectName("radioButton_3")
        self.checkBox = QtWidgets.QCheckBox(Form)
        self.checkBox.setGeometry(QtCore.QRect(610, 270, 70, 17))
        self.checkBox.setObjectName("checkBox")
        self.checkBox_2 = QtWidgets.QCheckBox(Form)
        self.checkBox_2.setGeometry(QtCore.QRect(610, 300, 70, 17))
        self.checkBox_2.setObjectName("checkBox_2")
        self.checkBox_3 = QtWidgets.QCheckBox(Form)
        self.checkBox_3.setGeometry(QtCore.QRect(610, 330, 70, 17))
        self.checkBox_3.setObjectName("checkBox_3")
        self.buttonBox = QtWidgets.QDialogButtonBox(Form)
        self.buttonBox.setGeometry(QtCore.QRect(540, 550, 156, 23))
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.commandLinkButton = QtWidgets.QCommandLinkButton(Form)
        self.commandLinkButton.setGeometry(QtCore.QRect(480, 370, 185, 41))
        self.commandLinkButton.setObjectName("commandLinkButton")
        self.toolButton = QtWidgets.QToolButton(Form)
        self.toolButton.setGeometry(QtCore.QRect(600, 520, 25, 21))
        self.toolButton.setObjectName("toolButton")
        self.tableView = QtWidgets.QTableView(Form)
        self.tableView.setGeometry(QtCore.QRect(470, 420, 231, 91))
        self.tableView.setObjectName("tableView")
        self.lcdNumber_2 = QtWidgets.QLCDNumber(Form)
        self.lcdNumber_2.setGeometry(QtCore.QRect(630, 520, 64, 23))
        self.lcdNumber_2.setObjectName("lcdNumber_2")

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Ejemplo n.º 12
0
    def __init__(self, parent=None):
        super(SearchSoldProductDialog, self).__init__(parent)
        self.resize(1024, 600)
        self.verticalLayout = QtWidgets.QVBoxLayout(self)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setSpacing(0)

        self.setWindowTitle('Search Order')

        self.searchWidget = QtWidgets.QWidget(self)
        self.searchWidgetLayout = QtWidgets.QHBoxLayout(self.searchWidget)
        self.searchWidgetLayout.setContentsMargins(8, 0, 8, 0)
        self.searchWidgetLayout.setSpacing(4)

        self.lineEdit = QtWidgets.QLineEdit(self.searchWidget)
        self.lineEdit.setPlaceholderText('Enter a product name to search')

        self.lineEdit.setStyleSheet(
            'padding-left:8px;border-radius:4px;color:white')
        self.startCheckBox = QtWidgets.QCheckBox(self.searchWidget)
        self.startCheckBox.setText('Disable Start Time')
        self.startCalenderLineEdit = QtWidgets.QDateTimeEdit(
            QtCore.QDate(QtCore.QDate.currentDate()), self.searchWidget)
        self.startCalenderLineEdit.setCalendarPopup(True)
        self.startCalenderLineEdit.setStyleSheet('color:black')

        self.stopCheckBox = QtWidgets.QCheckBox(self.searchWidget)
        self.stopCheckBox.setText('Disable Stop Time')
        self.stopCalenderLineEdit = QtWidgets.QDateTimeEdit(
            QtCore.QDate(QtCore.QDate.currentDate()), self.searchWidget)
        self.stopCalenderLineEdit.setCalendarPopup(True)
        self.stopCalenderLineEdit.setStyleSheet('color:black')

        self.limitWidget = QtWidgets.QWidget(self.searchWidget)
        self.limitWidgetLayout = QtWidgets.QHBoxLayout(self.limitWidget)
        self.limitWidgetLayout.setContentsMargins(0, 0, 0, 0)
        self.limitWidgetLayout.setSpacing(0)
        self.limitLabel = QtWidgets.QLabel(self.limitWidget)
        self.limitLabel.setText('Search Limit:')

        self.limitSpinbox = QtWidgets.QSpinBox(self.searchWidget)
        self.limitSpinbox.setMinimum(1)
        self.limitSpinbox.setMaximum(1000)
        self.limitSpinbox.setValue(30)
        self.limitSpinbox.setStyleSheet('color:black')

        self.limitWidgetLayout.addWidget(self.limitLabel)
        self.limitWidgetLayout.addWidget(self.limitSpinbox)

        self.searchButton = QtWidgets.QPushButton(self.searchWidget)
        self.searchButton.setText('Search')

        self.searchWidgetLayout.addWidget(self.lineEdit)
        self.searchWidgetLayout.addWidget(self.startCheckBox)
        self.searchWidgetLayout.addWidget(self.startCalenderLineEdit)
        self.searchWidgetLayout.addWidget(self.stopCheckBox)
        self.searchWidgetLayout.addWidget(self.stopCalenderLineEdit)
        self.searchWidgetLayout.addWidget(self.limitWidget)
        self.searchWidgetLayout.addWidget(self.searchButton)

        self.listView = ListView(self)
        self.listView.setItemDelegate(SearchSoldProductDelegate(self.listView))

        self.tableView = SoldOrderListWidget(self)
        self.tableView.infoWidgetIndexInfoLineEdit.hide()
        self.tableView.infoWidgetIndexInfoLabelText.hide()

        self.orderModel = OrderModel()
        self.listView.setModel(self.orderModel)
        self.startCheckBox.stateChanged.connect(self.__updateStartCalender)
        self.stopCheckBox.stateChanged.connect(self.__updateStopCalender)

        self.startCheckBox.setChecked(True)

        self.__search()

        self.verticalLayout.addWidget(self.searchWidget)
        self.verticalLayout.addWidget(self.listView)
        self.verticalLayout.addWidget(self.tableView)

        self.listView.currentIndexChanged.connect(self.__updateSoldProductList)
        self.listView.setCurrentIndex(self.listView.model().index(0))
        self.listView.setStyleSheet('background-color:#404040')

        self.searchButton.clicked.connect(self.__search)

        self.tableView.soldProductLabelView.horizontalHeader(
        ).sectionResized.connect(self.__saveHeaderSizes)
        headerSizes = []

        for i in range(self.tableView.soldProductLabelView.horizontalHeader().
                       count()):
            headerSizes.append(self.tableView.soldProductLabelView.
                               horizontalHeader().sectionSize(i))

        SearchSoldProductDialog.sizeInfo().headerSizes = headerSizes
Ejemplo n.º 13
0
    def setupUi(self, EntryDialog):
        EntryDialog.setObjectName("EntryDialog")
        EntryDialog.resize(439, 171)
        self.vboxlayout = QtWidgets.QVBoxLayout(EntryDialog)
        self.vboxlayout.setObjectName("vboxlayout")
        self.hboxlayout = QtWidgets.QHBoxLayout()
        self.hboxlayout.setObjectName("hboxlayout")
        self.label = QtWidgets.QLabel(EntryDialog)
        self.label.setObjectName("label")
        self.hboxlayout.addWidget(self.label)
        self.name = QtWidgets.QLineEdit(EntryDialog)
        self.name.setObjectName("name")
        self.hboxlayout.addWidget(self.name)
        self.vboxlayout.addLayout(self.hboxlayout)
        self.hboxlayout1 = QtWidgets.QHBoxLayout()
        self.hboxlayout1.setObjectName("hboxlayout1")
        self.label_6 = QtWidgets.QLabel(EntryDialog)
        self.label_6.setObjectName("label_6")
        self.hboxlayout1.addWidget(self.label_6)
        self.legend = QtWidgets.QLineEdit(EntryDialog)
        self.legend.setObjectName("legend")
        self.hboxlayout1.addWidget(self.legend)
        self.vboxlayout.addLayout(self.hboxlayout1)
        self.gridlayout = QtWidgets.QGridLayout()
        self.gridlayout.setObjectName("gridlayout")
        self.label_2 = QtWidgets.QLabel(EntryDialog)
        self.label_2.setObjectName("label_2")
        self.gridlayout.addWidget(self.label_2, 0, 0, 1, 1)
        self.type = QtWidgets.QComboBox(EntryDialog)
        self.type.setObjectName("type")
        self.gridlayout.addWidget(self.type, 0, 1, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(41, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.gridlayout.addItem(spacerItem, 0, 2, 1, 1)
        self.label_3 = QtWidgets.QLabel(EntryDialog)
        self.label_3.setObjectName("label_3")
        self.gridlayout.addWidget(self.label_3, 0, 3, 1, 1)
        self.startDate = QtWidgets.QDateTimeEdit(EntryDialog)
        self.startDate.setCalendarPopup(True)
        self.startDate.setObjectName("startDate")
        self.gridlayout.addWidget(self.startDate, 0, 4, 1, 1)
        self.label_5 = QtWidgets.QLabel(EntryDialog)
        self.label_5.setObjectName("label_5")
        self.gridlayout.addWidget(self.label_5, 1, 0, 1, 1)
        self.completion = QtWidgets.QSpinBox(EntryDialog)
        self.completion.setMaximum(100)
        self.completion.setObjectName("completion")
        self.gridlayout.addWidget(self.completion, 1, 1, 1, 1)
        self.label_4 = QtWidgets.QLabel(EntryDialog)
        self.label_4.setObjectName("label_4")
        self.gridlayout.addWidget(self.label_4, 1, 3, 1, 1)
        self.endDate = QtWidgets.QDateTimeEdit(EntryDialog)
        self.endDate.setCalendarPopup(True)
        self.endDate.setObjectName("endDate")
        self.gridlayout.addWidget(self.endDate, 1, 4, 1, 1)
        self.readOnly = QtWidgets.QCheckBox(EntryDialog)
        self.readOnly.setObjectName("readOnly")
        self.gridlayout.addWidget(self.readOnly, 2, 0, 1, 2)
        self.dependsLabel = QtWidgets.QLabel(EntryDialog)
        self.dependsLabel.setObjectName("dependsLabel")
        self.gridlayout.addWidget(self.dependsLabel, 2, 3, 1, 1)
        self.depends = QtWidgets.QComboBox(EntryDialog)
        self.depends.setObjectName("depends")
        self.depends.addItem("")
        self.gridlayout.addWidget(self.depends, 2, 4, 1, 1)
        self.vboxlayout.addLayout(self.gridlayout)
        self.buttonBox = QtWidgets.QDialogButtonBox(EntryDialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.NoButton
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.vboxlayout.addWidget(self.buttonBox)

        self.retranslateUi(EntryDialog)
        self.buttonBox.accepted.connect(EntryDialog.accept)
        self.buttonBox.rejected.connect(EntryDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(EntryDialog)
Ejemplo n.º 14
0
    def setupUi(self, Spacer):
        Spacer.setObjectName("Spacer")
        Spacer.resize(666, 601)
        Spacer.setStyleSheet("")
        self.centralwidget = QtWidgets.QWidget(Spacer)
        self.centralwidget.setStyleSheet("")
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName("gridLayout")
        self.scheduleGrid = QtWidgets.QGridLayout()
        self.scheduleGrid.setContentsMargins(20, -1, 20, 10)
        self.scheduleGrid.setVerticalSpacing(6)
        self.scheduleGrid.setObjectName("scheduleGrid")
        self.scheduleWidget = QtWidgets.QTableWidget(self.centralwidget)
        self.scheduleWidget.setStyleSheet("QTableWidget {\n"
                                          "border-style: solid;\n"
                                          "border-width: 1px;\n"
                                          "border-color:rgb(184, 184, 184);\n"
                                          "border-radius: 25px;\n"
                                          "background-color: white;\n"
                                          "}\n"
                                          "\n"
                                          "QHeaderView::section {\n"
                                          "}\n"
                                          "\n"
                                          "")
        self.scheduleWidget.setFrameShadow(QtWidgets.QFrame.Plain)
        self.scheduleWidget.setSizeAdjustPolicy(
            QtWidgets.QAbstractScrollArea.AdjustIgnored)
        self.scheduleWidget.setAlternatingRowColors(True)
        self.scheduleWidget.setSelectionMode(
            QtWidgets.QAbstractItemView.SingleSelection)
        self.scheduleWidget.setSelectionBehavior(
            QtWidgets.QAbstractItemView.SelectRows)
        self.scheduleWidget.setVerticalScrollMode(
            QtWidgets.QAbstractItemView.ScrollPerItem)
        self.scheduleWidget.setShowGrid(True)
        self.scheduleWidget.setRowCount(0)
        self.scheduleWidget.setColumnCount(3)
        self.scheduleWidget.setObjectName("scheduleWidget")
        self.scheduleWidget.setColumnCount(3)
        self.scheduleWidget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.scheduleWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.scheduleWidget.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.scheduleWidget.setHorizontalHeaderItem(2, item)
        self.scheduleWidget.horizontalHeader().setSortIndicatorShown(False)
        self.scheduleWidget.horizontalHeader().setStretchLastSection(False)
        self.scheduleWidget.verticalHeader().setSortIndicatorShown(False)
        self.scheduleWidget.verticalHeader().setStretchLastSection(False)
        self.scheduleGrid.addWidget(self.scheduleWidget, 2, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.centralwidget)
        self.label_2.setStyleSheet("color: rgb(54, 54, 54);\n"
                                   "font: 12pt \"MS Shell Dlg 2\";")
        self.label_2.setAlignment(QtCore.Qt.AlignCenter)
        self.label_2.setObjectName("label_2")
        self.scheduleGrid.addWidget(self.label_2, 3, 0, 1, 1)
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setStyleSheet("color: rgb(54, 54, 54);\n"
                                 "font: 12pt \"MS Shell Dlg 2\";")
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.scheduleGrid.addWidget(self.label, 1, 0, 1, 1)
        self.studyWidget = QtWidgets.QTableWidget(self.centralwidget)
        self.studyWidget.setStyleSheet("QTableWidget {\n"
                                       "border-style: solid;\n"
                                       "border-width: 1px;\n"
                                       "border-color:rgb(184, 184, 184);\n"
                                       "border-radius: 25px;\n"
                                       "background-color: white;\n"
                                       "}\n"
                                       "\n"
                                       "QHeaderView::section {\n"
                                       "}\n"
                                       "")
        self.studyWidget.setFrameShadow(QtWidgets.QFrame.Plain)
        self.studyWidget.setSizeAdjustPolicy(
            QtWidgets.QAbstractScrollArea.AdjustIgnored)
        self.studyWidget.setAlternatingRowColors(True)
        self.studyWidget.setSelectionMode(
            QtWidgets.QAbstractItemView.SingleSelection)
        self.studyWidget.setSelectionBehavior(
            QtWidgets.QAbstractItemView.SelectRows)
        self.studyWidget.setShowGrid(True)
        self.studyWidget.setRowCount(0)
        self.studyWidget.setColumnCount(4)
        self.studyWidget.setObjectName("studyWidget")
        self.studyWidget.setColumnCount(4)
        self.studyWidget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.studyWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.studyWidget.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.studyWidget.setHorizontalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.studyWidget.setHorizontalHeaderItem(3, item)
        self.studyWidget.horizontalHeader().setCascadingSectionResizes(False)
        self.studyWidget.horizontalHeader().setStretchLastSection(False)
        self.studyWidget.verticalHeader().setCascadingSectionResizes(False)
        self.studyWidget.verticalHeader().setHighlightSections(True)
        self.studyWidget.verticalHeader().setSortIndicatorShown(False)
        self.scheduleGrid.addWidget(self.studyWidget, 4, 0, 1, 1)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setSpacing(22)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.dateWidget = QtWidgets.QDateTimeEdit(self.centralwidget)
        self.dateWidget.setMinimumSize(QtCore.QSize(0, 18))
        self.dateWidget.setAutoFillBackground(False)
        self.dateWidget.setStyleSheet("border-style: solid;\n"
                                      "border-width: 1px;\n"
                                      "border-color:rgb(184, 184, 184);\n"
                                      "border-radius: 8px;\n"
                                      "background-color: white;")
        self.dateWidget.setAlignment(QtCore.Qt.AlignCenter)
        self.dateWidget.setReadOnly(False)
        self.dateWidget.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons)
        self.dateWidget.setCurrentSection(QtWidgets.QDateTimeEdit.MonthSection)
        self.dateWidget.setCalendarPopup(False)
        self.dateWidget.setObjectName("dateWidget")
        self.horizontalLayout_2.addWidget(self.dateWidget)
        self.taskEdit = QtWidgets.QLineEdit(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.taskEdit.sizePolicy().hasHeightForWidth())
        self.taskEdit.setSizePolicy(sizePolicy)
        self.taskEdit.setStyleSheet("border-style: solid;\n"
                                    "border-width: 1px;\n"
                                    "border-color:rgb(184, 184, 184);\n"
                                    "border-radius: 8px;\n"
                                    "background-color: rgb(255,255,255);")
        self.taskEdit.setText("")
        self.taskEdit.setEchoMode(QtWidgets.QLineEdit.PasswordEchoOnEdit)
        self.taskEdit.setAlignment(QtCore.Qt.AlignCenter)
        self.taskEdit.setObjectName("taskEdit")
        self.horizontalLayout_2.addWidget(self.taskEdit)
        self.btn_addTask = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.btn_addTask.sizePolicy().hasHeightForWidth())
        self.btn_addTask.setSizePolicy(sizePolicy)
        self.btn_addTask.setMinimumSize(QtCore.QSize(0, 18))
        self.btn_addTask.setAutoFillBackground(False)
        self.btn_addTask.setStyleSheet(
            "border-style: solid;\n"
            "border-width: 1px;\n"
            "border-color:rgb(184, 184, 184);\n"
            "border-radius: 8px;\n"
            "background-color: rgba(225, 225, 225, 212);")
        self.btn_addTask.setObjectName("btn_addTask")
        self.horizontalLayout_2.addWidget(self.btn_addTask)
        self.scheduleGrid.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
        self.gridLayout.addLayout(self.scheduleGrid, 2, 1, 1, 1)
        Spacer.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(Spacer)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 666, 22))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        Spacer.setMenuBar(self.menubar)
        self.actionExit = QtWidgets.QAction(Spacer)
        self.actionExit.setObjectName("actionExit")
        self.actionAbout = QtWidgets.QAction(Spacer)
        self.actionAbout.setObjectName("actionAbout")
        self.actionCode = QtWidgets.QAction(Spacer)
        self.actionCode.setObjectName("actionCode")
        self.menuFile.addAction(self.actionExit)
        self.menuFile.addAction(self.actionAbout)
        self.menuFile.addAction(self.actionCode)
        self.menubar.addAction(self.menuFile.menuAction())

        self.retranslateUi(Spacer)
        QtCore.QMetaObject.connectSlotsByName(Spacer)
Ejemplo n.º 15
0
    def setupUi(self, DockWidget):
        DockWidget.setObjectName("DockWidget")
        DockWidget.resize(703, 557)
        self.dockWidgetContents = QtWidgets.QWidget()
        self.dockWidgetContents.setObjectName("dockWidgetContents")
        self.gridLayout = QtWidgets.QGridLayout(self.dockWidgetContents)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(self.dockWidgetContents)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 1, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.dockWidgetContents)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 0, 2, 1, 1)
        self.label_12 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_12.setMinimumSize(QtCore.QSize(0, 0))
        self.label_12.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_12.setFont(font)
        self.label_12.setObjectName("label_12")
        self.gridLayout.addWidget(self.label_12, 1, 0, 1, 1)
        self.fontComboBox = QtWidgets.QFontComboBox(self.dockWidgetContents)
        self.fontComboBox.setMinimumSize(QtCore.QSize(0, 0))
        self.fontComboBox.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.fontComboBox.setObjectName("fontComboBox")
        self.gridLayout.addWidget(self.fontComboBox, 1, 1, 1, 1)
        self.fontComboBoxDis = QtWidgets.QFontComboBox(self.dockWidgetContents)
        self.fontComboBoxDis.setEnabled(False)
        self.fontComboBoxDis.setMinimumSize(QtCore.QSize(0, 0))
        self.fontComboBoxDis.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.fontComboBoxDis.setObjectName("fontComboBoxDis")
        self.gridLayout.addWidget(self.fontComboBoxDis, 1, 2, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
        self.comboBoxEdit = QtWidgets.QComboBox(self.dockWidgetContents)
        self.comboBoxEdit.setEditable(True)
        self.comboBoxEdit.setObjectName("comboBoxEdit")
        self.comboBoxEdit.addItem("")
        self.comboBoxEdit.addItem("")
        self.comboBoxEdit.addItem("")
        self.comboBoxEdit.setItemText(2, "")
        self.gridLayout.addWidget(self.comboBoxEdit, 2, 1, 1, 1)
        self.comboBoxEditDis = QtWidgets.QComboBox(self.dockWidgetContents)
        self.comboBoxEditDis.setEnabled(False)
        self.comboBoxEditDis.setEditable(True)
        self.comboBoxEditDis.setObjectName("comboBoxEditDis")
        self.comboBoxEditDis.addItem("")
        self.comboBoxEditDis.addItem("")
        self.comboBoxEditDis.addItem("")
        self.comboBoxEditDis.setItemText(2, "")
        self.gridLayout.addWidget(self.comboBoxEditDis, 2, 2, 1, 1)
        self.label_13 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_13.setMinimumSize(QtCore.QSize(0, 0))
        self.label_13.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_13.setFont(font)
        self.label_13.setObjectName("label_13")
        self.gridLayout.addWidget(self.label_13, 3, 0, 1, 1)
        self.lineEdit = QtWidgets.QLineEdit(self.dockWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.lineEdit.sizePolicy().hasHeightForWidth())
        self.lineEdit.setSizePolicy(sizePolicy)
        self.lineEdit.setMinimumSize(QtCore.QSize(0, 0))
        self.lineEdit.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.lineEdit.setObjectName("lineEdit")
        self.gridLayout.addWidget(self.lineEdit, 3, 1, 1, 1)
        self.lineEditDis = QtWidgets.QLineEdit(self.dockWidgetContents)
        self.lineEditDis.setEnabled(False)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.lineEditDis.sizePolicy().hasHeightForWidth())
        self.lineEditDis.setSizePolicy(sizePolicy)
        self.lineEditDis.setMinimumSize(QtCore.QSize(0, 0))
        self.lineEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.lineEditDis.setObjectName("lineEditDis")
        self.gridLayout.addWidget(self.lineEditDis, 3, 2, 1, 1)
        self.label_14 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_14.setMinimumSize(QtCore.QSize(0, 0))
        self.label_14.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_14.setFont(font)
        self.label_14.setObjectName("label_14")
        self.gridLayout.addWidget(self.label_14, 4, 0, 1, 1)
        self.textEdit = QtWidgets.QTextEdit(self.dockWidgetContents)
        self.textEdit.setMinimumSize(QtCore.QSize(0, 0))
        self.textEdit.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.textEdit.setObjectName("textEdit")
        self.gridLayout.addWidget(self.textEdit, 4, 1, 1, 1)
        self.textEditDis = QtWidgets.QTextEdit(self.dockWidgetContents)
        self.textEditDis.setEnabled(False)
        self.textEditDis.setMinimumSize(QtCore.QSize(0, 0))
        self.textEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.textEditDis.setObjectName("textEditDis")
        self.gridLayout.addWidget(self.textEditDis, 4, 2, 1, 1)
        self.label_15 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_15.setMinimumSize(QtCore.QSize(0, 0))
        self.label_15.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_15.setFont(font)
        self.label_15.setObjectName("label_15")
        self.gridLayout.addWidget(self.label_15, 5, 0, 1, 1)
        self.plainTextEdit = QtWidgets.QPlainTextEdit(self.dockWidgetContents)
        self.plainTextEdit.setMinimumSize(QtCore.QSize(0, 0))
        self.plainTextEdit.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.plainTextEdit.setObjectName("plainTextEdit")
        self.gridLayout.addWidget(self.plainTextEdit, 5, 1, 1, 1)
        self.plainTextEditDis = QtWidgets.QPlainTextEdit(
            self.dockWidgetContents)
        self.plainTextEditDis.setEnabled(False)
        self.plainTextEditDis.setMinimumSize(QtCore.QSize(0, 0))
        self.plainTextEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.plainTextEditDis.setObjectName("plainTextEditDis")
        self.gridLayout.addWidget(self.plainTextEditDis, 5, 2, 1, 1)
        self.label_16 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_16.setMinimumSize(QtCore.QSize(0, 0))
        self.label_16.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_16.setFont(font)
        self.label_16.setObjectName("label_16")
        self.gridLayout.addWidget(self.label_16, 6, 0, 1, 1)
        self.spinBox = QtWidgets.QSpinBox(self.dockWidgetContents)
        self.spinBox.setMinimumSize(QtCore.QSize(0, 0))
        self.spinBox.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.spinBox.setObjectName("spinBox")
        self.gridLayout.addWidget(self.spinBox, 6, 1, 1, 1)
        self.spinBoxDis = QtWidgets.QSpinBox(self.dockWidgetContents)
        self.spinBoxDis.setEnabled(False)
        self.spinBoxDis.setMinimumSize(QtCore.QSize(0, 0))
        self.spinBoxDis.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.spinBoxDis.setObjectName("spinBoxDis")
        self.gridLayout.addWidget(self.spinBoxDis, 6, 2, 1, 1)
        self.label_17 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_17.setMinimumSize(QtCore.QSize(0, 0))
        self.label_17.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_17.setFont(font)
        self.label_17.setObjectName("label_17")
        self.gridLayout.addWidget(self.label_17, 7, 0, 1, 1)
        self.doubleSpinBox = QtWidgets.QDoubleSpinBox(self.dockWidgetContents)
        self.doubleSpinBox.setMinimumSize(QtCore.QSize(0, 0))
        self.doubleSpinBox.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.doubleSpinBox.setObjectName("doubleSpinBox")
        self.gridLayout.addWidget(self.doubleSpinBox, 7, 1, 1, 1)
        self.doubleSpinBoxDis = QtWidgets.QDoubleSpinBox(
            self.dockWidgetContents)
        self.doubleSpinBoxDis.setEnabled(False)
        self.doubleSpinBoxDis.setMinimumSize(QtCore.QSize(0, 0))
        self.doubleSpinBoxDis.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.doubleSpinBoxDis.setObjectName("doubleSpinBoxDis")
        self.gridLayout.addWidget(self.doubleSpinBoxDis, 7, 2, 1, 1)
        self.label_18 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_18.setMinimumSize(QtCore.QSize(0, 0))
        self.label_18.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_18.setFont(font)
        self.label_18.setObjectName("label_18")
        self.gridLayout.addWidget(self.label_18, 8, 0, 1, 1)
        self.timeEdit = QtWidgets.QTimeEdit(self.dockWidgetContents)
        self.timeEdit.setMinimumSize(QtCore.QSize(0, 0))
        self.timeEdit.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.timeEdit.setObjectName("timeEdit")
        self.gridLayout.addWidget(self.timeEdit, 8, 1, 1, 1)
        self.timeEditDis = QtWidgets.QTimeEdit(self.dockWidgetContents)
        self.timeEditDis.setEnabled(False)
        self.timeEditDis.setMinimumSize(QtCore.QSize(0, 0))
        self.timeEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.timeEditDis.setObjectName("timeEditDis")
        self.gridLayout.addWidget(self.timeEditDis, 8, 2, 1, 1)
        self.label_19 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_19.setMinimumSize(QtCore.QSize(0, 0))
        self.label_19.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_19.setFont(font)
        self.label_19.setObjectName("label_19")
        self.gridLayout.addWidget(self.label_19, 9, 0, 1, 1)
        self.dateEdit = QtWidgets.QDateEdit(self.dockWidgetContents)
        self.dateEdit.setMinimumSize(QtCore.QSize(0, 0))
        self.dateEdit.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.dateEdit.setObjectName("dateEdit")
        self.gridLayout.addWidget(self.dateEdit, 9, 1, 1, 1)
        self.dateEditDis = QtWidgets.QDateEdit(self.dockWidgetContents)
        self.dateEditDis.setEnabled(False)
        self.dateEditDis.setMinimumSize(QtCore.QSize(0, 0))
        self.dateEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.dateEditDis.setObjectName("dateEditDis")
        self.gridLayout.addWidget(self.dateEditDis, 9, 2, 1, 1)
        self.label_20 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_20.setMinimumSize(QtCore.QSize(0, 0))
        self.label_20.setMaximumSize(QtCore.QSize(16777215, 16777215))
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_20.setFont(font)
        self.label_20.setObjectName("label_20")
        self.gridLayout.addWidget(self.label_20, 10, 0, 1, 1)
        self.dateTimeEdit = QtWidgets.QDateTimeEdit(self.dockWidgetContents)
        self.dateTimeEdit.setMinimumSize(QtCore.QSize(0, 0))
        self.dateTimeEdit.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.dateTimeEdit.setObjectName("dateTimeEdit")
        self.gridLayout.addWidget(self.dateTimeEdit, 10, 1, 1, 1)
        self.dateTimeEditDis = QtWidgets.QDateTimeEdit(self.dockWidgetContents)
        self.dateTimeEditDis.setEnabled(False)
        self.dateTimeEditDis.setMinimumSize(QtCore.QSize(0, 0))
        self.dateTimeEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.dateTimeEditDis.setObjectName("dateTimeEditDis")
        self.gridLayout.addWidget(self.dateTimeEditDis, 10, 2, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(20, 40,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem, 11, 0, 1, 1)
        self.label_51 = QtWidgets.QLabel(self.dockWidgetContents)
        self.label_51.setAlignment(QtCore.Qt.AlignCenter)
        self.label_51.setObjectName("label_51")
        self.gridLayout.addWidget(self.label_51, 12, 0, 1, 3)
        DockWidget.setWidget(self.dockWidgetContents)

        self.retranslateUi(DockWidget)
        QtCore.QObject.connect(self.fontComboBox,
                               QtCore.SIGNAL("editTextChanged(QString)"),
                               self.fontComboBoxDis.setEditText)
        QtCore.QObject.connect(self.lineEdit,
                               QtCore.SIGNAL("textEdited(QString)"),
                               self.lineEditDis.setText)
        QtCore.QObject.connect(self.spinBox,
                               QtCore.SIGNAL("valueChanged(int)"),
                               self.spinBoxDis.setValue)
        QtCore.QObject.connect(self.doubleSpinBox,
                               QtCore.SIGNAL("valueChanged(double)"),
                               self.doubleSpinBoxDis.setValue)
        QtCore.QObject.connect(self.timeEdit,
                               QtCore.SIGNAL("timeChanged(QTime)"),
                               self.timeEditDis.setTime)
        QtCore.QObject.connect(self.dateEdit,
                               QtCore.SIGNAL("dateTimeChanged(QDateTime)"),
                               self.dateEditDis.setDateTime)
        QtCore.QObject.connect(self.dateTimeEdit,
                               QtCore.SIGNAL("dateTimeChanged(QDateTime)"),
                               self.dateTimeEditDis.setDateTime)
        QtCore.QMetaObject.connectSlotsByName(DockWidget)
Ejemplo n.º 16
0
    def __init__(self, common, tab, mode_settings):
        super(ModeSettingsWidget, self).__init__()
        self.common = common
        self.tab = tab
        self.settings = mode_settings

        # Downstream Mode need to fill in this layout with its settings
        self.mode_specific_layout = QtWidgets.QVBoxLayout()

        # Persistent
        self.persistent_checkbox = QtWidgets.QCheckBox()
        self.persistent_checkbox.clicked.connect(
            self.persistent_checkbox_clicked)
        self.persistent_checkbox.setText(
            strings._("mode_settings_persistent_checkbox"))
        if self.settings.get("persistent", "enabled"):
            self.persistent_checkbox.setCheckState(QtCore.Qt.Checked)
        else:
            self.persistent_checkbox.setCheckState(QtCore.Qt.Unchecked)

        # Public
        self.public_checkbox = QtWidgets.QCheckBox()
        self.public_checkbox.clicked.connect(self.public_checkbox_clicked)
        self.public_checkbox.setText(
            strings._("mode_settings_public_checkbox"))
        if self.settings.get("general", "public"):
            self.public_checkbox.setCheckState(QtCore.Qt.Checked)
        else:
            self.public_checkbox.setCheckState(QtCore.Qt.Unchecked)

        # Title
        title_label = QtWidgets.QLabel(strings._("mode_settings_title_label"))
        self.title_lineedit = QtWidgets.QLineEdit()
        self.title_lineedit.editingFinished.connect(
            self.title_editing_finished)
        if self.settings.get("general", "title"):
            self.title_lineedit.setText(self.settings.get("general", "title"))
        title_layout = QtWidgets.QHBoxLayout()
        title_layout.addWidget(title_label)
        title_layout.addWidget(self.title_lineedit)

        # Whether or not to use an auto-start timer
        self.autostart_timer_checkbox = QtWidgets.QCheckBox()
        self.autostart_timer_checkbox.clicked.connect(
            self.autostart_timer_checkbox_clicked)
        self.autostart_timer_checkbox.setText(
            strings._("mode_settings_autostart_timer_checkbox"))
        if self.settings.get("general", "autostart_timer"):
            self.autostart_timer_checkbox.setCheckState(QtCore.Qt.Checked)
        else:
            self.autostart_timer_checkbox.setCheckState(QtCore.Qt.Unchecked)

        # The autostart timer widget
        self.autostart_timer_widget = QtWidgets.QDateTimeEdit()
        self.autostart_timer_widget.setDisplayFormat("hh:mm A MMM d, yy")
        self.autostart_timer_reset()
        self.autostart_timer_widget.setCurrentSection(
            QtWidgets.QDateTimeEdit.MinuteSection)
        if self.settings.get("general", "autostart_timer"):
            self.autostart_timer_widget.show()
        else:
            self.autostart_timer_widget.hide()

        # Autostart timer layout
        autostart_timer_layout = QtWidgets.QHBoxLayout()
        autostart_timer_layout.setContentsMargins(0, 0, 0, 0)
        autostart_timer_layout.addWidget(self.autostart_timer_checkbox)
        autostart_timer_layout.addWidget(self.autostart_timer_widget)

        # Whether or not to use an auto-stop timer
        self.autostop_timer_checkbox = QtWidgets.QCheckBox()
        self.autostop_timer_checkbox.clicked.connect(
            self.autostop_timer_checkbox_clicked)
        self.autostop_timer_checkbox.setText(
            strings._("mode_settings_autostop_timer_checkbox"))
        if self.settings.get("general", "autostop_timer"):
            self.autostop_timer_checkbox.setCheckState(QtCore.Qt.Checked)
        else:
            self.autostop_timer_checkbox.setCheckState(QtCore.Qt.Unchecked)

        # The autostop timer widget
        self.autostop_timer_widget = QtWidgets.QDateTimeEdit()
        self.autostop_timer_widget.setDisplayFormat("hh:mm A MMM d, yy")
        self.autostop_timer_reset()
        self.autostop_timer_widget.setCurrentSection(
            QtWidgets.QDateTimeEdit.MinuteSection)
        if self.settings.get("general", "autostop_timer"):
            self.autostop_timer_widget.show()
        else:
            self.autostop_timer_widget.hide()

        # Autostop timer layout
        autostop_timer_layout = QtWidgets.QHBoxLayout()
        autostop_timer_layout.setContentsMargins(0, 0, 0, 0)
        autostop_timer_layout.addWidget(self.autostop_timer_checkbox)
        autostop_timer_layout.addWidget(self.autostop_timer_widget)

        # Toggle advanced settings
        self.toggle_advanced_button = QtWidgets.QPushButton()
        self.toggle_advanced_button.clicked.connect(
            self.toggle_advanced_clicked)
        self.toggle_advanced_button.setFlat(True)
        self.toggle_advanced_button.setStyleSheet(
            self.common.gui.css["mode_settings_toggle_advanced"])

        # Advanced group itself
        advanced_layout = QtWidgets.QVBoxLayout()
        advanced_layout.setContentsMargins(0, 0, 0, 0)
        advanced_layout.addLayout(title_layout)
        advanced_layout.addLayout(autostart_timer_layout)
        advanced_layout.addLayout(autostop_timer_layout)
        self.advanced_widget = QtWidgets.QWidget()
        self.advanced_widget.setLayout(advanced_layout)
        self.advanced_widget.hide()

        layout = QtWidgets.QVBoxLayout()
        layout.addLayout(self.mode_specific_layout)
        layout.addWidget(self.persistent_checkbox)
        layout.addWidget(self.public_checkbox)
        layout.addWidget(self.advanced_widget)
        layout.addWidget(self.toggle_advanced_button)
        layout.addStretch()
        main_widget = QtWidgets.QWidget()
        main_widget.setLayout(layout)

        self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
        self.setWidgetResizable(True)
        self.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.setWidget(main_widget)

        self.update_ui()
Ejemplo n.º 17
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(596, 569)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.borderWidget = QtWidgets.QWidget(Form)
        self.borderWidget.setStyleSheet(
            "QWidget#borderWidget{border-width : 1px; border-style : solid; border-color : black; border-radius : 7px}\")\n"
            "")
        self.borderWidget.setObjectName("borderWidget")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.borderWidget)
        self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.formLayout_2 = QtWidgets.QFormLayout()
        self.formLayout_2.setContentsMargins(12, 12, 12, 12)
        self.formLayout_2.setObjectName("formLayout_2")
        self.title_label_3 = QtWidgets.QLabel(self.borderWidget)
        self.title_label_3.setStyleSheet("")
        self.title_label_3.setObjectName("title_label_3")
        self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole,
                                    self.title_label_3)
        self.title_edit_3 = QtWidgets.QLineEdit(self.borderWidget)
        self.title_edit_3.setMinimumSize(QtCore.QSize(250, 0))
        self.title_edit_3.setObjectName("title_edit_3")
        self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole,
                                    self.title_edit_3)
        self.date_label_3 = QtWidgets.QLabel(self.borderWidget)
        self.date_label_3.setObjectName("date_label_3")
        self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole,
                                    self.date_label_3)
        self.dateTime_edit_3 = QtWidgets.QDateTimeEdit(self.borderWidget)
        self.dateTime_edit_3.setMinimumSize(QtCore.QSize(100, 0))
        self.dateTime_edit_3.setObjectName("dateTime_edit_3")
        self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole,
                                    self.dateTime_edit_3)
        self.lig_label_5 = QtWidgets.QLabel(self.borderWidget)
        self.lig_label_5.setObjectName("lig_label_5")
        self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole,
                                    self.lig_label_5)
        self.lig_combo_5 = QtWidgets.QComboBox(self.borderWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.lig_combo_5.sizePolicy().hasHeightForWidth())
        self.lig_combo_5.setSizePolicy(sizePolicy)
        self.lig_combo_5.setMinimumSize(QtCore.QSize(150, 0))
        self.lig_combo_5.setObjectName("lig_combo_5")
        self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole,
                                    self.lig_combo_5)
        self.location_label_3 = QtWidgets.QLabel(self.borderWidget)
        self.location_label_3.setObjectName("location_label_3")
        self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.LabelRole,
                                    self.location_label_3)
        self.location_combo_3 = QtWidgets.QComboBox(self.borderWidget)
        self.location_combo_3.setMinimumSize(QtCore.QSize(200, 0))
        self.location_combo_3.setObjectName("location_combo_3")
        self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.FieldRole,
                                    self.location_combo_3)
        self.description_label_5 = QtWidgets.QLabel(self.borderWidget)
        self.description_label_5.setObjectName("description_label_5")
        self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.LabelRole,
                                    self.description_label_5)
        self.description_edit_5 = QtWidgets.QTextEdit(self.borderWidget)
        self.description_edit_5.setMaximumSize(QtCore.QSize(450, 16777215))
        self.description_edit_5.setObjectName("description_edit_5")
        self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.FieldRole,
                                    self.description_edit_5)
        self.team_label_3 = QtWidgets.QLabel(self.borderWidget)
        self.team_label_3.setObjectName("team_label_3")
        self.formLayout_2.setWidget(5, QtWidgets.QFormLayout.LabelRole,
                                    self.team_label_3)
        self.teamWidget_3 = QtWidgets.QWidget(self.borderWidget)
        self.teamWidget_3.setMaximumSize(QtCore.QSize(450, 16777215))
        self.teamWidget_3.setObjectName("teamWidget_3")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.teamWidget_3)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.teamWidgetLayout = QtWidgets.QVBoxLayout()
        self.teamWidgetLayout.setObjectName("teamWidgetLayout")
        self.horizontalLayout.addLayout(self.teamWidgetLayout)
        self.formLayout_2.setWidget(5, QtWidgets.QFormLayout.FieldRole,
                                    self.teamWidget_3)
        self.row7_hlyaout = QtWidgets.QHBoxLayout()
        self.row7_hlyaout.setObjectName("row7_hlyaout")
        self.cancel_btn = QtWidgets.QPushButton(self.borderWidget)
        self.cancel_btn.setObjectName("cancel_btn")
        self.row7_hlyaout.addWidget(self.cancel_btn)
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.row7_hlyaout.addItem(spacerItem)
        self.save_btn = QtWidgets.QPushButton(self.borderWidget)
        self.save_btn.setObjectName("save_btn")
        self.row7_hlyaout.addWidget(self.save_btn)
        self.formLayout_2.setLayout(6, QtWidgets.QFormLayout.FieldRole,
                                    self.row7_hlyaout)
        self.horizontalLayout_2.addLayout(self.formLayout_2)
        self.verticalLayout.addWidget(self.borderWidget)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Ejemplo n.º 18
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.setWindowModality(QtCore.Qt.NonModal)
        Form.resize(671, 604)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.frame = QtWidgets.QFrame(Form)
        self.frame.setStyleSheet("")
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.frame_2 = QtWidgets.QFrame(self.frame)
        self.frame_2.setGeometry(QtCore.QRect(0, 0, 231, 191))
        self.frame_2.setStyleSheet(
            "image: url(:/lula/images (1).jpg);\n"
            "border-color: qradialgradient(spread:repeat, cx:0.5, cy:0.5, radius:0.077, fx:0.5, fy:0.5, stop:0 rgba(0, 169, 255, 147), stop:0.497326 rgba(0, 0, 0, 147), stop:1 rgba(0, 169, 255, 147));"
        )
        self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.formFrame = QtWidgets.QFrame(self.frame)
        self.formFrame.setGeometry(QtCore.QRect(240, 10, 421, 181))
        self.formFrame.setAutoFillBackground(False)
        self.formFrame.setStyleSheet("border-color: rgb(0, 0, 0);\n"
                                     "border-top-color: rgb(0, 0, 0);")
        self.formFrame.setObjectName("formFrame")
        self.formLayout = QtWidgets.QFormLayout(self.formFrame)
        self.formLayout.setContentsMargins(10, 5, 4, 4)
        self.formLayout.setObjectName("formLayout")
        self.label = QtWidgets.QLabel(self.formFrame)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole,
                                  self.label)
        self.lineEdit = QtWidgets.QLineEdit(self.formFrame)
        self.lineEdit.setText("")
        self.lineEdit.setObjectName("lineEdit")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole,
                                  self.lineEdit)
        self.label_2 = QtWidgets.QLabel(self.formFrame)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole,
                                  self.label_2)
        self.lineEdit_2 = QtWidgets.QLineEdit(self.formFrame)
        self.lineEdit_2.setText("")
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole,
                                  self.lineEdit_2)
        self.label_3 = QtWidgets.QLabel(self.formFrame)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole,
                                  self.label_3)
        self.lineEdit_3 = QtWidgets.QLineEdit(self.formFrame)
        self.lineEdit_3.setText("")
        self.lineEdit_3.setObjectName("lineEdit_3")
        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole,
                                  self.lineEdit_3)
        self.label_4 = QtWidgets.QLabel(self.formFrame)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole,
                                  self.label_4)
        self.dateEdit = QtWidgets.QDateEdit(self.formFrame)
        self.dateEdit.setObjectName("dateEdit")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole,
                                  self.dateEdit)
        self.label_5 = QtWidgets.QLabel(self.formFrame)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_5.setFont(font)
        self.label_5.setObjectName("label_5")
        self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole,
                                  self.label_5)
        self.lineEdit_4 = QtWidgets.QLineEdit(self.formFrame)
        self.lineEdit_4.setText("")
        self.lineEdit_4.setObjectName("lineEdit_4")
        self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole,
                                  self.lineEdit_4)
        self.label_6 = QtWidgets.QLabel(self.formFrame)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_6.setFont(font)
        self.label_6.setObjectName("label_6")
        self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole,
                                  self.label_6)
        self.lineEdit_5 = QtWidgets.QLineEdit(self.formFrame)
        self.lineEdit_5.setText("")
        self.lineEdit_5.setObjectName("lineEdit_5")
        self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole,
                                  self.lineEdit_5)
        self.frame_3 = QtWidgets.QFrame(self.frame)
        self.frame_3.setGeometry(QtCore.QRect(0, 200, 231, 121))
        self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_3.setObjectName("frame_3")
        self.checkBox_2 = QtWidgets.QCheckBox(self.frame_3)
        self.checkBox_2.setGeometry(QtCore.QRect(10, 10, 233, 26))
        font = QtGui.QFont()
        font.setFamily("MS Serif")
        font.setPointSize(14)
        font.setWeight(75)
        font.setBold(True)
        self.checkBox_2.setFont(font)
        self.checkBox_2.setObjectName("checkBox_2")
        self.checkBox_3 = QtWidgets.QCheckBox(self.frame_3)
        self.checkBox_3.setGeometry(QtCore.QRect(10, 40, 221, 18))
        self.checkBox_3.setObjectName("checkBox_3")
        self.checkBox_4 = QtWidgets.QCheckBox(self.frame_3)
        self.checkBox_4.setGeometry(QtCore.QRect(10, 60, 233, 14))
        self.checkBox_4.setStyleSheet("border-color: rgb(0, 0, 0);")
        self.checkBox_4.setObjectName("checkBox_4")
        self.checkBox = QtWidgets.QCheckBox(self.frame_3)
        self.checkBox.setGeometry(QtCore.QRect(10, 80, 233, 14))
        self.checkBox.setStyleSheet("border-color: rgb(0, 0, 0);")
        self.checkBox.setObjectName("checkBox")
        self.frame_4 = QtWidgets.QFrame(self.frame)
        self.frame_4.setGeometry(QtCore.QRect(0, 360, 231, 131))
        self.frame_4.setStyleSheet(
            "image: url(:/digitais-do-lula/images (2).jpg);")
        self.frame_4.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_4.setObjectName("frame_4")
        self.frame_5 = QtWidgets.QFrame(self.frame)
        self.frame_5.setGeometry(QtCore.QRect(0, 330, 231, 21))
        self.frame_5.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_5.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_5.setObjectName("frame_5")
        self.label_7 = QtWidgets.QLabel(self.frame_5)
        self.label_7.setGeometry(QtCore.QRect(6, 0, 221, 20))
        font = QtGui.QFont()
        font.setFamily("Arial Black")
        self.label_7.setFont(font)
        self.label_7.setObjectName("label_7")
        self.frame_6 = QtWidgets.QFrame(self.frame)
        self.frame_6.setGeometry(QtCore.QRect(240, 200, 421, 31))
        self.frame_6.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_6.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_6.setObjectName("frame_6")
        self.formFrame1 = QtWidgets.QFrame(self.frame_6)
        self.formFrame1.setGeometry(QtCore.QRect(0, 0, 421, 41))
        self.formFrame1.setObjectName("formFrame1")
        self.formLayout_2 = QtWidgets.QFormLayout(self.formFrame1)
        self.formLayout_2.setContentsMargins(1, 1, -1, -1)
        self.formLayout_2.setObjectName("formLayout_2")
        self.label_8 = QtWidgets.QLabel(self.formFrame1)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_8.setFont(font)
        self.label_8.setObjectName("label_8")
        self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole,
                                    self.label_8)
        self.dateTimeEdit = QtWidgets.QDateTimeEdit(self.formFrame1)
        self.dateTimeEdit.setObjectName("dateTimeEdit")
        self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole,
                                    self.dateTimeEdit)
        self.frame_7 = QtWidgets.QFrame(self.frame)
        self.frame_7.setGeometry(QtCore.QRect(240, 240, 421, 121))
        self.frame_7.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_7.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_7.setObjectName("frame_7")
        self.formFrame2 = QtWidgets.QFrame(self.frame_7)
        self.formFrame2.setGeometry(QtCore.QRect(9, 9, 401, 111))
        self.formFrame2.setObjectName("formFrame2")
        self.formLayout_3 = QtWidgets.QFormLayout(self.formFrame2)
        self.formLayout_3.setObjectName("formLayout_3")
        self.label_9 = QtWidgets.QLabel(self.formFrame2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_9.setFont(font)
        self.label_9.setObjectName("label_9")
        self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole,
                                    self.label_9)
        self.comboBox = QtWidgets.QComboBox(self.formFrame2)
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole,
                                    self.comboBox)
        self.label_10 = QtWidgets.QLabel(self.formFrame2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_10.setFont(font)
        self.label_10.setObjectName("label_10")
        self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole,
                                    self.label_10)
        self.lineEdit_6 = QtWidgets.QLineEdit(self.formFrame2)
        self.lineEdit_6.setObjectName("lineEdit_6")
        self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole,
                                    self.lineEdit_6)
        self.label_11 = QtWidgets.QLabel(self.formFrame2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_11.setFont(font)
        self.label_11.setObjectName("label_11")
        self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole,
                                    self.label_11)
        self.lineEdit_7 = QtWidgets.QLineEdit(self.formFrame2)
        self.lineEdit_7.setObjectName("lineEdit_7")
        self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole,
                                    self.lineEdit_7)
        self.lineEdit_8 = QtWidgets.QLineEdit(self.formFrame2)
        self.lineEdit_8.setObjectName("lineEdit_8")
        self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.FieldRole,
                                    self.lineEdit_8)
        self.label_12 = QtWidgets.QLabel(self.formFrame2)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_12.setFont(font)
        self.label_12.setObjectName("label_12")
        self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.LabelRole,
                                    self.label_12)
        self.frame_8 = QtWidgets.QFrame(self.frame)
        self.frame_8.setGeometry(QtCore.QRect(0, 509, 231, 81))
        self.frame_8.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_8.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_8.setObjectName("frame_8")
        self.verticalLayoutWidget = QtWidgets.QWidget(self.frame_8)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 0, 221, 80))
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.checkBox_5 = QtWidgets.QCheckBox(self.verticalLayoutWidget)
        self.checkBox_5.setObjectName("checkBox_5")
        self.verticalLayout.addWidget(self.checkBox_5)
        self.checkBox_6 = QtWidgets.QCheckBox(self.verticalLayoutWidget)
        self.checkBox_6.setObjectName("checkBox_6")
        self.verticalLayout.addWidget(self.checkBox_6)
        self.checkBox_7 = QtWidgets.QCheckBox(self.verticalLayoutWidget)
        self.checkBox_7.setObjectName("checkBox_7")
        self.verticalLayout.addWidget(self.checkBox_7)
        self.frame_9 = QtWidgets.QFrame(self.frame)
        self.frame_9.setGeometry(QtCore.QRect(240, 370, 421, 81))
        self.frame_9.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_9.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_9.setObjectName("frame_9")
        self.formLayoutWidget = QtWidgets.QWidget(self.frame_9)
        self.formLayoutWidget.setGeometry(QtCore.QRect(9, 0, 411, 31))
        self.formLayoutWidget.setObjectName("formLayoutWidget")
        self.formLayout_4 = QtWidgets.QFormLayout(self.formLayoutWidget)
        self.formLayout_4.setContentsMargins(0, 0, 0, 0)
        self.formLayout_4.setObjectName("formLayout_4")
        self.label_13 = QtWidgets.QLabel(self.formLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("Arial")
        font.setPointSize(10)
        self.label_13.setFont(font)
        self.label_13.setObjectName("label_13")
        self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.LabelRole,
                                    self.label_13)
        self.comboBox_2 = QtWidgets.QComboBox(self.formLayoutWidget)
        self.comboBox_2.setObjectName("comboBox_2")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.FieldRole,
                                    self.comboBox_2)
        self.horizontalLayoutWidget = QtWidgets.QWidget(self.frame_9)
        self.horizontalLayoutWidget.setGeometry(QtCore.QRect(9, 30, 411, 63))
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(
            self.horizontalLayoutWidget)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.pushButton = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.pushButton.setObjectName("pushButton")
        self.horizontalLayout.addWidget(self.pushButton)
        self.pushButton_2 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.pushButton_2.setObjectName("pushButton_2")
        self.horizontalLayout.addWidget(self.pushButton_2)
        self.pushButton_3 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.pushButton_3.setObjectName("pushButton_3")
        self.horizontalLayout.addWidget(self.pushButton_3)
        self.frame_10 = QtWidgets.QFrame(self.frame)
        self.frame_10.setGeometry(QtCore.QRect(240, 460, 421, 80))
        self.frame_10.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_10.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_10.setObjectName("frame_10")
        self.verticalLayoutWidget_2 = QtWidgets.QWidget(self.frame_10)
        self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(10, 0, 411, 80))
        self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(
            self.verticalLayoutWidget_2)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.listView = QtWidgets.QListView(self.verticalLayoutWidget_2)
        self.listView.setObjectName("listView")
        self.verticalLayout_2.addWidget(self.listView)
        self.frame_11 = QtWidgets.QFrame(self.frame)
        self.frame_11.setGeometry(QtCore.QRect(250, 550, 411, 41))
        self.frame_11.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame_11.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame_11.setObjectName("frame_11")
        self.verticalLayoutWidget_3 = QtWidgets.QWidget(self.frame_11)
        self.verticalLayoutWidget_3.setGeometry(QtCore.QRect(0, 0, 411, 41))
        self.verticalLayoutWidget_3.setObjectName("verticalLayoutWidget_3")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(
            self.verticalLayoutWidget_3)
        self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.pushButton_4 = QtWidgets.QPushButton(self.verticalLayoutWidget_3)
        self.pushButton_4.setObjectName("pushButton_4")
        self.verticalLayout_3.addWidget(self.pushButton_4)
        self.gridLayout.addWidget(self.frame, 0, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Ejemplo n.º 19
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(422, 313)
        self.verticalLayoutWidget = QtWidgets.QWidget(Form)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 80, 160, 112))
        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.DeviceName = QtWidgets.QLabel(self.verticalLayoutWidget)
        self.DeviceName.setObjectName("DeviceName")
        self.verticalLayout.addWidget(self.DeviceName)
        self.comboBox_DeviceName = QtWidgets.QComboBox(self.verticalLayoutWidget)
        self.comboBox_DeviceName.setObjectName("comboBox_DeviceName")
        self.verticalLayout.addWidget(self.comboBox_DeviceName)
        self.label_DataType = QtWidgets.QLabel(self.verticalLayoutWidget)
        self.label_DataType.setObjectName("label_DataType")
        self.verticalLayout.addWidget(self.label_DataType)
        self.comboBox_DataType = QtWidgets.QComboBox(self.verticalLayoutWidget)
        self.comboBox_DataType.setObjectName("comboBox_DataType")
        self.verticalLayout.addWidget(self.comboBox_DataType)
        self.comboBox_TSS_file = QtWidgets.QComboBox(self.verticalLayoutWidget)
        self.comboBox_TSS_file.setMouseTracking(False)
        self.comboBox_TSS_file.setObjectName("comboBox_TSS_file")
        self.verticalLayout.addWidget(self.comboBox_TSS_file)
        self.comboBox_TSS_file.currentIndexChanged.connect(self.update_TSS_DATA)  # AR chaneg
        self.verticalLayoutWidget_2 = QtWidgets.QWidget(Form)
        self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(220, 80, 181, 86))
        self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_2)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.StartDate_Label = QtWidgets.QLabel(self.verticalLayoutWidget_2)
        self.StartDate_Label.setObjectName("StartDate_Label")
        self.verticalLayout_2.addWidget(self.StartDate_Label)
        self.StartDate_2 = QtWidgets.QDateTimeEdit(self.verticalLayoutWidget_2)
        self.StartDate_2.setObjectName("StartDate_2")
        self.StartDate_2.setDateTime(QtCore.QDateTime.currentDateTime()) # AR


        self.StartDate_2.setCalendarPopup(True)  #### By AR to display the calendar
        self.verticalLayout_2.addWidget(self.StartDate_2)
        self.EndDate_Label = QtWidgets.QLabel(self.verticalLayoutWidget_2)
        self.EndDate_Label.setObjectName("EndDate_Label")
        self.verticalLayout_2.addWidget(self.EndDate_Label)
        self.endDate = QtWidgets.QDateTimeEdit(self.verticalLayoutWidget_2)
        self.endDate.setObjectName("endDate")
        self.endDate.setDateTime(QtCore.QDateTime.currentDateTime()) #AR
        self.endDate.setCalendarPopup(True)  #### By AR to display the calendar
        self.verticalLayout_2.addWidget(self.endDate)
        self.verticalLayoutWidget_3 = QtWidgets.QWidget(Form)
        self.verticalLayoutWidget_3.setGeometry(QtCore.QRect(10, 210, 160, 83))
        self.verticalLayoutWidget_3.setObjectName("verticalLayoutWidget_3")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_3)
        self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.Save_button = QtWidgets.QPushButton(self.verticalLayoutWidget_3)
        self.Save_button.setObjectName("Save_button")
        self.verticalLayout_3.addWidget(self.Save_button)
        self.Save_button.clicked.connect(self.update_parameters)  #### By AR to display the calendar
        self.export_button = QtWidgets.QPushButton(self.verticalLayoutWidget_3)
        self.export_button.setObjectName("export_button")
        self.verticalLayout_3.addWidget(self.export_button)
        self.export_button.clicked.connect(self.loginCheck)  #### By AR to display the calendar
        self.plot_button = QtWidgets.QPushButton(self.verticalLayoutWidget_3)
        self.plot_button.setObjectName("plot_button")
        self.verticalLayout_3.addWidget(self.plot_button)
        self.plot_button.clicked.connect(self.plotFCAS)  #### By AR to display the calendar
        self.gridLayoutWidget = QtWidgets.QWidget(Form)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(220, 210, 186, 80))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.lineEdit_2 = QtWidgets.QLineEdit(self.gridLayoutWidget)
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.gridLayout.addWidget(self.lineEdit_2, 2, 0, 1, 1)
        self.toolButton_2 = QtWidgets.QToolButton(self.gridLayoutWidget)
        self.toolButton_2.setObjectName("toolButton_2")
        self.gridLayout.addWidget(self.toolButton_2, 2, 1, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.gridLayoutWidget)
        self.toolButton_2.clicked.connect(self.selectDestinationFolder)  # AR
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setWeight(75)
        font.setBold(True)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.gridLayoutWidget_2 = QtWidgets.QWidget(Form)
        self.gridLayoutWidget_2.setGeometry(QtCore.QRect(10, 20, 391, 44))
        self.gridLayoutWidget_2.setObjectName("gridLayoutWidget_2")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.gridLayoutWidget_2)
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.toolButton = QtWidgets.QToolButton(self.gridLayoutWidget_2)
        self.toolButton.setObjectName("toolButton")
        self.gridLayout_2.addWidget(self.toolButton, 2, 1, 1, 1)
        self.lineEdit = QtWidgets.QLineEdit(self.gridLayoutWidget_2)
        self.toolButton.clicked.connect(self.selectDirectory)  # AR
        self.lineEdit.setMouseTracking(False)
        self.lineEdit.setAcceptDrops(True)
        self.lineEdit.setDragEnabled(False)
        self.lineEdit.setReadOnly(True)
        self.lineEdit.setObjectName("lineEdit")
        self.gridLayout_2.addWidget(self.lineEdit, 2, 0, 1, 1)
        self.label = QtWidgets.QLabel(self.gridLayoutWidget_2)
        font = QtGui.QFont()
        font.setPointSize(10)
        font.setWeight(75)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
Ejemplo n.º 20
0
    def setupUi(self, CalcMainWindow):
        CalcMainWindow.setObjectName("CalcMainWindow")
        CalcMainWindow.resize(452, 365)
        self.calcular_pbt = QtWidgets.QPushButton(CalcMainWindow)
        self.calcular_pbt.setGeometry(QtCore.QRect(20, 300, 411, 41))
        self.calcular_pbt.setAutoDefault(True)
        self.calcular_pbt.setDefault(True)
        self.calcular_pbt.setObjectName("calcular_pbt")
        self.hsextras = QtWidgets.QLabel(CalcMainWindow)
        self.hsextras.setGeometry(QtCore.QRect(20, 57, 132, 16))
        self.hsextras.setObjectName("hsextras")
        self.valorjornada_LEd = QtWidgets.QLineEdit(CalcMainWindow)
        self.valorjornada_LEd.setGeometry(QtCore.QRect(262, 10, 161, 31))
        font = QtGui.QFont()
        font.setPointSize(11)
        self.valorjornada_LEd.setFont(font)
        self.valorjornada_LEd.setMouseTracking(True)
        self.valorjornada_LEd.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.valorjornada_LEd.setToolTipDuration(-1)
        self.valorjornada_LEd.setFrame(False)
        self.valorjornada_LEd.setCursorPosition(0)
        self.valorjornada_LEd.setProperty("valJornada", 0)
        self.valorjornada_LEd.setObjectName("valorjornada_LEd")
        self.valJornada_L = QtWidgets.QLabel(CalcMainWindow)
        self.valJornada_L.setGeometry(QtCore.QRect(20, 20, 236, 16))
        font = QtGui.QFont()
        font.setPointSize(10)
        self.valJornada_L.setFont(font)
        self.valJornada_L.setTextFormat(QtCore.Qt.AutoText)
        self.valJornada_L.setObjectName("valJornada_L")
        self.TotalaCobrar_LCD = QtWidgets.QLCDNumber(CalcMainWindow)
        self.TotalaCobrar_LCD.setGeometry(QtCore.QRect(130, 250, 291, 41))
        self.TotalaCobrar_LCD.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.TotalaCobrar_LCD.setSmallDecimalPoint(False)
        self.TotalaCobrar_LCD.setProperty("intValue", 0)
        self.TotalaCobrar_LCD.setObjectName("TotalaCobrar_LCD")
        self.cobraras_L = QtWidgets.QLabel(CalcMainWindow)
        self.cobraras_L.setGeometry(QtCore.QRect(20, 270, 123, 16))
        self.cobraras_L.setObjectName("cobraras_L")
        self.hnocturno_checkbox = QtWidgets.QCheckBox(CalcMainWindow)
        self.hnocturno_checkbox.setEnabled(True)
        self.hnocturno_checkbox.setGeometry(QtCore.QRect(20, 145, 243, 20))
        self.hnocturno_checkbox.setMinimumSize(QtCore.QSize(81, 0))
        self.hnocturno_checkbox.setObjectName("hnocturno_checkbox")
        self.duracion_Jornada_spinBox = QtWidgets.QSpinBox(CalcMainWindow)
        self.duracion_Jornada_spinBox.setGeometry(QtCore.QRect(
            160, 50, 51, 22))
        self.duracion_Jornada_spinBox.setMinimum(1)
        self.duracion_Jornada_spinBox.setMaximum(24)
        self.duracion_Jornada_spinBox.setProperty("value", 12)
        self.duracion_Jornada_spinBox.setObjectName("duracion_Jornada_spinBox")
        self.splitter = QtWidgets.QSplitter(CalcMainWindow)
        self.splitter.setGeometry(QtCore.QRect(20, 110, 401, 24))
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.dia_hora_entrada = QtWidgets.QDateTimeEdit(self.splitter)
        self.dia_hora_entrada.setDateTime(
            QtCore.QDateTime(QtCore.QDate(2019, 1, 1), QtCore.QTime(0, 0, 0)))
        self.dia_hora_entrada.setCurrentSection(
            QtWidgets.QDateTimeEdit.DaySection)
        self.dia_hora_entrada.setCalendarPopup(True)
        self.dia_hora_entrada.setObjectName("dia_hora_entrada")
        self.hasta_L = QtWidgets.QLabel(self.splitter)
        self.hasta_L.setObjectName("hasta_L")
        self.dia_hora_salida = QtWidgets.QDateTimeEdit(self.splitter)
        self.dia_hora_salida.setDateTime(
            QtCore.QDateTime(QtCore.QDate(2019, 1, 1), QtCore.QTime(0, 0, 0)))
        self.dia_hora_salida.setCurrentSection(
            QtWidgets.QDateTimeEdit.DaySection)
        self.dia_hora_salida.setCalendarPopup(True)
        self.dia_hora_salida.setObjectName("dia_hora_salida")
        self.Entrada_FechaHora_label = QtWidgets.QLabel(CalcMainWindow)
        self.Entrada_FechaHora_label.setGeometry(QtCore.QRect(20, 91, 119, 20))
        self.Entrada_FechaHora_label.setObjectName("Entrada_FechaHora_label")
        self.Salida_FechaHora_label = QtWidgets.QLabel(CalcMainWindow)
        self.Salida_FechaHora_label.setGeometry(QtCore.QRect(310, 90, 114, 24))
        self.Salida_FechaHora_label.setObjectName("Salida_FechaHora_label")
        self.porcentaje_hs_extras_spinBox = QtWidgets.QSpinBox(CalcMainWindow)
        self.porcentaje_hs_extras_spinBox.setGeometry(
            QtCore.QRect(380, 140, 41, 22))
        self.porcentaje_hs_extras_spinBox.setMinimum(0)
        self.porcentaje_hs_extras_spinBox.setMaximum(150)
        self.porcentaje_hs_extras_spinBox.setSingleStep(10)
        self.porcentaje_hs_extras_spinBox.setProperty("value", 50)
        self.porcentaje_hs_extras_spinBox.setObjectName(
            "porcentaje_hs_extras_spinBox")
        self.porcentaje_hs_ext_L = QtWidgets.QLabel(CalcMainWindow)
        self.porcentaje_hs_ext_L.setGeometry(QtCore.QRect(248, 145, 132, 16))
        self.porcentaje_hs_ext_L.setObjectName("porcentaje_hs_ext_L")
        self.gridLayoutWidget = QtWidgets.QWidget(CalcMainWindow)
        self.gridLayoutWidget.setGeometry(QtCore.QRect(20, 170, 415, 40))
        self.gridLayoutWidget.setObjectName("gridLayoutWidget")
        self.sub_totales_gridLayout = QtWidgets.QGridLayout(
            self.gridLayoutWidget)
        self.sub_totales_gridLayout.setSizeConstraint(
            QtWidgets.QLayout.SetMinimumSize)
        self.sub_totales_gridLayout.setContentsMargins(0, 0, 0, 0)
        self.sub_totales_gridLayout.setObjectName("sub_totales_gridLayout")
        self.por_hs_extra_label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("MS Shell Dlg 2")
        self.por_hs_extra_label.setFont(font)
        self.por_hs_extra_label.setObjectName("por_hs_extra_label")
        self.sub_totales_gridLayout.addWidget(self.por_hs_extra_label, 1, 5, 1,
                                              1)
        self.pesos_label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("MS Shell Dlg 2")
        self.pesos_label.setFont(font)
        self.pesos_label.setObjectName("pesos_label")
        self.sub_totales_gridLayout.addWidget(self.pesos_label, 1, 2, 1, 1)
        self.delascuales_label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("MS Shell Dlg 2")
        self.delascuales_label.setFont(font)
        self.delascuales_label.setObjectName("delascuales_label")
        self.sub_totales_gridLayout.addWidget(self.delascuales_label, 0, 3, 1,
                                              1)
        self.a_un_valor = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("MS Shell Dlg 2")
        self.a_un_valor.setFont(font)
        self.a_un_valor.setObjectName("a_un_valor")
        self.sub_totales_gridLayout.addWidget(self.a_un_valor, 1, 3, 1, 1)
        self.hasTrabajado = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("MS Shell Dlg 2")
        self.hasTrabajado.setFont(font)
        self.hasTrabajado.setObjectName("hasTrabajado")
        self.sub_totales_gridLayout.addWidget(self.hasTrabajado, 0, 0, 1, 1)
        self.son_extras_label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("MS Shell Dlg 2")
        self.son_extras_label.setFont(font)
        self.son_extras_label.setObjectName("son_extras_label")
        self.sub_totales_gridLayout.addWidget(self.son_extras_label, 0, 5, 1,
                                              1)
        self.gananciaHsExtra_label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.gananciaHsExtra_label.setFont(font)
        self.gananciaHsExtra_label.setObjectName("gananciaHsExtra_label")
        self.sub_totales_gridLayout.addWidget(self.gananciaHsExtra_label, 1, 1,
                                              1, 1)
        self.cobrarasXhsEx_L = QtWidgets.QLabel(self.gridLayoutWidget)
        self.cobrarasXhsEx_L.setObjectName("cobrarasXhsEx_L")
        self.sub_totales_gridLayout.addWidget(self.cobrarasXhsEx_L, 1, 0, 1, 1)
        self.horas_label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setFamily("MS Shell Dlg 2")
        self.horas_label.setFont(font)
        self.horas_label.setObjectName("horas_label")
        self.sub_totales_gridLayout.addWidget(self.horas_label, 0, 2, 1, 1)
        self.horasTrabajadas_label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.horasTrabajadas_label.setFont(font)
        self.horasTrabajadas_label.setObjectName("horasTrabajadas_label")
        self.sub_totales_gridLayout.addWidget(self.horasTrabajadas_label, 0, 1,
                                              1, 1)
        self.son_hs_extras_label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.son_hs_extras_label.setFont(font)
        self.son_hs_extras_label.setObjectName("son_hs_extras_label")
        self.sub_totales_gridLayout.addWidget(self.son_hs_extras_label, 0, 4,
                                              1, 1)
        self.valor_x_hsextra_label = QtWidgets.QLabel(self.gridLayoutWidget)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.valor_x_hsextra_label.setFont(font)
        self.valor_x_hsextra_label.setObjectName("valor_x_hsextra_label")
        self.sub_totales_gridLayout.addWidget(self.valor_x_hsextra_label, 1, 4,
                                              1, 1)

        self.retranslateUi(CalcMainWindow)
        QtCore.QObject.connect(self.valorjornada_LEd,
                               QtCore.SIGNAL("returnPressed()"),
                               self.calcular_pbt.update)
        QtCore.QObject.connect(self.duracion_Jornada_spinBox,
                               QtCore.SIGNAL("valueChanged(int)"),
                               CalcMainWindow.update)
        QtCore.QObject.connect(self.hnocturno_checkbox,
                               QtCore.SIGNAL("clicked(bool)"),
                               self.duracion_Jornada_spinBox.update)
        QtCore.QMetaObject.connectSlotsByName(CalcMainWindow)
        CalcMainWindow.setTabOrder(self.valorjornada_LEd,
                                   self.duracion_Jornada_spinBox)
        CalcMainWindow.setTabOrder(self.duracion_Jornada_spinBox,
                                   self.dia_hora_entrada)
        CalcMainWindow.setTabOrder(self.dia_hora_entrada, self.dia_hora_salida)
        CalcMainWindow.setTabOrder(self.dia_hora_salida, self.calcular_pbt)
        CalcMainWindow.setTabOrder(self.calcular_pbt, self.hnocturno_checkbox)
Ejemplo n.º 21
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(962, 771)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.uiSPL_test1 = QtWidgets.QSplitter(self.centralwidget)
        self.uiSPL_test1.setOrientation(QtCore.Qt.Horizontal)
        self.uiSPL_test1.setHandleWidth(10)
        self.uiSPL_test1.setObjectName("uiSPL_test1")
        self.layoutWidget = QtWidgets.QWidget(self.uiSPL_test1)
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.uiCHK_test1 = QtWidgets.QCheckBox(self.layoutWidget)
        self.uiCHK_test1.setObjectName("uiCHK_test1")
        self.verticalLayout.addWidget(self.uiCHK_test1)
        self.uiCHK_testTri1 = QtWidgets.QCheckBox(self.layoutWidget)
        self.uiCHK_testTri1.setTristate(True)
        self.uiCHK_testTri1.setObjectName("uiCHK_testTri1")
        self.verticalLayout.addWidget(self.uiCHK_testTri1)
        self.uiGRPBOX_test1 = QtWidgets.QGroupBox(self.layoutWidget)
        self.uiGRPBOX_test1.setCheckable(True)
        self.uiGRPBOX_test1.setChecked(True)
        self.uiGRPBOX_test1.setObjectName("uiGRPBOX_test1")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.uiGRPBOX_test1)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.uiRAD_test1 = QtWidgets.QRadioButton(self.uiGRPBOX_test1)
        self.uiRAD_test1.setObjectName("uiRAD_test1")
        self.horizontalLayout.addWidget(self.uiRAD_test1)
        self.uiRAD_test2 = QtWidgets.QRadioButton(self.uiGRPBOX_test1)
        self.uiRAD_test2.setObjectName("uiRAD_test2")
        self.horizontalLayout.addWidget(self.uiRAD_test2)
        self.verticalLayout.addWidget(self.uiGRPBOX_test1)
        self.uiLED_test1 = QtWidgets.QLineEdit(self.layoutWidget)
        self.uiLED_test1.setObjectName("uiLED_test1")
        self.verticalLayout.addWidget(self.uiLED_test1)
        self.uiSPN_test1 = QtWidgets.QSpinBox(self.layoutWidget)
        self.uiSPN_test1.setObjectName("uiSPN_test1")
        self.verticalLayout.addWidget(self.uiSPN_test1)
        self.uiSPNDBL_test1 = QtWidgets.QDoubleSpinBox(self.layoutWidget)
        self.uiSPNDBL_test1.setObjectName("uiSPNDBL_test1")
        self.verticalLayout.addWidget(self.uiSPNDBL_test1)
        self.uiTIMEDT_test1 = QtWidgets.QTimeEdit(self.layoutWidget)
        self.uiTIMEDT_test1.setObjectName("uiTIMEDT_test1")
        self.verticalLayout.addWidget(self.uiTIMEDT_test1)
        self.uiDATEDT_test1 = QtWidgets.QDateEdit(self.layoutWidget)
        self.uiDATEDT_test1.setObjectName("uiDATEDT_test1")
        self.verticalLayout.addWidget(self.uiDATEDT_test1)
        self.uiDTEDIT_test1 = QtWidgets.QDateTimeEdit(self.layoutWidget)
        self.uiDTEDIT_test1.setObjectName("uiDTEDIT_test1")
        self.verticalLayout.addWidget(self.uiDTEDIT_test1)
        self.uiBTN_test1 = QtWidgets.QPushButton(self.layoutWidget)
        self.uiBTN_test1.setCheckable(True)
        self.uiBTN_test1.setObjectName("uiBTN_test1")
        self.verticalLayout.addWidget(self.uiBTN_test1)
        self.uiCBX_test1 = QtWidgets.QComboBox(self.layoutWidget)
        self.uiCBX_test1.setObjectName("uiCBX_test1")
        self.uiCBX_test1.addItem("")
        self.uiCBX_test1.addItem("")
        self.uiCBX_test1.addItem("")
        self.uiCBX_test1.addItem("")
        self.uiCBX_test1.addItem("")
        self.uiCBX_test1.addItem("")
        self.uiCBX_test1.addItem("")
        self.verticalLayout.addWidget(self.uiCBX_test1)
        self.uiCBX_test2 = QtWidgets.QComboBox(self.layoutWidget)
        self.uiCBX_test2.setEditable(True)
        self.uiCBX_test2.setObjectName("uiCBX_test2")
        self.verticalLayout.addWidget(self.uiCBX_test2)
        self.uiSCR_test1 = QtWidgets.QScrollBar(self.layoutWidget)
        self.uiSCR_test1.setOrientation(QtCore.Qt.Horizontal)
        self.uiSCR_test1.setObjectName("uiSCR_test1")
        self.verticalLayout.addWidget(self.uiSCR_test1)
        self.uiSLD_test1 = QtWidgets.QSlider(self.layoutWidget)
        self.uiSLD_test1.setOrientation(QtCore.Qt.Horizontal)
        self.uiSLD_test1.setObjectName("uiSLD_test1")
        self.verticalLayout.addWidget(self.uiSLD_test1)
        self.uiDIA_test1 = QtWidgets.QDial(self.layoutWidget)
        self.uiDIA_test1.setObjectName("uiDIA_test1")
        self.verticalLayout.addWidget(self.uiDIA_test1)
        self.horizontalLayout_15 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_15.setObjectName("horizontalLayout_15")
        self.label_4 = QtWidgets.QLabel(self.layoutWidget)
        self.label_4.setObjectName("label_4")
        self.horizontalLayout_15.addWidget(self.label_4)
        self.uiLED_testVariable1 = QtWidgets.QLineEdit(self.layoutWidget)
        self.uiLED_testVariable1.setObjectName("uiLED_testVariable1")
        self.horizontalLayout_15.addWidget(self.uiLED_testVariable1)
        self.verticalLayout.addLayout(self.horizontalLayout_15)
        self.uiBTN_showDialog = QtWidgets.QPushButton(self.layoutWidget)
        self.uiBTN_showDialog.setObjectName("uiBTN_showDialog")
        self.verticalLayout.addWidget(self.uiBTN_showDialog)
        spacerItem = QtWidgets.QSpacerItem(20, 40,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.uiTAB_test1 = QtWidgets.QTabWidget(self.uiSPL_test1)
        self.uiTAB_test1.setObjectName("uiTAB_test1")
        self.uiTABPG_listWidget = QtWidgets.QWidget()
        self.uiTABPG_listWidget.setObjectName("uiTABPG_listWidget")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(
            self.uiTABPG_listWidget)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.uiLSTWID_test1 = QtWidgets.QListWidget(self.uiTABPG_listWidget)
        self.uiLSTWID_test1.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.uiLSTWID_test1.setObjectName("uiLSTWID_test1")
        QtWidgets.QListWidgetItem(self.uiLSTWID_test1)
        QtWidgets.QListWidgetItem(self.uiLSTWID_test1)
        QtWidgets.QListWidgetItem(self.uiLSTWID_test1)
        QtWidgets.QListWidgetItem(self.uiLSTWID_test1)
        QtWidgets.QListWidgetItem(self.uiLSTWID_test1)
        QtWidgets.QListWidgetItem(self.uiLSTWID_test1)
        QtWidgets.QListWidgetItem(self.uiLSTWID_test1)
        self.horizontalLayout_2.addWidget(self.uiLSTWID_test1)
        self.uiTAB_test1.addTab(self.uiTABPG_listWidget, "")
        self.uiTABPG_treeWidget = QtWidgets.QWidget()
        self.uiTABPG_treeWidget.setObjectName("uiTABPG_treeWidget")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(
            self.uiTABPG_treeWidget)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.uiTREW_test1 = QtWidgets.QTreeWidget(self.uiTABPG_treeWidget)
        self.uiTREW_test1.setAlternatingRowColors(True)
        self.uiTREW_test1.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.uiTREW_test1.setSelectionBehavior(
            QtWidgets.QAbstractItemView.SelectItems)
        self.uiTREW_test1.setObjectName("uiTREW_test1")
        item_0 = QtWidgets.QTreeWidgetItem(self.uiTREW_test1)
        item_0 = QtWidgets.QTreeWidgetItem(self.uiTREW_test1)
        item_0 = QtWidgets.QTreeWidgetItem(self.uiTREW_test1)
        item_0 = QtWidgets.QTreeWidgetItem(self.uiTREW_test1)
        item_1 = QtWidgets.QTreeWidgetItem(item_0)
        item_2 = QtWidgets.QTreeWidgetItem(item_1)
        item_2 = QtWidgets.QTreeWidgetItem(item_1)
        item_2 = QtWidgets.QTreeWidgetItem(item_1)
        item_0 = QtWidgets.QTreeWidgetItem(self.uiTREW_test1)
        item_1 = QtWidgets.QTreeWidgetItem(item_0)
        item_2 = QtWidgets.QTreeWidgetItem(item_1)
        item_2 = QtWidgets.QTreeWidgetItem(item_1)
        item_2 = QtWidgets.QTreeWidgetItem(item_1)
        item_0 = QtWidgets.QTreeWidgetItem(self.uiTREW_test1)
        item_1 = QtWidgets.QTreeWidgetItem(item_0)
        item_2 = QtWidgets.QTreeWidgetItem(item_1)
        item_2 = QtWidgets.QTreeWidgetItem(item_1)
        item_2 = QtWidgets.QTreeWidgetItem(item_1)
        self.uiTREW_test1.header().setDefaultSectionSize(200)
        self.uiTREW_test1.header().setMinimumSectionSize(200)
        self.uiTREW_test1.header().setSortIndicatorShown(True)
        self.horizontalLayout_3.addWidget(self.uiTREW_test1)
        self.uiTAB_test1.addTab(self.uiTABPG_treeWidget, "")
        self.uiTABPG_tableWidget = QtWidgets.QWidget()
        self.uiTABPG_tableWidget.setObjectName("uiTABPG_tableWidget")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout(
            self.uiTABPG_tableWidget)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.uiTBLWID_test1 = QtWidgets.QTableWidget(self.uiTABPG_tableWidget)
        self.uiTBLWID_test1.setObjectName("uiTBLWID_test1")
        self.uiTBLWID_test1.setColumnCount(2)
        self.uiTBLWID_test1.setRowCount(7)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setVerticalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setVerticalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setVerticalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setVerticalHeaderItem(3, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setVerticalHeaderItem(4, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setVerticalHeaderItem(5, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setVerticalHeaderItem(6, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(0, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(0, 1, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(1, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(1, 1, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(2, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(2, 1, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(3, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(3, 1, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(4, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(4, 1, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(5, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(5, 1, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(6, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.uiTBLWID_test1.setItem(6, 1, item)
        self.uiTBLWID_test1.horizontalHeader().setSortIndicatorShown(True)
        self.horizontalLayout_4.addWidget(self.uiTBLWID_test1)
        self.uiTAB_test1.addTab(self.uiTABPG_tableWidget, "")
        self.uiTABPG_listView = QtWidgets.QWidget()
        self.uiTABPG_listView.setObjectName("uiTABPG_listView")
        self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.uiTABPG_listView)
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
        self.uiLSTV_test1 = QtWidgets.QListView(self.uiTABPG_listView)
        self.uiLSTV_test1.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.uiLSTV_test1.setObjectName("uiLSTV_test1")
        self.horizontalLayout_7.addWidget(self.uiLSTV_test1)
        self.uiTAB_test1.addTab(self.uiTABPG_listView, "")
        self.uiTABPG_treeView = QtWidgets.QWidget()
        self.uiTABPG_treeView.setObjectName("uiTABPG_treeView")
        self.horizontalLayout_8 = QtWidgets.QHBoxLayout(self.uiTABPG_treeView)
        self.horizontalLayout_8.setObjectName("horizontalLayout_8")
        self.uiTREV_test1 = QtWidgets.QTreeView(self.uiTABPG_treeView)
        self.uiTREV_test1.setAlternatingRowColors(True)
        self.uiTREV_test1.setSelectionMode(
            QtWidgets.QAbstractItemView.ExtendedSelection)
        self.uiTREV_test1.setSelectionBehavior(
            QtWidgets.QAbstractItemView.SelectItems)
        self.uiTREV_test1.setSortingEnabled(True)
        self.uiTREV_test1.setObjectName("uiTREV_test1")
        self.uiTREV_test1.header().setDefaultSectionSize(200)
        self.uiTREV_test1.header().setMinimumSectionSize(200)
        self.uiTREV_test1.header().setSortIndicatorShown(True)
        self.horizontalLayout_8.addWidget(self.uiTREV_test1)
        self.uiTAB_test1.addTab(self.uiTABPG_treeView, "")
        self.uiTABPG_tableView = QtWidgets.QWidget()
        self.uiTABPG_tableView.setObjectName("uiTABPG_tableView")
        self.horizontalLayout_10 = QtWidgets.QHBoxLayout(
            self.uiTABPG_tableView)
        self.horizontalLayout_10.setObjectName("horizontalLayout_10")
        self.uiTBLV_test1 = QtWidgets.QTableView(self.uiTABPG_tableView)
        self.uiTBLV_test1.setSortingEnabled(True)
        self.uiTBLV_test1.setObjectName("uiTBLV_test1")
        self.uiTBLV_test1.horizontalHeader().setSortIndicatorShown(True)
        self.horizontalLayout_10.addWidget(self.uiTBLV_test1)
        self.uiTAB_test1.addTab(self.uiTABPG_tableView, "")
        self.uiTABPG_columnView = QtWidgets.QWidget()
        self.uiTABPG_columnView.setObjectName("uiTABPG_columnView")
        self.horizontalLayout_9 = QtWidgets.QHBoxLayout(
            self.uiTABPG_columnView)
        self.horizontalLayout_9.setObjectName("horizontalLayout_9")
        self.uiCOLV_test1 = QtWidgets.QColumnView(self.uiTABPG_columnView)
        self.uiCOLV_test1.setObjectName("uiCOLV_test1")
        self.horizontalLayout_9.addWidget(self.uiCOLV_test1)
        self.uiTAB_test1.addTab(self.uiTABPG_columnView, "")
        self.uiTABPG_scrollText = QtWidgets.QWidget()
        self.uiTABPG_scrollText.setObjectName("uiTABPG_scrollText")
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout(
            self.uiTABPG_scrollText)
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.uiSCA_test1 = QtWidgets.QScrollArea(self.uiTABPG_scrollText)
        self.uiSCA_test1.setWidgetResizable(True)
        self.uiSCA_test1.setObjectName("uiSCA_test1")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 634, 676))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.horizontalLayout_11 = QtWidgets.QHBoxLayout(
            self.scrollAreaWidgetContents)
        self.horizontalLayout_11.setObjectName("horizontalLayout_11")
        self.uiTXTEDT_test1 = QtWidgets.QTextEdit(
            self.scrollAreaWidgetContents)
        self.uiTXTEDT_test1.setMinimumSize(QtCore.QSize(300, 600))
        self.uiTXTEDT_test1.setObjectName("uiTXTEDT_test1")
        self.horizontalLayout_11.addWidget(self.uiTXTEDT_test1)
        self.uiPTXEDT_test1 = QtWidgets.QPlainTextEdit(
            self.scrollAreaWidgetContents)
        self.uiPTXEDT_test1.setMinimumSize(QtCore.QSize(300, 600))
        self.uiPTXEDT_test1.setObjectName("uiPTXEDT_test1")
        self.horizontalLayout_11.addWidget(self.uiPTXEDT_test1)
        self.uiSCA_test1.setWidget(self.scrollAreaWidgetContents)
        self.horizontalLayout_6.addWidget(self.uiSCA_test1)
        self.uiTAB_test1.addTab(self.uiTABPG_scrollText, "")
        self.uiTABPG_stackTool = QtWidgets.QWidget()
        self.uiTABPG_stackTool.setObjectName("uiTABPG_stackTool")
        self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.uiTABPG_stackTool)
        self.verticalLayout_6.setSpacing(0)
        self.verticalLayout_6.setContentsMargins(4, 6, 4, 4)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.horizontalLayout_12 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_12.setObjectName("horizontalLayout_12")
        spacerItem1 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_12.addItem(spacerItem1)
        self.uiBTN_stackDec = QtWidgets.QPushButton(self.uiTABPG_stackTool)
        self.uiBTN_stackDec.setObjectName("uiBTN_stackDec")
        self.horizontalLayout_12.addWidget(self.uiBTN_stackDec)
        self.uiBTN_stackInc = QtWidgets.QPushButton(self.uiTABPG_stackTool)
        self.uiBTN_stackInc.setObjectName("uiBTN_stackInc")
        self.horizontalLayout_12.addWidget(self.uiBTN_stackInc)
        self.verticalLayout_6.addLayout(self.horizontalLayout_12)
        self.uiSTK_test1 = QtWidgets.QStackedWidget(self.uiTABPG_stackTool)
        self.uiSTK_test1.setObjectName("uiSTK_test1")
        self.page0 = QtWidgets.QWidget()
        self.page0.setObjectName("page0")
        self.horizontalLayout_14 = QtWidgets.QHBoxLayout(self.page0)
        self.horizontalLayout_14.setSpacing(0)
        self.horizontalLayout_14.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout_14.setObjectName("horizontalLayout_14")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout()
        self.verticalLayout_3.setSpacing(6)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.label = QtWidgets.QLabel(self.page0)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.verticalLayout_3.addWidget(self.label)
        self.horizontalLayout_13 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_13.setObjectName("horizontalLayout_13")
        self.uiTBX_test1 = QtWidgets.QToolBox(self.page0)
        self.uiTBX_test1.setObjectName("uiTBX_test1")
        self.page = QtWidgets.QWidget()
        self.page.setGeometry(QtCore.QRect(0, 0, 98, 28))
        self.page.setObjectName("page")
        self.uiTBX_test1.addItem(self.page, "")
        self.page_2 = QtWidgets.QWidget()
        self.page_2.setGeometry(QtCore.QRect(0, 0, 98, 28))
        self.page_2.setObjectName("page_2")
        self.uiTBX_test1.addItem(self.page_2, "")
        self.page_5 = QtWidgets.QWidget()
        self.page_5.setGeometry(QtCore.QRect(0, 0, 318, 557))
        self.page_5.setObjectName("page_5")
        self.uiTBX_test1.addItem(self.page_5, "")
        self.horizontalLayout_13.addWidget(self.uiTBX_test1)
        self.uiTBX_test2 = QtWidgets.QToolBox(self.page0)
        self.uiTBX_test2.setObjectName("uiTBX_test2")
        self.page_3 = QtWidgets.QWidget()
        self.page_3.setGeometry(QtCore.QRect(0, 0, 98, 28))
        self.page_3.setObjectName("page_3")
        self.uiTBX_test2.addItem(self.page_3, "")
        self.page_4 = QtWidgets.QWidget()
        self.page_4.setGeometry(QtCore.QRect(0, 0, 98, 28))
        self.page_4.setObjectName("page_4")
        self.uiTBX_test2.addItem(self.page_4, "")
        self.page_6 = QtWidgets.QWidget()
        self.page_6.setGeometry(QtCore.QRect(0, 0, 318, 557))
        self.page_6.setObjectName("page_6")
        self.uiTBX_test2.addItem(self.page_6, "")
        self.horizontalLayout_13.addWidget(self.uiTBX_test2)
        self.verticalLayout_3.addLayout(self.horizontalLayout_13)
        self.horizontalLayout_14.addLayout(self.verticalLayout_3)
        self.uiSTK_test1.addWidget(self.page0)
        self.page1 = QtWidgets.QWidget()
        self.page1.setObjectName("page1")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.page1)
        self.verticalLayout_4.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.label_2 = QtWidgets.QLabel(self.page1)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.verticalLayout_4.addWidget(self.label_2)
        spacerItem2 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_4.addItem(spacerItem2)
        self.uiSTK_test1.addWidget(self.page1)
        self.page2 = QtWidgets.QWidget()
        self.page2.setObjectName("page2")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.page2)
        self.verticalLayout_5.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.label_3 = QtWidgets.QLabel(self.page2)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.label_3.setFont(font)
        self.label_3.setObjectName("label_3")
        self.verticalLayout_5.addWidget(self.label_3)
        spacerItem3 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_5.addItem(spacerItem3)
        self.uiSTK_test1.addWidget(self.page2)
        self.verticalLayout_6.addWidget(self.uiSTK_test1)
        self.uiTAB_test1.addTab(self.uiTABPG_stackTool, "")
        self.verticalLayout_2.addWidget(self.uiSPL_test1)
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        spacerItem4 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_5.addItem(spacerItem4)
        self.uiBTN_savePrefs = QtWidgets.QPushButton(self.centralwidget)
        self.uiBTN_savePrefs.setObjectName("uiBTN_savePrefs")
        self.horizontalLayout_5.addWidget(self.uiBTN_savePrefs)
        self.uiBTN_loadPrefs = QtWidgets.QPushButton(self.centralwidget)
        self.uiBTN_loadPrefs.setObjectName("uiBTN_loadPrefs")
        self.horizontalLayout_5.addWidget(self.uiBTN_loadPrefs)
        self.uiBTN_resetPrefs = QtWidgets.QPushButton(self.centralwidget)
        self.uiBTN_resetPrefs.setObjectName("uiBTN_resetPrefs")
        self.horizontalLayout_5.addWidget(self.uiBTN_resetPrefs)
        self.verticalLayout_2.addLayout(self.horizontalLayout_5)
        self.verticalLayout_2.setStretch(0, 1)
        MainWindow.setCentralWidget(self.centralwidget)

        self.retranslateUi(MainWindow)
        self.uiTAB_test1.setCurrentIndex(2)
        self.uiSTK_test1.setCurrentIndex(0)
        self.uiTBX_test1.setCurrentIndex(2)
        self.uiTBX_test2.setCurrentIndex(2)
        QtCore.QObject.connect(self.uiBTN_savePrefs,
                               QtCore.SIGNAL("clicked()"),
                               MainWindow.onSavePrefsClicked)
        QtCore.QObject.connect(self.uiBTN_loadPrefs,
                               QtCore.SIGNAL("clicked()"),
                               MainWindow.onLoadPrefsClicked)
        QtCore.QObject.connect(self.uiBTN_resetPrefs,
                               QtCore.SIGNAL("clicked()"),
                               MainWindow.onResetPrefsClicked)
        QtCore.QObject.connect(self.uiBTN_showDialog,
                               QtCore.SIGNAL("clicked()"),
                               MainWindow.onShowDialogClicked)
        QtCore.QObject.connect(self.uiBTN_stackDec, QtCore.SIGNAL("clicked()"),
                               MainWindow.onStackedWidgetPageDec)
        QtCore.QObject.connect(self.uiBTN_stackInc, QtCore.SIGNAL("clicked()"),
                               MainWindow.onStackedWidgetPageInc)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 22
0
    def __init__(self):
        """MainWindow constructor"""
        super().__init__()
        self.setWindowTitle('Qt Widget demo')
        self.setToolTip('This is my widget')

        #########################
        # Create widget objects #
        #########################
        # QWidget
        sub_widget = qtw.QWidget(self)
        sub_widget.setToolTip('This is your widget')
        print(sub_widget.toolTip())

        # QLabel
        label = qtw.QLabel(self)
        label.setText('<b>Hello Widgets!</b>')
        label.setMargin(10)

        # QLineEdit
        line_edit = qtw.QLineEdit(self)
        line_edit.setText('default value')
        line_edit.setPlaceholderText('Type here')
        line_edit.setClearButtonEnabled(True)
        line_edit.setMaxLength(20)

        # QPushButton
        button = qtw.QPushButton(self)
        button.setText('Push Me')
        button.setCheckable(True)
        button.setChecked(True)
        button.setShortcut(qtg.QKeySequence('Ctrl+p'))

        # QComboBox
        combobox = qtw.QComboBox(self)
        combobox.setEditable(True)
        combobox.setInsertPolicy(qtw.QComboBox.InsertAtTop)
        combobox.addItem('Lemon', 1)
        combobox.addItem('Peach', 'Ohh I like Peaches!')
        combobox.addItem('Strawberry', qtw.QWidget)
        combobox.insertItem(1, 'Radish', 2)

        # QSpiBox
        spinbox = qtw.QSpinBox(self)
        spinbox.setValue(12)
        spinbox.setMaximum(100)
        spinbox.setMinimum(10)
        spinbox.setPrefix('$')
        spinbox.setSuffix(' + Tax')
        spinbox.setSingleStep(5)

        # QDateTimeEdit
        datetime_box = qtw.QDateTimeEdit(self)
        datetime_box.setDate(qtc.QDate.currentDate())
        datetime_box.setTime(qtc.QTime(12, 30))
        datetime_box.setCalendarPopup(True)
        datetime_box.setMaximumDate(qtc.QDate(2030, 1, 1))
        datetime_box.setMaximumTime(qtc.QTime(17, 0))
        datetime_box.setDisplayFormat('yyyy-MM-dd HH:mm')

        # QTextEdit
        text_edit = qtw.QTextEdit(self)
        text_edit.setAcceptRichText(False)
        text_edit.setLineWrapMode(qtw.QTextEdit.FixedColumnWidth)
        text_edit.setLineWrapColumnOrWidth(25)
        text_edit.setPlaceholderText('Enter your text here')

        ##################
        # Layout Objects #
        ##################
        layout = qtw.QVBoxLayout()
        self.setLayout(layout)

        layout.addWidget(label)
        layout.addWidget(line_edit)

        sub_layout = qtw.QHBoxLayout()
        layout.addLayout(sub_layout)

        sub_layout.addWidget(button)
        sub_layout.addWidget(combobox)

        container = qtw.QWidget(self)
        grid_layout = qtw.QGridLayout()
        container.setLayout(grid_layout)

        grid_layout.addWidget(spinbox, 0, 0)
        grid_layout.addWidget(datetime_box, 0, 1)
        grid_layout.addWidget(text_edit, 1, 0, 2, 2)

        form_layout = qtw.QFormLayout()
        layout.addLayout(form_layout)

        form_layout.addRow('Item 1', qtw.QLineEdit(self))
        form_layout.addRow('Item 2', qtw.QLineEdit(self))
        form_layout.addRow(qtw.QLabel('<b>This is a label-only row</b>'))

        ################
        # Size Control #
        ################
        # Fix at 150 pixels wide by 40 pixels high
        label.setFixedSize(150, 40)

        # Setting minimum and maximum size
        line_edit.setMinimumSize(150, 15)
        line_edit.setMaximumSize(500, 50)

        # set the spinbox to a fixed width
        spinbox.setSizePolicy(qtw.QSizePolicy.Fixed, qtw.QSizePolicy.Preferred)

        # set the text edit to expand
        text_edit.setSizePolicy(qtw.QSizePolicy.MinimumExpanding,
                                qtw.QSizePolicy.MinimumExpanding)
        text_edit.sizeHint = lambda: qtc.QSize(500, 500)

        # use stretch factor
        stretch_layout = qtw.QHBoxLayout()
        layout.addLayout(stretch_layout)

        stretch_layout.addWidget(qtw.QLineEdit('Short'), 1)
        stretch_layout.addWidget(qtw.QLineEdit('Long'), 2)

        #############################
        # Container Widgets         #
        #############################
        tab_widget = qtw.QTabWidget()
        tab_widget.setMovable(True)
        tab_widget.setTabPosition(qtw.QTabWidget.West)
        tab_widget.setTabShape(qtw.QTabWidget.Triangular)
        layout.addWidget(tab_widget)

        tab_widget.addTab(container, 'Tab the first')
        tab_widget.addTab(sub_widget, 'Tab the second')

        group_box = qtw.QGroupBox('Buttons')
        group_box.setCheckable(True)
        group_box.setChecked(True)
        group_box.setAlignment(qtc.Qt.AlignHCenter)
        group_box.setFlat(True)

        group_box.setLayout(qtw.QHBoxLayout())
        group_box.layout().addWidget(qtw.QPushButton('OK'))
        group_box.layout().addWidget(qtw.QPushButton('Cancel'))
        layout.addWidget(group_box)

        ##############
        # Validation #
        ##############
        line_edit.setText('0.0.0.0')
        line_edit.setValidator(IPv4Validator())

        rating_box = ChoiceSpinBox(['bad', 'average', 'good', 'awesome'], self)
        sub_layout.addWidget(rating_box)

        self.show()
Ejemplo n.º 23
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(1091, 602)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.kline_layout = QtWidgets.QVBoxLayout()
        self.kline_layout.setObjectName("kline_layout")
        self.gridLayout.addLayout(self.kline_layout, 2, 0, 3, 12)
        self.tick_table = QtWidgets.QTableWidget(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(100)
        sizePolicy.setVerticalStretch(255)
        sizePolicy.setHeightForWidth(
            self.tick_table.sizePolicy().hasHeightForWidth())
        self.tick_table.setSizePolicy(sizePolicy)
        self.tick_table.setMinimumSize(QtCore.QSize(0, 300))
        self.tick_table.setMaximumSize(QtCore.QSize(400, 16777215))
        self.tick_table.setObjectName("tick_table")
        self.tick_table.setColumnCount(2)
        self.tick_table.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.tick_table.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tick_table.setHorizontalHeaderItem(1, item)
        self.tick_table.verticalHeader().setSortIndicatorShown(True)
        self.gridLayout.addWidget(self.tick_table, 1, 12, 4, 1)
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 6, 1, 1)
        self.end = QtWidgets.QDateTimeEdit(Form)
        self.end.setObjectName("end")
        self.gridLayout.addWidget(self.end, 1, 7, 1, 1)
        self.start = QtWidgets.QDateTimeEdit(Form)
        self.start.setObjectName("start")
        self.gridLayout.addWidget(self.start, 1, 5, 1, 1)
        self.label = QtWidgets.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 1, 4, 1, 1)
        self.frq = QtWidgets.QComboBox(Form)
        self.frq.setObjectName("frq")
        self.gridLayout.addWidget(self.frq, 1, 3, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 1, 9, 1, 1)
        self.symbol_list = QtWidgets.QComboBox(Form)
        self.symbol_list.setEditable(True)
        self.symbol_list.setObjectName("symbol_list")
        self.gridLayout.addWidget(self.symbol_list, 1, 2, 1, 1)
        self.source_btn = QtWidgets.QToolButton(Form)
        self.source_btn.setObjectName("source_btn")
        self.gridLayout.addWidget(self.source_btn, 1, 1, 1, 1)
        self.reload_btn = QtWidgets.QToolButton(Form)
        self.reload_btn.setObjectName("reload_btn")
        self.gridLayout.addWidget(self.reload_btn, 1, 8, 1, 1)
        self.hide_btn = QtWidgets.QToolButton(Form)
        self.hide_btn.setObjectName("hide_btn")
        self.gridLayout.addWidget(self.hide_btn, 1, 10, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
    def setupUi(self, Form):

        Form.resize(1000, 600)

        reg_ex = QtCore.QRegExp(
            r"^([-+/*]?\d+(\.\d+)?)*"
        )  # Regular Expression per filtrare solo valori numerici dove necessario

        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.horizontalLayout2 = QtWidgets.QHBoxLayout()

        self.tableView = QtWidgets.QTableView(Form)
        self.tableView.setSortingEnabled(True)
        self.tableView.setEditTriggers(
            QtWidgets.QAbstractItemView.NoEditTriggers)

        self.horizontalLayout2.addWidget(self.tableView)

        self.label_anteprima = QtWidgets.QLabel(Form)
        self.horizontalLayout2.addWidget(self.label_anteprima)

        #pixmap = QtGui.QPixmap("resources/no image.png")
        self.label_anteprima.setFixedSize(250, 250)
        self.label_anteprima.setScaledContents(True)
        #self.label_anteprima.setPixmap(pixmap)

        self.verticalLayout.addLayout(self.horizontalLayout2)
        self.gridLayout = QtWidgets.QGridLayout()

        self.label_4 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)

        self.label_12 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_12, 12, 0, 1, 1)

        self.label_7 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_7, 7, 0, 1, 1)

        self.label = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)

        self.lineEdit_Riferimento = QtWidgets.QLineEdit(Form)
        self.gridLayout.addWidget(self.lineEdit_Riferimento, 0, 6, 1, 1)

        self.label_2 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)

        self.lineEdit_CodicePadre = QtWidgets.QLineEdit(Form)
        self.gridLayout.addWidget(self.lineEdit_CodicePadre, 1, 6, 1, 1)

        self.label_5 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_5, 4, 0, 1, 1)

        self.label_3 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)

        self.lineEdit_Macchina = QtWidgets.QLineEdit(Form)
        self.gridLayout.addWidget(self.lineEdit_Macchina, 2, 6, 1, 1)

        self.comboBox_Denominazione = QtWidgets.QComboBox(Form)
        self.gridLayout.addWidget(self.comboBox_Denominazione, 4, 6, 1, 1)

        self.lineEdit_Massa = LineEdit_Expr(Form)
        Massa_input_validator = QtGui.QRegExpValidator(reg_ex,
                                                       self.lineEdit_Massa)
        self.lineEdit_Massa.setValidator(Massa_input_validator)
        self.gridLayout.addWidget(self.lineEdit_Massa, 12, 6, 1, 1)

        self.lineEdit_Massa2 = LineEdit_Expr(Form)
        Massa2_input_validator = QtGui.QRegExpValidator(
            reg_ex, self.lineEdit_Massa2)
        self.lineEdit_Massa2.setValidator(Massa2_input_validator)
        self.gridLayout.addWidget(self.lineEdit_Massa2, 12, 7, 1, 1)

        self.lineEdit_Quantita = LineEdit_Expr(Form)
        Quantita_input_validator = QtGui.QRegExpValidator(
            reg_ex, self.lineEdit_Quantita)
        self.lineEdit_Quantita.setValidator(Quantita_input_validator)
        self.gridLayout.addWidget(self.lineEdit_Quantita, 10, 6, 1, 1)

        self.lineEdit_Codice = QtWidgets.QLineEdit(Form)
        self.gridLayout.addWidget(self.lineEdit_Codice, 8, 6, 1, 1)

        self.lineEdit_MisuraMax = LineEdit_Expr(Form)
        MisuraMax_input_validator = QtGui.QRegExpValidator(
            reg_ex, self.lineEdit_MisuraMax)
        self.lineEdit_MisuraMax.setValidator(MisuraMax_input_validator)
        self.gridLayout.addWidget(self.lineEdit_MisuraMax, 11, 6, 1, 1)

        self.lineEdit_MisuraMax2 = LineEdit_Expr(Form)
        MisuraMax2_input_validator = QtGui.QRegExpValidator(
            reg_ex, self.lineEdit_MisuraMax2)
        self.lineEdit_MisuraMax2.setValidator(MisuraMax2_input_validator)
        self.gridLayout.addWidget(self.lineEdit_MisuraMax2, 11, 7, 1, 1)

        self.comboBox_Cliente = QtWidgets.QComboBox(Form)
        self.gridLayout.addWidget(self.comboBox_Cliente, 9, 6, 1, 1)

        self.comboBox_Materiale = QtWidgets.QComboBox(Form)
        self.gridLayout.addWidget(self.comboBox_Materiale, 3, 6, 1, 1)

        self.label_8 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_8, 8, 0, 1, 1)

        self.label_9 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_9, 9, 0, 1, 1)

        self.lineEdit_Nome = QtWidgets.QLineEdit(Form)
        self.gridLayout.addWidget(self.lineEdit_Nome, 7, 6, 1, 1)

        self.label_6 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_6, 5, 0, 1, 1)

        self.label_6_1 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_6_1, 6, 0, 1, 1)

        self.label_10 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_10, 10, 0, 1, 1)

        self.label_11 = QtWidgets.QLabel(Form)
        self.gridLayout.addWidget(self.label_11, 11, 0, 1, 1)

        self.DateTimeEdit_Data = QtWidgets.QDateTimeEdit(Form)
        self.gridLayout.addWidget(self.DateTimeEdit_Data, 5, 6, 1, 1)

        self.DateTimeEdit_Data2 = QtWidgets.QDateTimeEdit(Form)
        self.gridLayout.addWidget(self.DateTimeEdit_Data2, 5, 7, 1, 1)

        self.DateTimeEdit_ultima_modifica = QtWidgets.QDateTimeEdit(Form)
        self.gridLayout.addWidget(self.DateTimeEdit_ultima_modifica, 6, 6, 1,
                                  1)

        self.DateTimeEdit_ultima_modifica2 = QtWidgets.QDateTimeEdit(Form)
        self.gridLayout.addWidget(self.DateTimeEdit_ultima_modifica2, 6, 7, 1,
                                  1)

        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setSpacing(6)

        self.horizontalSpacer = QtWidgets.QSpacerItem(
            200, 40, QtWidgets.QSizePolicy.Minimum,
            QtWidgets.QSizePolicy.Expanding)
        self.horizontalLayout.addItem(self.horizontalSpacer)

        self.CancelButton = QtWidgets.QPushButton(Form)
        self.horizontalLayout.addWidget(self.CancelButton)

        self.ModifyButton = QtWidgets.QPushButton(Form)
        self.horizontalLayout.addWidget(self.ModifyButton)

        self.DeleteButton = QtWidgets.QPushButton(Form)
        self.horizontalLayout.addWidget(self.DeleteButton)

        self.SearchButton = QtWidgets.QPushButton(Form)
        self.horizontalLayout.addWidget(self.SearchButton)

        self.AcceptButton = QtWidgets.QPushButton(Form)
        self.horizontalLayout.addWidget(self.AcceptButton)

        self.verticalLayout.addLayout(self.gridLayout)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(Form)
Ejemplo n.º 25
0
 def setupUi(self, main_window):
     main_window.setObjectName("MainWindow")
     main_window.resize(1310, 600)
     sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(main_window.sizePolicy().hasHeightForWidth())
     main_window.setSizePolicy(sizePolicy)
     main_window.setMinimumSize(QtCore.QSize(1310, 600))
     main_window.setMaximumSize(QtCore.QSize(1310, 600))
     self.centralwidget = QtWidgets.QWidget(main_window)
     sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
     self.centralwidget.setSizePolicy(sizePolicy)
     self.centralwidget.setObjectName("centralwidget")
     self.horizontalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
     self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 9, 1291, 541))
     self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
     self.main_layout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
     self.main_layout.setContentsMargins(0, 0, 0, 0)
     self.main_layout.setObjectName("main_layout")
     self.profile_frame = QtWidgets.QFrame(self.horizontalLayoutWidget)
     self.profile_frame.setMaximumSize(QtCore.QSize(280, 16777215))
     self.profile_frame.setFrameShape(QtWidgets.QFrame.Box)
     self.profile_frame.setFrameShadow(QtWidgets.QFrame.Plain)
     self.profile_frame.setObjectName("profile_frame")
     self.verticalLayoutWidget = QtWidgets.QWidget(self.profile_frame)
     self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 261, 521))
     self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
     self.profile_layout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
     self.profile_layout.setContentsMargins(0, 0, 0, 0)
     self.profile_layout.setObjectName("profile_layout")
     self.profile_label = QtWidgets.QLabel(self.verticalLayoutWidget)
     self.profile_label.setObjectName("profile_label")
     self.profile_layout.addWidget(self.profile_label)
     self.profile_list = QtWidgets.QListWidget(self.verticalLayoutWidget)
     self.profile_list.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
     self.profile_list.setObjectName("profile_list")
     self.profile_layout.addWidget(self.profile_list)
     self.remove_profile_button = QtWidgets.QPushButton(self.horizontalLayoutWidget, text="Remove...")
     self.remove_profile_button.setObjectName("remove_profile_button")
     self.migrate_profile_button = QtWidgets.QPushButton(self.horizontalLayoutWidget, text="Migrate Subs")
     self.migrate_profile_button.setObjectName("migrate_profile_button")
     # self.purge_profile_button = QtWidgets.QPushButton(self.horizontalLayoutWidget, text="Purge...")
     # self.purge_profile_button.setObjectName("purge_profile_button")
     self.profile_button_layout = QtWidgets.QHBoxLayout()
     self.profile_button_layout.addWidget(self.remove_profile_button)
     self.profile_button_layout.addWidget(self.migrate_profile_button)
     # self.profile_button_layout.addWidget(self.purge_profile_button)
     self.profile_layout.addLayout(self.profile_button_layout)
     self.main_layout.addWidget(self.profile_frame)
     self.submission_frame = QtWidgets.QFrame(self.horizontalLayoutWidget)
     self.submission_frame.setMinimumSize(QtCore.QSize(700, 0))
     self.submission_frame.setFrameShape(QtWidgets.QFrame.Box)
     self.submission_frame.setFrameShadow(QtWidgets.QFrame.Plain)
     self.submission_frame.setObjectName("submission_frame")
     self.verticalLayoutWidget_2 = QtWidgets.QWidget(self.submission_frame)
     self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(10, 10, 681, 521))
     self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2")
     self.submission_layout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_2)
     self.submission_layout.setContentsMargins(0, 0, 0, 0)
     self.submission_layout.setObjectName("submission_layout")
     self.submission_label = QtWidgets.QLabel(self.verticalLayoutWidget_2)
     self.submission_label.setObjectName("submission_label")
     self.submission_layout.addWidget(self.submission_label)
     self.submission_search_bar = QtWidgets.QLineEdit(self.verticalLayoutWidget_2)
     self.submission_search_bar.setObjectName("submission_search_bar")
     self.submission_layout.addWidget(self.submission_search_bar)
     self.content_tree = QtWidgets.QTreeWidget()
     self.content_tree.setColumnCount(2)
     self.content_tree.setHeaderLabels(["ID", "Created On"])
     self.content_tree.setColumnWidth(0,505)
     self.content_tree.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
     self.submission_layout.addWidget(self.content_tree)
     self.submission_progress_bar = QtWidgets.QProgressBar()
     self.submission_progress_bar.setValue(0)
     self.submission_layout.addWidget(self.submission_progress_bar)
     self.submission_progress_status = QtWidgets.QLabel("Start program...")
     self.submission_layout.addWidget(self.submission_progress_status)
     self.submission_button_layout = QtWidgets.QHBoxLayout()
     self.submission_button_layout.setObjectName("submission_button_layout")
     self.submission_search_button = QtWidgets.QPushButton(self.verticalLayoutWidget_2)
     self.submission_search_button.setObjectName("submission_search_button")
     self.submission_button_layout.addWidget(self.submission_search_button)
     self.submission_dump_button = QtWidgets.QPushButton(self.verticalLayoutWidget_2)
     self.submission_dump_button.setObjectName("submission_dump_button")
     self.submission_button_layout.addWidget(self.submission_dump_button)
     self.submission_delete_button = QtWidgets.QPushButton(self.verticalLayoutWidget_2)
     self.submission_delete_button.setObjectName("submission_delete_button")
     self.submission_button_layout.addWidget(self.submission_delete_button)
     self.submission_clear_btn = QtWidgets.QPushButton(self.verticalLayoutWidget_2)
     self.submission_clear_btn.setObjectName("submission_clear_btn")
     self.submission_button_layout.addWidget(self.submission_clear_btn)
     self.submission_layout.addLayout(self.submission_button_layout)
     self.main_layout.addWidget(self.submission_frame)
     self.filter_frame = QtWidgets.QFrame(self.horizontalLayoutWidget)
     sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(self.filter_frame.sizePolicy().hasHeightForWidth())
     self.filter_frame.setSizePolicy(sizePolicy)
     self.filter_frame.setFrameShape(QtWidgets.QFrame.Box)
     self.filter_frame.setFrameShadow(QtWidgets.QFrame.Plain)
     self.filter_frame.setObjectName("filter_frame")
     self.formLayoutWidget = QtWidgets.QWidget(self.filter_frame)
     self.formLayoutWidget.setGeometry(QtCore.QRect(10, 10, 275, 521))
     self.formLayoutWidget.setObjectName("formLayoutWidget")
     self.filter_layout = QtWidgets.QFormLayout(self.formLayoutWidget)
     self.filter_layout.setObjectName("filter_layout")
     self.filter_label = QtWidgets.QLabel(self.formLayoutWidget)
     self.filter_label.setObjectName("filter_label")
     self.filter_layout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.filter_label)
     self.comment_radio = QtWidgets.QRadioButton(self.formLayoutWidget)
     self.comment_radio.setChecked(True)
     self.comment_radio.setObjectName("comment_radio")
     self.filter_layout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.comment_radio)
     self.post_radio = QtWidgets.QRadioButton(self.formLayoutWidget)
     self.post_radio.setObjectName("post_radio")
     self.filter_layout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.post_radio)
     self.sort_label = QtWidgets.QLabel(self.formLayoutWidget)
     self.sort_label.setObjectName("sort_label")
     self.filter_layout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.sort_label)
     self.sort_combo = QtWidgets.QComboBox(self.formLayoutWidget)
     self.sort_combo.setMinimumSize(QtCore.QSize(0, 0))
     self.sort_combo.setObjectName("sort_combo")
     self.sort_combo.addItem("")
     self.sort_combo.addItem("")
     self.filter_layout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.sort_combo)
     self.time_combo = QtWidgets.QComboBox(self.formLayoutWidget)
     self.time_combo.setObjectName("time_combo")
     self.time_combo.addItem("")
     self.time_combo.addItem("")
     self.filter_layout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.time_combo)
     self.time_edit = QtWidgets.QDateTimeEdit(self.formLayoutWidget)
     self.time_edit.setObjectName("time_edit")
     self.filter_layout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.time_edit)
     self.max_score_label = QtWidgets.QLabel(self.formLayoutWidget)
     self.max_score_label.setObjectName("score_label")
     self.filter_layout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.max_score_label)
     self.max_score_spin = QtWidgets.QSpinBox(self.formLayoutWidget)
     self.max_score_spin.setMaximum(9999999)
     self.max_score_spin.setMinimum(-9999999)
     self.max_score_spin.setObjectName("max_score_spin")
     self.max_score_spin.setValue(9999999)
     self.filter_layout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.max_score_spin)
     self.min_score_label = QtWidgets.QLabel(self.formLayoutWidget)
     self.min_score_label.setObjectName("min_score_label")
     self.filter_layout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.min_score_label)
     self.min_score_spin = QtWidgets.QSpinBox(self.formLayoutWidget)
     self.min_score_spin.setMaximum(9999999)
     self.min_score_spin.setMinimum(-9999999)
     self.min_score_spin.setValue(-9999999)
     self.min_score_spin.setObjectName("min_score_spin")
     self.filter_layout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.min_score_spin)
     self.award_label = QtWidgets.QLabel(self.formLayoutWidget)
     self.award_label.setObjectName("award_label")
     self.filter_layout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.award_label)
     self.award_combo = QtWidgets.QComboBox(self.formLayoutWidget)
     self.award_combo.setObjectName("award_combo")
     self.award_combo.addItem("")
     self.award_combo.addItem("")
     self.award_combo.addItem("")
     self.filter_layout.setWidget(8, QtWidgets.QFormLayout.FieldRole, self.award_combo)
     self.edited_label = QtWidgets.QLabel(self.formLayoutWidget)
     self.edited_label.setObjectName("edited_label")
     self.filter_layout.setWidget(9, QtWidgets.QFormLayout.LabelRole, self.edited_label)
     self.edited_combo = QtWidgets.QComboBox(self.formLayoutWidget)
     self.edited_combo.setObjectName("edited_combo")
     self.edited_combo.addItem("")
     self.edited_combo.addItem("")
     self.edited_combo.addItem("")
     self.filter_layout.setWidget(9, QtWidgets.QFormLayout.FieldRole, self.edited_combo)
     self.subreddit_label = QtWidgets.QLabel(self.formLayoutWidget)
     self.subreddit_label.setObjectName("subreddit_label")
     self.filter_layout.setWidget(10, QtWidgets.QFormLayout.LabelRole, self.subreddit_label)
     self.subreddit_edit = QtWidgets.QLineEdit(self.formLayoutWidget)
     self.subreddit_edit.setObjectName("subreddit_edit")
     self.filter_layout.setWidget(10, QtWidgets.QFormLayout.FieldRole, self.subreddit_edit)
     self.removed_combo = QtWidgets.QComboBox()
     self.removed_combo.addItems(["NA", "Yes", "No"])
     self.filter_layout.addRow(QtWidgets.QLabel("Removed"), self.removed_combo)
     self.main_layout.addWidget(self.filter_frame)
     main_window.setCentralWidget(self.centralwidget)
     self.menubar = QtWidgets.QMenuBar(main_window)
     self.menubar.setGeometry(QtCore.QRect(0, 0, 1310, 22))
     self.menubar.setObjectName("menubar")
     self.profile_menu = QtWidgets.QMenu(self.menubar)
     self.profile_menu.setObjectName("profile_menu")
     self.autodelete_menu = QtWidgets.QMenu(self.menubar)
     self.autodelete_menu.setObjectName("menuAutodelete")
     main_window.setMenuBar(self.menubar)
     self.create_profile_action = QtWidgets.QAction(main_window)
     self.create_profile_action.setObjectName("create_profile_action")
     self.import_profile_action = QtWidgets.QAction(main_window)
     self.import_profile_action.setObjectName("import_profile_action")
     self.export_profile_action = QtWidgets.QAction(main_window)
     self.export_profile_action.setObjectName("export_profile_action")
     self.actionRemove = QtWidgets.QAction(main_window)
     self.actionRemove.setObjectName("actionRemove")
     self.actionCreate_2 = QtWidgets.QAction(main_window)
     self.actionCreate_2.setObjectName("actionCreate_2")
     self.modify_autodelete_action = QtWidgets.QAction(main_window)
     self.modify_autodelete_action.setObjectName("modify_autodelete_action")
     self.remove_autodelete_action = QtWidgets.QAction(main_window)
     self.remove_autodelete_action.setObjectName("remove_autodelete_action")
     self.create_autodelete_action = QtWidgets.QAction(main_window)
     self.create_autodelete_action.setObjectName("create_autodelete_action")
     self.modify_profile_action = QtWidgets.QAction(main_window)
     self.modify_profile_action.setObjectName("modify_profile_action")
     self.profile_menu.addAction(self.create_profile_action)
     self.profile_menu.addAction(self.modify_profile_action)
     self.profile_menu.addAction(self.import_profile_action)
     self.profile_menu.addAction(self.export_profile_action)
     self.autodelete_menu.addSeparator()
     self.autodelete_menu.addAction(self.create_autodelete_action)
     self.autodelete_menu.addAction(self.modify_autodelete_action)
     self.autodelete_menu.addAction(self.remove_autodelete_action)
     self.menubar.addAction(self.profile_menu.menuAction())
     # self.menubar.addAction(self.autodelete_menu.menuAction())
     self.retranslateUi(main_window)
     QtCore.QMetaObject.connectSlotsByName(main_window)
Ejemplo n.º 26
0
    def __init__(self, common, tab, mode_settings):
        super(ModeSettingsWidget, self).__init__()
        self.common = common
        self.tab = tab
        self.settings = mode_settings

        # Downstream Mode need to fill in this layout with its settings
        self.mode_specific_layout = QtWidgets.QVBoxLayout()

        # Persistent
        self.persistent_checkbox = QtWidgets.QCheckBox()
        self.persistent_checkbox.clicked.connect(
            self.persistent_checkbox_clicked)
        self.persistent_checkbox.setText(
            strings._("mode_settings_persistent_checkbox"))
        if self.settings.get("persistent", "enabled"):
            self.persistent_checkbox.setCheckState(QtCore.Qt.Checked)
        else:
            self.persistent_checkbox.setCheckState(QtCore.Qt.Unchecked)

        # Public
        self.public_checkbox = QtWidgets.QCheckBox()
        self.public_checkbox.clicked.connect(self.public_checkbox_clicked)
        self.public_checkbox.setText(
            strings._("mode_settings_public_checkbox"))
        if self.settings.get("general", "public"):
            self.public_checkbox.setCheckState(QtCore.Qt.Checked)
        else:
            self.public_checkbox.setCheckState(QtCore.Qt.Unchecked)

        # Whether or not to use an auto-start timer
        self.autostart_timer_checkbox = QtWidgets.QCheckBox()
        self.autostart_timer_checkbox.clicked.connect(
            self.autostart_timer_checkbox_clicked)
        self.autostart_timer_checkbox.setText(
            strings._("mode_settings_autostart_timer_checkbox"))
        if self.settings.get("general", "autostart_timer"):
            self.autostart_timer_checkbox.setCheckState(QtCore.Qt.Checked)
        else:
            self.autostart_timer_checkbox.setCheckState(QtCore.Qt.Unchecked)

        # The autostart timer widget
        self.autostart_timer_widget = QtWidgets.QDateTimeEdit()
        self.autostart_timer_widget.setDisplayFormat("hh:mm A MMM d, yy")
        self.autostart_timer_reset()
        self.autostart_timer_widget.setCurrentSection(
            QtWidgets.QDateTimeEdit.MinuteSection)
        if self.settings.get("general", "autostart_timer"):
            self.autostart_timer_widget.show()
        else:
            self.autostart_timer_widget.hide()

        # Autostart timer layout
        autostart_timer_layout = QtWidgets.QHBoxLayout()
        autostart_timer_layout.setContentsMargins(0, 0, 0, 0)
        autostart_timer_layout.addWidget(self.autostart_timer_checkbox)
        autostart_timer_layout.addWidget(self.autostart_timer_widget)

        # Whether or not to use an auto-stop timer
        self.autostop_timer_checkbox = QtWidgets.QCheckBox()
        self.autostop_timer_checkbox.clicked.connect(
            self.autostop_timer_checkbox_clicked)
        self.autostop_timer_checkbox.setText(
            strings._("mode_settings_autostop_timer_checkbox"))
        if self.settings.get("general", "autostop_timer"):
            self.autostop_timer_checkbox.setCheckState(QtCore.Qt.Checked)
        else:
            self.autostop_timer_checkbox.setCheckState(QtCore.Qt.Unchecked)

        # The autostop timer widget
        self.autostop_timer_widget = QtWidgets.QDateTimeEdit()
        self.autostop_timer_widget.setDisplayFormat("hh:mm A MMM d, yy")
        self.autostop_timer_reset()
        self.autostop_timer_widget.setCurrentSection(
            QtWidgets.QDateTimeEdit.MinuteSection)
        if self.settings.get("general", "autostop_timer"):
            self.autostop_timer_widget.show()
        else:
            self.autostop_timer_widget.hide()

        # Autostop timer layout
        autostop_timer_layout = QtWidgets.QHBoxLayout()
        autostop_timer_layout.setContentsMargins(0, 0, 0, 0)
        autostop_timer_layout.addWidget(self.autostop_timer_checkbox)
        autostop_timer_layout.addWidget(self.autostop_timer_widget)

        # Legacy address
        self.legacy_checkbox = QtWidgets.QCheckBox()
        self.legacy_checkbox.clicked.connect(self.legacy_checkbox_clicked)
        self.legacy_checkbox.clicked.connect(self.update_ui)
        self.legacy_checkbox.setText(
            strings._("mode_settings_legacy_checkbox"))
        if self.settings.get("general", "legacy"):
            self.legacy_checkbox.setCheckState(QtCore.Qt.Checked)
        else:
            self.legacy_checkbox.setCheckState(QtCore.Qt.Unchecked)

        # Client auth
        self.client_auth_checkbox = QtWidgets.QCheckBox()
        self.client_auth_checkbox.clicked.connect(
            self.client_auth_checkbox_clicked)
        self.client_auth_checkbox.clicked.connect(self.update_ui)
        self.client_auth_checkbox.setText(
            strings._("mode_settings_client_auth_checkbox"))
        if self.settings.get("general", "client_auth"):
            self.client_auth_checkbox.setCheckState(QtCore.Qt.Checked)
        else:
            self.client_auth_checkbox.setCheckState(QtCore.Qt.Unchecked)

        # Toggle advanced settings
        self.toggle_advanced_button = QtWidgets.QPushButton()
        self.toggle_advanced_button.clicked.connect(
            self.toggle_advanced_clicked)
        self.toggle_advanced_button.setFlat(True)
        self.toggle_advanced_button.setStyleSheet(
            self.common.gui.css["mode_settings_toggle_advanced"])

        # Advanced group itself
        advanced_layout = QtWidgets.QVBoxLayout()
        advanced_layout.setContentsMargins(0, 0, 0, 0)
        advanced_layout.addLayout(autostart_timer_layout)
        advanced_layout.addLayout(autostop_timer_layout)
        advanced_layout.addWidget(self.legacy_checkbox)
        advanced_layout.addWidget(self.client_auth_checkbox)
        self.advanced_widget = QtWidgets.QWidget()
        self.advanced_widget.setLayout(advanced_layout)
        self.advanced_widget.hide()

        layout = QtWidgets.QVBoxLayout()
        layout.addLayout(self.mode_specific_layout)
        layout.addWidget(self.persistent_checkbox)
        layout.addWidget(self.public_checkbox)
        layout.addWidget(self.advanced_widget)
        layout.addWidget(self.toggle_advanced_button)
        self.setLayout(layout)

        self.update_ui()
    def setupUi(self, MainWindow):

        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1266, 874)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.tabWidget = CustomTabWidget(self.centralwidget)
        self.tabWidget.setGeometry(QtCore.QRect(0, 20, 1271, 1261))
        self.tabWidget.setProperty("5", "")
        self.tabWidget.setObjectName("tabWidget")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")

        self.label = QtWidgets.QLabel(self.tab)
        self.label.setGeometry(QtCore.QRect(0, 10, 121, 21))
        font = QtGui.QFont()
        font.setFamily("Noto Sans Mono CJK JP")
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setLineWidth(4)
        self.label.setObjectName("label")
        self.label_4 = QtWidgets.QLabel(self.tab)
        self.label_4.setGeometry(QtCore.QRect(140, 10, 121, 21))
        font = QtGui.QFont()
        font.setFamily("Noto Sans Mono CJK JP")
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_4.setFont(font)
        self.label_4.setLineWidth(4)
        self.label_4.setObjectName("label_4")
        self.pushButton_8 = QtWidgets.QPushButton(self.tab)
        self.pushButton_8.setGeometry(QtCore.QRect(440, 40, 31, 21))
        self.pushButton_8.setObjectName("pushButton_8")
        self.lineEdit = QtWidgets.QLineEdit(self.tab)
        self.lineEdit.setGeometry(QtCore.QRect(140, 40, 111, 20))
        self.lineEdit.setObjectName("lineEdit")
        self.lineEdit_4 = QtWidgets.QLineEdit(self.tab)
        self.lineEdit_4.setGeometry(QtCore.QRect(190, 40, 101, 20))
        self.lineEdit_4.setObjectName("lineEdit_4")
        self.comboBox = QtWidgets.QComboBox(self.tab)
        self.comboBox.setGeometry(QtCore.QRect(470, 40, 111, 21))
        self.comboBox.setObjectName("comboBox")

        self.lineEdit_6 = QtWidgets.QLineEdit(self.tab)
        self.lineEdit_6.setGeometry(QtCore.QRect(970, 120, 141, 16))
        self.lineEdit_6.setObjectName("lineEdit_6")
        self.label_9 = QtWidgets.QLabel(self.tab)
        self.label_9.setGeometry(QtCore.QRect(1120, 120, 131, 20))
        self.label_9.setObjectName("label_9")
        self.lineEdit_5 = QtWidgets.QLineEdit(self.tab)
        self.lineEdit_5.setGeometry(QtCore.QRect(970, 90, 141, 16))
        self.lineEdit_5.setObjectName("lineEdit_5")
        self.lineEdit_3 = QtWidgets.QLineEdit(self.tab)
        self.lineEdit_3.setGeometry(QtCore.QRect(970, 60, 141, 16))
        self.lineEdit_3.setObjectName("lineEdit_3")
        self.label_6 = QtWidgets.QLabel(self.tab)
        self.label_6.setGeometry(QtCore.QRect(950, 20, 121, 21))
        font = QtGui.QFont()
        font.setFamily("Noto Sans Mono CJK JP")
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_6.setFont(font)
        self.label_6.setLineWidth(4)
        self.label_6.setObjectName("label_6")
        self.label_8 = QtWidgets.QLabel(self.tab)
        self.label_8.setGeometry(QtCore.QRect(1120, 90, 131, 20))
        self.label_8.setObjectName("label_8")
        self.label_11 = QtWidgets.QLabel(self.tab)
        self.label_11.setGeometry(QtCore.QRect(1040, 560, 53, 16))
        self.label_11.setText("")
        self.label_11.setObjectName("label_11")
        self.pushButton_5 = QtWidgets.QPushButton(self.tab)
        self.pushButton_5.setGeometry(QtCore.QRect(1130, 480, 101, 31))
        self.pushButton_5.setObjectName("pushButton_5")
        self.pushButton_4 = QtWidgets.QPushButton(self.tab)
        self.pushButton_4.setGeometry(QtCore.QRect(970, 600, 91, 41))
        self.pushButton_4.setObjectName("pushButton_4")

        self.label_2 = QtWidgets.QLabel(self.tab)
        self.label_2.setGeometry(QtCore.QRect(970, 520, 81, 21))
        self.label_2.setMaximumSize(QtCore.QSize(81, 16777215))
        self.label_2.setObjectName("label_2")
        self.pushButton_7 = QtWidgets.QPushButton(self.tab)
        self.pushButton_7.setGeometry(QtCore.QRect(1130, 560, 101, 41))
        self.pushButton_7.setObjectName("pushButton_7")
        self.label_10 = QtWidgets.QLabel(self.tab)
        self.label_10.setGeometry(QtCore.QRect(1030, 520, 53, 16))
        self.label_10.setText("")
        self.label_10.setObjectName("label_10")
        self.pushButton_6 = QtWidgets.QPushButton(self.tab)
        self.pushButton_6.setGeometry(QtCore.QRect(1130, 520, 101, 31))
        self.pushButton_6.setObjectName("pushButton_6")
        self.label_5 = QtWidgets.QLabel(self.tab)
        self.label_5.setGeometry(QtCore.QRect(970, 560, 81, 21))
        self.label_5.setObjectName("label_5")
        # self.treeWidget.raise_()
        self.label.raise_()
        self.label_4.raise_()
        self.pushButton_8.raise_()
        self.lineEdit.raise_()
        # self.lineEdit_2.raise_()
        self.lineEdit_4.raise_()
        self.comboBox.raise_()
        # self.label_7.raise_()
        self.pushButton_4.raise_()

        self.lineEdit_6.raise_()
        self.label_5.raise_()
        self.label_6.raise_()
        self.lineEdit_3.raise_()
        self.pushButton_5.raise_()
        self.label_11.raise_()
        # self.tableWidget.raise_()
        self.lineEdit_5.raise_()
        self.label_2.raise_()
        self.label_10.raise_()
        self.label_8.raise_()
        self.label_9.raise_()
        self.pushButton_6.raise_()
        self.pushButton_7.raise_()
        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QtWidgets.QWidget()
        self.tab_2.setObjectName("tab_2")
        self.label_16 = QtWidgets.QLabel(self.tab_2)
        self.label_16.setGeometry(QtCore.QRect(10, 10, 121, 21))
        font = QtGui.QFont()
        font.setFamily("Noto Sans Mono CJK JP")
        font.setPointSize(14)
        font.setBold(True)
        font.setWeight(75)
        self.label_16.setFont(font)
        self.label_16.setLineWidth(4)
        self.label_16.setObjectName("label_16")
        self.dateTimeEdit = QtWidgets.QDateTimeEdit(self.tab_2)
        self.dateTimeEdit.setGeometry(QtCore.QRect(10, 40, 194, 25))
        self.dateTimeEdit.setObjectName("dateTimeEdit")
        self.dateTimeEdit_2 = QtWidgets.QDateTimeEdit(self.tab_2)
        self.dateTimeEdit_2.setGeometry(QtCore.QRect(10, 80, 194, 25))
        self.dateTimeEdit_2.setObjectName("dateTimeEdit_2")
        self.pushButton_10 = QtWidgets.QPushButton(self.tab_2)
        self.pushButton_10.setGeometry(QtCore.QRect(210, 40, 131, 61))
        self.pushButton_10.setObjectName("pushButton_10")
   
       
        self.label_21 = QtWidgets.QLabel(self.tab_2)
        self.label_21.setGeometry(QtCore.QRect(1040, -10, 151, 41))
        self.label_21.setObjectName("label_21")
        self.label_22 = QtWidgets.QLabel(self.tab_2)
        self.label_22.setGeometry(QtCore.QRect(1110, 0, 71, 41))
        self.label_22.setObjectName("label_22")
        self.label_23 = QtWidgets.QLabel(self.tab_2)
        self.label_23.setGeometry(QtCore.QRect(1110, 40, 71, 41))
        self.label_23.setObjectName("label_23")
        self.label_24 = QtWidgets.QLabel(self.tab_2)
        self.label_24.setGeometry(QtCore.QRect(1110, 80, 71, 41))
        self.label_24.setObjectName("label_24")
        self.label_25 = QtWidgets.QLabel(self.tab_2)
        self.label_25.setGeometry(QtCore.QRect(1190, 0, 71, 41))
        self.label_25.setObjectName("label_25")
        self.label_26 = QtWidgets.QLabel(self.tab_2)
        self.label_26.setGeometry(QtCore.QRect(1190, 40, 71, 41))
        self.label_26.setObjectName("label_26")
        self.label_27 = QtWidgets.QLabel(self.tab_2)
        self.label_27.setGeometry(QtCore.QRect(1190, 80, 71, 41))
        self.label_27.setObjectName("label_27")
        self.label_28 = QtWidgets.QLabel(self.tab_2)
        self.label_28.setGeometry(QtCore.QRect(1040, 120, 151, 41))
        self.label_28.setObjectName("label_28")
        self.pushButton_11 = QtWidgets.QPushButton(self.tab_2)
        self.pushButton_11.setGeometry(QtCore.QRect(1030, 170, 101, 31))
        self.pushButton_11.setObjectName("pushButton_11")
        self.pushButton_12 = QtWidgets.QPushButton(self.tab_2)
        self.pushButton_12.setGeometry(QtCore.QRect(1030, 200, 101, 31))
        self.pushButton_12.setObjectName("pushButton_12")
        self.pushButton_13 = QtWidgets.QPushButton(self.tab_2)
        self.pushButton_13.setGeometry(QtCore.QRect(1030, 230, 101, 31))
        self.pushButton_13.setObjectName("pushButton_13")
        self.pushButton_14 = QtWidgets.QPushButton(self.tab_2)
        self.pushButton_14.setGeometry(QtCore.QRect(1140, 200, 101, 31))
        self.pushButton_14.setObjectName("pushButton_14")
        self.pushButton_15 = QtWidgets.QPushButton(self.tab_2)
        self.pushButton_15.setGeometry(QtCore.QRect(1140, 230, 101, 31))
        self.pushButton_15.setObjectName("pushButton_15")
        self.pushButton_16 = QtWidgets.QPushButton(self.tab_2)
        self.pushButton_16.setGeometry(QtCore.QRect(1140, 170, 101, 31))
        self.pushButton_16.setObjectName("pushButton_16")
        self.textEdit = QtWidgets.QTextEdit(self.tab_2)
        self.textEdit.setGeometry(QtCore.QRect(1030, 310, 131, 31))
        self.textEdit.setObjectName("textEdit")
        self.textEdit_2 = QtWidgets.QTextEdit(self.tab_2)
        self.textEdit_2.setGeometry(QtCore.QRect(1030, 370, 201, 61))
        self.textEdit_2.setObjectName("textEdit_2")
        self.label_29 = QtWidgets.QLabel(self.tab_2)
        self.label_29.setGeometry(QtCore.QRect(1030, 260, 151, 41))
        self.label_29.setObjectName("label_29")
        self.label_30 = QtWidgets.QLabel(self.tab_2)
        self.label_30.setGeometry(QtCore.QRect(1030, 330, 151, 41))
        self.label_30.setObjectName("label_30")
        self.pushButton_17 = QtWidgets.QPushButton(self.tab_2)
        self.pushButton_17.setGeometry(QtCore.QRect(1030, 450, 101, 51))
        self.pushButton_17.setObjectName("pushButton_17")
        self.pushButton_18 = QtWidgets.QPushButton(self.tab_2)
        self.pushButton_18.setGeometry(QtCore.QRect(1140, 450, 101, 51))
        self.pushButton_18.setObjectName("pushButton_18")
       
        self.tabWidget.addTab(self.tab_2, "")
        self.tab_3 = QtWidgets.QWidget()
        self.tab_3.setObjectName("tab_3")
        self.tableWidget_3 = QtWidgets.QTableWidget(self.tab_3)
        self.tableWidget_3.setGeometry(QtCore.QRect(0, 20, 301, 191))
        self.tableWidget_3.setObjectName("tableWidget_3")
        self.tableWidget_3.setColumnCount(2)
        self.tableWidget_3.setRowCount(1)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_3.setVerticalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_3.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_3.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_3.setItem(0, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_3.setItem(0, 1, item)
        self.pushButton_9 = QtWidgets.QPushButton(self.tab_3)
        self.pushButton_9.setGeometry(QtCore.QRect(210, 40, 91, 31))
        self.pushButton_9.setObjectName("pushButton_9")
        self.tableWidget_4 = QtWidgets.QTableWidget(self.tab_3)
        self.tableWidget_4.setGeometry(QtCore.QRect(320, 20, 221, 181))
        self.tableWidget_4.setObjectName("tableWidget_4")
        self.tableWidget_4.setColumnCount(2)
        self.tableWidget_4.setRowCount(5)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setVerticalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setVerticalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setVerticalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setVerticalHeaderItem(3, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setVerticalHeaderItem(4, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setItem(0, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setItem(1, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setItem(2, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setItem(3, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_4.setItem(4, 0, item)
        self.pushButton = QtWidgets.QPushButton(self.tab_3)
        self.pushButton.setGeometry(QtCore.QRect(370, 210, 121, 31))
        self.pushButton.setObjectName("pushButton")
        self.label_12 = QtWidgets.QLabel(self.tab_3)
        self.label_12.setGeometry(QtCore.QRect(0, 0, 101, 16))
        self.label_12.setObjectName("label_12")
        self.label_13 = QtWidgets.QLabel(self.tab_3)
        self.label_13.setGeometry(QtCore.QRect(320, 0, 101, 16))
        self.label_13.setObjectName("label_13")
        self.tableWidget_5 = QtWidgets.QTableWidget(self.tab_3)
        self.tableWidget_5.setGeometry(QtCore.QRect(560, 50, 211, 181))
        self.tableWidget_5.setObjectName("tableWidget_5")
        self.tableWidget_5.setColumnCount(2)
        self.tableWidget_5.setRowCount(5)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setVerticalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setVerticalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setVerticalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setVerticalHeaderItem(3, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setVerticalHeaderItem(4, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setItem(0, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setItem(1, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setItem(2, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setItem(3, 0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget_5.setItem(4, 0, item)
        self.checkBox = QtWidgets.QCheckBox(self.tab_3)
        self.checkBox.setGeometry(QtCore.QRect(670, 130, 80, 22))
        self.checkBox.setText("")
        self.checkBox.setObjectName("checkBox")
        self.checkBox_2 = QtWidgets.QCheckBox(self.tab_3)
        self.checkBox_2.setGeometry(QtCore.QRect(670, 160, 80, 22))
        self.checkBox_2.setText("")
        self.checkBox_2.setObjectName("checkBox_2")
        self.checkBox_3 = QtWidgets.QCheckBox(self.tab_3)
        self.checkBox_3.setGeometry(QtCore.QRect(670, 190, 80, 22))
        self.checkBox_3.setText("")
        self.checkBox_3.setObjectName("checkBox_3")
        self.checkBox_4 = QtWidgets.QCheckBox(self.tab_3)
        self.checkBox_4.setGeometry(QtCore.QRect(670, 100, 80, 22))
        self.checkBox_4.setText("")
        self.checkBox_4.setObjectName("checkBox_4")
        self.checkBox_5 = QtWidgets.QCheckBox(self.tab_3)
        self.checkBox_5.setGeometry(QtCore.QRect(670, 70, 80, 22))
        self.checkBox_5.setText("")
        self.checkBox_5.setObjectName("checkBox_5")
        self.pushButton_2 = QtWidgets.QPushButton(self.tab_3)
        self.pushButton_2.setGeometry(QtCore.QRect(560, 20, 101, 31))
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_3 = QtWidgets.QPushButton(self.tab_3)
        self.pushButton_3.setGeometry(QtCore.QRect(660, 20, 111, 31))
        self.pushButton_3.setObjectName("pushButton_3")
        self.label_14 = QtWidgets.QLabel(self.tab_3)
        self.label_14.setGeometry(QtCore.QRect(560, -10, 181, 31))
        self.label_14.setObjectName("label_14")
        self.label_15 = QtWidgets.QLabel(self.tab_3)
        self.label_15.setGeometry(QtCore.QRect(790, -10, 181, 31))
        self.label_15.setObjectName("label_15")
        self.listView = QtWidgets.QListView(self.tab_3)
        self.listView.setGeometry(QtCore.QRect(790, 20, 251, 211))
        self.listView.setObjectName("listView")
        self.lineEdit_7 = QtWidgets.QLineEdit(self.tab_3)
        self.lineEdit_7.setGeometry(QtCore.QRect(100, 40, 111, 31))
        self.lineEdit_7.setText("")
        self.lineEdit_7.setObjectName("lineEdit_7")
        self.lineEdit_8 = QtWidgets.QLineEdit(self.tab_3)
        self.lineEdit_8.setGeometry(QtCore.QRect(420, 40, 111, 31))
        self.lineEdit_8.setText("")
        self.lineEdit_8.setObjectName("lineEdit_8")
        self.lineEdit_9 = QtWidgets.QLineEdit(self.tab_3)
        self.lineEdit_9.setGeometry(QtCore.QRect(420, 70, 111, 31))
        self.lineEdit_9.setText("")
        self.lineEdit_9.setObjectName("lineEdit_9")
        self.lineEdit_10 = QtWidgets.QLineEdit(self.tab_3)
        self.lineEdit_10.setGeometry(QtCore.QRect(420, 100, 111, 31))
        self.lineEdit_10.setText("")
        self.lineEdit_10.setObjectName("lineEdit_10")
        self.lineEdit_11 = QtWidgets.QLineEdit(self.tab_3)
        self.lineEdit_11.setGeometry(QtCore.QRect(420, 130, 111, 31))
        self.lineEdit_11.setText("")
        self.lineEdit_11.setObjectName("lineEdit_11")
        self.lineEdit_12 = QtWidgets.QLineEdit(self.tab_3)
        self.lineEdit_12.setGeometry(QtCore.QRect(420, 160, 111, 31))
        self.lineEdit_12.setText("")
        self.lineEdit_12.setObjectName("lineEdit_12")
        self.tabWidget.addTab(self.tab_3, "")
        self.label_3 = QtWidgets.QLabel(self.centralwidget)
        self.label_3.setGeometry(QtCore.QRect(320, 0, 71, 31))
        self.label_3.setObjectName("label_3")

        self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")

        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1266, 21))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menu = QtWidgets.QMenu(self.menubar)
        self.menu.setObjectName("menu")
        self.menu_2 = QtWidgets.QMenu(self.menubar)
        self.menu_2.setObjectName("menu_2")
        self.menu_3 = QtWidgets.QMenu(self.menubar)
        self.menu_3.setObjectName("menu_3")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.toolBar = QtWidgets.QToolBar(MainWindow)
        self.toolBar.setObjectName("toolBar")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.toolBar_2 = QtWidgets.QToolBar(MainWindow)
        self.toolBar_2.setObjectName("toolBar_2")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar_2)
        self.action = QtWidgets.QAction(MainWindow)
        self.action.setObjectName("action")
        self.add_goods_action = QtWidgets.QAction(MainWindow)
        self.add_goods_action.setObjectName("add_goods_action")
        self.action_4 = QtWidgets.QAction(MainWindow)
        self.action_4.setObjectName("action_4")
        self.action_CSV = QtWidgets.QAction(MainWindow)
        self.action_CSV.setObjectName("action_CSV")
        self.menuFile.addSeparator()
        self.menuFile.addSeparator()
        self.menuFile.addAction(self.action)
        self.menu.addAction(self.add_goods_action)
        self.menu.addAction(self.action_4)
        self.menu.addAction(self.action_CSV)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menu.menuAction())
        self.menubar.addAction(self.menu_2.menuAction())
        self.menubar.addAction(self.menu_3.menuAction())
        # self.label_7.setBuddy(self.label_2)
        # self.label_2.setBuddy(self.label_2)
        # self.label_5.setBuddy(self.label_2)

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(0)
        self.pushButton_9.clicked.connect(self.label_3.update)
        self.lineEdit_7.editingFinished.connect(self.label_3.repaint)
        # self.tableWidget.cellClicked['int','int'].connect(self.tableWidget.sortByColumn)
        # self.tableWidget.cellActivated['int','int'].connect(self.tableWidget.sortByColumn)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 28
0
    def setupUi(self, EventWindow):
        EventWindow.setObjectName("EventWindow")
        EventWindow.resize(609, 580)
        self.centralwidget = QtWidgets.QWidget(EventWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName("gridLayout")
        self.scrollArea = QtWidgets.QScrollArea(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.scrollArea.sizePolicy().hasHeightForWidth())
        self.scrollArea.setSizePolicy(sizePolicy)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 583, 446))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.gridLayout_2 = QtWidgets.QGridLayout(
            self.scrollAreaWidgetContents)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.textBrowser = QtWidgets.QTextBrowser(
            self.scrollAreaWidgetContents)
        self.textBrowser.setObjectName("textBrowser")
        self.gridLayout_2.addWidget(self.textBrowser, 0, 0, 1, 1)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.gridLayout.addWidget(self.scrollArea, 0, 0, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.gridLayout_3 = QtWidgets.QGridLayout()
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.AddToCalendarButton = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.AddToCalendarButton.sizePolicy().hasHeightForWidth())
        self.AddToCalendarButton.setSizePolicy(sizePolicy)
        self.AddToCalendarButton.setMinimumSize(QtCore.QSize(0, 0))
        self.AddToCalendarButton.setObjectName("AddToCalendarButton")
        self.gridLayout_3.addWidget(self.AddToCalendarButton, 1, 0, 1, 1)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.DateTimeLabel = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.DateTimeLabel.sizePolicy().hasHeightForWidth())
        self.DateTimeLabel.setSizePolicy(sizePolicy)
        self.DateTimeLabel.setMinimumSize(QtCore.QSize(0, 0))
        self.DateTimeLabel.setObjectName("DateTimeLabel")
        self.horizontalLayout_2.addWidget(self.DateTimeLabel)
        self.dateTimeEdit = QtWidgets.QDateTimeEdit(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.dateTimeEdit.sizePolicy().hasHeightForWidth())
        self.dateTimeEdit.setSizePolicy(sizePolicy)
        self.dateTimeEdit.setWrapping(False)
        self.dateTimeEdit.setFrame(True)
        self.dateTimeEdit.setButtonSymbols(
            QtWidgets.QAbstractSpinBox.UpDownArrows)
        self.dateTimeEdit.setAccelerated(False)
        self.dateTimeEdit.setCorrectionMode(
            QtWidgets.QAbstractSpinBox.CorrectToPreviousValue)
        self.dateTimeEdit.setProperty("showGroupSeparator", False)
        self.dateTimeEdit.setMaximumDate(QtCore.QDate(2022, 12, 31))
        self.dateTimeEdit.setMinimumDate(QtCore.QDate(2019, 1, 1))
        self.dateTimeEdit.setCurrentSection(
            QtWidgets.QDateTimeEdit.MonthSection)
        self.dateTimeEdit.setCalendarPopup(True)
        self.dateTimeEdit.setCurrentSectionIndex(0)
        self.dateTimeEdit.setDateTime(QtCore.QDateTime.currentDateTime())
        self.dateTimeEdit.setTimeSpec(QtCore.Qt.LocalTime)
        self.dateTimeEdit.setObjectName("dateTimeEdit")
        self.horizontalLayout_2.addWidget(self.dateTimeEdit)
        self.gridLayout_3.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
        self.horizontalLayout.addLayout(self.gridLayout_3)
        self.line = QtWidgets.QFrame(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.line.sizePolicy().hasHeightForWidth())
        self.line.setSizePolicy(sizePolicy)
        self.line.setFrameShape(QtWidgets.QFrame.VLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.horizontalLayout.addWidget(self.line)
        self.AddToFavoritesButton = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.AddToFavoritesButton.sizePolicy().hasHeightForWidth())
        self.AddToFavoritesButton.setSizePolicy(sizePolicy)
        self.AddToFavoritesButton.setObjectName("AddToFavoritesButton")
        self.horizontalLayout.addWidget(self.AddToFavoritesButton)
        self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
        EventWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(EventWindow)
        self.statusbar.setObjectName("statusbar")
        EventWindow.setStatusBar(self.statusbar)

        self.retranslateUi(EventWindow)
        QtCore.QMetaObject.connectSlotsByName(EventWindow)
Ejemplo n.º 29
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(680, 458)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout_3.setContentsMargins(12, 12, 12, 12)
        self.gridLayout_3.setHorizontalSpacing(16)
        self.gridLayout_3.setVerticalSpacing(0)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox.setMinimumSize(QtCore.QSize(320, 160))
        self.groupBox.setFlat(True)
        self.groupBox.setObjectName("groupBox")
        self.gridLayout = QtWidgets.QGridLayout(self.groupBox)
        self.gridLayout.setContentsMargins(16, 16, 16, 16)
        self.gridLayout.setHorizontalSpacing(12)
        self.gridLayout.setVerticalSpacing(8)
        self.gridLayout.setObjectName("gridLayout")
        self.labelWorkoutTime = QtWidgets.QLabel(self.groupBox)
        self.labelWorkoutTime.setObjectName("labelWorkoutTime")
        self.gridLayout.addWidget(self.labelWorkoutTime, 0, 0, 1, 1)
        self.workoutTime = QtWidgets.QDateTimeEdit(self.groupBox)
        self.workoutTime.setObjectName("workoutTime")
        self.gridLayout.addWidget(self.workoutTime, 0, 1, 1, 1)
        self.labelPowerAdjustment = QtWidgets.QLabel(self.groupBox)
        self.labelPowerAdjustment.setObjectName("labelPowerAdjustment")
        self.gridLayout.addWidget(self.labelPowerAdjustment, 2, 0, 1, 1)
        self.powerAdjustment = QtWidgets.QDoubleSpinBox(self.groupBox)
        self.powerAdjustment.setMinimum(-100.0)
        self.powerAdjustment.setMaximum(100.0)
        self.powerAdjustment.setSingleStep(0.1)
        self.powerAdjustment.setObjectName("powerAdjustment")
        self.gridLayout.addWidget(self.powerAdjustment, 2, 1, 1, 1)
        self.useFileDate = QtWidgets.QCheckBox(self.groupBox)
        self.useFileDate.setObjectName("useFileDate")
        self.gridLayout.addWidget(self.useFileDate, 1, 0, 1, 2)
        self.checkBoxExtra = QtWidgets.QCheckBox(self.groupBox)
        self.checkBoxExtra.setObjectName("checkBoxExtra")
        self.gridLayout.addWidget(self.checkBoxExtra, 3, 0, 1, 2)
        spacerItem = QtWidgets.QSpacerItem(20, 40,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem, 4, 0, 1, 1)
        self.gridLayout_3.addWidget(self.groupBox, 0, 0, 1, 1)
        self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_2.setMinimumSize(QtCore.QSize(320, 160))
        self.groupBox_2.setFlat(True)
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout_2.setContentsMargins(16, 16, 16, 16)
        self.gridLayout_2.setHorizontalSpacing(12)
        self.gridLayout_2.setVerticalSpacing(8)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.labelDurationName = QtWidgets.QLabel(self.groupBox_2)
        self.labelDurationName.setObjectName("labelDurationName")
        self.gridLayout_2.addWidget(self.labelDurationName, 1, 0, 1, 1)
        self.labelDuration = QtWidgets.QLabel(self.groupBox_2)
        self.labelDuration.setText("")
        self.labelDuration.setObjectName("labelDuration")
        self.gridLayout_2.addWidget(self.labelDuration, 1, 1, 1, 1)
        self.labelAveragePowerName = QtWidgets.QLabel(self.groupBox_2)
        self.labelAveragePowerName.setObjectName("labelAveragePowerName")
        self.gridLayout_2.addWidget(self.labelAveragePowerName, 2, 0, 1, 1)
        self.labelAveragePower = QtWidgets.QLabel(self.groupBox_2)
        self.labelAveragePower.setText("")
        self.labelAveragePower.setObjectName("labelAveragePower")
        self.gridLayout_2.addWidget(self.labelAveragePower, 2, 1, 1, 1)
        self.labelMaxPowerName = QtWidgets.QLabel(self.groupBox_2)
        self.labelMaxPowerName.setObjectName("labelMaxPowerName")
        self.gridLayout_2.addWidget(self.labelMaxPowerName, 3, 0, 1, 1)
        self.labelMaxPower = QtWidgets.QLabel(self.groupBox_2)
        self.labelMaxPower.setText("")
        self.labelMaxPower.setObjectName("labelMaxPower")
        self.gridLayout_2.addWidget(self.labelMaxPower, 3, 1, 1, 1)
        self.labelEquipmentName = QtWidgets.QLabel(self.groupBox_2)
        self.labelEquipmentName.setObjectName("labelEquipmentName")
        self.gridLayout_2.addWidget(self.labelEquipmentName, 0, 0, 1, 1)
        self.labelEquipment = QtWidgets.QLabel(self.groupBox_2)
        self.labelEquipment.setText("")
        self.labelEquipment.setObjectName("labelEquipment")
        self.gridLayout_2.addWidget(self.labelEquipment, 0, 1, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_2.addItem(spacerItem1, 4, 0, 1, 1)
        self.gridLayout_3.addWidget(self.groupBox_2, 0, 1, 1, 1)
        self.groupBoxPhysics = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBoxPhysics.setMinimumSize(QtCore.QSize(320, 160))
        self.groupBoxPhysics.setFlat(True)
        self.groupBoxPhysics.setObjectName("groupBoxPhysics")
        self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBoxPhysics)
        self.gridLayout_5.setContentsMargins(16, 16, 16, 16)
        self.gridLayout_5.setHorizontalSpacing(12)
        self.gridLayout_5.setVerticalSpacing(8)
        self.gridLayout_5.setObjectName("gridLayout_5")
        self.label = QtWidgets.QLabel(self.groupBoxPhysics)
        self.label.setObjectName("label")
        self.gridLayout_5.addWidget(self.label, 1, 0, 1, 1)
        self.doubleSpinBoxRiderWeight = QtWidgets.QDoubleSpinBox(
            self.groupBoxPhysics)
        self.doubleSpinBoxRiderWeight.setDecimals(1)
        self.doubleSpinBoxRiderWeight.setMaximum(1000.0)
        self.doubleSpinBoxRiderWeight.setProperty("value", 70.0)
        self.doubleSpinBoxRiderWeight.setObjectName("doubleSpinBoxRiderWeight")
        self.gridLayout_5.addWidget(self.doubleSpinBoxRiderWeight, 1, 1, 1, 1)
        self.comboBoxUnits = QtWidgets.QComboBox(self.groupBoxPhysics)
        self.comboBoxUnits.setObjectName("comboBoxUnits")
        self.comboBoxUnits.addItem("")
        self.comboBoxUnits.addItem("")
        self.gridLayout_5.addWidget(self.comboBoxUnits, 1, 2, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.groupBoxPhysics)
        self.label_2.setObjectName("label_2")
        self.gridLayout_5.addWidget(self.label_2, 2, 0, 1, 1)
        self.doubleSpinBoxBikeWeight = QtWidgets.QDoubleSpinBox(
            self.groupBoxPhysics)
        self.doubleSpinBoxBikeWeight.setDecimals(1)
        self.doubleSpinBoxBikeWeight.setMaximum(1000.0)
        self.doubleSpinBoxBikeWeight.setProperty("value", 8.0)
        self.doubleSpinBoxBikeWeight.setObjectName("doubleSpinBoxBikeWeight")
        self.gridLayout_5.addWidget(self.doubleSpinBoxBikeWeight, 2, 1, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_5.addItem(spacerItem2, 3, 0, 1, 1)
        self.checkBoxPhysics = QtWidgets.QCheckBox(self.groupBoxPhysics)
        self.checkBoxPhysics.setObjectName("checkBoxPhysics")
        self.gridLayout_5.addWidget(self.checkBoxPhysics, 0, 0, 1, 3)
        self.gridLayout_3.addWidget(self.groupBoxPhysics, 1, 0, 1, 1)
        self.widget = QtWidgets.QWidget(self.centralwidget)
        self.widget.setObjectName("widget")
        self.gridLayout_4 = QtWidgets.QGridLayout(self.widget)
        self.gridLayout_4.setContentsMargins(16, 20, 16, 16)
        self.gridLayout_4.setHorizontalSpacing(16)
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.saveButton = QtWidgets.QPushButton(self.widget)
        self.saveButton.setMinimumSize(QtCore.QSize(0, 32))
        self.saveButton.setStyleSheet("")
        self.saveButton.setObjectName("saveButton")
        self.gridLayout_4.addWidget(self.saveButton, 1, 1, 1, 1)
        self.loadButton = QtWidgets.QPushButton(self.widget)
        self.loadButton.setMinimumSize(QtCore.QSize(0, 32))
        self.loadButton.setStyleSheet("")
        self.loadButton.setObjectName("loadButton")
        self.gridLayout_4.addWidget(self.loadButton, 1, 0, 1, 1)
        spacerItem3 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_4.addItem(spacerItem3, 0, 0, 1, 1)
        self.gridLayout_3.addWidget(self.widget, 2, 0, 1, 2)
        self.groupBoxCompatibility = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBoxCompatibility.setMinimumSize(QtCore.QSize(320, 160))
        self.groupBoxCompatibility.setFlat(True)
        self.groupBoxCompatibility.setObjectName("groupBoxCompatibility")
        self.gridLayout_6 = QtWidgets.QGridLayout(self.groupBoxCompatibility)
        self.gridLayout_6.setContentsMargins(16, 16, 16, 16)
        self.gridLayout_6.setHorizontalSpacing(12)
        self.gridLayout_6.setVerticalSpacing(8)
        self.gridLayout_6.setObjectName("gridLayout_6")
        self.checkBoxInterpolate = QtWidgets.QCheckBox(
            self.groupBoxCompatibility)
        self.checkBoxInterpolate.setChecked(True)
        self.checkBoxInterpolate.setObjectName("checkBoxInterpolate")
        self.gridLayout_6.addWidget(self.checkBoxInterpolate, 0, 0, 1, 1)
        spacerItem4 = QtWidgets.QSpacerItem(20, 40,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_6.addItem(spacerItem4, 1, 0, 1, 1)
        self.gridLayout_3.addWidget(self.groupBoxCompatibility, 1, 1, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 680, 20))
        self.menubar.setObjectName("menubar")
        self.menuHelp = QtWidgets.QMenu(self.menubar)
        self.menuHelp.setObjectName("menuHelp")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.actionAbout = QtWidgets.QAction(MainWindow)
        self.actionAbout.setObjectName("actionAbout")
        self.menuHelp.addAction(self.actionAbout)
        self.menubar.addAction(self.menuHelp.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 30
0
    def __init__(self):
        super().__init__()

        self.setWindowIcon(QtGui.QIcon(Res.mainWindowIcon))
        self.setWindowTitle("任务")
        self.setFixedWidth(640)
        self.setFixedHeight(360)

        self.eventWindow = EventWindow()
        self.index = -1

        taskname = QtWidgets.QLineEdit()
        layout1 = QtWidgets.QHBoxLayout()
        layout1.addWidget(QtWidgets.QLabel("任务名"))
        layout1.addWidget(taskname)
        self.taskname = taskname

        start_time = QtWidgets.QDateTimeEdit(
            QtCore.QDateTime.currentDateTime().addSecs(600))
        start_time.setCalendarPopup(True)
        loop_mode = QtWidgets.QComboBox()
        loop_mode.addItems(['单次', '每天', '固定时间'])
        fixed_time = QtWidgets.QLineEdit("0")
        fixed_time.setEnabled(False)
        layout2 = QtWidgets.QHBoxLayout()
        layout2.addWidget(QtWidgets.QLabel("启动时间"))
        layout2.addWidget(start_time)
        layout2.addWidget(QtWidgets.QLabel("循环"))
        layout2.addWidget(loop_mode)
        layout2.addWidget(QtWidgets.QLabel("间隔(min)"))
        layout2.addWidget(fixed_time)
        loop_mode.currentTextChanged.connect(self.loop_mode_changed)
        self.start_time = start_time
        self.loop_mode = loop_mode
        self.fixed_time = fixed_time

        add = QtWidgets.QPushButton("添加")
        edit = QtWidgets.QPushButton("修改")
        delete = QtWidgets.QPushButton("删除")
        ok = QtWidgets.QPushButton("确定")
        add.clicked.connect(self.add_slot)
        edit.clicked.connect(self.edit_slot)
        delete.clicked.connect(self.delete_slot)
        ok.clicked.connect(self.ok_slot)

        layout3 = QtWidgets.QVBoxLayout()
        layout3.addWidget(add)
        layout3.addWidget(edit)
        layout3.addWidget(delete)
        layout3.addStretch()
        layout3.addWidget(ok)

        events = QtWidgets.QListWidget()
        layout4 = QtWidgets.QHBoxLayout()
        layout4.addWidget(events)
        layout4.addLayout(layout3)
        self.events = events

        mainlayout = QtWidgets.QVBoxLayout()
        mainlayout.addLayout(layout1)
        mainlayout.addLayout(layout2)
        mainlayout.addLayout(layout4)
        self.setLayout(mainlayout)