Logo Search packages:      
Sourcecode: kdenlive version File versions

void Gui::KdenliveApp::slotProjectAddColorClip (  )  [slot]

Create a new color clip (color, text or image)

Definition at line 3113 of file kdenlive.cpp.

References addCommand(), getDocument(), KdenliveDoc::getTimecodePosition(), m_doc, m_projectList, and slotStatusMsg().

Referenced by initActions().

                                              {
      slotStatusMsg(i18n("Adding Clips"));
        KDialogBase *dia = new KDialogBase(  KDialogBase::Swallow, i18n("Create Color Clip"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, this, "create_clip", true);
      createColorClip_UI *clipChoice = new createColorClip_UI(dia);
      clipChoice->edit_name->setText(i18n("Color Clip"));
        clipChoice->edit_duration->setText(KdenliveSettings::colorclipduration());
      dia->setMainWidget(clipChoice);
      dia->adjustSize();
      if (dia->exec() == QDialog::Accepted) {
          QString color = clipChoice->button_color->color().name();
          color = color.replace(0, 1, "0x") + "ff";
            GenTime duration = getDocument()->getTimecodePosition(clipChoice->edit_duration->text(), MAXFRAMEDURATION);
            
          KCommand *command =
            new Command::KAddClipCommand(*m_doc, m_projectList->parentName(), color, duration,
            clipChoice->edit_name->text(),
            clipChoice->edit_description->text(), true);
          addCommand(command, true);
      }
      delete dia;
      slotStatusMsg(i18n("Ready."));
    }


Generated by  Doxygen 1.6.0   Back to index