mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
6886c9ccf8
Previously, the subtitle generation was hardcoded, making it unsuitable if you didn't want all of the displayed values. This has been replaced by a format string that is configurable in the settings, using predefined tags that are replaced with the values. The default value for this has been set to (mostly) match the currently generated subtitle string. This also provides a good starting point for users that want to modify the string. Signed-off-by: Victor Arvidsson <victarv@gmail.com>
27 lines
960 B
C++
27 lines
960 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#include "qPrefMedia.h"
|
|
#include "qPrefPrivate.h"
|
|
|
|
static const QString group = QStringLiteral("Media");
|
|
|
|
qPrefMedia *qPrefMedia::instance()
|
|
{
|
|
static qPrefMedia *self = new qPrefMedia;
|
|
return self;
|
|
}
|
|
|
|
void qPrefMedia::loadSync(bool doSync)
|
|
{
|
|
disk_extract_video_thumbnails(doSync);
|
|
disk_extract_video_thumbnails_position(doSync);
|
|
disk_ffmpeg_executable(doSync);
|
|
disk_subtitles_format_string(doSync);
|
|
disk_auto_recalculate_thumbnails(doSync);
|
|
disk_auto_recalculate_thumbnails(doSync);
|
|
}
|
|
|
|
HANDLE_PREFERENCE_BOOL(Media, "auto_recalculate_thumbnails", auto_recalculate_thumbnails);
|
|
HANDLE_PREFERENCE_BOOL(Media, "extract_video_thumbnails", extract_video_thumbnails);
|
|
HANDLE_PREFERENCE_INT(Media, "extract_video_thumbnails_position", extract_video_thumbnails_position);
|
|
HANDLE_PREFERENCE_TXT(Media, "ffmpeg_executable", ffmpeg_executable);
|
|
HANDLE_PREFERENCE_TXT(Media, "subtitles_format_string", subtitles_format_string);
|