from PySide import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    def _fromUtf8(s):
        return s

try:
    _encoding = QtGui.QApplication.UnicodeUTF8
    def _translate(context, text, disambig):
        return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
    def _translate(context, text, disambig):
        return QtGui.QApplication.translate(context, text, disambig)

class Ui_dlgMain(QtGui.QMainWindow):
    def setupUi(self, dlgMain):
        dlgMain.setObjectName(_fromUtf8("dlgMain"))
        dlgMain.resize(611, 544)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8("icon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        dlgMain.setWindowIcon(icon)
        self.groupBox = QtGui.QGroupBox(dlgMain)
        self.groupBox.setGeometry(QtCore.QRect(320, 20, 281, 251))
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.lstServers = QtGui.QListWidget(self.groupBox)
        self.lstServers.setGeometry(QtCore.QRect(10, 20, 261, 192))
        self.lstServers.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        self.lstServers.setMidLineWidth(1)
        self.lstServers.setObjectName(_fromUtf8("lstServers"))
        self.lstServers.setToolTip("Double click server to remove it from the list.")
        self.txtAddserver = QtGui.QLineEdit(self.groupBox)
        self.txtAddserver.setGeometry(QtCore.QRect(10, 220, 101, 20))
        self.txtAddserver.setObjectName(_fromUtf8("txtAddserver"))

        self.btnAddServer = QtGui.QPushButton(self.groupBox)
        self.btnAddServer.setGeometry(QtCore.QRect(120, 220, 71, 21))
        self.btnAddServer.setObjectName(_fromUtf8("btnAddServer"))
        self.btnSaveList = QtGui.QPushButton(self.groupBox)
        self.btnSaveList.setGeometry(QtCore.QRect(200, 220, 71, 21))
        self.btnSaveList.setObjectName(_fromUtf8("btnSaveList"))
        self.groupBox_2 = QtGui.QGroupBox(dlgMain)
        self.groupBox_2.setGeometry(QtCore.QRect(10, 20, 281, 121))
        self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
        self.txtUsername = QtGui.QLineEdit(self.groupBox_2)
        self.txtUsername.setGeometry(QtCore.QRect(80, 20, 191, 21))
        self.txtUsername.setObjectName(_fromUtf8("txtUsername"))
        self.txtPassword = QtGui.QLineEdit(self.groupBox_2)
        self.txtPassword.setGeometry(QtCore.QRect(80, 50, 191, 21))
        self.txtPassword.setObjectName(_fromUtf8("txtPassword"))
        self.txtPassword.setEchoMode(QtGui.QLineEdit.Password)
        self.txtDomain = QtGui.QLineEdit(self.groupBox_2)
        self.txtDomain.setGeometry(QtCore.QRect(80, 80, 191, 21))
        self.txtDomain.setObjectName(_fromUtf8("txtDomain"))
        self.label = QtGui.QLabel(self.groupBox_2)
        self.label.setGeometry(QtCore.QRect(10, 10, 71, 31))
        self.label.setObjectName(_fromUtf8("label"))
        self.label_3 = QtGui.QLabel(self.groupBox_2)
        self.label_3.setGeometry(QtCore.QRect(10, 40, 71, 31))
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.label_4 = QtGui.QLabel(self.groupBox_2)
        self.label_4.setGeometry(QtCore.QRect(10, 70, 71, 31))
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.groupBox_3 = QtGui.QGroupBox(dlgMain)
        self.groupBox_3.setGeometry(QtCore.QRect(10, 150, 281, 51))
        self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
        self.radioExcel = QtGui.QRadioButton(self.groupBox_3)
        self.radioExcel.setGeometry(QtCore.QRect(10, 20, 71, 20))
        self.radioExcel.setObjectName(_fromUtf8("radioExcel"))
        self.radioCSV = QtGui.QRadioButton(self.groupBox_3)
        self.radioCSV.setGeometry(QtCore.QRect(110, 20, 71, 20))
        self.radioCSV.setObjectName(_fromUtf8("radioCSV"))
        self.radioGoogle = QtGui.QRadioButton(self.groupBox_3)
        self.radioGoogle.setGeometry(QtCore.QRect(190, 20, 71, 20))
        self.radioGoogle.setObjectName(_fromUtf8("radioGoogle"))
        self.btnSaveas = QtGui.QPushButton(dlgMain)
        self.btnSaveas.setGeometry(QtCore.QRect(10, 210, 75, 23))
        self.btnSaveas.setObjectName(_fromUtf8("btnSaveas"))
        self.txtFilename = QtGui.QLineEdit(dlgMain)
        self.txtFilename.setGeometry(QtCore.QRect(90, 210, 201, 21))

        self.txtFilename.setObjectName(_fromUtf8("txtFilename"))
        self.groupBox_4 = QtGui.QGroupBox(dlgMain)
        self.groupBox_4.setGeometry(QtCore.QRect(10, 240, 281, 121))
        self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
        self.txtGUsername = QtGui.QLineEdit(self.groupBox_4)
        self.txtGUsername.setGeometry(QtCore.QRect(80, 20, 191, 21))

        self.txtGUsername.setObjectName(_fromUtf8("txtGUsername"))
        self.txtGPassword = QtGui.QLineEdit(self.groupBox_4)
        self.txtGPassword.setGeometry(QtCore.QRect(80, 50, 191, 21))

        self.txtGPassword.setObjectName(_fromUtf8("txtGPassword"))
        self.txtGPassword.setEchoMode(QtGui.QLineEdit.Password)
        self.txtGSpreadsheet = QtGui.QLineEdit(self.groupBox_4)
        self.txtGSpreadsheet.setGeometry(QtCore.QRect(80, 80, 191, 21))
        self.txtGSpreadsheet.setObjectName(_fromUtf8("txtGSpreadsheet"))
        self.label_2 = QtGui.QLabel(self.groupBox_4)
        self.label_2.setGeometry(QtCore.QRect(10, 10, 71, 31))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.label_5 = QtGui.QLabel(self.groupBox_4)
        self.label_5.setGeometry(QtCore.QRect(10, 40, 71, 31))
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.label_6 = QtGui.QLabel(self.groupBox_4)
        self.label_6.setGeometry(QtCore.QRect(10, 70, 71, 31))
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.btnSaveCredentials = QtGui.QPushButton(dlgMain)
        self.btnSaveCredentials.setGeometry(QtCore.QRect(320, 330, 136, 21))
        self.btnSaveCredentials.setObjectName(_fromUtf8("btnSaveCredentials"))
        self.btnLoadCredentials = QtGui.QPushButton(dlgMain)
        self.btnLoadCredentials.setGeometry(QtCore.QRect(470, 330, 136, 21))
        self.btnLoadCredentials.setObjectName(_fromUtf8("btnLoadCredentials"))
        self.btnLoadCredentials.setText(_translate("dlgMain", "Load Credentials", None))

        self.btnClose = QtGui.QPushButton(dlgMain)
        self.btnClose.setGeometry(QtCore.QRect(440, 360, 75, 23))
        self.btnClose.setObjectName(_fromUtf8("btnClose"))
        self.btnScan = QtGui.QPushButton(dlgMain)
        self.btnScan.setGeometry(QtCore.QRect(520, 360, 75, 23))
        self.btnScan.setObjectName(_fromUtf8("btnScan"))
        self.txtPassphrase = QtGui.QLineEdit(dlgMain)
        self.txtPassphrase.setGeometry(QtCore.QRect(320, 300, 281, 21))
        self.txtPassphrase.setObjectName(_fromUtf8("txtPassphrase"))
        self.txtPassphrase.setEchoMode(QtGui.QLineEdit.Password)
        self.label_7 = QtGui.QLabel(dlgMain)
        self.label_7.setGeometry(QtCore.QRect(320, 280, 271, 16))
        self.label_7.setObjectName(_fromUtf8("label_7"))
        dlgMain.setWindowTitle(_translate("dlgMain", "EssentiaLink's Server Disk Space Collector", None))
        self.groupBox.setTitle(_translate("dlgMain", "Servers to Scan", None))
        self.btnAddServer.setText(_translate("dlgMain", "Add Servers", None))
        self.btnSaveList.setText(_translate("dlgMain", "Save List", None))
        self.groupBox_2.setTitle(_translate("dlgMain", "Admin Credentials for Servers", None))
        self.label.setText(_translate("dlgMain", "Username:", None))
        self.label_3.setText(_translate("dlgMain", "Password:", None))
        self.label_4.setText(_translate("dlgMain", "Domain:", None))
        self.groupBox_3.setTitle(_translate("dlgMain", "Export format:", None))
        self.radioExcel.setText(_translate("dlgMain", "Excel", None))
        self.radioCSV.setText(_translate("dlgMain", "CSV", None))
        self.radioGoogle.setText(_translate("dlgMain", "Google", None))
        self.btnSaveas.setText(_translate("dlgMain", "Save As", None))
        self.groupBox_4.setTitle(_translate("dlgMain", "Google Info", None))
        self.label_2.setText(_translate("dlgMain", "Username:", None))
        self.label_5.setText(_translate("dlgMain", "Password:", None))
        self.label_6.setText(_translate("dlgMain", "Spreadsheet:", None))
        self.btnSaveCredentials.setText(_translate("dlgMain", "Save Credentials", None))
        self.btnClose.setText(_translate("dlgMain", "Close", None))
        self.btnScan.setText(_translate("dlgMain", "Scan", None))
        self.label_7.setText(_translate("dlgMain", "Enter Passphrase to Encrypt Saved Credentials:", None))
        self.groupBox_5 = QtGui.QGroupBox(dlgMain)
        self.groupBox_5.setGeometry(QtCore.QRect(20, 390, 571, 71))
        self.groupBox_5.setObjectName(_fromUtf8("groupBox_5"))
        self.progressBar = QtGui.QProgressBar(self.groupBox_5)
        self.progressBar.setEnabled(False)
        self.progressBar.setGeometry(QtCore.QRect(20, 40, 531, 23))
        self.progressBar.setProperty("value", 0)
        self.progressBar.setObjectName(_fromUtf8("progressBar"))
        self.statusLabel = QtGui.QLabel(self.groupBox_5)
        #self.statusLabel.setEnabled(False)
        self.statusLabel.setGeometry(QtCore.QRect(20, 20, 431, 21))
        self.statusLabel.setObjectName(_fromUtf8("statusLabel"))
        self.groupBox_5.setTitle(_translate("dlgMain", "Status", None))
        self.lblLogo = QtGui.QLabel(dlgMain)
        self.lblLogo.setGeometry(QtCore.QRect(180, 470, 251, 51))
        self.lblLogo.setText(_fromUtf8(""))
        self.lblLogo.setPixmap(QtGui.QPixmap(_fromUtf8("logo.png")))
        self.lblLogo.setObjectName(_fromUtf8("lblLogo"))
        self.lblCopyright = QtGui.QLabel(dlgMain)
        self.lblCopyright.setGeometry(QtCore.QRect(240, 520, 191, 20))
        self.lblCopyright.setObjectName(_fromUtf8("lblCopyright"))
        self.lblCopyright.setText(_translate("dlgMain", "© 2013 <a href=\"http://essentialink.com\">EssentiaLink</a>", None))



        self.btnClose.clicked.connect(self.buttonClicked)
        self.btnAddServer.clicked.connect(self.buttonClicked)
        self.btnSaveas.clicked.connect(self.buttonClicked)
        self.btnScan.clicked.connect(self.buttonClicked)
        self.btnSaveCredentials.clicked.connect(self.buttonClicked)
        self.btnSaveList.clicked.connect(self.buttonClicked)
        self.btnLoadCredentials.clicked.connect(self.buttonClicked)
        self.radioCSV.clicked.connect(self.radioChange)
        self.radioExcel.clicked.connect(self.radioChange)
        self.radioGoogle.clicked.connect(self.radioChange)
        self.lstServers.itemDoubleClicked.connect(self.removeServer)
        self.lblCopyright.linkActivated.connect(self.openWebsite)

