File indexing completed on 2024-04-28 04:21:20
0001 // SPDX-FileCopyrightText: 2021 The KPhotoAlbum Development Team 0002 // SPDX-FileCopyrightText: 2022 Johannes Zarl-Zierl <johannes@zarl-zierl.at> 0003 // 0004 // SPDX-License-Identifier: GPL-2.0-or-later 0005 0006 #pragma once 0007 0008 #include <QDialog> 0009 #include <kpabase/SettingsData.h> 0010 0011 class QRadioButton; 0012 0013 namespace Settings 0014 { 0015 0016 /** 0017 * @brief availableVideoBackends shows what video backends were enabled during compilation. 0018 * @return the available video backends 0019 */ 0020 constexpr VideoBackends availableVideoBackends(); 0021 0022 /** 0023 * @brief preferredVideoBackend checks the configuredBackend against available video backends and an optional exclusions list. 0024 * The hard coded ranking of video backends was empirically determined and may change in the future. 0025 * @return the best suited VideoBackend, or VideoBackend::NotConfigured if none is viable. 0026 */ 0027 Settings::VideoBackend preferredVideoBackend(const Settings::VideoBackend configuredBackend, const Settings::VideoBackends exclusions = {}); 0028 0029 /** 0030 * @brief localizedEnumName returns a localized value for the enum, for use in localized messages. 0031 * @param backend the VideoBackend 0032 * @return a localized friendly name representing the enum value 0033 */ 0034 QString localizedEnumName(const Settings::VideoBackend backend); 0035 0036 class VideoPlayerSelectorDialog : public QDialog 0037 { 0038 Q_OBJECT 0039 public: 0040 VideoPlayerSelectorDialog(QWidget *parent = nullptr); 0041 Settings::VideoBackend backend() const; 0042 0043 private: 0044 QRadioButton *m_vlc; 0045 QRadioButton *m_qtav; 0046 QRadioButton *m_phonon; 0047 }; 0048 0049 } // namespace Settings