Esempio n. 1
0
 def show_new_view(self, has_subclasses):
     assert object_thread( self )
     from camelot.view.workspace import show_top_level
     selected = QtGui.QDialog.Accepted
     admin = self.admin
     if has_subclasses:
         from camelot.view.controls.inheritance import SubclassDialog
         select_subclass = SubclassDialog(self, self.admin)
         select_subclass.setWindowTitle(_('select'))
         selected = select_subclass.exec_()
         admin = select_subclass.selected_subclass
     if selected:
         form = admin.create_new_view()
         form.entity_created_signal.connect( self.select_object )
         show_top_level( form, self )
Esempio n. 2
0
 def show_new_view(self, has_subclasses):
     from camelot.view.workspace import show_top_level
     selected = QtGui.QDialog.Accepted
     admin = self.admin
     if has_subclasses:
         from camelot.view.controls.inheritance import SubclassDialog
         select_subclass = SubclassDialog(self, self.admin)
         select_subclass.setWindowTitle(_('select'))
         selected = select_subclass.exec_()
         admin = select_subclass.selected_subclass
     if selected:
         form = admin.create_new_view()
         form.entity_created_signal.connect(self.selectEntity)
         # @todo: dirty trick to keep reference
         #self.__new_form = form
         show_top_level( form, self )
Esempio n. 3
0
 def show_new_view(self, has_subclasses):
     from camelot.view.workspace import show_top_level
     selected = QtGui.QDialog.Accepted
     admin = self.admin
     if has_subclasses:
         from camelot.view.controls.inheritance import SubclassDialog
         select_subclass = SubclassDialog(self, self.admin)
         select_subclass.setWindowTitle(_('select'))
         selected = select_subclass.exec_()
         admin = select_subclass.selected_subclass
     if selected:
         form = admin.create_new_view()
         form.entity_created_signal.connect(self.selectEntity)
         # @todo: dirty trick to keep reference
         #self.__new_form = form
         show_top_level(form, self)
Esempio n. 4
0
 def render(self):
     subclass_dialog = SubclassDialog(admin=self.admin,
                                      subclass_tree=self.subclass_tree)
     subclass_dialog.setWindowTitle(ugettext('Select'))
     return subclass_dialog