Пример #1
0
 def __init__(self, app, parent, suite, name='TemplateEditor'):
     QSplitter.__init__(self, parent, name)
     dbwidget(self, app)
     self.trait = None
     self.listView = TraitList(self.app, self, 'template')
     self.mainEdit = SimpleEdit(self.app, self)
     self.set_suite(suite)
     self.refreshListView()
     self.connect(self.listView, SIGNAL('selectionChanged()'),
                  self.selectionChanged)
Пример #2
0
 def __init__(self, app, parent, suite, name='TemplateEditor'):
     QSplitter.__init__(self, parent, name)
     dbwidget(self, app)
     self.trait = None
     self.listView = TraitList(self.app, self, 'template')
     self.mainEdit = SimpleEdit(self.app, self)
     self.set_suite(suite)
     self.refreshListView()
     self.connect(self.listView,
                  SIGNAL('selectionChanged()'), self.selectionChanged)
Пример #3
0
class TemplateEditor(QSplitter):
    def __init__(self, app, parent, suite, name='TemplateEditor'):
        QSplitter.__init__(self, parent, name)
        dbwidget(self, app)
        self.trait = None
        self.listView = TraitList(self.app, self, 'template')
        self.mainEdit = SimpleEdit(self.app, self)
        self.set_suite(suite)
        self.refreshListView()
        self.connect(self.listView,
                     SIGNAL('selectionChanged()'), self.selectionChanged)
          
    def set_suite(self, suite):
        self.suite = suite
        self.listView.set_suite(suite)
        self.trait = Trait(self.conn, suite=suite)
        
    def set_trait(self, trait):
        self.trait.set_trait(trait)

    def refreshListView(self):
        self.listView.refreshlistView()

    def selectionChanged(self):
        current = self.listView.currentItem()
        if hasattr(current, 'row'):
            self.mainEdit.setText(self.listView.getData())
Пример #4
0
class TemplateEditor(QSplitter):
    def __init__(self, app, parent, suite, name='TemplateEditor'):
        QSplitter.__init__(self, parent, name)
        dbwidget(self, app)
        self.trait = None
        self.listView = TraitList(self.app, self, 'template')
        self.mainEdit = SimpleEdit(self.app, self)
        self.set_suite(suite)
        self.refreshListView()
        self.connect(self.listView, SIGNAL('selectionChanged()'),
                     self.selectionChanged)

    def set_suite(self, suite):
        self.suite = suite
        self.listView.set_suite(suite)
        self.trait = Trait(self.conn, suite=suite)

    def set_trait(self, trait):
        self.trait.set_trait(trait)

    def refreshListView(self):
        self.listView.refreshlistView()

    def selectionChanged(self):
        current = self.listView.currentItem()
        if hasattr(current, 'row'):
            self.mainEdit.setText(self.listView.getData())