def __init__(self, component_manager): ExportMetadataDialog.__init__(self, component_manager) QtGui.QDialog.__init__(self, self.main_widget()) self.setupUi(self) self.setWindowFlags(QtCore.Qt.Dialog \ | QtCore.Qt.CustomizeWindowHint \ | QtCore.Qt.WindowTitleHint \ & ~ QtCore.Qt.WindowCloseButtonHint \ & ~ QtCore.Qt.WindowContextHelpButtonHint) self.author_name.setText(self.config()["author_name"]) self.author_email.setText(self.config()["author_email"]) self.date.setDate(QtCore.QDate.currentDate()) self.allow_cancel = True self.cancelled = False
def activate(self): ExportMetadataDialog.activate(self) return self.exec_()