Ejemplo n.º 1
0
 def saveChanges(self):
     """
         Method for saving changes into db.
     """
     try:
         group_ctrl = GroupController(self.__parent._db_ctrl)
         
         # prepare data
         name = str(self._name.text().toUtf8())
         desc = str(self._desc.text().toUtf8())
         icon_id = self.getIconId()
     
         group_ctrl.insertGroup(name, desc, icon_id)
         
         self.accept()
     except Exception as e:
         logging.exception(e)
         
         InfoMsgBoxes.showErrorMsg(e)
Ejemplo n.º 2
0
 def insertDefaultGroups(self):
     """
         Creates default password groups.
         Page, SSH, E-Mail, PC, Code Revision
     """
     grp_ctrl = GroupController(self)
     icon_ctrl = IconController(self)
     
     # now insert new groups
     grp_ctrl.insertGroup("Page", "Web page credentials.", icon_ctrl.selectByName("key-personal")._id)
     grp_ctrl.insertGroup("SSH", "SSH credentials.", icon_ctrl.selectByName("key-ssh")._id)
     grp_ctrl.insertGroup("E-Mail", "E-Mail credentials.", icon_ctrl.selectByName("key")._id)
     grp_ctrl.insertGroup("PC", "PC credentials.", icon_ctrl.selectByName("person")._id)
     grp_ctrl.insertGroup("Code revision", "Code revision credentials.", icon_ctrl.selectByName("git")._id)
     grp_ctrl.insertGroup("Bank account", "Bank account credentials.", icon_ctrl.selectByName("bank")._id)