Go to the documentation of this file.
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 QMapIterator<int, Transition*> i(transitions);
119 gc->addSelection(i.value()->objectName(), QString::number(i.key()));
129 gc->setLabel(
TR(
"Slide Duration (ms)"));
130 gc->setHelpText(
TR(
"The time that a slide is displayed (between transitions), "
131 "in milliseconds."));
139 gc->setLabel(
TR(
"Transition Duration (ms)"));
140 gc->setHelpText(
TR(
"The time that each transition lasts, in milliseconds."));
148 gc->setLabel(
TR(
"Status Delay (ms)"));
149 gc->setHelpText(
TR(
"The delay before showing the Loading/Playing status, "
150 "in milliseconds."));
154 #if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
159 gc->setLabel(
TR(
"Maximum Image Size (MB)"));
160 gc->setHelpText(
TR(
"The maximum image size that will be loaded, "
161 "in megabytes. (-1 means system default, 0 "
162 "means unlimited.)"));
173 if (maxImageSize < 0)
175 QImageReader::setAllocationLimit(maxImageSize);
183 gc->setLabel(
TR(
"Use transitions when browsing"));
184 gc->setHelpText(
TR(
"When cleared, transitions will only be used "
185 "during a slideshow."));
197 gc->setVisible(enabled);
198 gc->setLabel(
TR(
"Import Command"));
199 gc->setHelpText(
TR(
"Command/script that can be run from the menu. "
200 "\n%TMPDIR% will be replaced by a new temporary directory, "
201 "which the import dialog will show automatically. The "
202 "directory will be removed when Gallery exits."));
214 gc->setVisible(enabled);
215 gc->setLabel(
TR(
"Scanner Exclusions"));
216 gc->setHelpText(
TR(
"Comma-separated list of filenames/directory names "
217 "to be ignored when scanning. "
218 "Glob wildcards * and ? are valid."));
234 gc->setVisible(enabled);
235 gc->setLabel(
TR(
"Start Gallery when media inserted"));
236 gc->setHelpText(
TR(
"Set to automatically start Gallery when media "
237 "(USB/CD's containing images) are inserted."));
249 gc->setVisible(enabled);
250 gc->setLabel(
TR(
"Password"));
251 gc->setHelpText(
TR(
"When set all actions that modify the filesystem or "
252 "database are protected (copy, move, transform, "
253 "hiding, covers). Hidden items cannot be viewed. "
254 "Applies to all frontends. "
255 "\nDisabled by an empty password. "
256 "Privileges persist until Gallery exits to main menu."));
268 gc->setVisible(enabled);
269 gc->setLabel(
TR(
"Reset Image Database"));
270 gc->setHelpText(
TR(
"Clears the database and thumbnails for the Image Storage Group. "
271 "A rescan will be required. Images for local media will persist."));
281 QString msg(
TR(
"Warning! This will erase settings for: hidden images, "
282 "directory covers and re-orientations. "
283 "You will have to set them again after re-scanning."));
286 if (dialog->Create())
288 stack->AddScreen(dialog);
307 #if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
static StandardSetting * Password(bool enabled)
Setting for changing password.
static StandardSetting * SlideDuration()
@ kSortByNameDesc
Name Z-A.
StandardSetting * DateFormat() const
@ kSortByExtDesc
Extension Z-A.
QMap< int, Transition * > TransitionMap
static StandardSetting * TransitionType()
static StandardSetting * UseTransitions()
@ kSortByDateDesc
Exif date Latest -> Earliest.
virtual void addChild(StandardSetting *child)
Provides transitions for slideshows.
@ kSortByNameAsc
Name A-Z.
static StandardSetting * StatusDelay()
static void ImageSizeChanged()
StandardSetting * ImageMaximumSize() const
StandardSetting * DirOrder() const
@ kSortByExtAsc
Extension A-Z.
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
int GetNumSetting(const QString &key, int defaultval=0)
GallerySettings(bool enable)
virtual void setLabel(QString str)
QDateTime fromString(const QString &dtstr)
Converts kFilename && kISODate formats to QDateTime.
Manages transitions available to s psinter.
@ kSortByModTimeDesc
File modified time Latest -> Earliest.
void addSelection(const QString &label, QString value=QString(), bool select=false)
static StandardSetting * Import(bool enabled)
Setting for Importing via script.
Dialog asking for user confirmation. Ok and optional Cancel button.
StandardSetting * ClearDb(bool enabled) const
Setting for clearing image database.
@ kSortByDateAsc
Exif date Earliest -> Latest.
StandardSetting * ImageOrder() const
StandardSetting * Exclusions(bool enabled) const
Setting for excluding image files by pattern.
MythMainWindow * GetMythMainWindow(void)
MythScreenStack * GetStack(const QString &Stackname)
@ kSortByModTimeAsc
File modified time Earliest -> Latest.
Provides Gallery configuration screens.
MythPainter * GetMythPainter(void)
@ kSortBySizeAsc
File size Smallest -> Largest.
TransitionMap GetAll() const
static StandardSetting * Autorun(bool enabled)
Setting for running gallery on start-up.
@ kSortBySizeDesc
File size Largest -> Smallest.
static void AddFormat(HostComboBoxSetting *gc, const QDateTime &date, const QString &format)
static StandardSetting * TransitionDuration()