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  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  handled = false;
180  }
181 
182  if (!handled && MythScreenType::keyPressEvent(event))
183  handled = true;
184 
185  return handled;
186 }
187 
189 {
190  int64_t size = 0;
191  for (const auto *a : qAsConst(m_archiveList))
192  size += a->newsize;
193 
194  uint usedSpace = size / 1024 / 1024;
195 
196  QString tmpSize;
197 
199  m_sizeBar->SetUsed(usedSpace);
200 
201  tmpSize = QString("%1 Mb").arg(m_archiveDestination.freeSpace / 1024);
202 
203  m_maxsizeText->SetText(tmpSize);
204 
205  m_minsizeText->SetText("0 Mb");
206 
207  tmpSize = QString("%1 Mb").arg(usedSpace);
208 
209  if (usedSpace > m_archiveDestination.freeSpace / 1024)
210  {
212 
215  }
216  else
217  {
219 
220  m_currentsizeText->SetText(tmpSize);
222  }
223 }
224 
226 {
227  auto *item = new EncoderProfile;
228  item->name = "NONE";
229  item->description = "";
230  item->bitrate = 0.0F;
231  m_profileList.append(item);
232 
233  // find the encoding profiles
234  // first look in the ConfDir (~/.mythtv)
235  QString filename = GetConfDir() +
236  "/MythArchive/ffmpeg_dvd_" +
237  ((gCoreContext->GetSetting("MythArchiveVideoFormat", "pal")
238  .toLower() == "ntsc") ? "ntsc" : "pal") + ".xml";
239 
240  if (!QFile::exists(filename))
241  {
242  // not found yet so use the default profiles
243  filename = GetShareDir() +
244  "mytharchive/encoder_profiles/ffmpeg_dvd_" +
245  ((gCoreContext->GetSetting("MythArchiveVideoFormat", "pal")
246  .toLower() == "ntsc") ? "ntsc" : "pal") + ".xml";
247  }
248 
249  LOG(VB_GENERAL, LOG_NOTICE,
250  "MythArchive: Loading encoding profiles from " + filename);
251 
252  QDomDocument doc("mydocument");
253  QFile file(filename);
254  if (!file.open(QIODevice::ReadOnly))
255  return;
256 
257  if (!doc.setContent( &file ))
258  {
259  file.close();
260  return;
261  }
262  file.close();
263 
264  QDomElement docElem = doc.documentElement();
265  QDomNodeList profileNodeList = doc.elementsByTagName("profile");
266  QString name;
267  QString desc;
268  QString bitrate;
269 
270  for (int x = 0; x < profileNodeList.count(); x++)
271  {
272  QDomNode n = profileNodeList.item(x);
273  QDomElement e = n.toElement();
274  QDomNode n2 = e.firstChild();
275  while (!n2.isNull())
276  {
277  QDomElement e2 = n2.toElement();
278  if(!e2.isNull())
279  {
280  if (e2.tagName() == "name")
281  name = e2.text();
282  if (e2.tagName() == "description")
283  desc = e2.text();
284  if (e2.tagName() == "bitrate")
285  bitrate = e2.text();
286 
287  }
288  n2 = n2.nextSibling();
289 
290  }
291 
292  auto *item2 = new EncoderProfile;
293  item2->name = name;
294  item2->description = desc;
295  item2->bitrate = bitrate.toFloat();
296  m_profileList.append(item2);
297  }
298 }
299 
301 {
303  auto *a = item->GetData().value<ArchiveItem *>();
304 
305  if (!a)
306  return;
307 
308  if (!a->hasCutlist)
309  return;
310 
311  a->useCutlist = !a->useCutlist;
312 
313  if (a->hasCutlist)
314  {
315  if (a->useCutlist)
316  {
317  item->SetText(tr("Using Cut List"), "cutlist");
318  item->DisplayState("using", "cutliststatus");
319  }
320  else
321  {
322  item->SetText(tr("Not Using Cut List"), "cutlist");
323  item->DisplayState("notusing", "cutliststatus");
324  }
325  }
326  else
327  {
328  item->SetText(tr("No Cut List"), "cutlist");
329  item->DisplayState("none", "cutliststatus");
330  }
331  recalcItemSize(a);
332  updateSizeBar();
333 }
334 
336 {
337  if (m_archiveList.empty())
338  {
339  ShowOkPopup(tr("You need to add at least one item to archive!"));
340  return;
341  }
342 
343  runScript();
344 }
345 
347 {
348  Close();
349 }
350 
352 {
354  m_themeScreen->Close();
355  Close();
356 }
357 
358 QString MythBurn::loadFile(const QString &filename)
359 {
360  QString res = "";
361 
362  QFile file(filename);
363 
364  if (!file.exists())
365  return "";
366 
367  if (file.open( QIODevice::ReadOnly ))
368  {
369  QTextStream stream(&file);
370 
371  while ( !stream.atEnd() )
372  {
373  res = res + stream.readLine();
374  }
375  file.close();
376  }
377  else
378  return "";
379 
380  return res;
381 }
382 
384 {
385  QString message = tr("Retrieving File Information. Please Wait...");
386 
387  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
388 
389  auto *busyPopup = new
390  MythUIBusyDialog(message, popupStack, "mythburnbusydialog");
391 
392  if (busyPopup->Create())
393  popupStack->AddScreen(busyPopup, false);
394  else
395  {
396  delete busyPopup;
397  busyPopup = nullptr;
398  }
399 
400  QCoreApplication::processEvents();
401 
403 
404  if (m_archiveList.empty())
405  {
406  m_nofilesText->Show();
407  }
408  else
409  {
410  for (auto *a : qAsConst(m_archiveList))
411  {
412  QCoreApplication::processEvents();
413  // get duration of this file
414  if (a->duration == 0)
415  {
416  if (!getFileDetails(a))
417  LOG(VB_GENERAL, LOG_ERR,
418  QString("MythBurn: failed to get file details for: %1").arg(a->filename));
419  }
420 
421  // get default encoding profile if needed
422 
423  if (a->encoderProfile == nullptr)
424  a->encoderProfile = getDefaultProfile(a);
425 
426  recalcItemSize(a);
427 
428  auto* item = new MythUIButtonListItem(m_archiveButtonList, a->title);
429  item->SetData(QVariant::fromValue(a));
430  item->SetText(a->subtitle, "subtitle");
431  item->SetText(a->startDate + " " + a->startTime, "date");
432  item->SetText(StringUtil::formatKBytes(a->newsize / 1024, 2), "size");
433  if (a->hasCutlist)
434  {
435  if (a->useCutlist)
436  {
437  item->SetText(tr("Using Cut List"), "cutlist");
438  item->DisplayState("using", "cutliststatus");
439  }
440  else
441  {
442  item->SetText(tr("Not Using Cut List"), "cutlist");
443  item->DisplayState("notusing", "cutliststatus");
444  }
445  }
446  else
447  {
448  item->SetText(tr("No Cut List"), "cutlist");
449  item->DisplayState("none", "cutliststatus");
450  }
451  item->SetText(tr("Encoder: ") + a->encoderProfile->name, "profile");
452  }
453 
454  m_nofilesText->Hide();
455 
458  }
459 
460  updateSizeBar();
461 
462  if (busyPopup)
463  busyPopup->Close();
464 }
465 
466 bool MythBurn::isArchiveItemValid(const QString &type, const QString &filename)
467 {
468  if (type == "Recording")
469  {
470  QString baseName = getBaseName(filename);
471 
472  MSqlQuery query(MSqlQuery::InitCon());
473  query.prepare("SELECT title FROM recorded WHERE basename = :FILENAME");
474  query.bindValue(":FILENAME", baseName);
475  if (query.exec() && query.size())
476  return true;
477  LOG(VB_GENERAL, LOG_ERR,
478  QString("MythArchive: Recording not found (%1)")
479  .arg(filename));
480  }
481  else if (type == "Video")
482  {
483  MSqlQuery query(MSqlQuery::InitCon());
484  query.prepare("SELECT title FROM videometadata"
485  " WHERE filename = :FILENAME");
486  query.bindValue(":FILENAME", filename);
487  if (query.exec() && query.size())
488  return true;
489  LOG(VB_GENERAL, LOG_ERR,
490  QString("MythArchive: Video not found (%1)").arg(filename));
491  }
492  else if (type == "File")
493  {
494  if (QFile::exists(filename))
495  return true;
496  LOG(VB_GENERAL, LOG_ERR,
497  QString("MythArchive: File not found (%1)").arg(filename));
498  }
499 
500  LOG(VB_GENERAL, LOG_NOTICE, "MythArchive: Archive item removed from list");
501 
502  return false;
503 }
504 
506 {
507  if (!item)
508  return m_profileList.at(0);
509 
510  EncoderProfile *profile = nullptr;
511 
512  // is the file an mpeg2 file?
513  if (item->videoCodec.toLower() == "mpeg2video (main)")
514  {
515  // does the file already have a valid DVD resolution?
516  if (gCoreContext->GetSetting("MythArchiveVideoFormat", "pal").toLower()
517  == "ntsc")
518  {
519  if ((item->videoWidth == 720 && item->videoHeight == 480) ||
520  (item->videoWidth == 704 && item->videoHeight == 480) ||
521  (item->videoWidth == 352 && item->videoHeight == 480) ||
522  (item->videoWidth == 352 && item->videoHeight == 240))
523  {
524  // don't need to re-encode
525  profile = m_profileList.at(0);
526  }
527  }
528  else
529  {
530  if ((item->videoWidth == 720 && item->videoHeight == 576) ||
531  (item->videoWidth == 704 && item->videoHeight == 576) ||
532  (item->videoWidth == 352 && item->videoHeight == 576) ||
533  (item->videoWidth == 352 && item->videoHeight == 288))
534  {
535  // don't need to re-encode
536  profile = m_profileList.at(0);
537  }
538  }
539  }
540 
541  if (!profile)
542  {
543  // file needs re-encoding - use default profile setting
544  QString defaultProfile =
545  gCoreContext->GetSetting("MythArchiveDefaultEncProfile", "SP");
546 
547  for (auto *x : qAsConst(m_profileList))
548  if (x->name == defaultProfile)
549  profile = x;
550  }
551 
552  return profile;
553 }
554 
556 {
557  QDomDocument doc("mythburn");
558 
559  QDomElement root = doc.createElement("mythburn");
560  doc.appendChild(root);
561 
562  QDomElement job = doc.createElement("job");
563  job.setAttribute("theme", m_theme);
564  root.appendChild(job);
565 
566  QDomElement media = doc.createElement("media");
567  job.appendChild(media);
568 
569  // now loop though selected archive items and add them to the xml file
570  for (int x = 0; x < m_archiveButtonList->GetCount(); x++)
571  {
573  if (!item)
574  continue;
575 
576  auto *a = item->GetData().value<ArchiveItem *>();
577  if (!a)
578  continue;
579 
580  QDomElement file = doc.createElement("file");
581  file.setAttribute("type", a->type.toLower() );
582  file.setAttribute("usecutlist", static_cast<int>(a->useCutlist));
583  file.setAttribute("filename", a->filename);
584  file.setAttribute("encodingprofile", a->encoderProfile->name);
585  if (a->editedDetails)
586  {
587  QDomElement details = doc.createElement("details");
588  file.appendChild(details);
589  details.setAttribute("title", a->title);
590  details.setAttribute("subtitle", a->subtitle);
591  details.setAttribute("startdate", a->startDate);
592  details.setAttribute("starttime", a->startTime);
593  QDomText desc = doc.createTextNode(a->description);
594  details.appendChild(desc);
595  }
596 
597  if (!a->thumbList.empty())
598  {
599  QDomElement thumbs = doc.createElement("thumbimages");
600  file.appendChild(thumbs);
601 
602  for (auto *thumbImage : qAsConst(a->thumbList))
603  {
604  QDomElement thumb = doc.createElement("thumb");
605  thumbs.appendChild(thumb);
606  thumb.setAttribute("caption", thumbImage->caption);
607  thumb.setAttribute("filename", thumbImage->filename);
608  thumb.setAttribute("frame", (int) thumbImage->frame);
609  }
610  }
611 
612  media.appendChild(file);
613  }
614 
615  // add the options to the xml file
616  QDomElement options = doc.createElement("options");
617  options.setAttribute("createiso", static_cast<int>(m_bCreateISO));
618  options.setAttribute("doburn", static_cast<int>(m_bDoBurn));
619  options.setAttribute("mediatype", m_archiveDestination.type);
620  options.setAttribute("dvdrsize", (qint64)m_archiveDestination.freeSpace);
621  options.setAttribute("erasedvdrw", static_cast<int>(m_bEraseDvdRw));
622  options.setAttribute("savefilename", m_saveFilename);
623  job.appendChild(options);
624 
625  // finally save the xml to the file
626  QFile f(filename);
627  if (!f.open(QIODevice::WriteOnly))
628  {
629  LOG(VB_GENERAL, LOG_ERR,
630  QString("MythBurn::createConfigFile: "
631  "Failed to open file for writing - %1") .arg(filename));
632  return;
633  }
634 
635  QTextStream t(&f);
636  t << doc.toString(4);
637  f.close();
638 }
639 
641 {
642  m_theme = gCoreContext->GetSetting("MythBurnMenuTheme", "");
643  m_bCreateISO = (gCoreContext->GetSetting("MythBurnCreateISO", "0") == "1");
644  m_bDoBurn = (gCoreContext->GetSetting("MythBurnBurnDVDr", "1") == "1");
645  m_bEraseDvdRw = (gCoreContext->GetSetting("MythBurnEraseDvdRw", "0") == "1");
646  m_saveFilename = gCoreContext->GetSetting("MythBurnSaveFilename", "");
647 
648  while (!m_archiveList.isEmpty())
649  delete m_archiveList.takeFirst();
650  m_archiveList.clear();
651 
652  // load selected file list
653  MSqlQuery query(MSqlQuery::InitCon());
654  query.prepare("SELECT type, title, subtitle, description, startdate, "
655  "starttime, size, filename, hascutlist, duration, "
656  "cutduration, videowidth, videoheight, filecodec, "
657  "videocodec, encoderprofile FROM archiveitems "
658  "ORDER BY intid;");
659 
660  if (!query.exec())
661  {
662  MythDB::DBError("archive item insert", query);
663  return;
664  }
665 
666  while (query.next())
667  {
668  auto *a = new ArchiveItem;
669  a->type = query.value(0).toString();
670  a->title = query.value(1).toString();
671  a->subtitle = query.value(2).toString();
672  a->description = query.value(3).toString();
673  a->startDate = query.value(4).toString();
674  a->startTime = query.value(5).toString();
675  a->size = query.value(6).toLongLong();
676  a->filename = query.value(7).toString();
677  a->hasCutlist = (query.value(8).toInt() == 1);
678  a->useCutlist = false;
679  a->duration = query.value(9).toInt();
680  a->cutDuration = query.value(10).toInt();
681  a->videoWidth = query.value(11).toInt();
682  a->videoHeight = query.value(12).toInt();
683  a->fileCodec = query.value(13).toString();
684  a->videoCodec = query.value(14).toString();
685  a->encoderProfile = getProfileFromName(query.value(15).toString());
686  a->editedDetails = false;
687  m_archiveList.append(a);
688  }
689 }
690 
691 EncoderProfile *MythBurn::getProfileFromName(const QString &profileName)
692 {
693  for (auto *x : qAsConst(m_profileList))
694  if (x->name == profileName)
695  return x;
696 
697  return nullptr;
698 }
699 
701 {
702  // remove all old archive items from DB
703  MSqlQuery query(MSqlQuery::InitCon());
704  query.prepare("DELETE FROM archiveitems;");
705  if (!query.exec())
706  MythDB::DBError("MythBurn::saveConfiguration - deleting archiveitems",
707  query);
708 
709  // save new list of archive items to DB
710  for (int x = 0; x < m_archiveButtonList->GetCount(); x++)
711  {
713  if (!item)
714  continue;
715 
716  auto *a = item->GetData().value<ArchiveItem *>();
717  if (!a)
718  continue;
719 
720  query.prepare("INSERT INTO archiveitems (type, title, subtitle, "
721  "description, startdate, starttime, size, filename, "
722  "hascutlist, duration, cutduration, videowidth, "
723  "videoheight, filecodec, videocodec, encoderprofile) "
724  "VALUES(:TYPE, :TITLE, :SUBTITLE, :DESCRIPTION, :STARTDATE, "
725  ":STARTTIME, :SIZE, :FILENAME, :HASCUTLIST, :DURATION, "
726  ":CUTDURATION, :VIDEOWIDTH, :VIDEOHEIGHT, :FILECODEC, "
727  ":VIDEOCODEC, :ENCODERPROFILE);");
728  query.bindValue(":TYPE", a->type);
729  query.bindValue(":TITLE", a->title);
730  query.bindValue(":SUBTITLE", a->subtitle);
731  query.bindValue(":DESCRIPTION", a->description);
732  query.bindValue(":STARTDATE", a->startDate);
733  query.bindValue(":STARTTIME", a->startTime);
734  query.bindValue(":SIZE", (qint64)a->size);
735  query.bindValue(":FILENAME", a->filename);
736  query.bindValue(":HASCUTLIST", a->hasCutlist);
737  query.bindValue(":DURATION", a->duration);
738  query.bindValue(":CUTDURATION", a->cutDuration);
739  query.bindValue(":VIDEOWIDTH", a->videoWidth);
740  query.bindValue(":VIDEOHEIGHT", a->videoHeight);
741  query.bindValue(":FILECODEC", a->fileCodec);
742  query.bindValue(":VIDEOCODEC", a->videoCodec);
743  query.bindValue(":ENCODERPROFILE", a->encoderProfile->name);
744 
745  if (!query.exec())
746  MythDB::DBError("archive item insert", query);
747  }
748 }
749 
751 {
752  if (m_archiveList.empty())
753  return;
754 
756  auto *curItem = item->GetData().value<ArchiveItem *>();
757 
758  if (!curItem)
759  return;
760 
761  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
762 
763  auto *menuPopup = new MythDialogBox(tr("Menu"), popupStack, "actionmenu");
764 
765  if (menuPopup->Create())
766  popupStack->AddScreen(menuPopup);
767 
768  menuPopup->SetReturnEvent(this, "action");
769 
770  if (curItem->hasCutlist)
771  {
772  if (curItem->useCutlist)
773  {
774  menuPopup->AddButton(tr("Don't Use Cut List"),
776  }
777  else
778  {
779  menuPopup->AddButton(tr("Use Cut List"),
781  }
782  }
783 
784  menuPopup->AddButton(tr("Remove Item"), &MythBurn::removeItem);
785  menuPopup->AddButton(tr("Edit Details"), &MythBurn::editDetails);
786  menuPopup->AddButton(tr("Change Encoding Profile"), &MythBurn::changeProfile);
787  menuPopup->AddButton(tr("Edit Thumbnails"), &MythBurn::editThumbnails);
788 }
789 
791 {
793  auto *curItem = item->GetData().value<ArchiveItem *>();
794 
795  if (!curItem)
796  return;
797 
798  m_archiveList.removeAll(curItem);
799 
801 }
802 
804 {
806  auto *curItem = item->GetData().value<ArchiveItem *>();
807 
808  if (!curItem)
809  return;
810 
812 
813  auto *editor = new EditMetadataDialog(mainStack, curItem);
814 
815  connect(editor, &EditMetadataDialog::haveResult,
816  this, &MythBurn::editorClosed);
817 
818  if (editor->Create())
819  mainStack->AddScreen(editor);
820 }
821 
823 {
825  auto *curItem = item->GetData().value<ArchiveItem *>();
826 
827  if (!curItem)
828  return;
829 
831 
832  auto *finder = new ThumbFinder(mainStack, curItem, m_theme);
833 
834  if (finder->Create())
835  mainStack->AddScreen(finder);
836 }
837 
839 {
841 
842  if (ok && item && gridItem)
843  {
844  // update the grid to reflect any changes
845  gridItem->SetText(item->title);
846  gridItem->SetText(item->subtitle, "subtitle");
847  gridItem->SetText(item->startDate + " " + item->startTime, "date");
848  }
849 }
850 
852 {
854  auto *curItem = item->GetData().value<ArchiveItem *>();
855 
856  if (!curItem)
857  return;
858 
859  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
860 
861  auto *profileDialog = new ProfileDialog(popupStack, curItem, m_profileList);
862 
863  if (profileDialog->Create())
864  {
865  popupStack->AddScreen(profileDialog, false);
866  connect(profileDialog, &ProfileDialog::haveResult,
867  this, &MythBurn::profileChanged);
868  }
869 }
870 
871 void MythBurn::profileChanged(int profileNo)
872 {
873  if (profileNo > m_profileList.size() - 1)
874  return;
875 
876  EncoderProfile *profile = m_profileList.at(profileNo);
877 
879  if (!item)
880  return;
881 
882  auto *archiveItem = item->GetData().value<ArchiveItem *>();
883  if (!archiveItem)
884  return;
885 
886  archiveItem->encoderProfile = profile;
887 
888  item->SetText(profile->name, "profile");
889  item->SetText(StringUtil::formatKBytes(archiveItem->newsize / 1024, 2), "size");
890 
891  updateSizeBar();
892 }
893 
895 {
896  QString tempDir = getTempDirectory();
897  QString logDir = tempDir + "logs";
898  QString configDir = tempDir + "config";
899  QString commandline;
900 
901  // remove any existing logs
902  myth_system("rm -f " + logDir + "/*.log");
903 
904  // remove cancel flag file if present
905  if (QFile::exists(logDir + "/mythburncancel.lck"))
906  QFile::remove(logDir + "/mythburncancel.lck");
907 
908  createConfigFile(configDir + "/mydata.xml");
909  commandline = PYTHON_EXE;
910  commandline += " " + GetShareDir() + "mytharchive/scripts/mythburn.py";
911  commandline += " -j " + configDir + "/mydata.xml"; // job file
912  commandline += " -l " + logDir + "/progress.log"; // progress log
913  commandline += " > " + logDir + "/mythburn.log 2>&1 &"; // Logs
914 
915  gCoreContext->SaveSetting("MythArchiveLastRunStatus", "Running");
916 
919  uint retval = myth_system(commandline, flags);
920  if (retval != GENERIC_EXIT_RUNNING && retval != GENERIC_EXIT_OK)
921  {
922  ShowOkPopup(tr("It was not possible to create the DVD. "
923  " An error occured when running the scripts"));
924  }
925  else
926  {
927  // now show the log viewer
928  showLogViewer();
929  }
930 
932  m_themeScreen->Close();
933  Close();
934 }
935 
937 {
939 
940  auto *selector = new RecordingSelector(mainStack, &m_archiveList);
941 
942  connect(selector, &RecordingSelector::haveResult,
943  this, &MythBurn::selectorClosed);
944 
945  if (selector->Create())
946  mainStack->AddScreen(selector);
947 }
948 
950 {
951  if (ok)
953 }
954 
956 {
957  MSqlQuery query(MSqlQuery::InitCon());
958  query.prepare("SELECT title FROM videometadata");
959  if (query.exec() && query.size())
960  {
961  }
962  else
963  {
964  ShowOkPopup(tr("You don't have any videos!"));
965  return;
966  }
967 
969 
970  auto *selector = new VideoSelector(mainStack, &m_archiveList);
971 
972  connect(selector, &VideoSelector::haveResult,
973  this, &MythBurn::selectorClosed);
974 
975  if (selector->Create())
976  mainStack->AddScreen(selector);
977 }
978 
980 {
981  QString filter = gCoreContext->GetSetting("MythArchiveFileFilter",
982  "*.mpg *.mpeg *.mov *.avi *.nuv");
983 
985 
986  auto *selector = new FileSelector(mainStack, &m_archiveList,
987  FSTYPE_FILELIST, "/", filter);
988 
989  connect(selector, qOverload<bool>(&FileSelector::haveResult),
990  this, &MythBurn::selectorClosed);
991 
992  if (selector->Create())
993  mainStack->AddScreen(selector);
994 }
995 
997 {
999 
1000  if (m_moveMode)
1001  item->DisplayState("on", "movestate");
1002  else
1003  item->DisplayState("off", "movestate");
1004 }
1005 
1007 
1009 {
1010  if (!LoadWindowFromXML("mythburn-ui.xml", "profilepopup", this))
1011  return false;
1012 
1013  bool err = false;
1014  UIUtilE::Assign(this, m_captionText, "caption_text", &err);
1015  UIUtilE::Assign(this, m_descriptionText, "description_text", &err);
1016  UIUtilE::Assign(this, m_oldSizeText, "oldsize_text", &err);
1017  UIUtilE::Assign(this, m_newSizeText, "newsize_text", &err);
1018  UIUtilE::Assign(this, m_profileBtnList, "profile_list", &err);
1019  UIUtilE::Assign(this, m_okButton, "ok_button", &err);
1020 
1021  if (err)
1022  {
1023  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'profilepopup'");
1024  return false;
1025  }
1026 
1027  for (auto *x : qAsConst(m_profileList))
1028  {
1029  auto *item = new
1031  item->SetData(QVariant::fromValue(x));
1032  }
1033 
1036 
1037 
1039 
1042 
1044 
1045  BuildFocusList();
1046 
1048 
1049  return true;
1050 }
1051 
1053 {
1054  if (!item)
1055  return;
1056 
1057  auto *profile = item->GetData().value<EncoderProfile *>();
1058  if (!profile)
1059  return;
1060 
1061  m_descriptionText->SetText(profile->description);
1062 
1064 
1065  // calc new size
1067 
1069 }
1070 
1071 
1073 {
1075 
1076  Close();
1077 }
1078 
1080 
1082  :QObject(nullptr)
1083 {
1084  setObjectName("BurnMenu");
1085 }
1086 
1088 {
1089  if (!gCoreContext->GetSetting("MythArchiveLastRunStatus").startsWith("Success"))
1090  {
1091  showWarningDialog(tr("Cannot burn a DVD.\n"
1092  "The last run failed to create a DVD."));
1093  return;
1094  }
1095 
1096  // ask the user what type of disk to burn to
1097  QString title = tr("Burn DVD");
1098  QString msg = tr("\nPlace a blank DVD in the"
1099  " drive and select an option below.");
1100  MythScreenStack *mainStack = GetMythMainWindow()->GetStack("main stack");
1101  auto *menuPopup = new MythDialogBox(title, msg, mainStack,
1102  "actionmenu", true);
1103 
1104  if (menuPopup->Create())
1105  mainStack->AddScreen(menuPopup);
1106 
1107  menuPopup->SetReturnEvent(this, "action");
1108 
1109  menuPopup->AddButton(tr("Burn DVD"));
1110  menuPopup->AddButton(tr("Burn DVD Rewritable"));
1111  menuPopup->AddButton(tr("Burn DVD Rewritable (Force Erase)"));
1112 }
1113 
1114 void BurnMenu::customEvent(QEvent *event)
1115 {
1116  if (auto *dce = dynamic_cast<DialogCompletionEvent*>(event))
1117  {
1118  if (dce->GetId() == "action")
1119  {
1120  doBurn(dce->GetResult());
1121  deleteLater();
1122  }
1123  }
1124 }
1125 
1126 void BurnMenu::doBurn(int mode)
1127 {
1128  if ((mode < 0) || (mode > 2))
1129  return;
1130 
1131  QString tempDir = getTempDirectory(true);
1132 
1133  if (tempDir == "")
1134  return;
1135 
1136  QString logDir = tempDir + "logs";
1137  QString commandline;
1138 
1139  // remove existing progress.log if present
1140  if (QFile::exists(logDir + "/progress.log"))
1141  QFile::remove(logDir + "/progress.log");
1142 
1143  // remove cancel flag file if present
1144  if (QFile::exists(logDir + "/mythburncancel.lck"))
1145  QFile::remove(logDir + "/mythburncancel.lck");
1146 
1147  QString sArchiveFormat = QString::number(mode);
1148  bool bEraseDVDRW = (mode == 2);
1149  bool bNativeFormat = gCoreContext->GetSetting("MythArchiveLastRunType")
1150  .startsWith("Native");
1151 
1152  commandline = "mytharchivehelper --burndvd --mediatype " + sArchiveFormat +
1153  (bEraseDVDRW ? " --erasedvdrw" : "") +
1154  (bNativeFormat ? " --nativeformat" : "");
1155  commandline += logPropagateArgs;
1156  if (!logPropagateQuiet())
1157  commandline += " --quiet";
1158  commandline += " > " + logDir + "/progress.log 2>&1 &";
1159 
1162  uint retval = myth_system(commandline, flags);
1163  if (retval != GENERIC_EXIT_RUNNING && retval != GENERIC_EXIT_OK)
1164  {
1165  showWarningDialog(tr("It was not possible to run "
1166  "mytharchivehelper to burn the DVD."));
1167  return;
1168  }
1169 
1170  // now show the log viewer
1171  showLogViewer();
1172 }
1173 
1174 /* 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:811
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:318
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:124
MythBurn::handleCancel
void handleCancel(void)
Definition: mythburn.cpp:351
ProfileDialog::Create
bool Create() override
Definition: mythburn.cpp:1008
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:383
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:346
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:700
ArchiveItem::newsize
int64_t newsize
Definition: archiveutil.h:61
MythBurn::removeItem
void removeItem(void)
Definition: mythburn.cpp:790
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:300
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:617
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:691
MythBurn::itemClicked
void itemClicked(MythUIButtonListItem *item)
Definition: mythburn.cpp:996
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:1081
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:358
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:838
ProfileDialog::save
void save(void)
Definition: mythburn.cpp:1072
MythRemoveDirectory
bool MythRemoveDirectory(QDir &aDir)
Definition: mythmiscutil.cpp:756
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:81
RecordingSelector
Definition: recordingselector.h:29
MythUIType::Show
void Show(void)
Definition: mythuitype.cpp:1147
MythBurn::ShowMenu
void ShowMenu(void) override
Definition: mythburn.cpp:750
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: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:1111
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:549
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:226
ProfileDialog::haveResult
void haveResult(int profile)
GetShareDir
QString GetShareDir(void)
Definition: mythdirs.cpp:254
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:979
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:1052
MythBurn::m_addfileButton
MythUIButton * m_addfileButton
Definition: mythburn.h:124
MythBurn::editDetails
void editDetails(void)
Definition: mythburn.cpp:803
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:3665
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:466
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:640
ProfileDialog::m_profileBtnList
MythUIButtonList * m_profileBtnList
Definition: mythburn.h:47
MythBurn::runScript
void runScript()
Definition: mythburn.cpp:894
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:949
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:822
MSqlQuery::bindValue
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:887
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:1114
MythBurn::m_moveMode
bool m_moveMode
Definition: mythburn.h:114
MythBurn::handleNextPage
void handleNextPage(void)
Definition: mythburn.cpp:335
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:132
MythBurn::loadEncoderProfiles
void loadEncoderProfiles(void)
Definition: mythburn.cpp:225
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:2279
MythBurn::handleAddVideo
void handleAddVideo(void)
Definition: mythburn.cpp:955
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1554
MythBurn::profileChanged
void profileChanged(int profileNo)
Definition: mythburn.cpp:871
build_compdb.action
action
Definition: build_compdb.py:9
MythBurn::changeProfile
void changeProfile(void)
Definition: mythburn.cpp:851
BurnMenu::start
void start(void)
Definition: mythburn.cpp:1087
MythBurn::createConfigFile
void createConfigFile(const QString &filename)
Definition: mythburn.cpp:555
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:619
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:323
ArchiveItem::subtitle
QString subtitle
Definition: archiveutil.h:55
FSTYPE_FILELIST
@ FSTYPE_FILELIST
Definition: fileselector.h:28
MythBurn::handleAddRecording
void handleAddRecording(void)
Definition: mythburn.cpp:936
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:880
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:505
MythUIButtonList::GetItemFirst
MythUIButtonListItem * GetItemFirst() const
Definition: mythuibuttonlist.cpp:1633
MythBurn::updateSizeBar
void updateSizeBar()
Definition: mythburn.cpp:188
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:52
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:562
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:897
ArchiveItem::videoCodec
QString videoCodec
Definition: archiveutil.h:66
BurnMenu::doBurn
static void doBurn(int mode)
Definition: mythburn.cpp:1126
MSqlQuery::prepare
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:836