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

CAMainWin::CAMainWin ( QMainWindow *  oParent = 0  ) 

Default constructor. Creates Canorus main window with parent oParent. Parent is usually null.

Definition at line 136 of file mainwin.cpp.

References _mode, _playbackViewPort, CAPluginManager::enablePlugins(), onTimeEditedTimerTimeout(), and setupCustomUi().

 : QMainWindow( oParent ) {
      setAttribute( Qt::WA_DeleteOnClose );

      // Create the GUI (actions, toolbars, menus etc.)
      createCustomActions();
      setupUi( this ); // initialize elements created by Qt Designer
      setupCustomUi();

      // Explicitly initialize this so it isn't true sometimes
      setRebuildUILock( false );

      // Initialize internal UI properties
      _mode = SelectMode;
      _playback = 0;
      _playbackViewPort = 0;
      _repaintTimer = 0;
      _animatedScroll = true;
      _lockScrollPlayback = false;

      // Create plugins menus and toolbars in this main window
      CAPluginManager::enablePlugins(this);

      // Connects MIDI IN callback function to a local slot. Not implemented yet.
      connect( CACanorus::midiDevice(), SIGNAL(midiInEvent( QVector<unsigned char> )), this, SLOT(onMidiInEvent( QVector<unsigned char> )) );

      // Connect QTimer so it increases the local document edited time every second
      restartTimeEditedTime();
      connect( &_timeEditedTimer, SIGNAL(timeout()), this, SLOT(onTimeEditedTimerTimeout()) );
      _timeEditedTimer.start(1000);

      // Setup the midi keyboad input processing object
      _keybdInput = new CAKeybdInput( this );

      _resourceView = new CAResourceView( 0, 0 );
      _resourceView->hide();

      _midiRecorderView = 0;

      _transposeView = new CATransposeView( this );
      addDockWidget( Qt::RightDockWidgetArea, _transposeView );
      _transposeView->hide();

      setDocument( 0 );
      _poExp = 0;
      CACanorus::addMainWin( this );
}


Generated by  Doxygen 1.6.0   Back to index