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