Example #1
0
    def __init__(self, username, password):

        self.username = username
        self.password = password

        QtGui.QWidget.__init__(self)

        self.dirSelection = Ui_dirForm()
        self.dirSelection.setupUi(self)

        self.dirSelection.addDir.clicked.connect(self.chooseDir)
        self.dirSelection.finButton.clicked.connect(self.writeConfig)
Example #2
0
class dirSelector(QtGui.QWidget):
    def __init__(self, username, password):

        self.username = username
        self.password = password

        QtGui.QWidget.__init__(self)

        self.dirSelection = Ui_dirForm()
        self.dirSelection.setupUi(self)

        self.dirSelection.addDir.clicked.connect(self.chooseDir)
        self.dirSelection.finButton.clicked.connect(self.writeConfig)

    def chooseDir(self):
        selection = QtGui.QFileDialog.getExistingDirectory(self, "Select Directory")
        self.updateDirList(selection)

    def updateDirList(self, selection):
        self.dirSelection.dirList.insertPlainText(selection + '\n')

    def writeConfig(self):
        window.hide()
        subprocess.call(['python3', '../fs_monitor/watcher.py'])