Пример #1
0
    def done(self, r):
        if r == QDialog.Accepted:
            if self.project_name_edit.text() == "":
                QMessageBox.critical(
                    None, "Project validation error", "Project name is empty", QMessageBox.Yes, QMessageBox.Yes
                )
                return

            if not projectmanager.validate_project(self.project_dir_edit.text()):
                return
            else:
                super(AddExistItemDialog, self).done(r)

        super(AddExistItemDialog, self).done(r)
Пример #2
0
    def open_dir(self):
        selected_dir = QFileDialog.getExistingDirectory(self, "Select Directory")

        if projectmanager.validate_project(selected_dir):
            self.project_dir_edit.setText(selected_dir)