# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'activate/resources/ui/settings.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.

from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_settings(object):
    def setupUi(self, settings):
        settings.setObjectName("settings")
        settings.resize(800, 600)
        self.main_layout = QtWidgets.QVBoxLayout(settings)
        self.main_layout.setObjectName("main_layout")
        self.settings_tabs = QtWidgets.QTabWidget(settings)
        self.settings_tabs.setTabPosition(QtWidgets.QTabWidget.West)
        self.settings_tabs.setObjectName("settings_tabs")
        self.units_tab = QtWidgets.QWidget()
        self.units_tab.setObjectName("units_tab")
        self.units_tab_layout = QtWidgets.QVBoxLayout(self.units_tab)
        self.units_tab_layout.setObjectName("units_tab_layout")
        self.restart_note_label = QtWidgets.QLabel(self.units_tab)
        self.restart_note_label.setObjectName("restart_note_label")
        self.units_tab_layout.addWidget(self.restart_note_label)
        self.unit_system_layout = QtWidgets.QHBoxLayout()
        self.unit_system_layout.setObjectName("unit_system_layout")
        self.system_label = QtWidgets.QLabel(self.units_tab)
        self.system_label.setObjectName("system_label")
        self.unit_system_layout.addWidget(self.system_label)
        self.unit_system = QtWidgets.QComboBox(self.units_tab)
        self.unit_system.setObjectName("unit_system")
        self.unit_system.addItem("")
        self.unit_system.addItem("")
        self.unit_system_layout.addWidget(self.unit_system)
        self.units_tab_layout.addLayout(self.unit_system_layout)
        self.line = QtWidgets.QFrame(self.units_tab)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.units_tab_layout.addWidget(self.line)
        self.custom_units_heading = QtWidgets.QLabel(self.units_tab)
        self.custom_units_heading.setObjectName("custom_units_heading")
        self.units_tab_layout.addWidget(self.custom_units_heading)
        self.settings_tabs.addTab(self.units_tab, "")
        self.servers_tab = QtWidgets.QWidget()
        self.servers_tab.setObjectName("servers_tab")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.servers_tab)
        self.verticalLayout.setObjectName("verticalLayout")
        self.server_table = ServersTable(self.servers_tab)
        self.server_table.setObjectName("server_table")
        self.server_table.setColumnCount(0)
        self.server_table.setRowCount(0)
        self.server_table.horizontalHeader().setDefaultSectionSize(180)
        self.server_table.horizontalHeader().setStretchLastSection(True)
        self.server_table.verticalHeader().setVisible(False)
        self.verticalLayout.addWidget(self.server_table)
        self.add_server_button = QtWidgets.QPushButton(self.servers_tab)
        self.add_server_button.setObjectName("add_server_button")
        self.verticalLayout.addWidget(self.add_server_button)
        self.settings_tabs.addTab(self.servers_tab, "")
        self.main_layout.addWidget(self.settings_tabs)
        self.settings_buttons = QtWidgets.QDialogButtonBox(settings)
        self.settings_buttons.setStandardButtons(
            QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok
        )
        self.settings_buttons.setObjectName("settings_buttons")
        self.main_layout.addWidget(self.settings_buttons)

        self.retranslateUi(settings)
        self.settings_tabs.setCurrentIndex(0)
        self.settings_buttons.accepted.connect(settings.accept)
        self.settings_buttons.rejected.connect(settings.reject)
        self.add_server_button.clicked["bool"].connect(settings.add_server)
        QtCore.QMetaObject.connectSlotsByName(settings)

    def retranslateUi(self, settings):
        _translate = QtCore.QCoreApplication.translate
        settings.setWindowTitle(_translate("settings", "Settings"))
        self.restart_note_label.setText(
            _translate(
                "settings", "A restart may be necessary for changes to take effect."
            )
        )
        self.system_label.setText(_translate("settings", "System"))
        self.unit_system.setItemText(0, _translate("settings", "Metric"))
        self.unit_system.setItemText(1, _translate("settings", "Imperial"))
        self.custom_units_heading.setText(_translate("settings", "Custom Units"))
        self.settings_tabs.setTabText(
            self.settings_tabs.indexOf(self.units_tab), _translate("settings", "Units")
        )
        self.add_server_button.setText(_translate("settings", "Add Server"))
        self.settings_tabs.setTabText(
            self.settings_tabs.indexOf(self.servers_tab),
            _translate("settings", "Servers"),
        )


from activate.app.tables import ServersTable
