127
129
#define ID_EDITMODE_MSG 2
128
130
#define ID_TIMELINE_MSG 3
132
135
KdenliveApp::KdenliveApp(bool newDoc, QWidget *parent,
133
136
const char *name):KDockMainWindow(parent, name), m_monitorManager(this),
134
m_workspaceMonitor(NULL), m_clipMonitor(NULL), m_captureMonitor(NULL), m_exportWidget(NULL), m_renderManager(NULL), m_doc(NULL), m_selectedFile(NULL), m_copiedClip(NULL), m_projectList(NULL), m_effectStackDialog(NULL), m_effectListDialog(NULL), m_projectFormat("dv_pal"), m_timelinePopupMenu(NULL), m_rulerPopupMenu(NULL), m_exportDvd(NULL), m_transitionPanel(NULL), m_resizeFunction(NULL), m_moveFunction(NULL), m_rollFunction(NULL), m_markerFunction(NULL),m_newLumaDialog(NULL), m_externalMonitor(0) {
137
m_workspaceMonitor(NULL), m_clipMonitor(NULL), m_captureMonitor(NULL), m_exportWidget(NULL), m_renderManager(NULL), m_doc(NULL), m_selectedFile(NULL), m_copiedClip(NULL), m_projectList(NULL), m_effectStackDialog(NULL), m_effectListDialog(NULL), m_projectFormat("dv_pal"), m_timelinePopupMenu(NULL), m_rulerPopupMenu(NULL), m_exportDvd(NULL), m_transitionPanel(NULL), m_resizeFunction(NULL), m_moveFunction(NULL), m_rollFunction(NULL), m_markerFunction(NULL),m_newLumaDialog(NULL), m_externalMonitor(0), m_debugDialog(NULL) {
137
140
config = kapp->config();
199
214
// call inits to invoke all other construction parts
200
215
m_commandHistory = new KCommandHistory(actionCollection(), true);
203
219
m_effectList.setAutoDelete(true);
205
initEffects::initializeEffects( &m_effectList );
221
initEffects::parseEffectFiles( &m_effectList );
207
// init transitions & effects menu
208
transitionsMenu = ((QPopupMenu *) factory()->container("add_transition_menu", this));
223
// init dynamic transitions & effects menu
224
transitionsMenu = new QPopupMenu;
209
225
transitionsMenu->insertItem(i18n("Crossfade"));
210
226
transitionsMenu->insertItem(i18n("Push"));
211
227
transitionsMenu->insertItem(i18n("Pip"));
212
228
transitionsMenu->insertItem(i18n("Wipe"));
213
229
connect(transitionsMenu, SIGNAL(activated(int)), this, SLOT(slotAddTransition(int)));
215
audioEffectsMenu = ((QPopupMenu *) factory()->container("audio_effect", this));
216
videoEffectsMenu = ((QPopupMenu *) factory()->container("video_effect", this));
217
removeEffectsMenu = ((QPopupMenu *) factory()->container("remove_effect", this));
231
audioEffectsMenu = new QPopupMenu;
232
videoEffectsMenu = new QPopupMenu;
233
removeEffectsMenu = new QPopupMenu;
235
QPopupMenu * menu = ((QPopupMenu *) factory()->container("timeline_clip_context", this));
236
menu->insertItem(i18n("Add Transition"), transitionsMenu, -1, 0);
237
menu->insertItem(i18n("Add Video Effect"), videoEffectsMenu, -1, 3);
238
menu->insertItem(i18n("Add Audio Effect"), audioEffectsMenu, -1, 4);
239
menu->insertItem(i18n("Delete Effect"), removeEffectsMenu, -1, 5);
241
menu = ((QPopupMenu *) factory()->container("timeline_playlist_context", this));
242
menu->insertItem(i18n("Add Transition"), transitionsMenu, -1, 0);
243
menu->insertItem(i18n("Add Video Effect"), videoEffectsMenu, -1, 3);
244
menu->insertItem(i18n("Add Audio Effect"), audioEffectsMenu, -1, 4);
245
menu->insertItem(i18n("Delete Effect"), removeEffectsMenu, -1, 5);
218
247
QPtrListIterator < EffectDesc > itt(m_effectList);
219
248
QStringList videoEffectsList;
220
249
QStringList audioEffectsList;
2476
2600
DocClipRefList selectedClip;
2477
2601
selectedClip.append(m_pastedClip);
2478
2602
if (getDocument()->projectClip().canAddClipsToTracks(selectedClip, ix, insertTime)) {
2603
kdDebug()<<"/ / / PASTING CLPI TOP TRACK: "<<ix<<endl;
2479
2604
m_pastedClip->setParentTrack(getDocument()->track(ix), ix);
2480
2605
m_pastedClip->moveTrackStart(insertTime);
2481
getDocument()->track(ix)->addClip(m_pastedClip, false);
2606
//getDocument()->track(ix)->addClip(m_pastedClip, false);
2483
KMacroCommand *macroCommand = new KMacroCommand(i18n("Paste"));
2608
/*KMacroCommand *macroCommand = new KMacroCommand(i18n("Paste"));
2484
2609
macroCommand->addCommand(Command::KSelectClipCommand::selectNone(getDocument()));
2485
2610
macroCommand->addCommand(new Command::KSelectClipCommand(getDocument(), m_pastedClip, true));
2486
addCommand(macroCommand, true);
2611
addCommand(macroCommand, true);*/
2488
addCommand(new Command::KAddRefClipCommand(effectList(), *m_doc, m_pastedClip, true), false);
2613
addCommand(new Command::KAddRefClipCommand(*m_doc, m_pastedClip, true), true);
2490
2615
if (m_pastedClip->trackEnd() > getDocument()->projectClip().duration())
2491
2616
getDocument()->track(ix)->checkTrackLength();
2492
getDocument()->activateSceneListGeneration(true);
2617
// getDocument()->activateSceneListGeneration(true);
2493
2618
slotStatusMsg(i18n("Ready."));
2592
2719
void KdenliveApp::slotSaveZone()
2594
QCheckBox * addToProject = new QCheckBox(i18n("Add new clip to project"),this);
2595
KFileDialog *fd = new KFileDialog(m_fileDialogPath.path(), "application/vnd.westley.scenelist", this, "save_westley", true,addToProject);
2721
QWidget *container = new QWidget();
2722
QGridLayout *lo = new QGridLayout ( container, 4, 2 );
2723
lo->setSpacing( KDialog::spacingHint() );
2725
QLabel *lab = new QLabel(i18n("Clip description:"), container);
2726
KLineEdit *le = new KLineEdit(container);
2727
lo->addWidget(lab, 0, 0);
2728
lo->addWidget(le, 0, 1);
2729
QCheckBox * addToProject = new QCheckBox(i18n("Add new clip to project"),container);
2730
addToProject->setChecked(KdenliveSettings::addnewlysaved());
2731
lo->addMultiCellWidget( addToProject, 1, 1, 0, 1 );
2733
KFileDialog *fd = new KFileDialog(m_fileDialogPath.path(), "application/vnd.westley.scenelist", this, "save_westley", true, container);
2596
2734
fd->setOperationMode(KFileDialog::Saving);
2597
2735
fd->setMode(KFile::File);
2598
2736
if (fd->exec() == QDialog::Accepted) {
2599
QDomDocument partial = getDocument()->projectClip().generatePartialSceneList(m_timeline->inpointPosition(), m_timeline->outpointPosition(), -1);
2600
QFile file(fd->selectedURL().path());
2601
file.open( IO_WriteOnly );
2602
QCString save = partial.toString().utf8();
2603
file.writeBlock(save, save.length());
2605
if (addToProject->isChecked()) insertClipFromUrl(fd->selectedURL().path());
2738
if (KIO::NetAccess::exists(fd->selectedURL(), false, this)) {
2739
if (KMessageBox::questionYesNo(this, i18n("File already exists.\nDo you want to overwrite it ?")) == KMessageBox::No) doIt = false;
2742
QDomDocument partial = getDocument()->projectClip().generatePartialSceneList(m_timeline->inpointPosition(), m_timeline->outpointPosition(), -1);
2744
if (!le->text().isEmpty()) {
2745
QDomElement documentElement = partial.documentElement();
2746
if (documentElement.tagName() != "westley") {
2747
kdWarning() << "KdenliveDoc::loadFromXML() document element has unknown tagName : " << documentElement.tagName() << endl;
2749
documentElement.setAttribute("title", le->text());
2752
QFile file(fd->selectedURL().path());
2753
file.open( IO_WriteOnly );
2754
QCString save = partial.toString().utf8();
2755
file.writeBlock(save, save.length());
2757
if (addToProject->isChecked()) insertClipFromUrl(fd->selectedURL().path());
2607
2760
delete addToProject;
2764
void KdenliveApp::slotExplodePlaylist()
2766
DocClipRefList list = getDocument()->projectClip().selectedClipList();
2767
DocClipRef *clipUnderMouse;
2769
// check if all clips are on the same track. If not, user needs to save selected zone
2771
clipUnderMouse = list.first();
2773
while (clipUnderMouse) {
2774
if (clipUnderMouse->clipType() == DocClipBase::PLAYLIST) {
2775
track = clipUnderMouse->trackNum();
2776
PlayList::explodePlaylist(clipUnderMouse, this);
2779
clipUnderMouse = list.next();
2611
2784
void KdenliveApp::slotSaveSubClip()
2613
QCheckBox * addToProject = new QCheckBox(i18n("Add new clip to project"),this);
2614
addToProject->setChecked(true);
2615
KFileDialog *fd = new KFileDialog(m_fileDialogPath.path(), "application/vnd.westley.scenelist", this, "save_westley", true, addToProject);
2787
DocClipRefList list = getDocument()->projectClip().selectedClipList();
2788
DocClipRef *clipUnderMouse;
2790
// check if all clips are on the same track. If not, user needs to save selected zone
2792
clipUnderMouse = list.first();
2793
track = clipUnderMouse->trackNum();
2794
clipUnderMouse = list.next();
2795
for (; clipUnderMouse; clipUnderMouse = list.next()) {
2796
if (track != clipUnderMouse->trackNum()) {
2797
KMessageBox::sorry(this, i18n("You have selected clips on several tracks.\nSaving a subclip does not allow this, please use the \"Save selected zone\" option."));
2802
QWidget *container = new QWidget();
2803
QGridLayout *lo = new QGridLayout ( container, 4, 2 );
2804
lo->setSpacing( KDialog::spacingHint() );
2806
QLabel *lab = new QLabel(i18n("Clip description:"), container);
2807
KLineEdit *le = new KLineEdit(container);
2808
lo->addWidget(lab, 0, 0);
2809
lo->addWidget(le, 0, 1);
2810
QCheckBox * addToProject = new QCheckBox(i18n("Add new clip to project"),container);
2811
addToProject->setChecked(KdenliveSettings::addnewlysaved());
2812
lo->addMultiCellWidget( addToProject, 1, 1, 0, 1 );
2813
KFileDialog *fd = new KFileDialog(QString::null, "application/vnd.westley.scenelist", this, "save_westley", true, container);
2616
2814
fd->setCaption(i18n("Save Subclip"));
2617
2815
fd->setOperationMode(KFileDialog::Saving);
2618
2816
fd->setMode(KFile::File);
2619
2817
if (fd->exec() == QDialog::Accepted) {
2620
2819
if (KIO::NetAccess::exists(fd->selectedURL(), false, this)) {
2621
if (KMessageBox::questionYesNo(this, i18n("File already exists.\nDo you want to overwrite it ?")) == KMessageBox::No) return;
2820
if (KMessageBox::questionYesNo(this, i18n("File already exists.\nDo you want to overwrite it ?")) == KMessageBox::No) doIt = false;
2623
DocClipRef *clipUnderMouse = getDocument()->projectClip().selectedClip();
2624
QDomDocument partial = clipUnderMouse->generateXMLClip();
2625
QFile file(fd->selectedURL().path());
2626
file.open( IO_WriteOnly );
2627
QCString save = QString("<westley><producer id=\"" + QString::number(clipUnderMouse->referencedClip()->getId()) + "\" resource=\"" + clipUnderMouse->fileURL().path() + "\" /><playlist>"+partial.toString()+"</playlist></westley>").utf8();
2628
file.writeBlock(save, save.length());
2630
if (addToProject->isChecked()) insertClipFromUrl(fd->selectedURL().path());
2825
QDomElement westley = doc.createElement("westley");
2826
doc.appendChild(westley);
2827
if (!le->text().isEmpty()) westley.setAttribute("title", le->text());
2828
QDomElement playlist = doc.createElement("playlist");
2830
clipUnderMouse = list.first();
2831
double fps = KdenliveSettings::defaultfps();
2832
int timestart = clipUnderMouse->trackStart().frames(fps);
2833
QDomElement producer, blank;
2834
QStringList resources;
2836
for (; clipUnderMouse; clipUnderMouse = list.next()) {
2837
QDomDocument partial = clipUnderMouse->generateXMLClip();
2838
int producerId = clipUnderMouse->referencedClip()->getId();
2839
DocumentBaseNode *node = getDocument()->findClipNodeById(producerId);
2840
if (node && resources.find(QString::number(producerId)) == resources.end()) {
2841
DocumentClipNode *clipNode = node->asClipNode();
2843
QDomElement avfile = doc.createElement("producer");
2844
westley.appendChild(SaveProjectNativeFilter::processedNode(clipNode, avfile));
2845
resources.append(QString::number(producerId));
2849
if (clipUnderMouse->trackStart().frames(fps) - timestart > 0.01) {
2850
blank = doc.createElement("blank");
2851
blank.setAttribute("length", clipUnderMouse->trackStart().frames(fps) - timestart);
2852
playlist.appendChild(blank);
2854
playlist.appendChild(partial.firstChild());
2855
timestart = (int)(clipUnderMouse->trackEnd()).frames(fps);
2857
westley.appendChild(playlist);
2859
QCString save = doc.toString().utf8();
2861
QFile file(fd->selectedURL().path());
2862
file.open( IO_WriteOnly );
2863
file.writeBlock(save, save.length());
2865
KdenliveSettings::setAddnewlysaved(addToProject->isChecked());
2866
if (addToProject->isChecked()) insertClipFromUrl(fd->selectedURL().path());
2632
2871
delete addToProject;
2936
3177
/** Called when the user activates the "Export Timeline" action */
2937
void KdenliveApp::slotRenderExportTimeline(bool show) {
2938
slotStatusMsg(i18n("Exporting Timeline..."));
2939
if (!m_exportWidget) {
3178
void KdenliveApp::initRenderExport(bool reset) {
3179
if (!m_exportWidget) {
2940
3180
m_exportWidget=new exportWidget(this, m_timeline, projectFormatParameters(m_projectFormat), this,"exporter");
2941
3181
m_exportWidget->setMetaData(getDocument()->metadata());
2942
3182
connect(m_workspaceMonitor->screen(),SIGNAL(exportOver()),m_exportWidget,SLOT(endExport()));
2943
3183
connect(m_exportWidget,SIGNAL(exportToFirewire(QString, int, GenTime, GenTime)),m_workspaceMonitor->screen(),SLOT(exportToFirewire(QString, int, GenTime, GenTime)));
2944
3184
connect(m_exportWidget,SIGNAL(addFileToProject(const QString &)),this,SLOT(slotAddFileToProject(const QString &)));
2945
3185
connect(m_exportWidget,SIGNAL(metadataChanged(const QStringList)), this, SLOT(slotSetDocumentMetadata(const QStringList)));
2948
if (m_exportWidget->isVisible()) m_exportWidget->hide();
2949
else m_exportWidget->show();
3187
else if (reset) m_exportWidget->resetValues();
3190
/** Called when the user activates the "Export Timeline" action */
3191
void KdenliveApp::slotRenderExportTimeline() {
3192
slotStatusMsg(i18n("Exporting Timeline..."));
3193
initRenderExport(false);
3194
if (m_exportWidget->isVisible()) m_exportWidget->hide();
3195
else m_exportWidget->show();
2951
3196
slotStatusMsg(i18n("Ready."));
3019
3264
void KdenliveApp::slotProjectRenameFolder(QString message) {
3020
if (m_projectList->currentClip()) return;
3265
if (!m_projectList->currentItemIsFolder()) return;
3021
3267
QString currentFolderName = m_projectList->currentItemName();
3022
3268
QString folderName = KInputDialog::getText(i18n("Rename Folder"), message + i18n("Enter new folder name: "), currentFolderName);
3023
3269
if (folderName.isEmpty()) return;
3024
3270
// check folder name doesn't exist
3025
/*QListViewItemIterator it( m_projectList->m_listView );
3026
while ( it.current() ) {
3027
if (it.current()->text(1) == folderName && (!static_cast<AVListViewItem *>(it.current())->clip())) {
3028
slotProjectRenameFolder(i18n("Folder %1 already exists\n").arg(folderName));
3034
DocumentGroupNode *folder = getDocument()->findClipNode(currentFolderName)->asGroupNode();
3035
folder->rename(folderName);
3271
if (m_projectList->renameFolder(folderName)) {
3272
DocumentGroupNode *folder = getDocument()->findClipNode(currentFolderName)->asGroupNode();
3273
folder->rename(folderName);
3275
else slotProjectRenameFolder(i18n("Folder %1 already exists\n").arg(folderName));
3038
3278
void KdenliveApp::slotProjectDeleteFolder() {
3039
3279
//TODO: implement icon view folder deletion
3040
3280
if (m_projectList->isEmpty() || m_projectList->currentClip() || !m_projectList->isListView()) return;
3041
3281
if (m_projectList->hasChildren())
3042
if (KMessageBox::questionYesNo(this, i18n("Deleting this folder will remove all reference to its clips in your project.\nDelete this folder ?")) == KMessageBox::No) return;
3282
if (KMessageBox::questionYesNo(this, i18n("Deleting this folder will remove all reference to its clips in your project.\nDelete this folder ?")) == KMessageBox::No) return;
3043
3283
QString folderName = m_projectList->currentItemName();
3044
3284
QStringList folderItems = m_projectList->currentItemChildrenIds();
3358
3602
duration, dia->name(), dia->description());
3360
3604
else if (refClip->clipType() == DocClipBase::IMAGE) {
3361
QString url = dia->url();
3606
url.setPath(dia->url());
3362
3607
if (duration > GenTime(MAXFRAMEDURATION, getDocument()->framesPerSecond())) duration = GenTime(MAXFRAMEDURATION, getDocument()->framesPerSecond());
3363
3608
Command::KEditClipCommand(*m_doc, refClip, url, duration, dia->description(), dia->transparency());
3365
3610
else if (refClip->clipType() == DocClipBase::SLIDESHOW) {
3366
3611
QString lumaFile = m_transitionPanel->getLumaFilePath(dia->lumaFile());
3367
QString url = dia->url() + "/.all." + dia->extension();
3613
url.setPath( dia->url() + "/.all." + dia->extension());
3368
3614
if (duration > GenTime(MAXFRAMEDURATION, getDocument()->framesPerSecond())) duration = GenTime(MAXFRAMEDURATION, getDocument()->framesPerSecond());
3369
3615
Command::KEditClipCommand(*m_doc, refClip, url, "",dia->ttl(), dia->crossfading(), lumaFile, dia->lumaSoftness(), dia->lumaDuration(), duration, dia->description(), dia->transparency());
3371
3617
else { // Video clip
3372
Command::KEditClipCommand(*m_doc, refClip, dia->url(),dia->description());
3619
url.setPath(dia->url());
3620
Command::KEditClipCommand(*m_doc, refClip, url, dia->description());
3374
if (refClip->numReferences() > 0) getDocument()->activateSceneListGeneration(true);
3622
if (refClip->numReferences() > 0) getDocument()->activateSceneListGeneration(true);
3398
3646
DocClipRef *refClip;
3647
bool usedClip = false;
3400
3648
// Create a macro command that will delete all clips from the timeline involving this avfile. Then, delete it.
3401
3649
KMacroCommand *macroCommand = new KMacroCommand(i18n("Delete Clip"));
3403
3650
for (refClip = refClipList.first(); refClip; refClip = refClipList.next()) {
3404
3651
DocClipBase *clip = refClip->referencedClip();
3652
if (clip->numReferences() > 0) usedClip = true;
3406
3653
// NOTE - we clear the monitors of the clip here - this does _not_ go into the macro command.
3407
3654
int id = clip->getId();
3408
3655
m_monitorManager.clearClip(clip);
3410
3657
DocClipRefList list = m_doc->referencedClips(clip);
3411
3658
QPtrListIterator < DocClipRef > itt(list);
3413
3660
while (itt.current()) {
3414
Command::KAddRefClipCommand * command = new Command::KAddRefClipCommand(effectList(), *m_doc, itt.current(), false);
3415
if (m_transitionPanel->belongsToClip(itt.current())) m_transitionPanel->setTransition(0);
3661
Command::KAddRefClipCommand * command = new Command::KAddRefClipCommand(*m_doc, itt.current(), false);
3662
if (m_transitionPanel->belongsToClip(itt.current())) m_transitionPanel->setTransition(0, getDocument());
3416
3663
macroCommand->addCommand(command);
3420
3666
// remove audio thumbnail and tmp files
3421
3667
clip->removeTmpFile();
3423
3668
DocumentBaseNode *node = m_doc->findClipNodeById(id);
3424
3669
if (!node) kdDebug()<<"++++++ CANNOT FIND NODE: "<<id<<endl;
3425
3670
macroCommand->addCommand(new Command::KAddClipCommand(*m_doc, node->name(), clip, node->parent(), false));
3427
3672
addCommand(macroCommand, true);
3428
if (confirm) getDocument()->activateSceneListGeneration(true);
3673
if (confirm && usedClip) getDocument()->activateSceneListGeneration(true);
3430
3675
else if (confirm) slotProjectDeleteFolder();
3431
3676
slotStatusMsg(i18n("Ready."));
3606
3842
slotExtractClipAudio(clip);
3846
void KdenliveApp::slotProjectDeleteClipMarkers() {
3847
DocClipRef *clip = m_projectList->currentClip();
3849
deleteClipMarkers(clip);
3852
void KdenliveApp::slotProjectImportCue() {
3853
DocClipRef *clip = m_projectList->currentClip();
3856
QCheckBox * mergeCues = new QCheckBox(i18n("Merge with existing cues"),this);
3857
KFileDialog *fd = new KFileDialog(m_fileDialogPath.path(), "*.cue", this, "import_cue", true, mergeCues);
3858
fd->setCaption(i18n("Open File..."));
3859
fd->setOperationMode(KFileDialog::Opening);
3860
fd->setMode(KFile::File);
3861
if (fd->exec() == QDialog::Accepted) {
3862
QFile file(fd->selectedFile());
3863
if ( file.open(IO_ReadOnly) ) {
3868
int fps = KdenliveSettings::defaultfps();
3869
int id = clip->referencedClip()->getId();
3870
if (!mergeCues->isChecked()) deleteClipMarkers(clip);
3871
KMacroCommand *macroCommand = new KMacroCommand(i18n("Import Markers"));
3872
QTextStream t( &file ); // use a text stream
3873
while ( !t.eof() ) {
3874
line = t.readLine();
3875
line = line.simplifyWhiteSpace();
3876
if (line.startsWith("title", false)) {
3877
title = line.section("\"", 1, 1);
3879
else if (line.startsWith("index", false)) {
3880
cueTime = line.section(" ", -1);
3881
int frames = (int) (cueTime.section(":", 0, 0).toInt() * 60 * fps + cueTime.section(":", 1, 1).toInt() * fps + cueTime.section(":", 2, 2).toInt() * fps / 74);
3882
time = GenTime(frames, fps);
3883
Command::KAddMarkerCommand * command = new Command::KAddMarkerCommand(*getDocument(), id, time, title, true);
3884
macroCommand->addCommand(command);
3885
title = QString::null;
3889
addCommand(macroCommand, true);
3609
3896
void KdenliveApp::slotExtractClipAudio(DocClipRef *clip) {
3610
3897
QCheckBox * addToProject = new QCheckBox(i18n("Add new audio clip to project"),this);
3611
3898
addToProject->setChecked(true);
4427
4767
if (!clip) return;
4428
4768
GenTime curr = m_timeline->seekPosition();
4429
4769
if ((curr <= clip->trackStart()) || (curr >= clip->trackEnd())) return;
4430
getDocument()->activateSceneListGeneration(false);
4431
addCommand(Command::DocumentMacroCommands::razorSelectedClipsAt(getDocument(), curr), true);
4432
getDocument()->activateSceneListGeneration(true);
4770
//getDocument()->activateSceneListGeneration(false);
4771
addCommand(Command::DocumentMacroCommands::razorSelectedClipsAt(this, getDocument(), curr), true);
4772
//getDocument()->activateSceneListGeneration(true);
4775
void KdenliveApp::slotPrint()
4777
// create the KPrinter object with default options
4780
printer.addDialogPage(new PrintSettings);
4782
// start the print dialog to initialize the KPrinter object
4783
if (printer.setup(this))
4785
// do the actual printing job
4790
void KdenliveApp::doPrint(KPrinter *printer)
4792
// create the painter object
4793
QPainter painter(printer);
4795
// at this moment we print the image using default options,
4796
// later we may want to customize printing.
4798
bool printFullPath = (printer->option("kde-kdenlive-fullpath") == "true") ? true : false;
4799
bool printFilter = (printer->option("kde-kdenlive-filter") == "true") ? true : false;
4800
bool printGray = (printer->option("kde-kdenlive-gray") == "true") ? true : false;
4801
// do the actual painting job
4802
m_projectList->doPrinting(printer, &painter, printer->option("kde-kdenlive-images").toInt(), printFullPath, printGray, printFilter);
4435
4805
} // namespace Gui