2#include <QStringBuilder>
12#define TR GallerySettings::tr
18 gc->setLabel(
TR(
"Image Order"));
19 gc->setHelpText(
TR(
"The order that pictures/videos are shown in thumbnail "
20 "view and ordered slideshows."));
22 gc->addSelection(
TR(
"Filename (A-Z)"),
24 gc->addSelection(
TR(
"Reverse Filename (Z-A)"),
26 gc->addSelection(
TR(
"Exif Date (oldest first)"),
28 gc->addSelection(
TR(
"Reverse Exif Date (newest first)"),
30 gc->addSelection(
TR(
"File Modified Time (oldest first)"),
32 gc->addSelection(
TR(
"Reverse File Modified Time (newest first)"),
34 gc->addSelection(
TR(
"File Extension (A-Z)"),
36 gc->addSelection(
TR(
"Reverse File Extension (Z-A)"),
38 gc->addSelection(
TR(
"File Size (smallest first)"),
40 gc->addSelection(
TR(
"Reverse File Size (largest first)"),
53 gc->setLabel(
TR(
"Directory Order"));
54 gc->setHelpText(
TR(
"The order that dirctories are shown and traversed "
55 "in recursive slideshows."));
59 gc->addSelection(
TR(
"File Modified Time (oldest first)"), QString::number(
kSortByModTimeAsc));
60 gc->addSelection(
TR(
"Reverse File Modified Time (newest first)"), QString::number(
kSortByModTimeDesc));
75 gc->setLabel(
TR(
"Date Format"));
76 gc->setHelpText(
TR(
"Date format of thumbnail captions. Other places use the system date format. "
77 "Sample shows 3rd May 2002."));
96 AddFormat(gc, sampdate, QString(
"yyyy") % QChar(0x5E74) %
97 "M" % QChar(0x6708) %
"d" % QChar(0x65E5));
109 gc->setLabel(
TR(
"Transition"));
110 gc->setHelpText(
TR(
"Effect to use between slides"));
115 for (
auto i = transitions.cbegin(); i != transitions.cend(); ++i)
116 gc->addSelection(i.value()->objectName(), QString::number(i.key()));
125 gc->setLabel(
TR(
"Slide Duration (ms)"));
126 gc->setHelpText(
TR(
"The time that a slide is displayed (between transitions), "
127 "in milliseconds."));
135 gc->setLabel(
TR(
"Transition Duration (ms)"));
136 gc->setHelpText(
TR(
"The time that each transition lasts, in milliseconds."));
144 gc->setLabel(
TR(
"Status Delay (ms)"));
145 gc->setHelpText(
TR(
"The delay before showing the Loading/Playing status, "
146 "in milliseconds."));
150#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
155 gc->setLabel(
TR(
"Maximum Image Size (MB)"));
156 gc->setHelpText(
TR(
"The maximum image size that will be loaded, "
157 "in megabytes. (-1 means system default, 0 "
158 "means unlimited.)"));
169 if (maxImageSize < 0)
171 QImageReader::setAllocationLimit(maxImageSize);
179 gc->setLabel(
TR(
"Use transitions when browsing"));
180 gc->setHelpText(
TR(
"When cleared, transitions will only be used "
181 "during a slideshow."));
193 gc->setVisible(enabled);
194 gc->setLabel(
TR(
"Import Command"));
195 gc->setHelpText(
TR(
"Command/script that can be run from the menu. "
196 "\n%TMPDIR% will be replaced by a new temporary directory, "
197 "which the import dialog will show automatically. The "
198 "directory will be removed when Gallery exits."));
210 gc->setVisible(enabled);
211 gc->setLabel(
TR(
"Scanner Exclusions"));
212 gc->setHelpText(
TR(
"Comma-separated list of filenames/directory names "
213 "to be ignored when scanning. "
214 "Glob wildcards * and ? are valid."));
230 gc->setVisible(enabled);
231 gc->setLabel(
TR(
"Start Gallery when media inserted"));
232 gc->setHelpText(
TR(
"Set to automatically start Gallery when media "
233 "(USB/CD's containing images) are inserted."));
245 gc->setVisible(enabled);
246 gc->setLabel(
TR(
"Password"));
247 gc->setHelpText(
TR(
"When set all actions that modify the filesystem or "
248 "database are protected (copy, move, transform, "
249 "hiding, covers). Hidden items cannot be viewed. "
250 "Applies to all frontends. "
251 "\nDisabled by an empty password. "
252 "Privileges persist until Gallery exits to main menu."));
264 gc->setVisible(enabled);
265 gc->setLabel(
TR(
"Reset Image Database"));
266 gc->setHelpText(
TR(
"Clears the database and thumbnails for the Image Storage Group. "
267 "A rescan will be required. Images for local media will persist."));
277 QString msg(
TR(
"Warning! This will erase settings for: hidden images, "
278 "directory covers and re-orientations. "
279 "You will have to set them again after re-scanning."));
282 if (dialog->Create())
284 stack->AddScreen(dialog);
305#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
static void ImageSizeChanged()
StandardSetting * DirOrder() const
StandardSetting * DateFormat() const
StandardSetting * ImageOrder() const
StandardSetting * ClearDb(bool enabled) const
Setting for clearing image database.
StandardSetting * Exclusions(bool enabled) const
Setting for excluding image files by pattern.
StandardSetting * ImageMaximumSize() const
GallerySettings(bool enable)
Dialog asking for user confirmation.
int GetNumSetting(const QString &key, int defaultval=0)
MythScreenStack * GetStack(const QString &Stackname)
void addSelection(const QString &label, QString value=QString(), bool select=false)
virtual void addChild(StandardSetting *child)
virtual void setLabel(QString str)
Manages transitions available to s psinter.
TransitionMap GetAll() const
static StandardSetting * SlideDuration()
static StandardSetting * StatusDelay()
static void AddFormat(HostComboBoxSetting *gc, const QDateTime &date, const QString &format)
static StandardSetting * UseTransitions()
static StandardSetting * Import(bool enabled)
Setting for Importing via script.
static StandardSetting * TransitionType()
static StandardSetting * Autorun(bool enabled)
Setting for running gallery on start-up.
static StandardSetting * Password(bool enabled)
Setting for changing password.
static StandardSetting * TransitionDuration()
Provides Gallery configuration screens.
Provides transitions for slideshows.
QMap< int, Transition * > TransitionMap
@ kSortBySizeAsc
File size Smallest -> Largest.
@ kSortByNameAsc
Name A-Z.
@ kSortByDateAsc
Exif date Earliest -> Latest.
@ kSortByExtAsc
Extension A-Z.
@ kSortByExtDesc
Extension Z-A.
@ kSortByNameDesc
Name Z-A.
@ kSortBySizeDesc
File size Largest -> Smallest.
@ kSortByModTimeAsc
File modified time Earliest -> Latest.
@ kSortByModTimeDesc
File modified time Latest -> Earliest.
@ kSortByDateDesc
Exif date Latest -> Earliest.
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
MythPainter * GetMythPainter(void)
MythMainWindow * GetMythMainWindow(void)
QDateTime fromString(const QString &dtstr)
Converts kFilename && kISODate formats to QDateTime.