Пример #1
0
 def __init__(self, parent, profile):
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.profile = Profile(self.conn)
     self.profile.set_profile(profile)
     BaseAssigner.__init__(self, parent, name="FamilyAssigner", udbuttons=True)
     self.connect(self, SIGNAL("okClicked()"), self.slotInsertNewFamilies)
Пример #2
0
 def __init__(self, parent, umlmachines, name='InstallerWidget'):
     QWidget.__init__(self, parent, name)
     self.resize(600, 600)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.umlmachines = umlmachines
     self.machine = self.umlmachines.current
     self.current_machine_process = 'start'
     self.current_profile = None
     self.current_trait = None
     self.traitlist = []
     self.curenv = CurrentEnvironment(self.conn, self.machine)
     self.curenv['current_profile'] = 'None'
     self.curenv['current_trait'] = 'None'
     self.curenv['current_machine_process'] = self.current_machine_process
     self.timer = QTimer(self)
     self.connect(self.timer, SIGNAL('timeout()'), self.update_progress)
     self.timer.startTimer(1000)
     self.grid = QGridLayout(self, 4, 1, 5, 7)
     self.main_label = QLabel(self)
     self.main_label.setText(self._msg())
     self.grid.addWidget(self.main_label, 0, 0)
     self.profile_progress_lbl = QLabel(self)
     self.grid.addWidget(self.profile_progress_lbl, 1, 0)
     self.profile_progress = KProgress(self)
     self.grid.addWidget(self.profile_progress, 2, 0)
     self.logview = LogBrowser(self, '/tmp/uml-installer.log')
     self.grid.addWidget(self.logview, 3, 0)
     #self.console_view = StdOutBrowser(self)
     #self.console_view = KTextBrowser(self)
     #self.grid.addWidget(self.console_view, 4, 0)
     self.console_text = ''
Пример #3
0
 def __init__(self, parent, umlmachines, name="InstallerWidget"):
     QWidget.__init__(self, parent, name)
     self.resize(600, 600)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.umlmachines = umlmachines
     self.machine = self.umlmachines.current
     self.current_machine_process = "start"
     self.current_profile = None
     self.current_trait = None
     self.traitlist = []
     self.curenv = CurrentEnvironment(self.conn, self.machine)
     self.curenv["current_profile"] = "None"
     self.curenv["current_trait"] = "None"
     self.curenv["current_machine_process"] = self.current_machine_process
     self.timer = QTimer(self)
     self.connect(self.timer, SIGNAL("timeout()"), self.update_progress)
     self.timer.startTimer(1000)
     self.grid = QGridLayout(self, 4, 1, 5, 7)
     self.main_label = QLabel(self)
     self.main_label.setText(self._msg())
     self.grid.addWidget(self.main_label, 0, 0)
     self.profile_progress_lbl = QLabel(self)
     self.grid.addWidget(self.profile_progress_lbl, 1, 0)
     self.profile_progress = KProgress(self)
     self.grid.addWidget(self.profile_progress, 2, 0)
     self.logview = LogBrowser(self, "/tmp/uml-installer.log")
     self.grid.addWidget(self.logview, 3, 0)
     # self.console_view = StdOutBrowser(self)
     # self.console_view = KTextBrowser(self)
     # self.grid.addWidget(self.console_view, 4, 0)
     self.console_text = ""
Пример #4
0
    def __init__(self, parent, name='SuiteTraitComboBox'):
        QFrame.__init__(self, parent, name)
        self.app = get_application_pointer()
        self.conn = self.app.conn
        self.suiteCursor = Suites(self.conn)
        self.suites = self.suiteCursor.list()
        self.traits = Traits(self.conn, self.suites[0])
        self.scombo = KComboBox(self, 'SuiteComboBox')
        self.scombo.insertStrList(self.suites)
        self.tcombo = KComboBox(self, 'TypeComboBox')
        self.tcombo.insertStrList(['template', 'script'])
        self.trcombo = KComboBox(self, 'TraitComboBox')
        self.update_btn = KPushButton('update', self)
        self.listView = TraitListView(self)
        self.vbox = QVBoxLayout(self)
        for attribute in [
                'listView', 'scombo', 'tcombo', 'trcombo', 'update_btn'
        ]:
            widget = getattr(self, attribute)
            self.vbox.addWidget(widget)
        # we need to redo the signals and the methods that are called
        self.connect(self.scombo, SIGNAL('activated(int)'), self.update_traits)

        self.connect(self.update_btn, SIGNAL('clicked()'),
                     self.refreshlistView)
Пример #5
0
 def __init__(self, parent, family):
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.family = Family(self.conn)
     self.family.set_family(family)
     BaseAssigner.__init__(self, parent, name='FamilyParentAssigner',
                           udbuttons=False)
     self.connect(self, SIGNAL('okClicked()'), self.slotAssignParents)
Пример #6
0
 def __init__(self, parent, profile):
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.profile = Profile(self.conn)
     self.profile.set_profile(profile)
     BaseAssigner.__init__(self, parent, name='FamilyAssigner',
                           udbuttons=True)
     self.connect(self, SIGNAL('okClicked()'), self.slotInsertNewFamilies)
Пример #7
0
 def __init__(self, parent, name='ScriptNameComboBox'):
     KComboBox.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.cursor = StatementCursor(self.app.conn)
     self.scriptnames = [
         row.script for row in self.cursor.select(table='scriptnames')
     ]
     self.insertStrList(self.scriptnames)
Пример #8
0
 def __init__(self, parent, trait, suite, name='ParentAssigner'):
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.suite = suite
     self.trait = Trait(self.conn, suite=self.suite)
     self.trait.set_trait(trait)
     BaseAssigner.__init__(self, parent, name=name)
     self.connect(self, SIGNAL('okClicked()'), self.slotInsertNewParents)
Пример #9
0
 def __init__(self, parent, profile):
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.profile = Profile(self.conn)
     self.profile.set_profile(profile)
     BaseAssigner.__init__(self, parent, name='TraitAssigner',
                           udbuttons=True)
     self.connect(self, SIGNAL('okClicked()'), self.slotInsertNewTraits)
Пример #10
0
 def __init__(self, parent, trait, suite, name='ParentAssigner'):
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.suite = suite
     self.trait = Trait(self.conn, suite=self.suite)
     self.trait.set_trait(trait)
     BaseAssigner.__init__(self, parent, name=name)
     self.connect(self, SIGNAL('okClicked()'), self.slotInsertNewParents)
Пример #11
0
 def __init__(self, parent, type, name='ScriptNameComboBox'):
     KComboBox.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.cursor = StatementCursor(self.app.conn)
     clause=In('type', ['both', type])
     rows = self.cursor.select(table='scriptnames', clause=clause)
     #self.scriptnames = [row.script for row in  self.cursor.select(table='scriptnames')]
     self.scriptnames = [row.script for row in rows]
     self.insertStrList(self.scriptnames)
Пример #12
0
 def __init__(self, parent, type, name='ScriptNameComboBox'):
     KComboBox.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.cursor = StatementCursor(self.app.conn)
     clause = In('type', ['both', type])
     rows = self.cursor.select(table='scriptnames', clause=clause)
     #self.scriptnames = [row.script for row in  self.cursor.select(table='scriptnames')]
     self.scriptnames = [row.script for row in rows]
     self.insertStrList(self.scriptnames)
Пример #13
0
 def __init__(self, parent, suite, name='TemplateEditor'):
     QSplitter.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.trait = None
     self.listView = TraitListView(self, 'template')
     self.mainEdit = SimpleEdit(self)
     self.set_suite(suite)
     self.refreshListView()
     self.connect(self.listView, SIGNAL('selectionChanged()'),
                  self.selectionChanged)
Пример #14
0
 def __init__(self, parent, name='FamilyList'):
     KListView.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     
     self.family = Family(self.conn)
     
     self.setRootIsDecorated(True)
     self.addColumn('family')
     self.refreshlistView()
Пример #15
0
    def __init__(self, parent, name='FamilyList'):
        KListView.__init__(self, parent, name)
        self.app = get_application_pointer()
        self.conn = self.app.conn

        self.family = Family(self.conn)

        self.setRootIsDecorated(True)
        self.addColumn('family')
        self.refreshlistView()
Пример #16
0
 def __init__(self, parent, family):
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.family = Family(self.conn)
     self.family.set_family(family)
     BaseAssigner.__init__(self,
                           parent,
                           name='FamilyParentAssigner',
                           udbuttons=False)
     self.connect(self, SIGNAL('okClicked()'), self.slotAssignParents)
Пример #17
0
 def __init__(self, parent, suite, name='TemplateEditor'):
     QSplitter.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.trait = None
     self.listView = TraitListView(self, 'template')
     self.mainEdit = SimpleEdit(self)
     self.set_suite(suite)
     self.refreshListView()
     self.connect(self.listView,
                  SIGNAL('selectionChanged()'), self.selectionChanged)
Пример #18
0
 def __init__(self, parent, name='PaellaConnectionDialog'):
     fields = ['dbhost', 'dbname', 'dbusername', 'dbpassword']
     BaseRecordDialog.__init__(self, parent, fields, name=name)
     self.frame.text_label.setText('Connect to a database.')
     self.setButtonOKText('connect', 'connect')
     self.app = get_application_pointer()
     # setup the password entry
     entry = self.frame.entries['dbpassword']
     entry.setEchoMode(entry.Password)
     if os.environ.has_key('PAELLA_DBPASSWD'):
         entry.setText(os.environ['PAELLA_DBPASSWD'])
Пример #19
0
 def __init__(self, parent, name='PaellaConnectionDialog'):
     fields = ['dbhost', 'dbname', 'dbusername', 'dbpassword']
     BaseRecordDialog.__init__(self, parent, fields, name=name)
     self.frame.text_label.setText('Connect to a database.')
     self.setButtonOKText('connect', 'connect')
     self.app = get_application_pointer()
     # setup the password entry
     entry = self.frame.entries['dbpassword']
     entry.setEchoMode(entry.Password)
     if os.environ.has_key('PAELLA_DBPASSWD'):
         entry.setText(os.environ['PAELLA_DBPASSWD'])
Пример #20
0
 def __init__(self, parent, etype='default', name='EnvironmentList'):
     KListView.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.etype = etype
     self.environ = ETYPE[self.etype](self.conn)
     self.cursor = self.conn.cursor(statement=True)
     self.cursor.set_table('%s_environment' % self.etype)
     self.setRootIsDecorated(True)
     for field in ['section', 'option', 'value']:
         self.addColumn(field)
Пример #21
0
 def __init__(self, parent, etype='default', name='EnvironmentList'):
     KListView.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.etype = etype
     self.environ = ETYPE[self.etype](self.conn)
     self.cursor = self.conn.cursor(statement=True)
     self.cursor.set_table('%s_environment' % self.etype)
     self.setRootIsDecorated(True)
     for field in ['section', 'option', 'value']:
         self.addColumn(field)
Пример #22
0
 def __init__(self, parent, file_type='template', name='TraitListView'):
     KListView.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.file_type = file_type
     self.scripts = None
     self.templates = None
     self.traits = None
     self.trait = None
     self.setRootIsDecorated(True)
     self.addColumn('trait/file')
     self.addColumn('name')
     self.addColumn('package')
Пример #23
0
 def __init__(self, parent, file_type='template', name='TraitListView'):
     KListView.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.file_type = file_type
     self.scripts = None
     self.templates = None
     self.traits = None
     self.trait = None
     self.setRootIsDecorated(True)
     self.addColumn('trait/file')
     self.addColumn('name')
     self.addColumn('package')
Пример #24
0
 def __init__(self, parent, umlmachines, name='RunnerWidget'):
     QWidget.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.umlmachines = umlmachines
     self.proc = self.umlmachines.run_machine()
     self._mainbox = QVBoxLayout(self, 5, 7)
     # add label
     self.mainlabel = QLabel(self)
     self.mainlabel.setText('Running Umlmachine %s' % self.umlmachines.current)
     self._mainbox.addWidget(self.mainlabel)
     # add stdout viewer
     logfile = self.umlmachines.stdout_logfile.name
     self.logbrowser = LogBrowser(self, logfile)
     self._mainbox.addWidget(self.logbrowser)
     self.timer = QTimer(self)
     self.connect(self.timer, SIGNAL('timeout()'), self.update_progress)
     self.timer.startTimer(1000)
Пример #25
0
    def __init__(self, parent, name='BaseEntityDataFrame'):
        QFrame.__init__(self, parent, name)
        self.entityid = None
        numrows = 5
        numcols = 1
        margin = 0
        space = 1
        self.grid = QGridLayout(self, numrows, numcols,
                                margin, space, 'BaseEntityDataLayout')
        self.app = get_application_pointer()

        self.lbl = QLabel('Select the tags', self)
        self.grid.addWidget(self.lbl, 0, 0)

        self.listView = KListView(self)
        self.listView.addColumn('tagname', -1)
        self.listView.clear()
        self.grid.addMultiCellWidget(self.listView, 1, 4, 0, 0)
Пример #26
0
 def __init__(self, parent, suite, name="RunnerWidget"):
     QWidget.__init__(self, parent, name)
     self.app = get_application_pointer()
     cfg = self.app.umlcfg
     basefile = make_base_filesystem(suite, "%s.base" % suite, cfg=cfg, size=300, mkfs="mke2fs")
     self.bootstrapper = UmlBootstrapper(suite, basefile, cfg=self.cfg)
     self._mainbox = QVBoxLayout(self, 5, 7)
     # add label
     self.mainlabel = QLabel(self)
     self.mainlabel.setText("Bootstrapping suite %s" % suite)
     self._mainbox.addWidget(self.mainlabel)
     # add stdout viewer
     logfile = self.umlmachines.stdout_logfile.name
     self.logbrowser = LogBrowser(self, logfile)
     self._mainbox.addWidget(self.logbrowser)
     self.timer = QTimer(self)
     self.connect(self.timer, SIGNAL("timeout()"), self.update_progress)
     self.timer.startTimer(1000)
Пример #27
0
 def __init__(self, parent, umlmachines, name='RunnerWidget'):
     QWidget.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.umlmachines = umlmachines
     self.proc = self.umlmachines.run_machine()
     self._mainbox = QVBoxLayout(self, 5, 7)
     # add label
     self.mainlabel = QLabel(self)
     self.mainlabel.setText('Running Umlmachine %s' %
                            self.umlmachines.current)
     self._mainbox.addWidget(self.mainlabel)
     # add stdout viewer
     logfile = self.umlmachines.stdout_logfile.name
     self.logbrowser = LogBrowser(self, logfile)
     self._mainbox.addWidget(self.logbrowser)
     self.timer = QTimer(self)
     self.connect(self.timer, SIGNAL('timeout()'), self.update_progress)
     self.timer.startTimer(1000)
Пример #28
0
    def __init__(self, parent, name='BaseEntityDataFrame'):
        AppFrame.__init__(self, parent, name)
        self.entityid = None
        numrows = 2
        numcols = 1
        margin = 3
        space = 2
        self.grid = QGridLayout(self, numrows, numcols,
                                margin, space, 'BaseEntityDataLayout')
        self.app = get_application_pointer()


        self.name_lbl = QLabel('Name', self)
        self.name_entry = KLineEdit('', self)

        self.grid.addWidget(self.name_lbl, 0, 0)
        self.grid.addWidget(self.name_entry, 1, 0)

        self.etype_lbl = QLabel('type', self)
        self.etype_combo = KComboBox(self, 'etype_combo')
        db = self.app.db
        etypes = db.session.query(db.EntityType).all()
        self.etype_combo.insertStrList([e.type for e in etypes])
        self.connect(self.etype_combo, SIGNAL('activated(const QString &)'),
                                              self.change_etype)
        self.grid.addWidget(self.etype_lbl, 2, 0)
        self.grid.addWidget(self.etype_combo, 3, 0)

        self.url_lbl = QLabel('url', self)
        self.url_entry = KLineEdit('', self)

        self.grid.addWidget(self.url_lbl, 4, 0)
        self.grid.addWidget(self.url_entry, 5, 0)
        
        grid_rownum = 6
        
        
        self.desc_lbl = QLabel('Description', self)
        self.desc_entry = KTextEdit(self, 'description_entry')
        self.desc_entry.setTextFormat(self.PlainText)
        
        self.grid.addMultiCellWidget(self.desc_lbl, 6, 6, 0, 0)
        self.grid.addMultiCellWidget(self.desc_entry, 7, 10, 0, 0)
Пример #29
0
 def __init__(self, parent, suite, name='RunnerWidget'):
     QWidget.__init__(self, parent, name)
     self.app = get_application_pointer()
     cfg = self.app.umlcfg
     basefile = make_base_filesystem(suite,
                                     '%s.base' % suite,
                                     cfg=cfg,
                                     size=300,
                                     mkfs='mke2fs')
     self.bootstrapper = UmlBootstrapper(suite, basefile, cfg=self.cfg)
     self._mainbox = QVBoxLayout(self, 5, 7)
     # add label
     self.mainlabel = QLabel(self)
     self.mainlabel.setText('Bootstrapping suite %s' % suite)
     self._mainbox.addWidget(self.mainlabel)
     # add stdout viewer
     logfile = self.umlmachines.stdout_logfile.name
     self.logbrowser = LogBrowser(self, logfile)
     self._mainbox.addWidget(self.logbrowser)
     self.timer = QTimer(self)
     self.connect(self.timer, SIGNAL('timeout()'), self.update_progress)
     self.timer.startTimer(1000)
Пример #30
0
 def __init__(self, parent, name='SuiteTraitComboBox'):
     QFrame.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.suiteCursor = Suites(self.conn)
     self.suites = self.suiteCursor.list()
     self.traits = Traits(self.conn, self.suites[0])
     self.scombo = KComboBox(self, 'SuiteComboBox')
     self.scombo.insertStrList(self.suites)
     self.tcombo = KComboBox(self, 'TypeComboBox')
     self.tcombo.insertStrList(['template', 'script'])
     self.trcombo = KComboBox(self, 'TraitComboBox')
     self.update_btn = KPushButton('update', self)
     self.listView = TraitListView(self)
     self.vbox = QVBoxLayout(self)
     for attribute in ['listView', 'scombo', 'tcombo', 'trcombo', 'update_btn']:
         widget = getattr(self, attribute)
         self.vbox.addWidget(widget)
     # we need to redo the signals and the methods that are called
     self.connect(self.scombo,
                  SIGNAL('activated(int)'), self.update_traits)
     
     self.connect(self.update_btn,
                  SIGNAL('clicked()'), self.refreshlistView)
Пример #31
0
 def __init__(self, parent):
     ViewBrowser.__init__(self, parent, FamilyDoc)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.family = Family(self.conn)
Пример #32
0
 def __init__(self, parent, name='ScriptNameComboBox'):
     KComboBox.__init__(self, parent, name)
     self.app = get_application_pointer()
     self.cursor = StatementCursor(self.app.conn)
     self.scriptnames = [row.script for row in  self.cursor.select(table='scriptnames')]
     self.insertStrList(self.scriptnames)
Пример #33
0
 def __init__(self, parent, name='SimpleProgress'):
     KProgress.__init__(self, parent, name)
     self.app = get_application_pointer()
Пример #34
0
 def initPaellaCommon(self):
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.cfg = self.app.cfg
Пример #35
0
 def __init__(self, parent):
     KTextEdit.__init__(self, parent)
     self.app = get_application_pointer()
     self.hl = TemplateHighlighter(self)
Пример #36
0
 def __init__(self, parent):
     ViewBrowser.__init__(self, parent, FamilyDoc)
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.family = Family(self.conn)
Пример #37
0
 def __init__(self, *args):
     QFrame.__init__(self, *args)
     self.app = get_application_pointer()
Пример #38
0
 def initPaellaCommon(self):
     self.app = get_application_pointer()
     self.conn = self.app.conn
     self.cfg = self.app.cfg
Пример #39
0
 def __init__(self, parent, docobject):
     KTextBrowser.__init__(self, parent)
     self.setMimeSourceFactory()
     self.app = get_application_pointer()
     self.doc = docobject(self.app)
     self.setNotifyClick(True)
Пример #40
0
 def __init__(self, parent, mainview, listview=None, name='UmlManagerWidget'):
     BaseManagerWidget.__init__(self, parent, mainview, listview=listview,
                                name=name)
     self.app = get_application_pointer()
Пример #41
0
 def __init__(self, parent=None, name='BaseUmlManagerMainWindow'):
     BaseMainWindow.__init__(self, parent, name)
     self.app = get_application_pointer()
Пример #42
0
 def __init__(self, parent):
     KTextEdit.__init__(self, parent)
     self.app = get_application_pointer()
     self.hl = TemplateHighlighter(self)
Пример #43
0
 def __init__(self, parent, name='SimpleProgress'):
     KProgress.__init__(self, parent, name)
     self.app = get_application_pointer()
Пример #44
0
 def __init__(self, parent, docobject):
     KTextBrowser.__init__(self, parent)
     self.setMimeSourceFactory()
     self.app = get_application_pointer()
     self.doc = docobject(self.app)
     self.setNotifyClick(True)