Exemple #1
0
 def selectionChanged(self):
     current = self.listView.currentItem()
     win = None
     if hasattr(current, 'suite'):
         print 'suite is', current.suite
         if not self._suites:
             KMessageBox.information(self, "No suites are present.")
         else:
             win = TraitMainWindow(self, current.suite)
     elif hasattr(current, 'profiles'):
         win = ProfileMainWindow(self)
     elif hasattr(current, 'families'):
         self.slotManageFamilies()
     elif hasattr(current, 'machines'):
         win = MachineMainWindow(self)
     elif hasattr(current, 'dtype'):
         print 'differ', current.dtype
         win = DifferWindow(self, current.dtype)
     elif hasattr(current, 'etype'):
         win = EnvironmentWindow(self, current.etype)
     elif hasattr(current, 'installer'):
         #win = InstallerMainWin(self)
         KMessageBox.information(self, 'Not Implemented')
     elif hasattr(current, 'clients'):
         win = ClientsMainWindow(self)
     elif hasattr(current, 'folder'):
         # nothing important selected, do nothing
         pass
     else:
         KMessageBox.error(self,
                           'something bad happened in the list selection')
     if win is not None:
         win.show()
         self._all_my_children.append(win)
Exemple #2
0
 def selectionChanged(self):
     current = self.listView.currentItem()
     win = None
     if hasattr(current, 'suite'):
         print 'suite is', current.suite
         if  not self._suites:
             KMessageBox.information(self, "No suites are present.")
         else:
             win = TraitMainWindow(self, current.suite)
     elif hasattr(current, 'profiles'):
         win = ProfileMainWindow(self)
     elif hasattr(current, 'families'):
         self.slotManageFamilies()
     elif hasattr(current, 'machines'):
         win = MachineMainWindow(self)
     elif hasattr(current, 'dtype'):
         print 'differ', current.dtype
         win = DifferWindow(self, current.dtype)
     elif hasattr(current, 'etype'):
         win = EnvironmentWindow(self, current.etype)
     elif hasattr(current, 'installer'):
         #win = InstallerMainWin(self)
         KMessageBox.information(self, 'Not Implemented')
     elif hasattr(current, 'clients'):
         win = ClientsMainWindow(self)
     elif hasattr(current, 'folder'):
         # nothing important selected, do nothing
         pass
     else:
         KMessageBox.error(self, 'something bad happened in the list selection')
     if win is not None:
         win.show()
         self._all_my_children.append(win)
Exemple #3
0
 def _activate(self):
     print 'activating %s action' % self.suite
     #BaseAction.activate(self)
     win = TraitMainWindow(self._winparent, self.suite)
     self._winparent._all_my_children.append(win)
     win.show()
Exemple #4
0
 def _activate(self):
     print 'activating %s action' % self.suite
     #BaseAction.activate(self)
     win = TraitMainWindow(self._winparent, self.suite)
     self._winparent._all_my_children.append(win)
     win.show()