MythTV  master
gallerythumbview.cpp
Go to the documentation of this file.
1 // C++
2 #include <chrono> // for milliseconds
3 #include <thread> // for sleep_for
4 #include <utility>
5 
6 // Qt
7 #include <QApplication>
8 
9 // MythTV
10 #include "libmythbase/compat.h"
12 #include "libmythbase/remotefile.h"
16 #include "libmythui/mythuitext.h"
17 
18 // MythFrontend
19 #include "galleryconfig.h"
20 #include "gallerythumbview.h"
21 
22 #define LOC QString("Thumbview: ")
23 
24 
26 class ShellThread: public MThread
27 {
28 public:
29  ShellThread(QString cmd, QString path)
30  : MThread("Import"), m_command(std::move(cmd)), m_path(std::move(path)) {}
31 
32  int GetResult(void) const { return m_result; }
33 
34  void run() override // MThread
35  {
36  RunProlog();
37 
38  QString cmd = QString("cd %1 && %2").arg(m_path, m_command);
39  LOG(VB_GENERAL, LOG_INFO, QString("Executing \"%1\"").arg(cmd));
40 
41  m_result = myth_system(cmd);
42 
43  LOG(VB_GENERAL, LOG_INFO, QString(" ...with result %1").arg(m_result));
44 
45  RunEpilog();
46  }
47 
48 private:
49  int m_result {0};
50  QString m_command;
51  QString m_path;
52 };
53 
54 
56 class TransferThread : public MThread
57 {
58  Q_DECLARE_TR_FUNCTIONS(FileTransferWorker);
59 public:
60  using TransferMap = QMap<ImagePtrK, QString>;
61  using ImageSet = QSet<ImagePtrK>;
62 
63  TransferThread(TransferMap files, bool move, MythUIProgressDialog *dialog)
64  : MThread("FileTransfer"),
65  m_move(move), m_files(std::move(files)), m_dialog(dialog) {}
66 
67  ImageSet GetResult(void) { return m_failed; }
68 
69  void run() override // MThread
70  {
71  RunProlog();
72 
73  QString action = m_move ? tr("Moving") : tr("Copying");
74 
75  // Sum file sizes
76  auto keys = m_files.keys();
77  auto add_size = [](int t, const ImagePtrK & im){ return t + im->m_size; };
78  int total = std::accumulate(keys.cbegin(), keys.cend(), 0, add_size);
79 
80  int progressSize = 0;
81 #if QT_VERSION < QT_VERSION_CHECK(5,15,0)
82  for (auto it = m_files.constKeyValueBegin();
83  it != m_files.constKeyValueEnd(); it++)
84  {
85  const ImagePtrK & im = (*it).first;
86  QString newPath = (*it).second;
87 #else
88  for (auto it = m_files.constKeyValueBegin();
89  it != m_files.constKeyValueEnd(); it++)
90  {
91  const ImagePtrK & im = it->first;
92  QString newPath = it->second;
93 #endif
94  // Update progress dialog
95  if (m_dialog)
96  {
97  QString message = QString("%1 %2\n%3")
98  .arg(action, QFileInfo(im->m_url).fileName(),
99  ImageAdapterBase::FormatSize(im->m_size / 1024));
100 
101  auto *pue = new ProgressUpdateEvent(progressSize, total, message);
102  QApplication::postEvent(m_dialog, pue);
103  }
104 
105  LOG(VB_FILE, LOG_INFO, QString("%2 %3 -> %4")
106  .arg(action, im->m_url, newPath));
107 
108  bool success = m_move ? RemoteFile::MoveFile(im->m_url, newPath)
109  : RemoteFile::CopyFile(im->m_url, newPath,
110  false, true);
111  if (!success)
112  {
113  // Flag failures
114  m_failed.insert(im);
115 
116  LOG(VB_GENERAL, LOG_ERR,
117  QString("%1: Failed to copy/move %2 -> %3")
118  .arg(objectName(), im->m_url, m_files[im]));
119  }
120 
121  progressSize += im->m_size;
122  }
123 
124  // Update progress dialog
125  if (m_dialog)
126  {
127  auto *pue =
128  new ProgressUpdateEvent(progressSize, total, tr("Complete"));
129  QApplication::postEvent(m_dialog, pue);
130  }
131 
132  RunEpilog();
133  }
134 
135 private:
136  bool m_move;
140 };
141 
142 
147 static void WaitUntilDone(MThread &worker)
148 {
149  worker.start();
150  while (!worker.isFinished())
151  {
152  std::this_thread::sleep_for(1ms);
153  QCoreApplication::processEvents();
154  }
155 }
156 
157 
164  : MythScreenType(parent, name),
165  m_popupStack(*GetMythMainWindow()->GetStack("popup stack")),
166  m_mgr(ImageManagerFe::getInstance()),
167  // This screen uses a single fixed view (Parent dir, ordered dirs, ordered images)
168  m_view(new DirectoryView(kOrdered)),
169  m_infoList(*this),
170  // Start in edit mode unless a password exists
171  m_editsAllowed(gCoreContext->GetSetting("GalleryPassword").isEmpty())
172 {
173  // Hide hidden when edits disallowed
174  if (!m_editsAllowed)
175  m_mgr.SetVisibility(false);
176 }
177 
178 
183 {
184  LOG(VB_GUI, LOG_DEBUG, LOC + "Exiting Gallery");
185  delete m_view;
186 }
187 
188 
193 {
194  LOG(VB_GUI, LOG_DEBUG, LOC + "Closing Gallery");
195 
197 
198  // Cleanup local devices
200 
201  // Cleanup view
202  m_view->Clear();
203 
205 }
206 
207 
212 {
213  if (!LoadWindowFromXML("image-ui.xml", "gallery", this))
214  return false;
215 
216  // Determine zoom levels supported by theme
217  // images0 must exist; images1, images2 etc. are optional and enable zoom
218  int zoom = 0;
219  MythUIButtonList *widget = nullptr;
220  do
221  {
222  QString name = QString("images%1").arg(zoom++);
223  widget = dynamic_cast<MythUIButtonList *>(this->GetChild(name));
224  if (widget)
225  {
226  m_zoomWidgets.append(widget);
227  widget->SetVisible(false);
228  }
229  }
230  while (widget);
231 
232  if (m_zoomWidgets.isEmpty())
233  {
234  LOG(VB_GENERAL, LOG_ERR, LOC + "Screen 'Gallery' is missing 'images0'");
235  return false;
236  }
237  LOG(VB_GUI, LOG_DEBUG, LOC + QString("Screen 'Gallery' found %1 zoom levels")
238  .arg(m_zoomWidgets.size()));
239 
240  // File details list is managed elsewhere
241  if (!m_infoList.Create(false))
242  {
243  LOG(VB_GENERAL, LOG_ERR, LOC + "Cannot load 'Info buttonlist'");
244  return false;
245  }
246 
247  UIUtilW::Assign(this, m_captionText, "caption");
248  UIUtilW::Assign(this, m_emptyText, "noimages");
249  UIUtilW::Assign(this, m_positionText, "position");
250  UIUtilW::Assign(this, m_crumbsText, "breadcrumbs");
251  UIUtilW::Assign(this, m_hideFilterText, "hidefilter");
252  UIUtilW::Assign(this, m_typeFilterText, "typefilter");
253  UIUtilW::Assign(this, m_scanProgressText, "scanprogresstext");
254  UIUtilW::Assign(this, m_scanProgressBar, "scanprogressbar");
255 
256  if (m_scanProgressText)
258  if (m_scanProgressBar)
260 
261  BuildFocusList();
262 
263  // Initialise list widget with appropriate zoom level for this theme.
264  m_zoomLevel = gCoreContext->GetNumSetting("GalleryZoomLevel", 0);
265  SelectZoomWidget(0);
266 
267  return true;
268 }
269 
270 
275 bool GalleryThumbView::keyPressEvent(QKeyEvent *event)
276 {
277  if (GetFocusWidget()->keyPressEvent(event))
278  return true;
279 
280  QStringList actions;
281  bool handled = GetMythMainWindow()->TranslateKeyPress("Images", event, actions);
282 
283  for (int i = 0; i < actions.size() && !handled; i++)
284  {
285  QString action = actions[i];
286  handled = true;
287 
288  if (action == "MENU")
289  MenuMain();
290  else if (action == "INFO")
291  ShowDetails();
292  else if (action == "ZOOMIN")
293  ZoomIn();
294  else if (action == "ZOOMOUT")
295  ZoomOut();
296  else if (action == "ROTRIGHT")
297  RotateCW();
298  else if (action == "ROTLEFT")
299  RotateCCW();
300  else if (action == "FLIPHORIZONTAL")
301  FlipHorizontal();
302  else if (action == "FLIPVERTICAL")
303  FlipVertical();
304  else if (action == "COVER")
305  {
306  ImagePtrK im = m_view->GetSelected();
307  if (m_editsAllowed && im)
308  {
309  if (im == m_view->GetParent())
310  {
311  // Reset dir
312  m_mgr.SetCover(im->m_id, 0);
313  }
314  else
315  {
316  // Set parent cover
317  m_mgr.SetCover(im->m_parentId, im->m_id);
318  }
319  }
320  }
321  else if (action == "PLAY")
322  Slideshow();
323  else if (action == "RECURSIVESHOW")
324  {
325  ImagePtrK im = m_view->GetSelected();
326  if (im && im->IsDirectory())
328  }
329  else if (action == "MARK")
330  {
331  ImagePtrK im = m_view->GetSelected();
332  if (m_editsAllowed && im && im != m_view->GetParent())
333  DoMarkItem(!m_view->IsMarked(im->m_id));
334  }
335  else if (action == "ESCAPE" && !GetMythMainWindow()->IsExitingToMain())
336  {
337  // Exit info list, if shown
338  handled = m_infoList.Hide();
339 
340  // Ascend the tree unless parent is root,
341  // or a device and multiple devices/imports exist
342  if (!handled)
343  {
344  ImagePtrK node = m_view->GetParent();
345  if (node && node->m_id != GALLERY_DB_ID
346  && (!node->IsDevice() || m_mgr.DeviceCount() > 0))
347  handled = DirSelectUp();
348  }
349  }
350  else
351  handled = false;
352  }
353 
354  if (!handled)
355  handled = MythScreenType::keyPressEvent(event);
356 
357  return handled;
358 }
359 
360 
365 void GalleryThumbView::customEvent(QEvent *event)
366 {
367 
368  if (event->type() == MythEvent::MythEventMessage)
369  {
370  auto *me = dynamic_cast<MythEvent *>(event);
371  if (me == nullptr)
372  return;
373 
374  const QString& mesg = me->Message();
375  QStringList extra = me->ExtraDataList();
376 
377  // Internal messages contain a hostname. Ignore other FE messages
378  QStringList token = mesg.split(' ');
379  if (token.size() >= 2 && token[1] != gCoreContext->GetHostName())
380  return;
381 
382  if (token[0] == "IMAGE_METADATA")
383  {
384  int id = extra[0].toInt();
385  ImagePtrK selected = m_view->GetSelected();
386 
387  if (selected && selected->m_id == id)
388  m_infoList.Display(*selected, extra.mid(1));
389  }
390  else if (token[0] == "THUMB_AVAILABLE")
391  {
392  int id = extra[0].toInt();
393 
394  // Note existance of all thumbs
395  m_thumbExists.insert(id);
396 
397  // Get all buttons waiting for this thumbnail
398  QList<ThumbLocation> affected = m_pendingMap.values(id);
399 
400  // Only concerned with thumbnails we've requested
401  if (affected.isEmpty())
402  return;
403 
404  LOG(VB_GENERAL, LOG_DEBUG, LOC +
405  QString("Rx %1 : %2").arg(token[0], extra.join(",")));
406 
407  // Thumb url was cached when request was sent
408  QString url = m_view->GetCachedThumbUrl(id);
409 
410  // Set thumbnail for each button now it exists
411  for (const ThumbLocation & location : qAsConst(affected))
412  {
413  MythUIButtonListItem *button = location.first;
414  int index = location.second;
415 
416  auto im = button->GetData().value<ImagePtrK>();
417  if (im)
418  UpdateThumbnail(button, im, url, index);
419  }
420 
421  // Cancel pending request
422  m_pendingMap.remove(id);
423  }
424  else if (token[0] == "IMAGE_DB_CHANGED")
425  {
426  // Expects csv list of deleted ids, csv list of changed ids
427  LOG(VB_GENERAL, LOG_DEBUG, LOC +
428  QString("Rx %1 : %2").arg(token[0], extra.join(",")));
429 
430  if (!extra.isEmpty())
431  {
432 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
433  QStringList idDeleted =
434  extra[0].split(",", QString::SkipEmptyParts);
435 #else
436  QStringList idDeleted =
437  extra[0].split(",", Qt::SkipEmptyParts);
438 #endif
439 
440  RemoveImages(idDeleted);
441  }
442  if (extra.size() >= 2)
443  {
444 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
445  QStringList idChanged =
446  extra[1].split(",", QString::SkipEmptyParts);
447 #else
448  QStringList idChanged =
449  extra[1].split(",", Qt::SkipEmptyParts);
450 #endif
451  RemoveImages(idChanged, false);
452  }
453 
454  // Refresh display
456  }
457  else if (token[0] == "IMAGE_DEVICE_CHANGED")
458  {
459  // Expects list of url prefixes
460  LOG(VB_GENERAL, LOG_DEBUG, LOC +
461  QString("Rx %1 : %2").arg(token[0], extra.join(",")));
462 
463  // Clear everything. Local devices will be rebuilt
464  m_view->Clear();
465  m_thumbExists.clear();
466 
467  // Remove thumbs & images from image cache using supplied prefixes
468  for (const QString & url : qAsConst(extra))
470 
471  // Refresh display
473  }
474  else if (token[0] == "IMAGE_SCAN_STATUS" && extra.size() == 3)
475  {
476  // Expects scanner id, scanned#, total#
477  UpdateScanProgress(extra[0], extra[1].toInt(), extra[2].toInt());
478  }
479  }
480  else if (event->type() == DialogCompletionEvent::kEventType)
481  {
482  auto *dce = (DialogCompletionEvent *)(event);
483 
484  QString resultid = dce->GetId();
485  int buttonnum = dce->GetResult();
486 
487  if (resultid == "FileRename")
488  {
489  QString newName = dce->GetResultText();
491  {
492  QString err = m_mgr.RenameFile(m_menuState.m_selected,
493  newName);
494  if (!err.isEmpty())
495  ShowOkPopup(err);
496  }
497  }
498  else if (resultid == "MakeDir")
499  {
501  {
502  // Prohibit subtrees
503  QString name = dce->GetResultText();
504  QString err = name.contains("/")
505  ? tr("Invalid Name")
507  QStringList(name));
508  if (!err.isEmpty())
509  ShowOkPopup(err);
510  }
511  }
512  else if (resultid == "SlideOrderMenu")
513  {
514  SlideOrderType slideOrder = kOrdered;
515 
516  switch (buttonnum)
517  {
518  case 0: slideOrder = kOrdered; break;
519  case 1: slideOrder = kShuffle; break;
520  case 2: slideOrder = kRandom; break;
521  case 3: slideOrder = kSeasonal; break;
522  }
523  gCoreContext->SaveSetting("GallerySlideOrder", slideOrder);
524  LOG(VB_FILE, LOG_DEBUG, LOC + QString("Order %1").arg(slideOrder));
525  }
526  else if (resultid == "ImageCaptionMenu")
527  {
528  ImageCaptionType captions = kNoCaption;
529 
530  switch (buttonnum)
531  {
532  case 0: captions = kNameCaption; break;
533  case 1: captions = kDateCaption; break;
534  case 2: captions = kUserCaption; break;
535  case 3: captions = kNoCaption; break;
536  }
537  gCoreContext->SaveSetting("GalleryImageCaption", captions);
538  BuildImageList();
539  }
540  else if (resultid == "DirCaptionMenu")
541  {
542  ImageCaptionType captions = kNoCaption;
543 
544  switch (buttonnum)
545  {
546  case 0: captions = kNameCaption; break;
547  case 1: captions = kDateCaption; break;
548  case 2: captions = kNoCaption; break;
549  }
550  gCoreContext->SaveSetting("GalleryDirCaption", captions);
551  BuildImageList();
552  }
553  else if (resultid == "Password")
554  {
555  QString password = dce->GetResultText();
556  m_editsAllowed = (password == gCoreContext->GetSetting("GalleryPassword"));
557  }
558  else if (buttonnum == 1)
559  {
560  // Confirm current file deletion
561  QString err;
562  if (resultid == "ConfirmDelete" && m_menuState.m_selected)
563  {
565  err = m_mgr.DeleteFiles(ids);
566  }
567  // Confirm marked file deletion
568  else if (resultid == "ConfirmDeleteMarked")
569  {
571  }
572  else
573  return;
574 
575  if (!err.isEmpty())
576  ShowOkPopup(err);
577  }
578  }
579 }
580 
581 
587 void GalleryThumbView::RemoveImages(const QStringList &ids, bool deleted)
588 {
589  for (const QString & id : qAsConst(ids))
590  {
591  // Remove image from view
592  QStringList urls = m_view->RemoveImage(id.toInt(), deleted);
593  // Cleanup url lookup
594  m_thumbExists.remove(id.toInt());
595 
596  // Remove thumbs & images from image cache
597  for (const QString & url : qAsConst(urls))
598  {
599  LOG(VB_FILE, LOG_DEBUG, LOC +
600  QString("Clearing image cache of '%1'").arg(url));
601 
603  }
604  }
605 }
606 
607 
612 {
613  // Detect any running BE scans
614  // Expects OK, scanner id, current#, total#
615  QStringList message = ImageManagerFe::ScanQuery();
616  if (message.size() == 4 && message[0] == "OK")
617  {
618  UpdateScanProgress(message[1], message[2].toInt(), message[3].toInt());
619  }
620 
621  // Only receive events after device/scan status has been established
622  gCoreContext->addListener(this);
623 
624  // Start at Root if devices exist. Otherwise go straight to SG node
626 
627  LoadData(start);
628 }
629 
630 
636 {
638 
639  // Load view for parent directory
640  if (m_view->LoadFromDb(parent))
641  {
642  m_imageList->SetVisible(true);
643  if (m_emptyText)
644  {
645  m_emptyText->SetVisible(false);
646  m_emptyText->Reset();
647  }
648 
649  // Construct the buttonlist
650  BuildImageList();
651  }
652  else
653  {
654  m_infoList.Hide();
655  m_imageList->SetVisible(false);
656  if (m_emptyText)
657  {
658  m_emptyText->SetVisible(true);
659  m_emptyText->SetText(tr("No images found.\n"
660  "Scan storage group using menu,\n"
661  "or insert/mount local media.\n"));
662  }
663  }
664 }
665 
666 
671 {
672  m_imageList->Reset();
673  m_pendingMap.clear();
674 
675  // Get parent & all children
676  ImageListK nodes = m_view->GetAllNodes();
677  ImagePtrK selected = m_view->GetSelected();
678 
679  // go through the entire list and update
680  for (const ImagePtrK & im : qAsConst(nodes))
681  {
682  if (im)
683  {
684  // Data must be set by constructor: First item is automatically
685  // selected and must have data available for selection event, as
686  // subsequent reselection of same item will always fail.
687  auto *item = new MythUIButtonListItem(m_imageList, "",
688  QVariant::fromValue(im));
689 
690  item->setCheckable(true);
691  item->setChecked(MythUIButtonListItem::NotChecked);
692 
693  // assign and display all information about
694  // the current item, like title and subdirectory count
695  UpdateImageItem(item);
696 
697  // Treat parent differently
698  if (im == nodes[0])
699  {
700  // Only non-root parents can ascend
701  if (im->m_id != GALLERY_DB_ID)
702  item->DisplayState("upfolder", "parenttype");
703  }
704  else if (im == selected)
705  // Reinstate the active button item. Note this would fail for parent
707  }
708  }
709 }
710 
711 
717 {
718  auto im = item->GetData().value<ImagePtrK >();
719  if (!im)
720  return;
721 
722  // Allow themes to distinguish between roots, folders, pics, videos
723  switch (im->m_type)
724  {
725  case kDevice:
726  case kCloneDir:
727  case kDirectory:
728  if (im->m_dirCount > 0)
729  {
730  item->SetText(QString("%1/%2")
731  .arg(im->m_fileCount).arg(im->m_dirCount),
732  "childcount");
733  }
734  else
735  {
736  item->SetText(QString::number(im->m_fileCount), "childcount");
737  }
738 
739  item->DisplayState(im->IsDevice() ? "device" : "subfolder", "buttontype");
740  break;
741 
742  case kImageFile:
743  item->DisplayState("image", "buttontype");
744  break;
745 
746  case kVideoFile:
747  item->DisplayState("video", "buttontype");
748  break;
749 
750  default:
751  break;
752  }
753 
754  // Allow theme to distinguish visible/hidden nodes
755  QString hideState = (im->m_isHidden) ? "hidden" : "visible";
756  item->DisplayState(hideState, "buttonstate");
757 
758  // Caption
759  QString text;
761  im->IsFile() ? "GalleryImageCaption"
762  : "GalleryDirCaption");
763  switch (show)
764  {
765  case kNameCaption: text = m_mgr.CrumbName(*im); break;
766  case kDateCaption: text = m_mgr.ShortDateOf(im); break;
767  case kUserCaption: text = im->m_comment; break;
768  default:
769  case kNoCaption: text = ""; break;
770  }
771  item->SetText(text);
772 
773  // Set marked state
775  = m_view->IsMarked(im->m_id)
778 
779  item->setChecked(state);
780 
781  // Thumbnails required
782  ImageIdList request;
783 
784  if (im->m_thumbNails.size() == 1)
785  {
786  // Single thumbnail
787  QString url = CheckThumbnail(item, im, request, 0);
788 
789  if (!url.isEmpty())
790  UpdateThumbnail(item, im, url, 0);
791  }
792  else
793  {
794  // Dir showing up to 4 thumbs. Set them all at same time
795  InfoMap thumbMap;
796  for (int index = 0; index < im->m_thumbNails.size(); ++index)
797  {
798  QString url = CheckThumbnail(item, im, request, index);
799  if (!url.isEmpty())
800  thumbMap.insert(QString("thumbimage%1").arg(index), url);
801  }
802  if (!thumbMap.isEmpty())
803  item->SetImageFromMap(thumbMap);
804  }
805 
806  // Request creation/verification of unknown thumbnails.
807  if (!request.isEmpty())
808  m_mgr.CreateThumbnails(request, im->IsDirectory());
809 }
810 
811 
824  ImageIdList &request, int index)
825 {
826  ThumbPair thumb(im->m_thumbNails.at(index));
827  int id = thumb.first;
828 
829  if (m_thumbExists.contains(id))
830  return thumb.second;
831 
832  // Request BE thumbnail check if it is not already pending
833  if (!m_pendingMap.contains(id))
834  request << id;
835 
836  // Note this button is awaiting an update
837  m_pendingMap.insert(id, qMakePair(item, index));
838 
839  return "";
840 }
841 
842 
851  const ImagePtrK& im, const QString &url,
852  int index)
853 {
854  if (im->m_thumbNails.size() == 1)
855  {
856  // Pics, dirs & videos use separate widgets
857  switch (im->m_type)
858  {
859  case kImageFile: button->SetImage(url); break;
860  case kVideoFile: button->SetImage(url, "videoimage"); break;
861  default: button->SetImage(url, "folderimage"); break;
862  }
863  }
864  else
865  // Dir with 4 thumbnails
866  button->SetImage(url, QString("thumbimage%1").arg(index));
867 }
868 
869 
877 void GalleryThumbView::UpdateScanProgress(const QString &scanner,
878  int current, int total)
879 {
880  // Scan update
881  m_scanProgress.insert(scanner, qMakePair(current, total));
882 
883  // Detect end of this scan
884  if (current >= total)
885  {
886  LOG(VB_GUI, LOG_DEBUG, LOC + QString("Scan Finished %1 %2/%3")
887  .arg(scanner).arg(current).arg(total));
888 
889  // Mark inactive scanner
890  m_scanActive.remove(scanner);
891 
892  // Detect end of last scan
893  if (m_scanActive.isEmpty())
894  {
895  if (m_scanProgressText)
896  {
899  }
900  if (m_scanProgressBar)
901  {
904  }
905 
906  m_scanProgress.clear();
907 
908  return;
909  }
910  }
911  else
912  {
913  // Detect first scan update
914  if (m_scanActive.isEmpty())
915  {
916  // Show progressbar when first scan starts
917  if (m_scanProgressBar)
918  {
921  }
922  if (m_scanProgressText)
924  }
925 
926  if (!m_scanActive.contains(scanner))
927  {
928  LOG(VB_GUI, LOG_DEBUG, LOC + QString("Scan Started %1 %2/%3")
929  .arg(scanner).arg(current).arg(total));
930 
931  // Mark active scanner
932  m_scanActive.insert(scanner);
933  }
934  }
935 
936  // Aggregate all running scans
937  int currentAgg = 0;
938  int totalAgg = 0;
939  for (IntPair scan : qAsConst(m_scanProgress))
940  {
941  currentAgg += scan.first;
942  totalAgg += scan.second;
943  }
944 
945  if (m_scanProgressBar)
946  {
947  m_scanProgressBar->SetUsed(currentAgg);
948  m_scanProgressBar->SetTotal(totalAgg);
949  }
950  if (m_scanProgressText)
951  m_scanProgressText->SetText(tr("%L1 of %L3").arg(currentAgg).arg(totalAgg));
952 }
953 
954 
959 {
960  if (m_positionText)
962 
963  if (m_captionText)
964  m_captionText->Reset();
965 
966  if (m_crumbsText)
967  m_crumbsText->Reset();
968 
969  if (m_hideFilterText)
971 
972  if (m_typeFilterText)
974 }
975 
976 
982 {
983  auto im = item->GetData().value<ImagePtrK >();
984  if (im)
985  {
986  // update the position in the node list
987  m_view->Select(im->m_id);
988 
989  // show the name/path of the image
990  if (m_crumbsText)
991  m_crumbsText->SetText(m_mgr.CrumbName(*im, true));
992 
993  if (m_captionText)
994  {
995  // show the date & comment of non-root nodes
996  QStringList text;
997  if (im->m_id != GALLERY_DB_ID)
998  {
999  if (im->IsFile() || im->IsDevice())
1000  text << ImageManagerFe::LongDateOf(im);
1001 
1002  if (!im->m_comment.isEmpty())
1003  text << im->m_comment;
1004  }
1005  m_captionText->SetText(text.join(" - "));
1006  }
1007 
1008  if (m_hideFilterText)
1009  {
1010  m_hideFilterText->SetText(m_mgr.GetVisibility() ? tr("Hidden") : "");
1011  }
1012 
1013  if (m_typeFilterText)
1014  {
1015  QString text = "";
1016  switch (m_mgr.GetType())
1017  {
1018  case kPicAndVideo : text = ""; break;
1019  case kPicOnly : text = tr("Pictures"); break;
1020  case kVideoOnly : text = tr("Videos"); break;
1021  }
1022  m_typeFilterText->SetText(text);
1023  }
1024 
1025  // show the position of the image
1026  if (m_positionText)
1028 
1029  // Update any file details information
1030  m_infoList.Update(im);
1031  }
1032 }
1033 
1034 
1039 {
1040  // Create the main menu
1041  auto *menu = new MythMenu(tr("Gallery Options"), this, "mainmenu");
1042 
1043  // Menu options depend on the marked files and the current node
1045 
1046  if (m_menuState.m_selected)
1047  {
1048  if (m_editsAllowed)
1049  {
1050  MenuMarked(menu);
1051  MenuPaste(menu);
1053  MenuAction(menu);
1054  }
1056  MenuShow(menu);
1057  if (!m_editsAllowed)
1058  menu->AddItem(tr("Enable Edits"), &GalleryThumbView::ShowPassword);
1059  }
1060 
1061  // Depends on current status of backend scanner - string(number(isBackend()))
1062  if (m_scanActive.contains("1"))
1063  menu->AddItem(tr("Stop Scan"), &GalleryThumbView::StopScan);
1064  else
1065  menu->AddItem(tr("Scan Storage Group"), &GalleryThumbView::StartScan);
1066 
1067  menu->AddItem(tr("Settings"), &GalleryThumbView::ShowSettings);
1068 
1069  auto *popup = new MythDialogBox(menu, &m_popupStack, "menuPopup");
1070  if (popup->Create())
1071  m_popupStack.AddScreen(popup);
1072  else
1073  delete popup;
1074 }
1075 
1076 
1082 {
1083  ImagePtrK parent = m_view->GetParent();
1084 
1085  if (m_menuState.m_childCount == 0 || parent.isNull())
1086  return;
1087 
1088  QString title = tr("%L1 marked").arg(m_menuState.m_markedId.size());
1089  auto *menu = new MythMenu(title, this, "markmenu");
1090 
1091  // Mark/unmark selected
1092  if (m_menuState.m_selected->IsFile())
1093  {
1095  menu->AddItem(tr("Unmark File"), &GalleryThumbView::UnmarkItem);
1096  else
1097  menu->AddItem(tr("Mark File"), &GalleryThumbView::MarkItem);
1098  }
1099  // Cannot mark/unmark parent dir from this level
1100  else if (!m_menuState.m_selected->IsDevice()
1101  && m_menuState.m_selected != parent)
1102  {
1104  menu->AddItem(tr("Unmark Directory"), &GalleryThumbView::UnmarkItem);
1105  else
1106  menu->AddItem(tr("Mark Directory"), &GalleryThumbView::MarkItem);
1107  }
1108 
1109  if (parent->m_id != GALLERY_DB_ID)
1110  {
1111  // Mark All if unmarked files exist
1113  menu->AddItem(tr("Mark All"), &GalleryThumbView::MarkAll);
1114 
1115  // Unmark All if marked files exist
1116  if (!m_menuState.m_markedId.isEmpty())
1117  {
1118  menu->AddItem(tr("Unmark All"), &GalleryThumbView::UnmarkAll);
1119  menu->AddItem(tr("Invert Marked"), &GalleryThumbView::MarkInvertAll);
1120  }
1121  }
1122 
1123  if (menu->IsEmpty())
1124  delete menu;
1125  else
1126  mainMenu->AddItem(tr("Mark"), nullptr, menu);
1127 }
1128 
1129 
1135 {
1136  // Can only copy/move into non-root dirs
1137  if (m_menuState.m_selected->IsDirectory()
1138  && m_menuState.m_selected->m_id != GALLERY_DB_ID)
1139  {
1140  // Operate on current marked files, if any
1142  if (files.isEmpty())
1143  files = m_menuState.m_prevMarkedId;
1144  if (files.isEmpty())
1145  return;
1146 
1147  QString title = tr("%L1 marked").arg(files.size());
1148 
1149  auto *menu = new MythMenu(title, this, "pastemenu");
1150 
1151  menu->AddItem(tr("Move Marked Into"), &GalleryThumbView::Move);
1152  menu->AddItem(tr("Copy Marked Into"), qOverload<>(&GalleryThumbView::Copy));
1153 
1154  mainMenu->AddItem(tr("Paste"), nullptr, menu);
1155  }
1156 }
1157 
1158 
1164 {
1165  // Operate on marked files, if any, otherwise selected node
1166  if (!m_menuState.m_markedId.isEmpty())
1167  {
1168  QString title = tr("%L1 marked").arg(m_menuState.m_markedId.size());
1169 
1170  auto *menu = new MythMenu(title, this, "");
1171 
1172  menu->AddItem(tr("Rotate Marked CW"), &GalleryThumbView::RotateCWMarked);
1173  menu->AddItem(tr("Rotate Marked CCW"), &GalleryThumbView::RotateCCWMarked);
1174  menu->AddItem(tr("Flip Marked Horizontal"), &GalleryThumbView::FlipHorizontalMarked);
1175  menu->AddItem(tr("Flip Marked Vertical"), &GalleryThumbView::FlipVerticalMarked);
1176  menu->AddItem(tr("Reset Marked to Exif"), &GalleryThumbView::ResetExifMarked);
1177 
1178  mainMenu->AddItem(tr("Transforms"), nullptr, menu);
1179  }
1180  else if (m_menuState.m_selected->IsFile())
1181  {
1182  auto *menu = new MythMenu(m_menuState.m_selected->m_baseName, this, "");
1183 
1184  menu->AddItem(tr("Rotate CW"), &GalleryThumbView::RotateCW);
1185  menu->AddItem(tr("Rotate CCW"), &GalleryThumbView::RotateCCW);
1186  menu->AddItem(tr("Flip Horizontal"), &GalleryThumbView::FlipHorizontal);
1187  menu->AddItem(tr("Flip Vertical"), &GalleryThumbView::FlipVertical);
1188  menu->AddItem(tr("Reset to Exif"), &GalleryThumbView::ResetExif);
1189 
1190  mainMenu->AddItem(tr("Transforms"), nullptr, menu);
1191  }
1192 }
1193 
1194 
1200 {
1201  MythMenu *menu = nullptr;
1202  ImagePtrK selected = m_menuState.m_selected;
1203 
1204  // Operate on current marked files, if any
1205  if (!m_menuState.m_markedId.empty())
1206  {
1207  QString title = tr("%L1 marked").arg(m_menuState.m_markedId.size());
1208 
1209  menu = new MythMenu(title, this, "actionmenu");
1210 
1211  // Only offer Hide/Unhide if relevant
1213  menu->AddItem(tr("Hide Marked"), &GalleryThumbView::HideMarked);
1215  menu->AddItem(tr("Unhide Marked"), &GalleryThumbView::UnhideMarked);
1216 
1217  menu->AddItem(tr("Delete Marked"), &GalleryThumbView::DeleteMarked);
1218  }
1219  else
1220  {
1221  // Operate on selected file/dir
1222  menu = new MythMenu(selected->m_baseName, this, "actionmenu");
1223 
1224  // Prohibit actions on devices and parent dirs
1225  if (!selected->IsDevice() && selected != m_view->GetParent())
1226  {
1227  if (selected->m_isHidden)
1228  menu->AddItem(tr("Unhide"), &GalleryThumbView::Unhide);
1229  else
1230  menu->AddItem(tr("Hide"), &GalleryThumbView::HideItem);
1231 
1232  menu->AddItem(tr("Use as Cover"), &GalleryThumbView::SetCover);
1233  menu->AddItem(tr("Delete"), &GalleryThumbView::DeleteItem);
1234  menu->AddItem(tr("Rename"), &GalleryThumbView::ShowRenameInput);
1235  }
1236  else if (selected->m_userThumbnail)
1237  menu->AddItem(tr("Reset Cover"), &GalleryThumbView::ResetCover);
1238  }
1239 
1240  // Can only mkdir in a non-root dir
1241  if (selected->IsDirectory()
1242  && selected->m_id != GALLERY_DB_ID)
1243  menu->AddItem(tr("Create Directory"), &GalleryThumbView::MakeDir);
1244 
1245  // Only show import command on root, when defined
1246  if (selected->m_id == GALLERY_DB_ID
1247  && !gCoreContext->GetSetting("GalleryImportCmd").isEmpty())
1248  menu->AddItem(tr("Import"), &GalleryThumbView::Import);
1249 
1250  // Only show eject when devices (excluding import) exist
1251  if (selected->IsDevice() && selected->IsLocal())
1252  menu->AddItem(tr("Eject media"), &GalleryThumbView::Eject);
1253 
1254  if (menu->IsEmpty())
1255  delete menu;
1256  else
1257  mainMenu->AddItem(tr("Actions"), nullptr, menu);
1258 }
1259 
1260 
1266 {
1267  int order = gCoreContext->GetNumSetting("GallerySlideOrder", kOrdered);
1268 
1269  QString ordering;
1270  switch (order)
1271  {
1272  case kShuffle : ordering = tr("Shuffled"); break;
1273  case kRandom : ordering = tr("Random"); break;
1274  case kSeasonal : ordering = tr("Seasonal"); break;
1275  default:
1276  case kOrdered : ordering = tr("Ordered"); break;
1277  }
1278 
1279  auto *menu = new MythMenu(tr("Slideshow") + " (" + ordering + ")",
1280  this, "SlideshowMenu");
1281 
1282  // Use selected dir or parent, if image selected
1283  if (m_menuState.m_selected->IsDirectory())
1284  {
1285  if (m_menuState.m_selected->m_fileCount > 0)
1286  menu->AddItem(tr("Directory"), &GalleryThumbView::Slideshow);
1287 
1288  if (m_menuState.m_selected->m_dirCount > 0)
1289  menu->AddItem(tr("Recursive"), &GalleryThumbView::RecursiveSlideshow);
1290  }
1291  else
1292  menu->AddItem(tr("Current Directory"), &GalleryThumbView::Slideshow);
1293 
1294  auto *orderMenu = new MythMenu(tr("Slideshow Order"), this, "SlideOrderMenu");
1295 
1296  orderMenu->AddItem(tr("Ordered"), nullptr, nullptr, order == kOrdered);
1297  orderMenu->AddItem(tr("Shuffled"), nullptr, nullptr, order == kShuffle);
1298  orderMenu->AddItem(tr("Random"), nullptr, nullptr, order == kRandom);
1299  orderMenu->AddItem(tr("Seasonal"), nullptr, nullptr, order == kSeasonal);
1300 
1301  menu->AddItem(tr("Change Order"), nullptr, orderMenu);
1302 
1303  if (gCoreContext->GetBoolSetting("GalleryRepeat", false))
1304  menu->AddItem(tr("Turn Repeat Off"), &GalleryThumbView::RepeatOff);
1305  else
1306  menu->AddItem(tr("Turn Repeat On"), &GalleryThumbView::RepeatOn);
1307 
1308  mainMenu->AddItem(tr("Slideshow"), nullptr, menu);
1309 }
1310 
1311 
1317 {
1318  auto *menu = new MythMenu(tr("Show Options"), this, "showmenu");
1319 
1320  int type = m_mgr.GetType();
1321  if (type == kPicAndVideo)
1322  {
1323  menu->AddItem(tr("Hide Pictures"), &GalleryThumbView::HidePictures);
1324  menu->AddItem(tr("Hide Videos"), &GalleryThumbView::HideVideos);
1325  }
1326  else
1327  menu->AddItem(type == kPicOnly ? tr("Show Videos") : tr("Show Pictures"),
1329 
1330  int show = gCoreContext->GetNumSetting("GalleryImageCaption");
1331  auto *captionMenu = new MythMenu(tr("Image Captions"), this,
1332  "ImageCaptionMenu");
1333 
1334  captionMenu->AddItem(tr("Name"), nullptr, nullptr, show == kNameCaption);
1335  captionMenu->AddItem(tr("Date"), nullptr, nullptr, show == kDateCaption);
1336  captionMenu->AddItem(tr("Comment"), nullptr, nullptr, show == kUserCaption);
1337  captionMenu->AddItem(tr("None"), nullptr, nullptr, show == kNoCaption);
1338 
1339  menu->AddItem(tr("Image Captions"), nullptr, captionMenu);
1340 
1341  show = gCoreContext->GetNumSetting("GalleryDirCaption");
1342  captionMenu = new MythMenu(tr("Directory Captions"), this, "DirCaptionMenu");
1343 
1344  captionMenu->AddItem(tr("Name"), nullptr, nullptr, show == kNameCaption);
1345  captionMenu->AddItem(tr("Date"), nullptr, nullptr, show == kDateCaption);
1346  captionMenu->AddItem(tr("None"), nullptr, nullptr, show == kNoCaption);
1347 
1348  menu->AddItem(tr("Directory Captions"), nullptr, captionMenu);
1349 
1350  if (m_editsAllowed)
1351  {
1352  if (m_mgr.GetVisibility())
1353  menu->AddItem(tr("Hide Hidden Items"), &GalleryThumbView::HideHidden);
1354  else
1355  menu->AddItem(tr("Show Hidden Items"), &GalleryThumbView::ShowHidden);
1356  }
1357 
1358  if (m_zoomLevel > 0)
1359  menu->AddItem(tr("Zoom Out"), &GalleryThumbView::ZoomOut);
1360  if (m_zoomLevel < m_zoomWidgets.size() - 1)
1361  menu->AddItem(tr("Zoom In"), &GalleryThumbView::ZoomIn);
1362 
1363  QString details = m_infoList.GetState() == kNoInfo
1364  ? tr("Show Details") : tr("Hide Details");
1365 
1366  menu->AddItem(details, &GalleryThumbView::ShowDetails);
1367 
1368  mainMenu->AddItem(tr("Show"), nullptr, menu);
1369 }
1370 
1371 
1377 {
1378  // Only update selection if image is currently displayed
1379  if (m_view->Select(id, -1))
1380  BuildImageList();
1381 }
1382 
1383 
1389 {
1390  if (!item)
1391  return;
1392 
1393  auto im = item->GetData().value<ImagePtrK>();
1394  if (!im)
1395  return;
1396 
1397  switch (im->m_type)
1398  {
1399  case kDevice:
1400  case kCloneDir:
1401  case kDirectory:
1402  if (im == m_view->GetParent())
1403  DirSelectUp();
1404  else
1405  DirSelectDown();
1406  break;
1407 
1408  case kImageFile:
1409  case kVideoFile:
1410  StartSlideshow(kBrowseSlides); break;
1411  };
1412 }
1413 
1414 
1420 {
1421  QString err = m_mgr.ScanImagesAction(start);
1422  if (!err.isEmpty())
1423  ShowOkPopup(err);
1424 }
1425 
1426 
1432 {
1433  ImagePtrK selected = m_view->GetSelected();
1434  if (!selected)
1435  return;
1436 
1438  auto *slide = new GallerySlideView(mainStack, "galleryslideview",
1439  m_editsAllowed);
1440  if (slide->Create())
1441  {
1442  mainStack->AddScreen(slide);
1443 
1444  // Update selected item when slideshow exits
1445  connect(slide, &GallerySlideView::ImageSelected,
1447 
1448  if (selected->IsDirectory())
1449  {
1450  // Show selected dir
1451  slide->Start(mode, selected->m_id);
1452  }
1453  else
1454  {
1455  // Show current dir starting at selection
1456  slide->Start(mode, selected->m_parentId, selected->m_id);
1457  }
1458  }
1459  else
1460  delete slide;
1461 }
1462 
1463 
1468 {
1469  ImagePtrK im = m_view->GetParent();
1470  if (im)
1471  {
1472  LOG(VB_GUI, LOG_DEBUG, LOC +
1473  QString("Going up from %1").arg(im->m_filePath));
1474 
1475  // Select the upfolder in the higher dir
1476  m_view->Select(im->m_id);
1477 
1478  // Create tree rooted at parent of the kUpFolder directory node
1479  LoadData(im->m_parentId);
1480  }
1481  return true;
1482 }
1483 
1484 
1489 {
1490  ImagePtrK im = m_view->GetSelected();
1491  if (im)
1492  {
1493  LOG(VB_GUI, LOG_DEBUG, LOC +
1494  QString("Going down to %1").arg(im->m_filePath));
1495 
1496  // Create tree rooted at selected item
1497  LoadData(im->m_id);
1498  }
1499 }
1500 
1501 
1507 {
1508  ImagePtrK im = m_view->GetSelected();
1509  if (im)
1510  {
1511  // Mark/unmark selected item
1512  m_view->Mark(im->m_id, mark);
1513 
1514  // Redisplay buttonlist as a parent dir may have been unmarked
1515  BuildImageList();
1516  }
1517 }
1518 
1519 
1525 {
1526  if (mark)
1527  m_view->MarkAll();
1528  else
1529  m_view->ClearMarked();
1530 
1531  // Redisplay buttonlist
1532  BuildImageList();
1533 }
1534 
1535 
1540 {
1541  m_view->InvertMarked();
1542 
1543  // Redisplay buttonlist
1544  BuildImageList();
1545 }
1546 
1547 
1553 {
1554  ImagePtrK im = m_view->GetSelected();
1555  if (im && m_editsAllowed)
1556  {
1557  ImageIdList ids;
1558  ids.append(im->m_id);
1559  QString err = m_mgr.ChangeOrientation(transform, ids);
1560  if (!err.isEmpty())
1561  ShowOkPopup(err);
1562  }
1563 }
1564 
1565 
1571 {
1572  QString err = m_mgr.ChangeOrientation(transform, m_menuState.m_markedId);
1573  if (!err.isEmpty())
1574  ShowOkPopup(err);
1575 }
1576 
1577 
1583 {
1584  if (m_menuState.m_selected)
1585  {
1586  ImageIdList ids;
1587  ids.append(m_menuState.m_selected->m_id);
1588 
1589  QString err = m_mgr.HideFiles(hide, ids);
1590  if (!err.isEmpty())
1591  {
1592  ShowOkPopup(err);
1593  }
1594  else if (hide && !m_mgr.GetVisibility())
1595  {
1596  // Unmark invisible file
1597  m_view->Mark(m_menuState.m_selected->m_id, false);
1598  }
1599  }
1600 }
1601 
1602 
1608 {
1609  QString err = m_mgr.HideFiles(hide, m_menuState.m_markedId);
1610  if (!err.isEmpty())
1611  {
1612  ShowOkPopup(err);
1613  }
1614  else if (hide && !m_mgr.GetVisibility())
1615  {
1616  // Unmark invisible files
1617  for (int id : qAsConst(m_menuState.m_markedId))
1618  m_view->Mark(id, false);
1619  }
1620 }
1621 
1622 
1627 {
1628  if (m_menuState.m_selected)
1629  ShowDialog(tr("Do you want to delete\n%1 ?")
1630  .arg(m_menuState.m_selected->m_baseName), "ConfirmDelete");
1631 }
1632 
1633 
1638 {
1639  ShowDialog(tr("Do you want to delete all marked files ?"),
1640  "ConfirmDeleteMarked");
1641 }
1642 
1643 
1648 {
1649  // Show settings dialog
1650  auto *config = new GallerySettings(m_editsAllowed);
1652  auto *ssd = new StandardSettingDialog(mainStack, "gallerysettings", config);
1653  if (!ssd->Create())
1654  {
1655  delete ssd;
1656  return;
1657  }
1658 
1659  mainStack->AddScreen(ssd);
1660 
1661  // Effect setting changes when dialog saves on exit
1662 
1663  connect(config, &GallerySettings::ClearDbPressed,
1665 
1666  connect(config, &GallerySettings::OrderChanged,
1667  this, [this]()
1668  {
1669  // Update db view, reset cover cache & reload
1670  int sortIm = gCoreContext->GetNumSetting("GalleryImageOrder");
1671  int sortDir = gCoreContext->GetNumSetting("GalleryDirOrder");
1672  m_mgr.SetSortOrder(sortIm, sortDir);
1673  m_view->ClearCache();
1675  });
1676 
1677  connect(config, &GallerySettings::DateChanged,
1678  this, [this]()
1679  {
1680  QString date = gCoreContext->GetSetting("GalleryDateFormat");
1681  m_mgr.SetDateFormat(date);
1682  BuildImageList();
1683  });
1684 
1685  connect(config, &GallerySettings::ExclusionsChanged,
1686  this, [this]()
1687  {
1688  // Request rescan
1689  QString exclusions = gCoreContext->GetSetting("GalleryIgnoreFilter");
1690  m_view->ClearCache();
1691  ImageManagerFe::IgnoreDirs(exclusions);
1692  });
1693 }
1694 
1695 
1701 {
1702  gCoreContext->SaveBoolSetting("GalleryShowHidden", show);
1703 
1704  // Update Db(s)
1706 
1707  // Reset dir thumbnail cache
1708  m_view->ClearCache();;
1709 
1711 }
1712 
1713 
1719 void GalleryThumbView::ShowDialog(const QString& msg, const QString& event)
1720 {
1721  auto *popup = new MythConfirmationDialog(&m_popupStack, msg, true);
1722 
1723  if (popup->Create())
1724  {
1725  popup->SetReturnEvent(this, event);
1726  m_popupStack.AddScreen(popup);
1727  }
1728  else
1729  delete popup;
1730 }
1731 
1732 
1737 {
1738  if (m_menuState.m_selected)
1739  {
1740  QString base = QFileInfo(m_menuState.m_selected->m_baseName).completeBaseName();
1741  QString msg = tr("Enter a new name:");
1742  auto *popup = new MythTextInputDialog(&m_popupStack, msg, FilterNone,
1743  false, base);
1744  if (popup->Create())
1745  {
1746  popup->SetReturnEvent(this, "FileRename");
1747  m_popupStack.AddScreen(popup);
1748  }
1749  else
1750  delete popup;
1751  }
1752 }
1753 
1754 
1759 {
1761 }
1762 
1763 
1768 {
1769  QString msg = tr("Enter password:");
1770  auto *popup = new MythTextInputDialog(&m_popupStack, msg, FilterNone, true);
1771  if (popup->Create())
1772  {
1773  popup->SetReturnEvent(this, "Password");
1774  m_popupStack.AddScreen(popup);
1775  }
1776  else
1777  delete popup;
1778 }
1779 
1780 
1785 {
1786  gCoreContext->SaveSetting("GalleryShowType", type);
1787 
1788  // Update Db(s)
1789  m_mgr.SetType(type);
1790 
1791  // Reset dir thumbnail cache
1792  m_view->ClearCache();
1793 
1795 }
1796 
1797 
1803 {
1804  if (m_menuState.m_selected)
1805  {
1806  QString err = reset ? m_mgr.SetCover(m_menuState.m_selected->m_id, 0)
1807  : m_mgr.SetCover(m_menuState.m_selected->m_parentId,
1808  m_menuState.m_selected->m_id);
1809  if (!err.isEmpty())
1810  ShowOkPopup(err);
1811  }
1812 }
1813 
1814 
1819 {
1820  SelectZoomWidget(-1);
1821  BuildImageList();
1822 }
1823 
1824 
1829 {
1830  SelectZoomWidget(1);
1831  BuildImageList();
1832 }
1833 
1834 
1840 {
1841  m_zoomLevel += change;
1842 
1843  // constrain to zoom levels supported by theme
1844  if (m_zoomLevel < 0)
1845  m_zoomLevel = 0;
1846  if (m_zoomLevel >= m_zoomWidgets.size())
1847  m_zoomLevel = m_zoomWidgets.size() - 1;
1848 
1849  // Store any requested change, but not constraining adjustments
1850  // Thus, changing to a theme with fewer zoom levels will not overwrite the
1851  // setting
1852  if (change != 0)
1853  gCoreContext->SaveSetting("GalleryZoomLevel", m_zoomLevel);
1854 
1855  // dump the current list widget
1856  if (m_imageList)
1857  {
1858  m_imageList->SetVisible(false);
1859  disconnect(m_imageList, nullptr, this, nullptr);
1860  }
1861 
1862  // initialise new list widget
1864 
1865  m_imageList->SetVisible(true);
1867 
1868  // Monitor list actions (after focus events have been ignored)
1873 }
1874 
1875 
1880 {
1881  auto *popup = new MythTextInputDialog(&m_popupStack,
1882  tr("Enter name of new directory"),
1883  FilterNone, false);
1884  if (popup->Create())
1885  {
1886  popup->SetReturnEvent(this, "MakeDir");
1887  m_popupStack.AddScreen(popup);
1888  }
1889  else
1890  delete popup;
1891 }
1892 
1893 
1898 {
1900  if (dir)
1901  m_mgr.CloseDevices(dir->m_device, true);
1902 }
1903 
1904 
1914 void GalleryThumbView::Copy(bool deleteAfter)
1915 {
1916  // Destination must be a dir
1917  ImagePtrK destDir = m_menuState.m_selected;
1918  if (!destDir || destDir->IsFile())
1919  return;
1920 
1921  // Use current markings, if any. Otherwise use previous markings
1922  ImageIdList markedIds = m_menuState.m_markedId;
1923  if (markedIds.isEmpty())
1924  {
1925  markedIds = m_menuState.m_prevMarkedId;
1926  if (markedIds.isEmpty())
1927  {
1928  ShowOkPopup(tr("No files specified"));
1929  return;
1930  }
1931  }
1932 
1933  // Get all files/dirs in subtree(s). Only files are copied
1934  ImageList files;
1935  ImageList dirs;
1936  m_mgr.GetDescendants(markedIds, files, dirs);
1937 
1938  if (dirs.isEmpty() && files.isEmpty())
1939  {
1940  ShowOkPopup(tr("No images"));
1941  // Nothing to clean up
1942  return;
1943  }
1944 
1945  // Child dirs appear before their subdirs. If no dirs, images are all direct children
1946  ImagePtrK aChild = dirs.isEmpty() ? files[0] : dirs[0];
1947 
1948  // Determine parent path including trailing /
1949  int basePathSize = aChild->m_filePath.size() - aChild->m_baseName.size();
1950 
1951  // Update filepaths for Db & generate URLs for filesystem copy
1952  // Only copy files, destination dirs will be created automatically
1953  TransferThread::TransferMap transfers;
1954  for (const ImagePtr & im : qAsConst(files))
1955  {
1956  // Replace base path with destination path
1957  im->m_filePath = ImageManagerFe::ConstructPath(destDir->m_filePath,
1958  im->m_filePath.mid(basePathSize));
1959 
1960  transfers.insert(im, m_mgr.BuildTransferUrl(im->m_filePath,
1961  destDir->IsLocal()));
1962  }
1963 
1964  // Create progress dialog
1965  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
1966  auto *progress = new MythUIProgressDialog(tr("Copying files"), popupStack,
1967  "copydialog");
1968  if (progress->Create())
1969  popupStack->AddScreen(progress, false);
1970  else
1971  {
1972  delete progress;
1973  progress = nullptr;
1974  }
1975 
1976  // Copy files in a servant thread
1977  TransferThread copy(transfers, false, progress);
1979  TransferThread::ImageSet failed = copy.GetResult();
1980 
1981  if (progress)
1982  progress->Close();
1983 
1984  if (!failed.isEmpty())
1985  ShowOkPopup(tr("Failed to copy %L1/%Ln file(s)", nullptr, transfers.size())
1986  .arg(failed.size()));
1987 
1988  // Don't update Db for files that failed
1989  for (const ImagePtrK & im : qAsConst(failed))
1990  transfers.remove(im);
1991 
1992  ImageListK newImages = transfers.keys();
1993 
1994  // Include dirs
1995  QStringList dirPaths;
1996  for (const ImagePtr & im : qAsConst(dirs))
1997  {
1998  QString relPath = im->m_filePath.mid(basePathSize);
1999 
2000  dirPaths << relPath;
2001 
2002  // Replace base path with destination path
2003  im->m_filePath = ImageManagerFe::ConstructPath(destDir->m_filePath, relPath);
2004 
2005  // Append dirs so that hidden state & cover is preserved for new dirs
2006  // Pre-existing dirs will take precedance over these.
2007  newImages.append(im);
2008  }
2009 
2010  // Copy empty dirs as well (will fail for non-empty dirs)
2011  if (!dirPaths.isEmpty())
2012  m_mgr.MakeDir(destDir->m_id, dirPaths, false);
2013 
2014  if (!newImages.isEmpty())
2015  {
2016  // Update Db
2017  m_mgr.CreateImages(destDir->m_id, newImages);
2018 
2019  if (deleteAfter)
2020  {
2021  // Delete files/dirs that have been successfully copied
2022  // Will fail for dirs containing images that failed to copy
2023  ImageIdList ids;
2024  for (const ImagePtrK & im : qAsConst(newImages))
2025  ids << im->m_id;
2026 
2027  m_mgr.DeleteFiles(ids);
2028  }
2029  }
2030 }
2031 
2032 
2043 {
2044  // Destination must be a dir
2045  ImagePtrK destDir = m_menuState.m_selected;
2046  if (!destDir || destDir->IsFile())
2047  return;
2048 
2049  // Use current markings, if any. Otherwise use previous markings
2050  ImageIdList markedIds = m_menuState.m_markedId;
2051  if (markedIds.isEmpty())
2052  {
2053  markedIds = m_menuState.m_prevMarkedId;
2054  if (markedIds.isEmpty())
2055  {
2056  ShowOkPopup(tr("No files specified"));
2057  return;
2058  }
2059  }
2060 
2061  // Note UI mandates that transferees are either all local or all remote
2062  if (destDir->IsLocal() != ImageItem::IsLocalId(markedIds[0]))
2063  {
2064  // Moves between hosts require copy/delete
2065  Copy(true);
2066  return;
2067  }
2068 
2069  // Get marked images. Each file and dir will be renamed
2070  ImageList files;
2071  ImageList dirs;
2072  if (m_mgr.GetImages(markedIds, files, dirs) <= 0)
2073  {
2074  ShowOkPopup(tr("No images specified"));
2075  // Nothing to clean up
2076  return;
2077  }
2078  ImageList images = dirs + files;
2079 
2080  // Determine parent from first dir or pic
2081  ImagePtr aChild = images[0];
2082 
2083  // Determine parent path including trailing /
2084  // Note UI mandates that transferees all have same parent.
2085  int basePathSize = aChild->m_filePath.size() - aChild->m_baseName.size();
2086  QString parentPath = aChild->m_filePath.left(basePathSize);
2087 
2088  // Determine destination URLs
2089  TransferThread::TransferMap transfers;
2090  for (const QSharedPointer<ImageItem> & im : qAsConst(images))
2091  {
2092  // Replace base path with destination path
2093  QString newPath = ImageManagerFe::ConstructPath(destDir->m_filePath,
2094  im->m_filePath.mid(basePathSize));
2095 
2096  transfers.insert(im, m_mgr.BuildTransferUrl(newPath, aChild->IsLocal()));
2097  }
2098 
2099  // Create progress dialog
2100  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
2101  auto *progress = new MythUIProgressDialog(tr("Moving files"), popupStack,
2102  "movedialog");
2103 
2104  if (progress->Create())
2105  popupStack->AddScreen(progress, false);
2106  else
2107  {
2108  delete progress;
2109  progress = nullptr;
2110  }
2111 
2112  // Move files in a servant thread
2113  TransferThread move(transfers, true, progress);
2114  WaitUntilDone(move);
2115  TransferThread::ImageSet failed = move.GetResult();
2116 
2117  if (progress)
2118  progress->Close();
2119 
2120  if (!failed.isEmpty())
2121  ShowOkPopup(tr("Failed to move %L1/%Ln file(s)", nullptr, transfers.size())
2122  .arg(failed.size()));
2123 
2124  // Don't update Db for files that failed
2125  for (const ImagePtrK & im : qAsConst(failed))
2126  transfers.remove(im);
2127 
2128  if (!transfers.isEmpty())
2129  {
2130  ImageListK moved = transfers.keys();
2131 
2132  // Unmark moved files
2133  for (const ImagePtrK & im : qAsConst(moved))
2134  m_view->Mark(im->m_id, false);
2135 
2136  // Update Db
2137  m_mgr.MoveDbImages(destDir, moved, parentPath);
2138  }
2139 }
2140 
2141 
2146 {
2147  QString path = m_mgr.CreateImport();
2148  if (path.isEmpty())
2149  {
2150  ShowOkPopup(tr("Failed to create temporary directory."));
2151  return;
2152  }
2153 
2154  // Replace placeholder in command
2155  QString cmd = gCoreContext->GetSetting("GalleryImportCmd");
2156  cmd.replace("%TMPDIR%", path);
2157 
2158  // Run command in a separate thread
2159  MythUIBusyDialog *busy =
2160  ShowBusyPopup(tr("Running Import command.\nPlease wait..."));
2161 
2162  ShellThread thread(cmd, path);
2163  WaitUntilDone(thread);
2164 
2165  if (busy)
2166  busy->Close();
2167 
2168  int error = thread.GetResult();
2169  if (error != 0)
2170  ShowOkPopup(tr("Import command failed.\nError: %1").arg(error));
2171 
2172  // Rescan local devices
2173  QString err = m_mgr.ScanImagesAction(true, true);
2174  if (!err.isEmpty())
2175  LOG(VB_GENERAL, LOG_ERR, LOC + err);
2176 }
GalleryThumbView::FlipVerticalMarked
void FlipVerticalMarked()
Definition: gallerythumbview.h:81
GalleryThumbView::UpdateThumbnail
static void UpdateThumbnail(MythUIButtonListItem *button, const ImagePtrK &im, const QString &url, int index)
Update the buttonlist item with a thumbnail.
Definition: gallerythumbview.cpp:850
kPicAndVideo
@ kPicAndVideo
Show Pictures & Videos.
Definition: imagemanager.h:78
ImagePtrK
QSharedPointer< ImageItemK > ImagePtrK
Definition: imagetypes.h:165
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:315
MenuSubjects::m_prevMarkedId
ImageIdList m_prevMarkedId
Ids of marked items in previous dir.
Definition: galleryviews.h:69
InfoList::Display
void Display(ImageItemK &im, const QStringList &tagStrings)
Build list of metadata tags.
Definition: galleryinfo.cpp:222
ImageDbReader::GetImages
int GetImages(const ImageIdList &ids, ImageList &files, ImageList &dirs) const
Returns images (local or remote but not a combination)
Definition: imagemanager.cpp:1851
MythEvent::MythEventMessage
static Type MythEventMessage
Definition: mythevent.h:79
MThread::start
void start(QThread::Priority p=QThread::InheritPriority)
Tell MThread to start running the thread in the near future.
Definition: mthread.cpp:283
ShowBusyPopup
MythUIBusyDialog * ShowBusyPopup(const QString &message)
Definition: mythprogressdialog.cpp:95
GalleryThumbView::m_scanProgressBar
MythUIProgressBar * m_scanProgressBar
Definition: gallerythumbview.h:138
GalleryThumbView::m_thumbExists
QSet< int > m_thumbExists
Images where thumbnails are known to exist.
Definition: gallerythumbview.h:161
GalleryThumbView::IntPair
QPair< int, int > IntPair
Definition: gallerythumbview.h:127
mythuitext.h
mythuiprogressbar.h
ImageAdapterBase::ConstructPath
static QString ConstructPath(const QString &path, const QString &name)
Assembles a canonical file path without corrupting its absolute/relative nature.
Definition: imagemanager.h:132
FilterNone
@ FilterNone
Definition: mythuitextedit.h:21
ImageManagerFe::CreateThumbnails
void CreateThumbnails(const ImageIdList &ids, bool forFolder)
Create thumbnails or verify that they already exist.
Definition: imagemanager.cpp:1997
TransferThread::m_failed
ImageSet m_failed
Definition: gallerythumbview.cpp:138
GalleryThumbView::m_positionText
MythUIText * m_positionText
Definition: gallerythumbview.h:136
DirectoryView::GetPosition
QString GetPosition() const
Get positional status.
Definition: galleryviews.cpp:484
GallerySettings::DateChanged
void DateChanged()
MythUIText::Reset
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitext.cpp:82
error
static void error(const char *str,...)
Definition: vbi.cpp:36
kVideoFile
@ kVideoFile
A video.
Definition: imagetypes.h:40
GallerySettings::ExclusionsChanged
void ExclusionsChanged()
GalleryThumbView::StartScan
void StartScan()
Definition: gallerythumbview.h:111
TransferThread::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(FileTransferWorker)
GalleryThumbView::HideMarked
void HideMarked()
Definition: gallerythumbview.h:94
ImageSlideShowType
ImageSlideShowType
Type of slide show.
Definition: galleryslideview.h:15
GalleryThumbView::MenuPaste
void MenuPaste(MythMenu *mainMenu)
Add a Paste submenu.
Definition: gallerythumbview.cpp:1134
GalleryThumbView::m_imageList
MythUIButtonList * m_imageList
Definition: gallerythumbview.h:130
MythUIButtonListItem::DisplayState
void DisplayState(const QString &state, const QString &name)
Definition: mythuibuttonlist.cpp:3563
ImageManagerFe::CreateImages
QString CreateImages(int destId, const ImageListK &images)
Copies database images (but not the files themselves).
Definition: imagemanager.cpp:2243
GalleryThumbView::MakeDir
void MakeDir()
Show dialog to input new directory name.
Definition: gallerythumbview.cpp:1879
GalleryThumbView::SelectZoomWidget
void SelectZoomWidget(int change)
Change buttonlist to use a different size.
Definition: gallerythumbview.cpp:1839
ImageManagerFe::ScanImagesAction
QString ScanImagesAction(bool start, bool local=false)
Handle scanner start/stop commands.
Definition: imagemanager.cpp:2032
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:386
MythUIButtonListItem::SetImageFromMap
void SetImageFromMap(const InfoMap &imageMap)
Definition: mythuibuttonlist.cpp:3461
ImageManagerFe::BuildTransferUrl
QString BuildTransferUrl(const QString &path, bool local) const
Generate Myth URL for a local or remote path.
Definition: imagemanager.h:499
GalleryThumbView::m_scanProgress
QHash< QString, IntPair > m_scanProgress
Last scan updates received from scanners.
Definition: gallerythumbview.h:150
progress
bool progress
Definition: mythcommflag.cpp:69
GalleryThumbView::customEvent
void customEvent(QEvent *event) override
Handle custom events.
Definition: gallerythumbview.cpp:365
MythUIProgressBar::SetStart
void SetStart(int value)
Definition: mythuiprogressbar.cpp:63
GalleryThumbView::DirSelectDown
void DirSelectDown()
Goes one directory level down.
Definition: gallerythumbview.cpp:1488
GallerySettings
Definition: galleryconfig.h:9
MenuSubjects::m_unhiddenMarked
bool m_unhiddenMarked
Is any marked item unhidden ?
Definition: galleryviews.h:72
GalleryThumbView::UnmarkAll
void UnmarkAll()
Definition: gallerythumbview.h:88
DirectoryView::Mark
void Mark(int id, bool mark)
Mark/unmark an image/dir.
Definition: galleryviews.cpp:736
GalleryThumbView::m_infoList
InfoList m_infoList
Image details overlay.
Definition: gallerythumbview.h:147
ImageManagerFe::MakeDir
QString MakeDir(int parent, const QStringList &names, bool rescan=true)
Create directories.
Definition: imagemanager.cpp:2201
MythUIType::GetChild
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Definition: mythuitype.cpp:133
MenuSubjects::m_markedId
ImageIdList m_markedId
Ids of all marked items.
Definition: galleryviews.h:68
kDirectory
@ kDirectory
A device sub directory.
Definition: imagetypes.h:38
DialogCompletionEvent::kEventType
static Type kEventType
Definition: mythdialogbox.h:57
GalleryThumbView::ShowPassword
void ShowPassword()
Displays dialog to accept password.
Definition: gallerythumbview.cpp:1767
kBrowseSlides
@ kBrowseSlides
Definition: galleryslideview.h:16
ImageManagerFe::DeviceCount
int DeviceCount() const
Definition: imagemanager.h:100
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
MythEvent
This class is used as a container for messages.
Definition: mythevent.h:16
GalleryThumbView::FlipHorizontalMarked
void FlipHorizontalMarked()
Definition: gallerythumbview.h:80
MythMenu::AddItem
void AddItem(const QString &title)
Definition: mythdialogbox.h:110
ImageManagerFe::IgnoreDirs
static QString IgnoreDirs(const QString &excludes)
Set directories to ignore during scans of the storage group.
Definition: imagemanager.cpp:2185
MythUIProgressBar::SetUsed
void SetUsed(int value)
Definition: mythuiprogressbar.cpp:69
GalleryThumbView::GalleryThumbView
GalleryThumbView(MythScreenStack *parent, const char *name)
Constructor.
Definition: gallerythumbview.cpp:163
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
GalleryThumbView::FlipVertical
void FlipVertical()
Definition: gallerythumbview.h:76
MythUIButtonListItem::FullChecked
@ FullChecked
Definition: mythuibuttonlist.h:48
GalleryThumbView::LoadData
void LoadData(int parent)
Loads & displays images from database.
Definition: gallerythumbview.cpp:635
TransferThread::m_files
TransferMap m_files
Maps source filepath to destination filepath.
Definition: gallerythumbview.cpp:137
TransferThread::run
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Definition: gallerythumbview.cpp:69
kNoInfo
@ kNoInfo
Details not displayed.
Definition: galleryinfo.h:16
kDateCaption
@ kDateCaption
Dates.
Definition: gallerythumbview.h:17
GalleryThumbView::m_crumbsText
MythUIText * m_crumbsText
Definition: gallerythumbview.h:132
InfoList::Update
void Update(const ImagePtrK &im)
Populates available exif details for the current image/dir.
Definition: galleryinfo.cpp:196
kNoCaption
@ kNoCaption
None.
Definition: gallerythumbview.h:15
GalleryThumbView::m_typeFilterText
MythUIText * m_typeFilterText
Definition: gallerythumbview.h:135
ImageManagerFe::HideFiles
QString HideFiles(bool hidden, const ImageIdList &ids)
Hide/unhide images.
Definition: imagemanager.cpp:2078
GalleryThumbView::MenuAction
void MenuAction(MythMenu *mainMenu)
Add a Action submenu.
Definition: gallerythumbview.cpp:1199
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MThread::RunProlog
void RunProlog(void)
Sets up a thread, call this if you reimplement run().
Definition: mthread.cpp:196
MenuSubjects::m_childCount
ssize_t m_childCount
Number of images & dirs excl parent.
Definition: galleryviews.h:70
ImageManagerFe::SetDateFormat
void SetDateFormat(const QString &format)
Definition: imagemanager.h:492
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
show
static void show(uint8_t *buf, int length)
Definition: ringbuffer.cpp:339
kSeasonal
@ kSeasonal
Biased random selection so that images are more likely to appear on anniversaries.
Definition: galleryviews.h:25
GalleryThumbView::m_hideFilterText
MythUIText * m_hideFilterText
Definition: gallerythumbview.h:134
GalleryThumbView::Import
void Import()
Executes user 'Import command'.
Definition: gallerythumbview.cpp:2145
DirectoryView::GetParent
ImagePtrK GetParent() const
Definition: galleryviews.h:175
myth_system
uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
Definition: mythsystemlegacy.cpp:506
ImageDbReader::SetVisibility
void SetVisibility(bool showHidden)
Definition: imagemanager.h:417
GalleryThumbView::ZoomIn
void ZoomIn()
Use smaller buttonlist widgets.
Definition: gallerythumbview.cpp:1828
GalleryThumbView::HideHidden
void HideHidden()
Definition: gallerythumbview.h:99
GalleryThumbView::DoHideItem
void DoHideItem(bool hide=true)
Hide or unhide item.
Definition: gallerythumbview.cpp:1582
TransferThread::TransferThread
TransferThread(TransferMap files, bool move, MythUIProgressDialog *dialog)
Definition: gallerythumbview.cpp:63
GalleryThumbView::m_menuState
MenuSubjects m_menuState
Current selection/marked files when menu is invoked.
Definition: gallerythumbview.h:155
TransferThread::TransferMap
QMap< ImagePtrK, QString > TransferMap
Definition: gallerythumbview.cpp:60
ImageManagerFe::CloseDevices
void CloseDevices(int devId=DEVICE_INVALID, bool eject=false)
Definition: imagemanager.cpp:2424
FlatView::Select
bool Select(int id, int fallback=0)
Selects first occurrence of an image.
Definition: galleryviews.cpp:119
hardwareprofile.scan.scan
def scan(profile, smoonURL, gate)
Definition: scan.py:57
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:14
mythprogressdialog.h
MythEvent::Message
const QString & Message() const
Definition: mythevent.h:65
MenuSubjects::m_selectedMarked
bool m_selectedMarked
Is selected item marked ?
Definition: galleryviews.h:67
MythUIButtonListItem::CheckState
CheckState
Definition: mythuibuttonlist.h:44
GalleryThumbView::Create
bool Create() override
Initialises and shows the graphical elements.
Definition: gallerythumbview.cpp:211
ImageManagerFe::ChangeOrientation
QString ChangeOrientation(ImageFileTransform transform, const ImageIdList &ids)
Apply an orientation transform to images.
Definition: imagemanager.cpp:2109
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:113
GalleryThumbView::MenuMain
void MenuMain()
Shows the main menu when the MENU button was pressed.
Definition: gallerythumbview.cpp:1038
mythsystemlegacy.h
DirectoryView::MarkAll
void MarkAll()
Mark all images/dirs.
Definition: galleryviews.cpp:723
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
GalleryThumbView::HideItem
void HideItem()
Definition: gallerythumbview.h:91
MythUIButtonListItem::SetText
void SetText(const QString &text, const QString &name="", const QString &state="")
Definition: mythuibuttonlist.cpp:3268
GalleryThumbView::RepeatOff
static void RepeatOff()
Definition: gallerythumbview.h:124
MythObservable::addListener
void addListener(QObject *listener)
Add a listener to the observable.
Definition: mythobservable.cpp:38
GalleryThumbView::SetUiSelection
void SetUiSelection(MythUIButtonListItem *item)
Updates text widgets for selected item.
Definition: gallerythumbview.cpp:981
GalleryThumbView::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Handle keypresses.
Definition: gallerythumbview.cpp:275
GalleryThumbView::DoSetCover
void DoSetCover(bool reset=false)
Set or reset thumbnails to use for a directory cover.
Definition: gallerythumbview.cpp:1802
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
TransferThread
Worker thread for copying/moving files.
Definition: gallerythumbview.cpp:56
ImageFileTransform
ImageFileTransform
Image transformations.
Definition: imagemetadata.h:46
TransferThread::m_move
bool m_move
Copy if false, Move if true.
Definition: gallerythumbview.cpp:136
ProgressUpdateEvent
Definition: mythprogressdialog.h:16
StandardSettingDialog
Definition: standardsettings.h:468
MythUIProgressBar::SetTotal
void SetTotal(int value)
Definition: mythuiprogressbar.cpp:81
ShellThread
Worker thread for running import.
Definition: gallerythumbview.cpp:26
GalleryThumbView::ResetUiSelection
void ResetUiSelection()
Clears all text widgets for selected item.
Definition: gallerythumbview.cpp:958
GallerySlideView
Slideshow screen.
Definition: galleryslideview.h:23
InfoList::Toggle
void Toggle(const ImagePtrK &im)
Toggle infolist state for an image. Focusable widgets toggle between Basic & Full info....
Definition: galleryinfo.cpp:85
GalleryThumbView::RotateCCWMarked
void RotateCCWMarked()
Definition: gallerythumbview.h:79
GalleryThumbView::MenuShow
void MenuShow(MythMenu *mainMenu)
Add a Show submenu.
Definition: gallerythumbview.cpp:1316
kPicOnly
@ kPicOnly
Hide videos.
Definition: imagemanager.h:79
GalleryThumbView::ShowSettings
void ShowSettings()
Show configuration screen.
Definition: gallerythumbview.cpp:1647
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
ImageDbReader::SetSortOrder
void SetSortOrder(int order, int dirOrder)
Definition: imagemanager.h:414
GalleryThumbView::UpdateScanProgress
void UpdateScanProgress(const QString &scanner, int current, int total)
Update progressbar with scan status.
Definition: gallerythumbview.cpp:877
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
remotefile.h
MythFile::copy
MBASE_PUBLIC long long copy(QFile &dst, QFile &src, uint block_size=0)
Copies src file to dst file.
Definition: mythmiscutil.cpp:264
MythUIProgressBar::Reset
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuiprogressbar.cpp:16
MythUIProgressDialog
Definition: mythprogressdialog.h:59
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:118
hardwareprofile.i18n.t
t
Definition: i18n.py:36
GalleryThumbView::TransformMarked
void TransformMarked(ImageFileTransform tran=kRotateCW)
Apply transform to marked images.
Definition: gallerythumbview.cpp:1570
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
menu
static MythThemedMenu * menu
Definition: mythtv-setup.cpp:58
GalleryThumbView::SelectImage
void SelectImage(int id)
Select item if it is displayed.
Definition: gallerythumbview.cpp:1376
compat.h
GalleryThumbView::ResetCover
void ResetCover()
Definition: gallerythumbview.h:102
GalleryThumbView::DoShowHidden
void DoShowHidden(bool show=true)
Show or hide hidden files.
Definition: gallerythumbview.cpp:1700
mark
Definition: lang.cpp:22
ImageDbReader::GetType
int GetType() const
Definition: imagemanager.h:408
ImageAdapterBase::FormatSize
static QString FormatSize(int sizeKib)
Definition: imagemanager.h:143
GalleryThumbView::m_view
DirectoryView * m_view
List of images comprising the view.
Definition: gallerythumbview.h:146
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:206
gallerythumbview.h
Implements Gallery Thumbnail screen.
GalleryThumbView::MenuSlideshow
void MenuSlideshow(MythMenu *mainMenu)
Add a Slideshow submenu.
Definition: gallerythumbview.cpp:1265
kShuffle
@ kShuffle
Each image appears exactly once, but in random order.
Definition: galleryviews.h:23
GalleryThumbView::ClearSgDb
static void ClearSgDb()
Definition: gallerythumbview.h:34
GalleryThumbView::BuildImageList
void BuildImageList()
Displays all images in current view.
Definition: gallerythumbview.cpp:670
ImageDbReader::GetDescendants
void GetDescendants(const ImageIdList &ids, ImageList &files, ImageList &dirs) const
Return all (local or remote) images that are direct children of a dir.
Definition: imagemanager.cpp:1891
GalleryThumbView::StartSlideshow
void StartSlideshow(ImageSlideShowType mode)
Start slideshow screen.
Definition: gallerythumbview.cpp:1431
GalleryThumbView::ShowRenameInput
void ShowRenameInput()
Show dialog to allow input.
Definition: gallerythumbview.cpp:1736
GalleryThumbView::ShowDialog
void ShowDialog(const QString &msg, const QString &event="")
Show a confirmation dialog.
Definition: gallerythumbview.cpp:1719
FlatView::GetAllNodes
ImageListK GetAllNodes() const
Get all images/dirs in view.
Definition: galleryviews.cpp:53
DirectoryView::InvertMarked
void InvertMarked()
Mark all unmarked items, unmark all marked items.
Definition: galleryviews.cpp:755
MythUIThemeCache::RemoveFromCacheByFile
void RemoveFromCacheByFile(const QString &File)
Definition: mythuithemecache.cpp:508
GalleryThumbView::DeleteMarked
void DeleteMarked()
Confirm user deletion of marked files.
Definition: gallerythumbview.cpp:1637
GalleryThumbView::Unhide
void Unhide()
Definition: gallerythumbview.h:92
ImageListK
QList< ImagePtrK > ImageListK
Definition: imagetypes.h:166
MThread::RunEpilog
void RunEpilog(void)
Cleans up a thread's resources, call this if you reimplement run().
Definition: mthread.cpp:209
ImageCaptionType
ImageCaptionType
Type of captions to display.
Definition: gallerythumbview.h:14
GalleryThumbView::m_scanActive
QSet< QString > m_scanActive
Scanners currently scanning.
Definition: gallerythumbview.h:152
FlatView::GetCachedThumbUrl
QString GetCachedThumbUrl(int id) const
Definition: galleryviews.h:121
GalleryThumbView::RotateCCW
void RotateCCW()
Definition: gallerythumbview.h:74
ImageManagerFe::LongDateOf
static QString LongDateOf(const ImagePtrK &im)
Return a timestamp/datestamp for an image or dir.
Definition: imagemanager.cpp:2344
ShellThread::m_command
QString m_command
Definition: gallerythumbview.cpp:50
MythUIBusyDialog
Definition: mythprogressdialog.h:36
ImageDbReader::GetVisibility
bool GetVisibility() const
Definition: imagemanager.h:409
GalleryThumbView::ZoomOut
void ZoomOut()
Use larger buttonlist widgets.
Definition: gallerythumbview.cpp:1818
MThread::isFinished
bool isFinished(void) const
Definition: mthread.cpp:258
GalleryThumbView::ResetExif
void ResetExif()
Definition: gallerythumbview.h:77
FlatView::GetSelected
ImagePtrK GetSelected() const
Get current selection.
Definition: galleryviews.cpp:66
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3665
ImageManagerFe::SetCover
QString SetCover(int parent, int cover)
Set image to use as a cover thumbnail(s)
Definition: imagemanager.cpp:2141
GallerySettings::ClearDbPressed
void ClearDbPressed()
GalleryThumbView::ItemClicked
void ItemClicked(MythUIButtonListItem *item)
Action item click.
Definition: gallerythumbview.cpp:1388
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:54
InfoList::GetState
InfoVisibleState GetState() const
Definition: galleryinfo.h:33
ImageItem::IsLocalId
static bool IsLocalId(int id)
Determine image type (local/remote) from its id. Root/Gallery is remote.
Definition: imagetypes.h:122
LOC
#define LOC
Definition: gallerythumbview.cpp:22
GallerySettings::OrderChanged
void OrderChanged()
GalleryThumbView::DoHideMarked
void DoHideMarked(bool hide=true)
Hide or unhide marked items.
Definition: gallerythumbview.cpp:1607
GalleryThumbView::DirSelectUp
bool DirSelectUp()
Goes up one directory level.
Definition: gallerythumbview.cpp:1467
GalleryThumbView::UpdateImageItem
void UpdateImageItem(MythUIButtonListItem *item)
Initialises a single buttonlist item.
Definition: gallerythumbview.cpp:716
TransferThread::GetResult
ImageSet GetResult(void)
Definition: gallerythumbview.cpp:67
GalleryThumbView::ShowDetails
void ShowDetails()
Shows exif info/details about an item.
Definition: gallerythumbview.cpp:1758
GalleryThumbView::CheckThumbnail
QString CheckThumbnail(MythUIButtonListItem *item, const ImagePtrK &im, ImageIdList &request, int index)
Verify thumbnail is known to exist.
Definition: gallerythumbview.cpp:823
RemoteFile::CopyFile
static bool CopyFile(const QString &src, const QString &dst, bool overwrite=false, bool verify=false)
Definition: remotefile.cpp:580
GalleryThumbView::FlipHorizontal
void FlipHorizontal()
Definition: gallerythumbview.h:75
GalleryThumbView::m_popupStack
MythScreenStack & m_popupStack
Definition: gallerythumbview.h:144
GalleryThumbView::m_pendingMap
QMultiHash< int, ThumbLocation > m_pendingMap
Buttons waiting for thumbnails to be created.
Definition: gallerythumbview.h:159
ImageList
QVector< ImagePtr > ImageList
Definition: imagetypes.h:160
MythCoreContext::GetNumSetting
int GetNumSetting(const QString &key, int defaultval=0)
Definition: mythcorecontext.cpp:910
GalleryThumbView::TransformItem
void TransformItem(ImageFileTransform tran=kRotateCW)
Apply transform to an image.
Definition: gallerythumbview.cpp:1552
ImageManagerFe::CreateImport
QString CreateImport()
Definition: imagemanager.cpp:2521
GalleryThumbView::RotateCW
void RotateCW()
Definition: gallerythumbview.h:73
GalleryThumbView::RepeatOn
static void RepeatOn()
Definition: gallerythumbview.h:123
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
GalleryThumbView::m_scanProgressText
MythUIText * m_scanProgressText
Definition: gallerythumbview.h:137
GalleryThumbView::MarkInvertAll
void MarkInvertAll()
Invert all marked items.
Definition: gallerythumbview.cpp:1539
DirectoryView::LoadFromDb
bool LoadFromDb(int parentId) override
Populate view from database as images/subdirs of a directory. View is ordered: Parent dir,...
Definition: galleryviews.cpp:498
MythCoreContext::GetBoolSetting
bool GetBoolSetting(const QString &key, bool defaultval=false)
Definition: mythcorecontext.cpp:904
GalleryThumbView::RecursiveSlideshow
void RecursiveSlideshow()
Definition: gallerythumbview.h:71
InfoList::Hide
bool Hide()
Remove infolist from display.
Definition: galleryinfo.cpp:119
TransferThread::ImageSet
QSet< ImagePtrK > ImageSet
Definition: gallerythumbview.cpp:61
GalleryThumbView::m_emptyText
MythUIText * m_emptyText
Definition: gallerythumbview.h:133
GalleryThumbView::Move
void Move()
Move marked images to selected dir. If no marked files, use previously marked files....
Definition: gallerythumbview.cpp:2042
kImageFile
@ kImageFile
A picture.
Definition: imagetypes.h:39
MythMenu
Definition: mythdialogbox.h:99
ImageManagerFe::MoveDbImages
QString MoveDbImages(const ImagePtrK &destDir, ImageListK &images, const QString &srcPath)
Moves database images (but not the files themselves).
Definition: imagemanager.cpp:2287
GalleryThumbView::m_mgr
ImageManagerFe & m_mgr
Manages the images.
Definition: gallerythumbview.h:145
kUserCaption
@ kUserCaption
Exif comments.
Definition: gallerythumbview.h:18
GalleryThumbView::SetCover
void SetCover()
Definition: gallerythumbview.h:101
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:404
GallerySlideView::ImageSelected
void ImageSelected(int)
ImagePtr
QSharedPointer< ImageItem > ImagePtr
Definition: imagetypes.h:159
GalleryThumbView::m_editsAllowed
bool m_editsAllowed
Edit privileges.
Definition: gallerythumbview.h:162
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:272
ImageDbReader::SetType
void SetType(int showType)
Definition: imagemanager.h:411
GalleryThumbView::HidePictures
void HidePictures()
Definition: gallerythumbview.h:105
ImageManagerFe
The image manager for use by Frontends.
Definition: imagemanager.h:459
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:695
MythUIButtonListItem::SetImage
void SetImage(MythImage *image, const QString &name="")
Sets an image directly, should only be used in special circumstances since it bypasses the cache.
Definition: mythuibuttonlist.cpp:3429
FlatView::GetParentId
int GetParentId() const
Definition: galleryviews.h:105
GalleryThumbView::Copy
void Copy()
Definition: gallerythumbview.h:119
std
Definition: mythchrono.h:23
WaitUntilDone
static void WaitUntilDone(MThread &worker)
Runs a worker thread and waits for it to finish.
Definition: gallerythumbview.cpp:147
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:41
GalleryThumbView::DoMarkAll
void DoMarkAll(bool mark=true)
Mark or unmark all items.
Definition: gallerythumbview.cpp:1524
ImageIdList
QList< int > ImageIdList
Definition: imagetypes.h:60
ShellThread::GetResult
int GetResult(void) const
Definition: gallerythumbview.cpp:32
ImageManagerFe::CrumbName
QString CrumbName(ImageItemK &im, bool getPath=false) const
Return a displayable name (with optional path) for an image.
Definition: imagemanager.cpp:2403
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:132
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1108
RemoteFile::MoveFile
static bool MoveFile(const QString &src, const QString &dst, bool overwrite=false)
Definition: remotefile.cpp:670
MThread
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:48
GalleryThumbView::DeleteItem
void DeleteItem()
Confirm user deletion of an item.
Definition: gallerythumbview.cpp:1626
DirectoryView::GetMenuSubjects
MenuSubjects GetMenuSubjects()
Determine current selection, markings & various info to support menu display.
Definition: galleryviews.cpp:807
GalleryThumbView::ShowHidden
void ShowHidden()
Definition: gallerythumbview.h:98
PHOTO_DB_ID
static constexpr int PHOTO_DB_ID
Definition: imagetypes.h:29
GalleryThumbView::m_zoomWidgets
QList< MythUIButtonList * > m_zoomWidgets
Theme buttonlist widgets implementing zoom levels.
Definition: gallerythumbview.h:141
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
SlideOrderType
SlideOrderType
Order of images in slideshow.
Definition: galleryviews.h:21
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1554
GalleryThumbView::UnhideMarked
void UnhideMarked()
Definition: gallerythumbview.h:95
GalleryThumbView::~GalleryThumbView
~GalleryThumbView() override
Destructor.
Definition: gallerythumbview.cpp:182
build_compdb.action
action
Definition: build_compdb.py:9
DirectoryView::ClearCache
void ClearCache()
Clears UI cache.
Definition: galleryviews.cpp:887
GalleryThumbView::m_zoomLevel
int m_zoomLevel
Definition: gallerythumbview.h:142
GalleryThumbView::RemoveImages
void RemoveImages(const QStringList &ids, bool deleted=true)
Cleanup UI & image caches when a device is removed.
Definition: gallerythumbview.cpp:587
GalleryThumbView::MarkAll
void MarkAll()
Definition: gallerythumbview.h:87
DirectoryView::Clear
void Clear(bool resetParent=true)
Resets view.
Definition: galleryviews.cpp:712
ShellThread::ShellThread
ShellThread(QString cmd, QString path)
Definition: gallerythumbview.cpp:29
GalleryThumbView::UnmarkItem
void UnmarkItem()
Definition: gallerythumbview.h:85
MThread::objectName
QString objectName(void) const
Definition: mthread.cpp:243
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:320
GalleryThumbView::DoShowType
void DoShowType(int type)
Show/hide pictures or videos.
Definition: gallerythumbview.cpp:1784
GalleryThumbView::Slideshow
void Slideshow()
Definition: gallerythumbview.h:70
DirectoryView::RemoveImage
QStringList RemoveImage(int id, bool deleted=false)
Clear file/dir and all its ancestors from UI cache so that ancestor thumbnails are recalculated....
Definition: galleryviews.cpp:902
GalleryThumbView::DoMarkItem
void DoMarkItem(bool mark)
Mark or unmark a single item.
Definition: gallerythumbview.cpp:1506
GalleryThumbView::MenuTransform
void MenuTransform(MythMenu *mainMenu)
Add a Transform submenu.
Definition: gallerythumbview.cpp:1163
MythCoreContext::GetHostName
QString GetHostName(void)
Definition: mythcorecontext.cpp:836
ThumbPair
QPair< int, QString > ThumbPair
Definition: imagetypes.h:64
MenuSubjects::m_selected
ImagePtrK m_selected
Selected item.
Definition: galleryviews.h:66
kOrdered
@ kOrdered
Ordered as per user setting GallerySortOrder.
Definition: galleryviews.h:22
GalleryThumbView::ThumbLocation
QPair< MythUIButtonListItem *, int > ThumbLocation
Definition: gallerythumbview.h:157
ImageManagerFe::DeleteFiles
QString DeleteFiles(const ImageIdList &ids)
Delete images.
Definition: imagemanager.cpp:2314
GalleryThumbView::m_captionText
MythUIText * m_captionText
Definition: gallerythumbview.h:131
ShellThread::m_path
QString m_path
Definition: gallerythumbview.cpp:51
GalleryThumbView::DoScanAction
void DoScanAction(bool start)
Action scan request.
Definition: gallerythumbview.cpp:1419
GalleryThumbView::ResetExifMarked
void ResetExifMarked()
Definition: gallerythumbview.h:82
InfoList::Create
bool Create(bool focusable)
Initialise buttonlist from XML.
Definition: galleryinfo.cpp:67
galleryconfig.h
Provides Gallery configuration screens.
MythTextInputDialog
Dialog prompting the user to enter a text string.
Definition: mythdialogbox.h:314
MythCoreContext::SaveSetting
void SaveSetting(const QString &key, int newValue)
Definition: mythcorecontext.cpp:879
GalleryThumbView::HideVideos
void HideVideos()
Definition: gallerythumbview.h:106
GalleryThumbView::MarkItem
void MarkItem()
Definition: gallerythumbview.h:84
GALLERY_DB_ID
static constexpr int GALLERY_DB_ID
Definition: imagetypes.h:27
DirectoryView
A datastore of images for display by a screen. Provides an ordered list of dirs & images from a singl...
Definition: galleryviews.h:170
kDevice
@ kDevice
Storage Group and local mounted media.
Definition: imagetypes.h:36
GetMythUI
MythUIHelper * GetMythUI()
Definition: mythuihelper.cpp:66
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:191
DirectoryView::IsMarked
bool IsMarked(int id) const
Definition: galleryviews.h:188
MythUIProgressBar::SetVisible
void SetVisible(bool visible) override
Definition: mythuiprogressbar.cpp:196
DirectoryView::ClearMarked
void ClearMarked()
Unmark all items.
Definition: galleryviews.cpp:766
GalleryThumbView::MenuMarked
void MenuMarked(MythMenu *mainMenu)
Adds a Marking submenu.
Definition: gallerythumbview.cpp:1081
MythUIButtonListItem::setChecked
void setChecked(CheckState state)
Definition: mythuibuttonlist.cpp:3629
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:50
kNameCaption
@ kNameCaption
Filenames.
Definition: gallerythumbview.h:16
kRandom
@ kRandom
Random selection from view. An image may be absent or appear multiple times.
Definition: galleryviews.h:24
GalleryThumbView::Close
void Close() override
Exit Gallery.
Definition: gallerythumbview.cpp:192
ImageManagerFe::ScanQuery
static QStringList ScanQuery()
Returns storage group scanner status.
Definition: imagemanager.cpp:2058
ShowOkPopup
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
Definition: mythdialogbox.cpp:562
ImageManagerFe::RenameFile
QString RenameFile(const ImagePtrK &im, const QString &name)
Rename an image.
Definition: imagemanager.cpp:2223
ImageManagerFe::ShortDateOf
QString ShortDateOf(const ImagePtrK &im) const
Return a short datestamp for thumbnail captions.
Definition: imagemanager.cpp:2370
GalleryThumbView::Eject
void Eject()
Remove local device (or Import) from Gallery.
Definition: gallerythumbview.cpp:1897
MythObservable::removeListener
void removeListener(QObject *listener)
Remove a listener to the observable.
Definition: mythobservable.cpp:55
GalleryThumbView::RotateCWMarked
void RotateCWMarked()
Definition: gallerythumbview.h:78
ShellThread::run
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Definition: gallerythumbview.cpp:34
MythCoreContext::SaveBoolSetting
void SaveBoolSetting(const QString &key, bool newValue)
Definition: mythcorecontext.h:161
TransferThread::m_dialog
MythUIProgressDialog * m_dialog
Images for which copy/move failed.
Definition: gallerythumbview.cpp:139
ShellThread::m_result
int m_result
Definition: gallerythumbview.cpp:49
kCloneDir
@ kCloneDir
A device sub dir comprised from multiple SG dirs.
Definition: imagetypes.h:37
kVideoOnly
@ kVideoOnly
Hide pictures.
Definition: imagemanager.h:80
GalleryThumbView::ShowType
void ShowType()
Definition: gallerythumbview.h:104
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:896
GalleryThumbView::StopScan
void StopScan()
Definition: gallerythumbview.h:112
GalleryThumbView::Start
void Start()
Start Thumbnail screen.
Definition: gallerythumbview.cpp:611
MenuSubjects::m_hiddenMarked
bool m_hiddenMarked
Is any marked item hidden ?
Definition: galleryviews.h:71
MythUIButtonListItem::NotChecked
@ NotChecked
Definition: mythuibuttonlist.h:46
ImageManagerFe::DetectLocalDevices
bool DetectLocalDevices()
Detect and scan local devices.
Definition: imagemanager.cpp:2437