import os

from gui.main_window import font_size
from PyQt5 import QtCore, QtWidgets, QtGui

font_setting = font_size()


try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    _fromUtf8 = lambda s: s

class Ui_attack_settings(object):
    def setupUi(self, attack_settings):
        attack_settings.setObjectName(_fromUtf8("attack_settings"))
        attack_settings.resize(400, 199)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8("%s/resources/mac_address.png"%(os.getcwd()))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        attack_settings.setWindowIcon(icon)
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(attack_settings)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.mac_box = QtWidgets.QGroupBox(attack_settings)
        font = QtGui.QFont()
        font.setPointSize(font_setting)
        self.mac_box.setFont(font)
        self.mac_box.setCheckable(True)
        self.mac_box.setChecked(False)
        self.mac_box.setObjectName(_fromUtf8("mac_box"))
        self.verticalLayout = QtWidgets.QVBoxLayout(self.mac_box)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtWidgets.QLabel(self.mac_box)
        font = QtGui.QFont()
        font.setPointSize(font_setting)
        self.label.setFont(font)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        spacerItem = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        self.verticalLayout.addItem(spacerItem)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.mac_edit = QtWidgets.QLineEdit(self.mac_box)
        font = QtGui.QFont()
        font.setPointSize(font_setting)
        self.mac_edit.setFont(font)
        self.mac_edit.setObjectName(_fromUtf8("mac_edit"))
        self.horizontalLayout.addWidget(self.mac_edit)
        spacerItem1 = QtWidgets.QSpacerItem(22, 21, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.mac_button = QtWidgets.QPushButton(self.mac_box)
        font = QtGui.QFont()
        font.setPointSize(font_setting)
        self.mac_button.setFont(font)
        self.mac_button.setObjectName(_fromUtf8("mac_button"))
        self.horizontalLayout.addWidget(self.mac_button)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.verticalLayout_3.addWidget(self.mac_box)
        self.capture_box = QtWidgets.QGroupBox(attack_settings)
        font = QtGui.QFont()
        font.setPointSize(font_setting)
        self.capture_box.setFont(font)
        self.capture_box.setCheckable(True)
        self.capture_box.setChecked(False)
        self.capture_box.setObjectName(_fromUtf8("capture_box"))
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.capture_box)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.label_2 = QtWidgets.QLabel(self.capture_box)
        font = QtGui.QFont()
        font.setPointSize(font_setting)
        self.label_2.setFont(font)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.verticalLayout_2.addWidget(self.label_2)
        spacerItem2 = QtWidgets.QSpacerItem(20, 1, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        self.verticalLayout_2.addItem(spacerItem2)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.directory_label = QtWidgets.QLabel(self.capture_box)
        self.directory_label.setObjectName(_fromUtf8("directory_label"))
        self.horizontalLayout_2.addWidget(self.directory_label)
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem3)
        self.direc_browse = QtWidgets.QPushButton(self.capture_box)
        self.direc_browse.setObjectName(_fromUtf8("direc_browse"))
        self.horizontalLayout_2.addWidget(self.direc_browse)
        self.verticalLayout_2.addLayout(self.horizontalLayout_2)
        self.verticalLayout_3.addWidget(self.capture_box)

        self.retranslateUi(attack_settings)
        QtCore.QMetaObject.connectSlotsByName(attack_settings)

    def retranslateUi(self, attack_settings):
        attack_settings.setWindowTitle(QtWidgets.QApplication.translate("attack_settings", "WIFI Attack Settings", None, 0))
        self.mac_box.setTitle(QtWidgets.QApplication.translate("attack_settings", "Default MAC Settings", None, 0))
        self.label.setText(QtWidgets.QApplication.translate("attack_settings", "Set default MAC address to be used when attempting WIFI  attacks", None, 0))
        self.mac_button.setText(QtWidgets.QApplication.translate("attack_settings", "Set MAC", None, 0))
        self.capture_box.setTitle(QtWidgets.QApplication.translate("attack_settings", "Capture File Settings", None, 0))
        self.label_2.setText(QtWidgets.QApplication.translate("attack_settings", "Set Directory for storing capture files for offline usage", None, 0))
        self.directory_label.setText(QtWidgets.QApplication.translate("attack_settings", "", None, 0))
        self.direc_browse.setText(QtWidgets.QApplication.translate("attack_settings", "Browse", None, 0))

