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

void CAMainWin::updateClefToolBar (  )  [private]

Shows/Hides the clef properties tool bar according to the current state.

Definition at line 4302 of file mainwin.cpp.

References CAClef::offset(), CAClef::offsetToReadable(), and CAScoreViewPort::selection().

Referenced by updateToolBars().

                                  {
      if ( uiClefType->isChecked() && mode()==InsertMode ) {
            uiClefOffset->setValue( musElementFactory()->clefOffset() );
            uiClefToolBar->show();
      } else if ( mode()==EditMode && currentScoreViewPort() &&
                  currentScoreViewPort()->selection().size() &&
                  dynamic_cast<CAClef*>(currentScoreViewPort()->selection().at(0)->musElement()) ) {
            CAScoreViewPort *v = currentScoreViewPort();
            if (v && v->selection().size()) {
                  CAClef *clef = dynamic_cast<CAClef*>(v->selection().at(0)->musElement());
                  if (clef) {
                        uiClefOffset->setValue( CAClef::offsetToReadable(clef->offset()) );
                        uiClefToolBar->show();
                  } else
                        uiClefToolBar->hide();
            }
      } else
            uiClefToolBar->hide();
}


Generated by  Doxygen 1.6.0   Back to index