Logo Search packages:      
Sourcecode: canorus version File versions  Download package

void CAMainWin::on_uiRemoveContext_triggered (  )  [private, slot]

Removes the current context from the sheet and all its contents.

Definition at line 1266 of file mainwin.cpp.

References currentContext(), CAContext::name(), CASheet::removeContext(), and CAContext::sheet().

      CAContext *context = currentContext();
      if (context) {
            int ret = QMessageBox::warning(
                  this, tr("Canorus"),
                  tr("Are you sure do you want to delete context\n%1 and all its contents?").arg(context->name()),
                  QMessageBox::Yes | QMessageBox::No,

            if (ret == QMessageBox::Yes) {
                  CACanorus::undo()->createUndoCommand( document(), tr("context removal", "undo") );
                  CASheet *sheet = context->sheet();
                  CACanorus::rebuildUI(document(), currentSheet());
                  delete context;

Generated by  Doxygen 1.6.0   Back to index