Logo Search packages:      
Sourcecode: kdenlive version File versions

void Gui::KdenliveApp::initStatusBar (  )  [protected]

sets up the statusbar for the main window by initialzing a statuslabel.

Definition at line 1163 of file kdenlive.cpp.

References m_statusBarProgress, slotDisableEffects(), slotDisableTransitions(), and slotStatusMsg().

Referenced by KdenliveApp().

                                    {
      ///////////////////////////////////////////////////////////////////
      // STATUSBAR
      // TODO: add your own items you need for displaying current application status.

      statusBar()->insertItem(i18n("Ready."), ID_STATUS_MSG);
      
      m_statusBarProgress = new KProgress(statusBar());
      m_statusBarProgress->setMaximumWidth(100);
      m_statusBarProgress->setTotalSteps(0);
      //m_statusBarProgress->setTextEnabled(false);
      statusBar()->addWidget(m_statusBarProgress);
      m_statusBarProgress->hide();
      m_statusBarTimer = new QTimer(this);
      connect(m_statusBarTimer, SIGNAL(timeout()), this, SLOT(slotStatusMsg()));

      // Stop export button
      KIconLoader loader;
      QIconSet eff;
      m_stopExportButton = new KPushButton(loader.loadIcon("stop", KIcon::Small, 16), QString::null, this);
      QToolTip::add( m_stopExportButton, i18n( "Stop Export" ) );
      connect(m_stopExportButton, SIGNAL(clicked()), this, SLOT(slotStopExport()));
      m_stopExportButton->setMaximumSize(QSize(18, 18));
      m_stopExportButton->setFlat(true);
      statusBar()->addWidget(m_stopExportButton);
      m_stopExportButton->hide();

      m_statusBarExportProgress = new KProgress(statusBar());
      m_statusBarExportProgress->setMaximumWidth(100);
      m_statusBarExportProgress->setTotalSteps(100);
      //m_statusBarExportProgress->setTextEnabled(false);
      statusBar()->addWidget(m_statusBarExportProgress);
      m_statusBarExportProgress->hide();

      eff.setPixmap(loader.loadIcon("kdenlive_effects", KIcon::Small, 16), QIconSet::Small, QIconSet::Normal, QIconSet::Off);
      eff.setPixmap(loader.loadIcon("kdenlive_effectsoff", KIcon::Small, 16), QIconSet::Small, QIconSet::Normal, QIconSet::On);
      KPushButton *effectsButton = new KPushButton(eff, QString::null, this);
      QToolTip::add( effectsButton, i18n( "Show Effects" ) );
      connect(effectsButton, SIGNAL(clicked()), this, SLOT(slotDisableEffects()));
      effectsButton->setToggleButton(true);
      effectsButton->setFlat(true);
      effectsButton->setMaximumSize(QSize(18, 18));
      statusBar()->addWidget(effectsButton);

      eff.setPixmap(loader.loadIcon("kdenlive_transitions", KIcon::Small, 16), QIconSet::Small, QIconSet::Normal, QIconSet::Off);
      eff.setPixmap(loader.loadIcon("kdenlive_transitionsoff", KIcon::Small, 16), QIconSet::Small, QIconSet::Normal, QIconSet::On);
      KPushButton *transitionsButton = new KPushButton(eff, QString::null, this);
      QToolTip::add( transitionsButton, i18n( "Show Transitions" ) );
      connect(transitionsButton, SIGNAL(clicked()), this, SLOT(slotDisableTransitions()));
      transitionsButton->setToggleButton(true);
      transitionsButton->setFlat(true);
      transitionsButton->setMaximumSize(QSize(18, 18));
      statusBar()->addWidget(transitionsButton);

      eff.setPixmap(loader.loadIcon("kdenlive_thumbs", KIcon::Small, 16), QIconSet::Small, QIconSet::Normal, QIconSet::Off);
      eff.setPixmap(loader.loadIcon("kdenlive_thumbsoff", KIcon::Small, 16), QIconSet::Small, QIconSet::Normal, QIconSet::On);
      thumbsButton = new KPushButton(eff, QString::null, this);
      QToolTip::add( thumbsButton, i18n( "Show Thumbnails" ) );
      connect(thumbsButton, SIGNAL(clicked()), this, SLOT(slotDisableThumbnails()));
      thumbsButton->setToggleButton(true);
      thumbsButton->setFlat(true);
      thumbsButton->setOn(!KdenliveSettings::videothumbnails());
      thumbsButton->setMaximumSize(QSize(18, 18));
      statusBar()->addWidget(thumbsButton);

      eff.setPixmap(loader.loadIcon("kdenlive_audiothumbs", KIcon::Small, 16), QIconSet::Small, QIconSet::Normal, QIconSet::Off);
      eff.setPixmap(loader.loadIcon("kdenlive_audiothumbsoff", KIcon::Small, 16), QIconSet::Small, QIconSet::Normal, QIconSet::On);
      audioThumbsButton = new KPushButton(eff, QString::null, this);
      QToolTip::add( audioThumbsButton, i18n( "Show Audio Thumbnails" ) );
      connect(audioThumbsButton, SIGNAL(clicked()), this, SLOT(slotDisableAudioThumbnails()));
      audioThumbsButton->setToggleButton(true);
      audioThumbsButton->setFlat(true);
      audioThumbsButton->setOn(!KdenliveSettings::audiothumbnails());
      audioThumbsButton->setMaximumSize(QSize(18, 18));
      statusBar()->addWidget(audioThumbsButton);

      KdenliveSettings::setShoweffects(true);
      KdenliveSettings::setShowtransitions(true);

      statusBar()->insertItem(i18n("Move/Resize mode"), ID_EDITMODE_MSG,
          0, true);
      statusBar()->insertItem(QString::null, ID_TIMELINE_MSG,
          0, true);
    }


Generated by  Doxygen 1.6.0   Back to index