void ContactsTable::showView(ContactView& view) const { if (view.isAddingNewContact()) { ui->contact_details_view->show(); ui->contact_table->hide (); } else ui->contact_table->show (); ui->contact_details_view->setCurrentWidget(&view); }
void ContactsTable::showView(ContactView& view) const { if (view.isAddingNewContact()) { ui->contact_details_view->show(); showContactsTable (false); //save current view and restore it after canceled _currentWidgetView = ui->contact_details_view->currentWidget(); } else showContactsTable (true); ui->contact_details_view->setCurrentWidget(&view); }
void ContactsTable::addNewContact(ContactView& view) const { addContactView(view); showView(view); view.addNewContact (); }