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

void QETDiagramEditor::slot_updateModeActions (  )  [slot]

Gere les actions relatives au mode du schema

Definition at line 1160 of file qetdiagrameditor.cpp.

References currentDiagram(), grp_visu_sel, mode_selection, and mode_visualise.

Referenced by diagramWasAdded(), and slot_updateActions().

                                              {
      DiagramView *dv = currentDiagram();
      
      // actions ayant aussi besoin d'un document ouvert et de la connaissance de son mode
      if (!dv) {
            grp_visu_sel -> setEnabled(false);
      } else {
            switch((int)(dv -> dragMode())) {
                  case QGraphicsView::NoDrag:
                        grp_visu_sel -> setEnabled(false);
                        break;
                  case QGraphicsView::ScrollHandDrag:
                        grp_visu_sel -> setEnabled(true);
                        mode_visualise -> setChecked(true);
                        break;
                  case QGraphicsView::RubberBandDrag:
                        grp_visu_sel -> setEnabled(true);
                        mode_selection -> setChecked(true);
                        break;
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index