public void initialize() {
    ui.setupUi(this);
    ui.btnAdd.clicked.connect(this, "addClicked()");

    ProjectController.getInstance().update.connect(this, "updateData()");
    ProjectController.getInstance().add.connect(this, "addData(Project)");

    LanguageController.getInstance().languageChanged.connect(this, "translate()");

    setFields();
  }
 private void saveProject() {
   project.setDescription(ui.txtDescription.text());
   project.setPlannedTime(ui.txtPlannedTime.value());
   project.setProjectManager(
       (Usr) ui.cmbProjectManager.itemData(ui.cmbProjectManager.currentIndex()));
   project.setActiveState(!ui.checkBox.isChecked());
   try {
     ProjectController.getInstance().updateProject(project);
   } catch (WaktuException e) {
     errorMessage.emit(e.getMessage());
   }
 }
 private void addNewProject() {
   try {
     project =
         ProjectController.getInstance()
             .addProject(
                 ui.txtProjectnumber.text(),
                 ui.txtDescription.text(),
                 (Usr) ui.cmbProjectManager.itemData(ui.cmbProjectManager.currentIndex()),
                 ui.txtPlannedTime.value());
   } catch (WaktuException e) {
     errorMessage.emit(e.getMessage());
   }
 }