MythTV  master
mythburn.cpp
Go to the documentation of this file.
1 // C++
2 #include <cstdlib>
3 #include <iostream>
4 #include <sys/wait.h> // for WIFEXITED and WEXITSTATUS
5 #include <unistd.h>
6 
7 // qt
8 #include <QApplication>
9 #include <QDir>
10 #include <QDomDocument>
11 #include <QKeyEvent>
12 #include <QTextStream>
13 
14 // myth
15 #include <mythconfig.h>
16 #include <libmyth/mythcontext.h>
17 #include <libmythbase/exitcodes.h>
18 #include <libmythbase/mythdate.h>
19 #include <libmythbase/mythdb.h>
20 #include <libmythbase/mythdirs.h>
23 #include <libmythbase/stringutil.h>
26 #include <libmythui/mythuibutton.h>
29 #include <libmythui/mythuihelper.h>
31 #include <libmythui/mythuitext.h>
32 
33 // mytharchive
34 #include "archiveutil.h"
35 #include "editmetadata.h"
36 #include "fileselector.h"
37 #include "logviewer.h"
38 #include "mythburn.h"
39 #include "recordingselector.h"
40 #include "thumbfinder.h"
41 #include "videoselector.h"
42 
44  MythScreenType *destinationScreen,
45  MythScreenType *themeScreen,
46  const ArchiveDestination &archiveDestination, const QString& name) :
47  MythScreenType(parent, name),
48  m_destinationScreen(destinationScreen),
49  m_themeScreen(themeScreen),
50  m_archiveDestination(archiveDestination)
51 {
52  // remove any old thumb images
53  QString thumbDir = getTempDirectory() + "/config/thumbs";
54  QDir dir(thumbDir);
55  if (dir.exists() && !MythRemoveDirectory(dir))
56  LOG(VB_GENERAL, LOG_ERR, "MythBurn: Failed to clear thumb directory");
57 }
58 
60 {
62 
63  while (!m_profileList.isEmpty())
64  delete m_profileList.takeFirst();
65  m_profileList.clear();
66 
67  while (!m_archiveList.isEmpty())
68  delete m_archiveList.takeFirst();
69  m_archiveList.clear();
70 }
71 
72 bool MythBurn::Create(void)
73 {
74  // Load the theme for this screen
75  bool foundtheme = LoadWindowFromXML("mythburn-ui.xml", "mythburn", this);
76  if (!foundtheme)
77  return false;
78 
79  bool err = false;
80  UIUtilE::Assign(this, m_nextButton, "next_button", &err);
81  UIUtilE::Assign(this, m_prevButton, "prev_button", &err);
82  UIUtilE::Assign(this, m_cancelButton, "cancel_button", &err);
83  UIUtilE::Assign(this, m_nofilesText, "nofiles", &err);
84  UIUtilE::Assign(this, m_archiveButtonList, "archivelist", &err);
85  UIUtilE::Assign(this, m_addrecordingButton, "addrecording_button", &err);
86  UIUtilE::Assign(this, m_addvideoButton, "addvideo_button", &err);
87  UIUtilE::Assign(this, m_addfileButton, "addfile_button", &err);
88  UIUtilE::Assign(this, m_maxsizeText, "maxsize", &err);
89  UIUtilE::Assign(this, m_minsizeText, "minsize", &err);
90  UIUtilE::Assign(this, m_currentsizeErrorText, "currentsize_error", &err);
91  UIUtilE::Assign(this, m_currentsizeText, "currentsize", &err);
92  UIUtilE::Assign(this, m_sizeBar, "size_bar", &err);
93 
94  if (err)
95  {
96  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'mythburn'");
97  return false;
98  }
99 
103 
104 
107 
109 
112 
116  this, &MythBurn::itemClicked);
117 
118  BuildFocusList();
119 
121 
122  return true;
123 }
124 
125 bool MythBurn::keyPressEvent(QKeyEvent *event)
126 {
127  if (!m_moveMode && GetFocusWidget()->keyPressEvent(event))
128  return true;
129 
130  QStringList actions;
131  bool handled = GetMythMainWindow()->TranslateKeyPress("Archive", event, actions);
132 
133  for (int i = 0; i < actions.size() && !handled; i++)
134  {
135  QString action = actions[i];
136  handled = true;
137 
138  // if we are currently moving an item,
139  // we only accept UP/DOWN/SELECT/ESCAPE
140  if (m_moveMode)
141  {
143  if (!item)
144  return false;
145 
146  if (action == "SELECT" || action == "ESCAPE")
147  {
148  m_moveMode = false;
149  item->DisplayState("off", "movestate");
150  }
151  else if (action == "UP")
152  {
153  item->MoveUpDown(true);
154  }
155  else if (action == "DOWN")
156  {
157  item->MoveUpDown(false);
158  }
159 
160  return true;
161  }
162 
163  if (action == "MENU")
164  {
165  ShowMenu();
166  }
167  else if (action == "DELETE")
168  {
169  removeItem();
170  }
171  else if (action == "INFO")
172  {
173  editThumbnails();
174  }
175  else if (action == "TOGGLECUT")
176  {
178  }
179  else
180  handled = false;
181  }
182 
183  if (!handled && MythScreenType::keyPressEvent(event))
184  handled = true;
185 
186  return handled;
187 }
188 
190 {
191  int64_t size = 0;
192  for (const auto *a : qAsConst(m_archiveList))
193  size += a->newsize;
194 
195  uint usedSpace = size / 1024 / 1024;
196 
197  QString tmpSize;
198 
200  m_sizeBar->SetUsed(usedSpace);
201 
202  tmpSize = QString("%1 Mb").arg(m_archiveDestination.freeSpace / 1024);
203 
204  m_maxsizeText->SetText(tmpSize);
205 
206  m_minsizeText->SetText("0 Mb");
207 
208  tmpSize = QString("%1 Mb").arg(usedSpace);
209 
210  if (usedSpace > m_archiveDestination.freeSpace / 1024)
211  {
213 
216  }
217  else
218  {
220 
221  m_currentsizeText->SetText(tmpSize);
223  }
224 }
225 
227 {
228  auto *item = new EncoderProfile;
229  item->name = "NONE";
230  item->description = "";
231  item->bitrate = 0.0F;
232  m_profileList.append(item);
233 
234  // find the encoding profiles
235  // first look in the ConfDir (~/.mythtv)
236  QString filename = GetConfDir() +
237  "/MythArchive/ffmpeg_dvd_" +
238  ((gCoreContext->GetSetting("MythArchiveVideoFormat", "pal")
239  .toLower() == "ntsc") ? "ntsc" : "pal") + ".xml";
240 
241  if (!QFile::exists(filename))
242  {
243  // not found yet so use the default profiles
244  filename = GetShareDir() +
245  "mytharchive/encoder_profiles/ffmpeg_dvd_" +
246  ((gCoreContext->GetSetting("MythArchiveVideoFormat", "pal")
247  .toLower() == "ntsc") ? "ntsc" : "pal") + ".xml";
248  }
249 
250  LOG(VB_GENERAL, LOG_NOTICE,
251  "MythArchive: Loading encoding profiles from " + filename);
252 
253  QDomDocument doc("mydocument");
254  QFile file(filename);
255  if (!file.open(QIODevice::ReadOnly))
256  return;
257 
258  if (!doc.setContent( &file ))
259  {
260  file.close();
261  return;
262  }
263  file.close();
264 
265  QDomElement docElem = doc.documentElement();
266  QDomNodeList profileNodeList = doc.elementsByTagName("profile");
267  QString name;
268  QString desc;
269  QString bitrate;
270 
271  for (int x = 0; x < profileNodeList.count(); x++)
272  {
273  QDomNode n = profileNodeList.item(x);
274  QDomElement e = n.toElement();
275  QDomNode n2 = e.firstChild();
276  while (!n2.isNull())
277  {
278  QDomElement e2 = n2.toElement();
279  if(!e2.isNull())
280  {
281  if (e2.tagName() == "name")
282  name = e2.text();
283  if (e2.tagName() == "description")
284  desc = e2.text();
285  if (e2.tagName() == "bitrate")
286  bitrate = e2.text();
287 
288  }
289  n2 = n2.nextSibling();
290 
291  }
292 
293  auto *item2 = new EncoderProfile;
294  item2->name = name;
295  item2->description = desc;
296  item2->bitrate = bitrate.toFloat();
297  m_profileList.append(item2);
298  }
299 }
300 
302 {
304  auto *a = item->GetData().value<ArchiveItem *>();
305 
306  if (!a)
307  return;
308 
309  if (!a->hasCutlist)
310  return;
311 
312  a->useCutlist = !a->useCutlist;
313 
314  if (a->hasCutlist)
315  {
316  if (a->useCutlist)
317  {
318  item->SetText(tr("Using Cut List"), "cutlist");
319  item->DisplayState("using", "cutliststatus");
320  }
321  else
322  {
323  item->SetText(tr("Not Using Cut List"), "cutlist");
324  item->DisplayState("notusing", "cutliststatus");
325  }
326  }
327  else
328  {
329  item->SetText(tr("No Cut List"), "cutlist");
330  item->DisplayState("none", "cutliststatus");
331  }
332  recalcItemSize(a);
333  updateSizeBar();
334 }
335 
337 {
338  if (m_archiveList.empty())
339  {
340  ShowOkPopup(tr("You need to add at least one item to archive!"));
341  return;
342  }
343 
344  runScript();
345 }
346 
348 {
349  Close();
350 }
351 
353 {
355  m_themeScreen->Close();
356  Close();
357 }
358 
359 QString MythBurn::loadFile(const QString &filename)
360 {
361  QString res = "";
362 
363  QFile file(filename);
364 
365  if (!file.exists())
366  return "";
367 
368  if (file.open( QIODevice::ReadOnly ))
369  {
370  QTextStream stream(&file);
371 
372  while ( !stream.atEnd() )
373  {
374  res = res + stream.readLine();
375  }
376  file.close();
377  }
378  else
379  return "";
380 
381  return res;
382 }
383 
385 {
386  QString message = tr("Retrieving File Information. Please Wait...");
387 
388  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
389 
390  auto *busyPopup = new
391  MythUIBusyDialog(message, popupStack, "mythburnbusydialog");
392 
393  if (busyPopup->Create())
394  popupStack->AddScreen(busyPopup, false);
395  else
396  {
397  delete busyPopup;
398  busyPopup = nullptr;
399  }
400 
401  QCoreApplication::processEvents();
402 
404 
405  if (m_archiveList.empty())
406  {
407  m_nofilesText->Show();
408  }
409  else
410  {
411  for (auto *a : qAsConst(m_archiveList))
412  {
413  QCoreApplication::processEvents();
414  // get duration of this file
415  if (a->duration == 0)
416  {
417  if (!getFileDetails(a))
418  LOG(VB_GENERAL, LOG_ERR,
419  QString("MythBurn: failed to get file details for: %1").arg(a->filename));
420  }
421 
422  // get default encoding profile if needed
423 
424  if (a->encoderProfile == nullptr)
425  a->encoderProfile = getDefaultProfile(a);
426 
427  recalcItemSize(a);
428 
429  auto* item = new MythUIButtonListItem(m_archiveButtonList, a->title);
430  item->SetData(QVariant::fromValue(a));
431  item->SetText(a->subtitle, "subtitle");
432  item->SetText(a->startDate + " " + a->startTime, "date");
433  item->SetText(StringUtil::formatKBytes(a->newsize / 1024, 2), "size");
434  if (a->hasCutlist)
435  {
436  if (a->useCutlist)
437  {
438  item->SetText(tr("Using Cut List"), "cutlist");
439  item->DisplayState("using", "cutliststatus");
440  }
441  else
442  {
443  item->SetText(tr("Not Using Cut List"), "cutlist");
444  item->DisplayState("notusing", "cutliststatus");
445  }
446  }
447  else
448  {
449  item->SetText(tr("No Cut List"), "cutlist");
450  item->DisplayState("none", "cutliststatus");
451  }
452  item->SetText(tr("Encoder: ") + a->encoderProfile->name, "profile");
453  }
454 
455  m_nofilesText->Hide();
456 
459  }
460 
461  updateSizeBar();
462 
463  if (busyPopup)
464  busyPopup->Close();
465 }
466 
467 bool MythBurn::isArchiveItemValid(const QString &type, const QString &filename)
468 {
469  if (type == "Recording")
470  {
471  QString baseName = getBaseName(filename);
472 
473  MSqlQuery query(MSqlQuery::InitCon());
474  query.prepare("SELECT title FROM recorded WHERE basename = :FILENAME");
475  query.bindValue(":FILENAME", baseName);
476  if (query.exec() && query.size())
477  return true;
478  LOG(VB_GENERAL, LOG_ERR,
479  QString("MythArchive: Recording not found (%1)")
480  .arg(filename));
481  }
482  else if (type == "Video")
483  {
484  MSqlQuery query(MSqlQuery::InitCon());
485  query.prepare("SELECT title FROM videometadata"
486  " WHERE filename = :FILENAME");
487  query.bindValue(":FILENAME", filename);
488  if (query.exec() && query.size())
489  return true;
490  LOG(VB_GENERAL, LOG_ERR,
491  QString("MythArchive: Video not found (%1)").arg(filename));
492  }
493  else if (type == "File")
494  {
495  if (QFile::exists(filename))
496  return true;
497  LOG(VB_GENERAL, LOG_ERR,
498  QString("MythArchive: File not found (%1)").arg(filename));
499  }
500 
501  LOG(VB_GENERAL, LOG_NOTICE, "MythArchive: Archive item removed from list");
502 
503  return false;
504 }
505 
507 {
508  if (!item)
509  return m_profileList.at(0);
510 
511  EncoderProfile *profile = nullptr;
512 
513  // is the file an mpeg2 file?
514  if (item->videoCodec.toLower() == "mpeg2video (main)")
515  {
516  // does the file already have a valid DVD resolution?
517  if (gCoreContext->GetSetting("MythArchiveVideoFormat", "pal").toLower()
518  == "ntsc")
519  {
520  if ((item->videoWidth == 720 && item->videoHeight == 480) ||
521  (item->videoWidth == 704 && item->videoHeight == 480) ||
522  (item->videoWidth == 352 && item->videoHeight == 480) ||
523  (item->videoWidth == 352 && item->videoHeight == 240))
524  {
525  // don't need to re-encode
526  profile = m_profileList.at(0);
527  }
528  }
529  else
530  {
531  if ((item->videoWidth == 720 && item->videoHeight == 576) ||
532  (item->videoWidth == 704 && item->videoHeight == 576) ||
533  (item->videoWidth == 352 && item->videoHeight == 576) ||
534  (item->videoWidth == 352 && item->videoHeight == 288))
535  {
536  // don't need to re-encode
537  profile = m_profileList.at(0);
538  }
539  }
540  }
541 
542  if (!profile)
543  {
544  // file needs re-encoding - use default profile setting
545  QString defaultProfile =
546  gCoreContext->GetSetting("MythArchiveDefaultEncProfile", "SP");
547 
548  for (auto *x : qAsConst(m_profileList))
549  if (x->name == defaultProfile)
550  profile = x;
551  }
552 
553  return profile;
554 }
555 
557 {
558  QDomDocument doc("mythburn");
559 
560  QDomElement root = doc.createElement("mythburn");
561  doc.appendChild(root);
562 
563  QDomElement job = doc.createElement("job");
564  job.setAttribute("theme", m_theme);
565  root.appendChild(job);
566 
567  QDomElement media = doc.createElement("media");
568  job.appendChild(media);
569 
570  // now loop though selected archive items and add them to the xml file
571  for (int x = 0; x < m_archiveButtonList->GetCount(); x++)
572  {
574  if (!item)
575  continue;
576 
577  auto *a = item->GetData().value<ArchiveItem *>();
578  if (!a)
579  continue;
580 
581  QDomElement file = doc.createElement("file");
582  file.setAttribute("type", a->type.toLower() );
583  file.setAttribute("usecutlist", static_cast<int>(a->useCutlist));
584  file.setAttribute("filename", a->filename);
585  file.setAttribute("encodingprofile", a->encoderProfile->name);
586  if (a->editedDetails)
587  {
588  QDomElement details = doc.createElement("details");
589  file.appendChild(details);
590  details.setAttribute("title", a->title);
591  details.setAttribute("subtitle", a->subtitle);
592  details.setAttribute("startdate", a->startDate);
593  details.setAttribute("starttime", a->startTime);
594  QDomText desc = doc.createTextNode(a->description);
595  details.appendChild(desc);
596  }
597 
598  if (!a->thumbList.empty())
599  {
600  QDomElement thumbs = doc.createElement("thumbimages");
601  file.appendChild(thumbs);
602 
603  for (auto *thumbImage : qAsConst(a->thumbList))
604  {
605  QDomElement thumb = doc.createElement("thumb");
606  thumbs.appendChild(thumb);
607  thumb.setAttribute("caption", thumbImage->caption);
608  thumb.setAttribute("filename", thumbImage->filename);
609  thumb.setAttribute("frame", (int) thumbImage->frame);
610  }
611  }
612 
613  media.appendChild(file);
614  }
615 
616  // add the options to the xml file
617  QDomElement options = doc.createElement("options");
618  options.setAttribute("createiso", static_cast<int>(m_bCreateISO));
619  options.setAttribute("doburn", static_cast<int>(m_bDoBurn));
620  options.setAttribute("mediatype", m_archiveDestination.type);
621  options.setAttribute("dvdrsize", (qint64)m_archiveDestination.freeSpace);
622  options.setAttribute("erasedvdrw", static_cast<int>(m_bEraseDvdRw));
623  options.setAttribute("savefilename", m_saveFilename);
624  job.appendChild(options);
625 
626  // finally save the xml to the file
627  QFile f(filename);
628  if (!f.open(QIODevice::WriteOnly))
629  {
630  LOG(VB_GENERAL, LOG_ERR,
631  QString("MythBurn::createConfigFile: "
632  "Failed to open file for writing - %1") .arg(filename));
633  return;
634  }
635 
636  QTextStream t(&f);
637  t << doc.toString(4);
638  f.close();
639 }
640 
642 {
643  m_theme = gCoreContext->GetSetting("MythBurnMenuTheme", "");
644  m_bCreateISO = (gCoreContext->GetSetting("MythBurnCreateISO", "0") == "1");
645  m_bDoBurn = (gCoreContext->GetSetting("MythBurnBurnDVDr", "1") == "1");
646  m_bEraseDvdRw = (gCoreContext->GetSetting("MythBurnEraseDvdRw", "0") == "1");
647  m_saveFilename = gCoreContext->GetSetting("MythBurnSaveFilename", "");
648 
649  while (!m_archiveList.isEmpty())
650  delete m_archiveList.takeFirst();
651  m_archiveList.clear();
652 
653  // load selected file list
654  MSqlQuery query(MSqlQuery::InitCon());
655  query.prepare("SELECT type, title, subtitle, description, startdate, "
656  "starttime, size, filename, hascutlist, duration, "
657  "cutduration, videowidth, videoheight, filecodec, "
658  "videocodec, encoderprofile FROM archiveitems "
659  "ORDER BY intid;");
660 
661  if (!query.exec())
662  {
663  MythDB::DBError("archive item insert", query);
664  return;
665  }
666 
667  while (query.next())
668  {
669  auto *a = new ArchiveItem;
670  a->type = query.value(0).toString();
671  a->title = query.value(1).toString();
672  a->subtitle = query.value(2).toString();
673  a->description = query.value(3).toString();
674  a->startDate = query.value(4).toString();
675  a->startTime = query.value(5).toString();
676  a->size = query.value(6).toLongLong();
677  a->filename = query.value(7).toString();
678  a->hasCutlist = (query.value(8).toInt() == 1);
679  a->useCutlist = false;
680  a->duration = query.value(9).toInt();
681  a->cutDuration = query.value(10).toInt();
682  a->videoWidth = query.value(11).toInt();
683  a->videoHeight = query.value(12).toInt();
684  a->fileCodec = query.value(13).toString();
685  a->videoCodec = query.value(14).toString();
686  a->encoderProfile = getProfileFromName(query.value(15).toString());
687  a->editedDetails = false;
688  m_archiveList.append(a);
689  }
690 }
691 
692 EncoderProfile *MythBurn::getProfileFromName(const QString &profileName)
693 {
694  for (auto *x : qAsConst(m_profileList))
695  if (x->name == profileName)
696  return x;
697 
698  return nullptr;
699 }
700 
702 {
703  // remove all old archive items from DB
704  MSqlQuery query(MSqlQuery::InitCon());
705  query.prepare("DELETE FROM archiveitems;");
706  if (!query.exec())
707  MythDB::DBError("MythBurn::saveConfiguration - deleting archiveitems",
708  query);
709 
710  // save new list of archive items to DB
711  for (int x = 0; x < m_archiveButtonList->GetCount(); x++)
712  {
714  if (!item)
715  continue;
716 
717  auto *a = item->GetData().value<ArchiveItem *>();
718  if (!a)
719  continue;
720 
721  query.prepare("INSERT INTO archiveitems (type, title, subtitle, "
722  "description, startdate, starttime, size, filename, "
723  "hascutlist, duration, cutduration, videowidth, "
724  "videoheight, filecodec, videocodec, encoderprofile) "
725  "VALUES(:TYPE, :TITLE, :SUBTITLE, :DESCRIPTION, :STARTDATE, "
726  ":STARTTIME, :SIZE, :FILENAME, :HASCUTLIST, :DURATION, "
727  ":CUTDURATION, :VIDEOWIDTH, :VIDEOHEIGHT, :FILECODEC, "
728  ":VIDEOCODEC, :ENCODERPROFILE);");
729  query.bindValue(":TYPE", a->type);
730  query.bindValue(":TITLE", a->title);
731  query.bindValue(":SUBTITLE", a->subtitle);
732  query.bindValue(":DESCRIPTION", a->description);
733  query.bindValue(":STARTDATE", a->startDate);
734  query.bindValue(":STARTTIME", a->startTime);
735  query.bindValue(":SIZE", (qint64)a->size);
736  query.bindValue(":FILENAME", a->filename);
737  query.bindValue(":HASCUTLIST", a->hasCutlist);
738  query.bindValue(":DURATION", a->duration);
739  query.bindValue(":CUTDURATION", a->cutDuration);
740  query.bindValue(":VIDEOWIDTH", a->videoWidth);
741  query.bindValue(":VIDEOHEIGHT", a->videoHeight);
742  query.bindValue(":FILECODEC", a->fileCodec);
743  query.bindValue(":VIDEOCODEC", a->videoCodec);
744  query.bindValue(":ENCODERPROFILE", a->encoderProfile->name);
745 
746  if (!query.exec())
747  MythDB::DBError("archive item insert", query);
748  }
749 }
750 
752 {
753  if (m_archiveList.empty())
754  return;
755 
757  auto *curItem = item->GetData().value<ArchiveItem *>();
758 
759  if (!curItem)
760  return;
761 
762  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
763 
764  auto *menuPopup = new MythDialogBox(tr("Menu"), popupStack, "actionmenu");
765 
766  if (menuPopup->Create())
767  popupStack->AddScreen(menuPopup);
768 
769  menuPopup->SetReturnEvent(this, "action");
770 
771  if (curItem->hasCutlist)
772  {
773  if (curItem->useCutlist)
774  {
775  menuPopup->AddButton(tr("Don't Use Cut List"),
777  }
778  else
779  {
780  menuPopup->AddButton(tr("Use Cut List"),
782  }
783  }
784 
785  menuPopup->AddButton(tr("Remove Item"), &MythBurn::removeItem);
786  menuPopup->AddButton(tr("Edit Details"), &MythBurn::editDetails);
787  menuPopup->AddButton(tr("Change Encoding Profile"), &MythBurn::changeProfile);
788  menuPopup->AddButton(tr("Edit Thumbnails"), &MythBurn::editThumbnails);
789 }
790 
792 {
794  auto *curItem = item->GetData().value<ArchiveItem *>();
795 
796  if (!curItem)
797  return;
798 
799  m_archiveList.removeAll(curItem);
800 
802 }
803 
805 {
807  auto *curItem = item->GetData().value<ArchiveItem *>();
808 
809  if (!curItem)
810  return;
811 
813 
814  auto *editor = new EditMetadataDialog(mainStack, curItem);
815 
816  connect(editor, &EditMetadataDialog::haveResult,
817  this, &MythBurn::editorClosed);
818 
819  if (editor->Create())
820  mainStack->AddScreen(editor);
821 }
822 
824 {
826  auto *curItem = item->GetData().value<ArchiveItem *>();
827 
828  if (!curItem)
829  return;
830 
832 
833  auto *finder = new ThumbFinder(mainStack, curItem, m_theme);
834 
835  if (finder->Create())
836  mainStack->AddScreen(finder);
837 }
838 
840 {
842 
843  if (ok && item && gridItem)
844  {
845  // update the grid to reflect any changes
846  gridItem->SetText(item->title);
847  gridItem->SetText(item->subtitle, "subtitle");
848  gridItem->SetText(item->startDate + " " + item->startTime, "date");
849  }
850 }
851 
853 {
855  auto *curItem = item->GetData().value<ArchiveItem *>();
856 
857  if (!curItem)
858  return;
859 
860  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
861 
862  auto *profileDialog = new ProfileDialog(popupStack, curItem, m_profileList);
863 
864  if (profileDialog->Create())
865  {
866  popupStack->AddScreen(profileDialog, false);
867  connect(profileDialog, &ProfileDialog::haveResult,
868  this, &MythBurn::profileChanged);
869  }
870 }
871 
872 void MythBurn::profileChanged(int profileNo)
873 {
874  if (profileNo > m_profileList.size() - 1)
875  return;
876 
877  EncoderProfile *profile = m_profileList.at(profileNo);
878 
880  if (!item)
881  return;
882 
883  auto *archiveItem = item->GetData().value<ArchiveItem *>();
884  if (!archiveItem)
885  return;
886 
887  archiveItem->encoderProfile = profile;
888 
889  item->SetText(profile->name, "profile");
890  item->SetText(StringUtil::formatKBytes(archiveItem->newsize / 1024, 2), "size");
891 
892  updateSizeBar();
893 }
894 
896 {
897  QString tempDir = getTempDirectory();
898  QString logDir = tempDir + "logs";
899  QString configDir = tempDir + "config";
900  QString commandline;
901 
902  // remove any existing logs
903  myth_system("rm -f " + logDir + "/*.log");
904 
905  // remove cancel flag file if present
906  if (QFile::exists(logDir + "/mythburncancel.lck"))
907  QFile::remove(logDir + "/mythburncancel.lck");
908 
909  createConfigFile(configDir + "/mydata.xml");
910  commandline = PYTHON_EXE;
911  commandline += " " + GetShareDir() + "mytharchive/scripts/mythburn.py";
912  commandline += " -j " + configDir + "/mydata.xml"; // job file
913  commandline += " -l " + logDir + "/progress.log"; // progress log
914  commandline += " > " + logDir + "/mythburn.log 2>&1 &"; // Logs
915 
916  gCoreContext->SaveSetting("MythArchiveLastRunStatus", "Running");
917 
920  uint retval = myth_system(commandline, flags);
921  if (retval != GENERIC_EXIT_RUNNING && retval != GENERIC_EXIT_OK)
922  {
923  ShowOkPopup(tr("It was not possible to create the DVD. "
924  " An error occured when running the scripts"));
925  }
926  else
927  {
928  // now show the log viewer
929  showLogViewer();
930  }
931 
933  m_themeScreen->Close();
934  Close();
935 }
936 
938 {
940 
941  auto *selector = new RecordingSelector(mainStack, &m_archiveList);
942 
943  connect(selector, &RecordingSelector::haveResult,
944  this, &MythBurn::selectorClosed);
945 
946  if (selector->Create())
947  mainStack->AddScreen(selector);
948 }
949 
951 {
952  if (ok)
954 }
955 
957 {
958  MSqlQuery query(MSqlQuery::InitCon());
959  query.prepare("SELECT title FROM videometadata");
960  if (query.exec() && query.size())
961  {
962  }
963  else
964  {
965  ShowOkPopup(tr("You don't have any videos!"));
966  return;
967  }
968 
970 
971  auto *selector = new VideoSelector(mainStack, &m_archiveList);
972 
973  connect(selector, &VideoSelector::haveResult,
974  this, &MythBurn::selectorClosed);
975 
976  if (selector->Create())
977  mainStack->AddScreen(selector);
978 }
979 
981 {
982  QString filter = gCoreContext->GetSetting("MythArchiveFileFilter",
983  "*.mpg *.mpeg *.mov *.avi *.nuv");
984 
986 
987  auto *selector = new FileSelector(mainStack, &m_archiveList,
988  FSTYPE_FILELIST, "/", filter);
989 
990  connect(selector, qOverload<bool>(&FileSelector::haveResult),
991  this, &MythBurn::selectorClosed);
992 
993  if (selector->Create())
994  mainStack->AddScreen(selector);
995 }
996 
998 {
1000 
1001  if (m_moveMode)
1002  item->DisplayState("on", "movestate");
1003  else
1004  item->DisplayState("off", "movestate");
1005 }
1006 
1008 
1010 {
1011  if (!LoadWindowFromXML("mythburn-ui.xml", "profilepopup", this))
1012  return false;
1013 
1014  bool err = false;
1015  UIUtilE::Assign(this, m_captionText, "caption_text", &err);
1016  UIUtilE::Assign(this, m_descriptionText, "description_text", &err);
1017  UIUtilE::Assign(this, m_oldSizeText, "oldsize_text", &err);
1018  UIUtilE::Assign(this, m_newSizeText, "newsize_text", &err);
1019  UIUtilE::Assign(this, m_profileBtnList, "profile_list", &err);
1020  UIUtilE::Assign(this, m_okButton, "ok_button", &err);
1021 
1022  if (err)
1023  {
1024  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'profilepopup'");
1025  return false;
1026  }
1027 
1028  for (auto *x : qAsConst(m_profileList))
1029  {
1030  auto *item = new
1032  item->SetData(QVariant::fromValue(x));
1033  }
1034 
1037 
1038 
1040 
1043 
1045 
1046  BuildFocusList();
1047 
1049 
1050  return true;
1051 }
1052 
1054 {
1055  if (!item)
1056  return;
1057 
1058  auto *profile = item->GetData().value<EncoderProfile *>();
1059  if (!profile)
1060  return;
1061 
1062  m_descriptionText->SetText(profile->description);
1063 
1065 
1066  // calc new size
1068 
1070 }
1071 
1072 
1074 {
1076 
1077  Close();
1078 }
1079 
1081 
1083  :QObject(nullptr)
1084 {
1085  setObjectName("BurnMenu");
1086 }
1087 
1089 {
1090  if (!gCoreContext->GetSetting("MythArchiveLastRunStatus").startsWith("Success"))
1091  {
1092  showWarningDialog(tr("Cannot burn a DVD.\n"
1093  "The last run failed to create a DVD."));
1094  return;
1095  }
1096 
1097  // ask the user what type of disk to burn to
1098  QString title = tr("Burn DVD");
1099  QString msg = tr("\nPlace a blank DVD in the"
1100  " drive and select an option below.");
1101  MythScreenStack *mainStack = GetMythMainWindow()->GetStack("main stack");
1102  auto *menuPopup = new MythDialogBox(title, msg, mainStack,
1103  "actionmenu", true);
1104 
1105  if (menuPopup->Create())
1106  mainStack->AddScreen(menuPopup);
1107 
1108  menuPopup->SetReturnEvent(this, "action");
1109 
1110  menuPopup->AddButton(tr("Burn DVD"));
1111  menuPopup->AddButton(tr("Burn DVD Rewritable"));
1112  menuPopup->AddButton(tr("Burn DVD Rewritable (Force Erase)"));
1113 }
1114 
1115 void BurnMenu::customEvent(QEvent *event)
1116 {
1117  if (auto *dce = dynamic_cast<DialogCompletionEvent*>(event))
1118  {
1119  if (dce->GetId() == "action")
1120  {
1121  doBurn(dce->GetResult());
1122  deleteLater();
1123  }
1124  }
1125 }
1126 
1127 void BurnMenu::doBurn(int mode)
1128 {
1129  if ((mode < 0) || (mode > 2))
1130  return;
1131 
1132  QString tempDir = getTempDirectory(true);
1133 
1134  if (tempDir == "")
1135  return;
1136 
1137  QString logDir = tempDir + "logs";
1138  QString commandline;
1139 
1140  // remove existing progress.log if present
1141  if (QFile::exists(logDir + "/progress.log"))
1142  QFile::remove(logDir + "/progress.log");
1143 
1144  // remove cancel flag file if present
1145  if (QFile::exists(logDir + "/mythburncancel.lck"))
1146  QFile::remove(logDir + "/mythburncancel.lck");
1147 
1148  QString sArchiveFormat = QString::number(mode);
1149  bool bEraseDVDRW = (mode == 2);
1150  bool bNativeFormat = gCoreContext->GetSetting("MythArchiveLastRunType")
1151  .startsWith("Native");
1152 
1153  commandline = "mytharchivehelper --burndvd --mediatype " + sArchiveFormat +
1154  (bEraseDVDRW ? " --erasedvdrw" : "") +
1155  (bNativeFormat ? " --nativeformat" : "");
1156  commandline += logPropagateArgs;
1157  if (!logPropagateQuiet())
1158  commandline += " --quiet";
1159  commandline += " > " + logDir + "/progress.log 2>&1 &";
1160 
1163  uint retval = myth_system(commandline, flags);
1164  if (retval != GENERIC_EXIT_RUNNING && retval != GENERIC_EXIT_OK)
1165  {
1166  showWarningDialog(tr("It was not possible to run "
1167  "mytharchivehelper to burn the DVD."));
1168  return;
1169  }
1170 
1171  // now show the log viewer
1172  showLogViewer();
1173 }
1174 
1175 /* vim: set expandtab tabstop=4 shiftwidth=4: */
MythUIButton::Clicked
void Clicked()
MythUIButtonList::GetItemAt
MythUIButtonListItem * GetItemAt(int pos) const
Definition: mythuibuttonlist.cpp:1673
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:807
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:128
RecordingSelector::haveResult
void haveResult(bool ok)
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:315
ArchiveDestination
Definition: archiveutil.h:26
ArchiveItem::useCutlist
bool useCutlist
Definition: archiveutil.h:70
MythBurn::m_theme
QString m_theme
Definition: mythburn.h:112
MSqlQuery::size
int size(void) const
Definition: mythdbcon.h:215
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1587
ProfileDialog::m_okButton
MythUIButton * m_okButton
Definition: mythburn.h:49
mythuitext.h
mythuiprogressbar.h
fileselector.h
MythBurn::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythburn.cpp:125
MythBurn::handleCancel
void handleCancel(void)
Definition: mythburn.cpp:352
ProfileDialog::Create
bool Create() override
Definition: mythburn.cpp:1009
MythBurn::m_cancelButton
MythUIButton * m_cancelButton
Definition: mythburn.h:118
kMSDontBlockInputDevs
@ kMSDontBlockInputDevs
avoid blocking LIRC & Joystick Menu
Definition: mythsystem.h:36
mythdb.h
VideoSelector::haveResult
void haveResult(bool ok)
EncoderProfile
Definition: archiveutil.h:36
MythUIButtonListItem::DisplayState
void DisplayState(const QString &state, const QString &name)
Definition: mythuibuttonlist.cpp:3563
MythBurn::updateArchiveList
void updateArchiveList(void)
Definition: mythburn.cpp:384
ProfileDialog::m_profileList
QList< EncoderProfile * > m_profileList
Definition: mythburn.h:40
MythBurn::m_currentsizeErrorText
MythUIText * m_currentsizeErrorText
Definition: mythburn.h:130
MythBurn::m_minsizeText
MythUIText * m_minsizeText
Definition: mythburn.h:129
MythBurn::handlePrevPage
void handlePrevPage(void)
Definition: mythburn.cpp:347
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:386
ProfileDialog::m_archiveItem
ArchiveItem * m_archiveItem
Definition: mythburn.h:39
MythBurn::m_bCreateISO
bool m_bCreateISO
Definition: mythburn.h:108
MythBurn::m_prevButton
MythUIButton * m_prevButton
Definition: mythburn.h:117
ProfileDialog::m_oldSizeText
MythUIText * m_oldSizeText
Definition: mythburn.h:44
MythBurn::saveConfiguration
void saveConfiguration(void)
Definition: mythburn.cpp:701
ArchiveItem::newsize
int64_t newsize
Definition: archiveutil.h:61
MythBurn::removeItem
void removeItem(void)
Definition: mythburn.cpp:791
ArchiveDestination::freeSpace
int64_t freeSpace
Definition: archiveutil.h:31
MythBurn::m_addrecordingButton
MythUIButton * m_addrecordingButton
Definition: mythburn.h:122
MythBurn::m_destinationScreen
MythScreenType * m_destinationScreen
Definition: mythburn.h:101
EditMetadataDialog::haveResult
void haveResult(bool ok, ArchiveItem *item)
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
VideoSelector
Definition: videoselector.h:38
MythUIProgressBar::SetUsed
void SetUsed(int value)
Definition: mythuiprogressbar.cpp:69
MythBurn::toggleUseCutlist
void toggleUseCutlist(void)
Definition: mythburn.cpp:301
mythdialogbox.h
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:205
MythScreenStack
Definition: mythscreenstack.h:16
ArchiveItem::videoWidth
int videoWidth
Definition: archiveutil.h:67
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:608
logviewer.h
ArchiveItem::startTime
QString startTime
Definition: archiveutil.h:58
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
MythBurn::getProfileFromName
EncoderProfile * getProfileFromName(const QString &profileName)
Definition: mythburn.cpp:692
MythBurn::itemClicked
void itemClicked(MythUIButtonListItem *item)
Definition: mythburn.cpp:997
MythBurn::m_saveFilename
QString m_saveFilename
Definition: mythburn.h:111
build_compdb.file
file
Definition: build_compdb.py:55
MythBurn::m_bDoBurn
bool m_bDoBurn
Definition: mythburn.h:109
BurnMenu::BurnMenu
BurnMenu(void)
Definition: mythburn.cpp:1082
mythdirs.h
myth_system
uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
Definition: mythsystemlegacy.cpp:506
GENERIC_EXIT_OK
@ GENERIC_EXIT_OK
Exited with no error.
Definition: exitcodes.h:11
getTempDirectory
QString getTempDirectory(bool showError)
Definition: archiveutil.cpp:46
ArchiveItem::title
QString title
Definition: archiveutil.h:54
MythBurn::m_currentsizeText
MythUIText * m_currentsizeText
Definition: mythburn.h:131
MythBurn::m_profileList
QList< EncoderProfile * > m_profileList
Definition: mythburn.h:106
MythBurn::loadFile
static QString loadFile(const QString &filename)
Definition: mythburn.cpp:359
mythuibuttonlist.h
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1652
mythprogressdialog.h
ThumbFinder
Definition: thumbfinder.h:36
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:113
mythsystemlegacy.h
showWarningDialog
void showWarningDialog(const QString &msg)
Definition: archiveutil.cpp:272
MythBurn::m_nextButton
MythUIButton * m_nextButton
Definition: mythburn.h:116
MythUIButtonListItem::SetText
void SetText(const QString &text, const QString &name="", const QString &state="")
Definition: mythuibuttonlist.cpp:3268
MythBurn::editorClosed
void editorClosed(bool ok, ArchiveItem *item)
Definition: mythburn.cpp:839
ProfileDialog::save
void save(void)
Definition: mythburn.cpp:1073
MythRemoveDirectory
bool MythRemoveDirectory(QDir &aDir)
Definition: mythmiscutil.cpp:752
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
recordingselector.h
ArchiveItem::type
QString type
Definition: archiveutil.h:53
MythBurn::~MythBurn
~MythBurn(void) override
Definition: mythburn.cpp:59
mythdate.h
FileSelector
Definition: fileselector.h:39
MythUIProgressBar::SetTotal
void SetTotal(int value)
Definition: mythuiprogressbar.cpp:81
RecordingSelector
Definition: recordingselector.h:29
MythUIType::Show
void Show(void)
Definition: mythuitype.cpp:1147
MythBurn::ShowMenu
void ShowMenu(void) override
Definition: mythburn.cpp:751
GetConfDir
QString GetConfDir(void)
Definition: mythdirs.cpp:224
ArchiveItem::size
int64_t size
Definition: archiveutil.h:60
MythBurn::m_archiveDestination
ArchiveDestination m_archiveDestination
Definition: mythburn.h:103
hardwareprofile.scan.profile
profile
Definition: scan.py:99
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1104
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:238
archiveutil.h
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:118
hardwareprofile.i18n.t
t
Definition: i18n.py:36
getFileDetails
bool getFileDetails(ArchiveItem *a)
Definition: archiveutil.cpp:199
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
ArchiveDestination::type
ARCHIVEDESTINATION type
Definition: archiveutil.h:28
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:540
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:227
ProfileDialog::haveResult
void haveResult(int profile)
GetShareDir
QString GetShareDir(void)
Definition: mythdirs.cpp:222
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:206
videoselector.h
ProfileDialog
Definition: mythburn.h:19
ArchiveItem::startDate
QString startDate
Definition: archiveutil.h:57
MythBurn::handleAddFile
void handleAddFile(void)
Definition: mythburn.cpp:980
stringutil.h
EditMetadataDialog
Definition: editvideometadata.h:19
showLogViewer
void showLogViewer(void)
Definition: logviewer.cpp:25
MythBurn::m_addvideoButton
MythUIButton * m_addvideoButton
Definition: mythburn.h:123
ProfileDialog::profileChanged
void profileChanged(MythUIButtonListItem *item)
Definition: mythburn.cpp:1053
MythBurn::m_addfileButton
MythUIButton * m_addfileButton
Definition: mythburn.h:124
MythBurn::editDetails
void editDetails(void)
Definition: mythburn.cpp:804
MythBurn::m_archiveButtonList
MythUIButtonList * m_archiveButtonList
Definition: mythburn.h:120
MythUIBusyDialog
Definition: mythprogressdialog.h:36
thumbfinder.h
MythBurn::m_bEraseDvdRw
bool m_bEraseDvdRw
Definition: mythburn.h:110
MythBurn::MythBurn
MythBurn(MythScreenStack *parent, MythScreenType *destinationScreen, MythScreenType *themeScreen, const ArchiveDestination &archiveDestination, const QString &name)
Definition: mythburn.cpp:43
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3665
MythBurn::Create
bool Create(void) override
Definition: mythburn.cpp:72
uint
unsigned int uint
Definition: compat.h:79
editmetadata.h
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:54
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
MythBurn::isArchiveItemValid
static bool isArchiveItemValid(const QString &type, const QString &filename)
Definition: mythburn.cpp:467
MythBurn::m_archiveList
QList< ArchiveItem * > m_archiveList
Definition: mythburn.h:105
ArchiveItem::encoderProfile
EncoderProfile * encoderProfile
Definition: archiveutil.h:64
MythUIType::Hide
void Hide(void)
Definition: mythuitype.cpp:1142
StringUtil::formatKBytes
MBASE_PUBLIC QString formatKBytes(int64_t sizeKB, int prec=1)
Definition: stringutil.cpp:357
kMSRunBackground
@ kMSRunBackground
run child in the background
Definition: mythsystem.h:38
mythuihelper.h
MythBurn::loadConfiguration
void loadConfiguration(void)
Definition: mythburn.cpp:641
ProfileDialog::m_profileBtnList
MythUIButtonList * m_profileBtnList
Definition: mythburn.h:47
MythBurn::runScript
void runScript()
Definition: mythburn.cpp:895
ProfileDialog::m_captionText
MythUIText * m_captionText
Definition: mythburn.h:42
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:404
mythmiscutil.h
ArchiveItem::videoHeight
int videoHeight
Definition: archiveutil.h:68
mythburn.h
MythBurn::m_sizeBar
MythUIProgressBar * m_sizeBar
Definition: mythburn.h:127
MythBurn::selectorClosed
void selectorClosed(bool ok)
Definition: mythburn.cpp:950
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:695
ProfileDialog::m_newSizeText
MythUIText * m_newSizeText
Definition: mythburn.h:45
MythBurn::m_nofilesText
MythUIText * m_nofilesText
Definition: mythburn.h:121
MythBurn::editThumbnails
void editThumbnails(void)
Definition: mythburn.cpp:823
MSqlQuery::bindValue
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:883
FileSelector::haveResult
void haveResult(bool ok)
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:41
BurnMenu::customEvent
void customEvent(QEvent *event) override
Definition: mythburn.cpp:1115
MythBurn::m_moveMode
bool m_moveMode
Definition: mythburn.h:114
MythBurn::handleNextPage
void handleNextPage(void)
Definition: mythburn.cpp:336
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:132
MythBurn::loadEncoderProfiles
void loadEncoderProfiles(void)
Definition: mythburn.cpp:226
mythcontext.h
ProfileDialog::m_descriptionText
MythUIText * m_descriptionText
Definition: mythburn.h:43
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:116
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:102
MythUIButtonList::MoveToNamedPosition
bool MoveToNamedPosition(const QString &position_name)
Definition: mythuibuttonlist.cpp:2279
MythBurn::handleAddVideo
void handleAddVideo(void)
Definition: mythburn.cpp:956
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1554
MythBurn::profileChanged
void profileChanged(int profileNo)
Definition: mythburn.cpp:872
build_compdb.action
action
Definition: build_compdb.py:9
MythBurn::changeProfile
void changeProfile(void)
Definition: mythburn.cpp:852
BurnMenu::start
void start(void)
Definition: mythburn.cpp:1088
MythBurn::createConfigFile
void createConfigFile(const QString &filename)
Definition: mythburn.cpp:556
mythuibutton.h
recalcItemSize
void recalcItemSize(ArchiveItem *item)
Definition: archiveutil.cpp:281
logPropagateQuiet
bool logPropagateQuiet(void)
Check if we are propagating a "--quiet".
Definition: logging.cpp:663
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:320
ArchiveItem::subtitle
QString subtitle
Definition: archiveutil.h:55
FSTYPE_FILELIST
@ FSTYPE_FILELIST
Definition: fileselector.h:28
MythBurn::handleAddRecording
void handleAddRecording(void)
Definition: mythburn.cpp:937
logPropagateArgs
QString logPropagateArgs
Definition: logging.cpp:86
ArchiveItem
Definition: archiveutil.h:50
MythBurn::m_maxsizeText
MythUIText * m_maxsizeText
Definition: mythburn.h:128
kMSDontDisableDrawing
@ kMSDontDisableDrawing
avoid disabling UI drawing
Definition: mythsystem.h:37
MythCoreContext::SaveSetting
void SaveSetting(const QString &key, int newValue)
Definition: mythcorecontext.cpp:879
getBaseName
QString getBaseName(const QString &filename)
Definition: archiveutil.cpp:123
MythBurn::m_themeScreen
MythScreenType * m_themeScreen
Definition: mythburn.h:102
mythuicheckbox.h
exitcodes.h
MythBurn::getDefaultProfile
EncoderProfile * getDefaultProfile(ArchiveItem *item)
Definition: mythburn.cpp:506
MythUIButtonList::GetItemFirst
MythUIButtonListItem * GetItemFirst() const
Definition: mythuibuttonlist.cpp:1633
MythBurn::updateSizeBar
void updateSizeBar()
Definition: mythburn.cpp:189
build_compdb.filename
filename
Definition: build_compdb.py:21
GENERIC_EXIT_RUNNING
@ GENERIC_EXIT_RUNNING
Process is running.
Definition: exitcodes.h:26
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:50
MythUIButtonListItem::MoveUpDown
bool MoveUpDown(bool flag)
Definition: mythuibuttonlist.cpp:3670
ShowOkPopup
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
Definition: mythdialogbox.cpp:563
build_compdb.options
options
Definition: build_compdb.py:11
EncoderProfile::name
QString name
Definition: archiveutil.h:38
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:896
ArchiveItem::videoCodec
QString videoCodec
Definition: archiveutil.h:66
BurnMenu::doBurn
static void doBurn(int mode)
Definition: mythburn.cpp:1127
MSqlQuery::prepare
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:832