[video] fix selection after changing video or extra art
[xbmc.git] / xbmc / pvr / dialogs / GUIDialogPVRRecordingSettings.h
blobf0de299e0e4c995225ac28620fca84746a885581
1 /*
2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "settings/dialogs/GUIDialogSettingsManualBase.h"
13 #include <memory>
14 #include <string>
15 #include <vector>
17 class CFileItem;
18 class CSetting;
20 struct IntegerSettingOption;
22 namespace PVR
24 class CPVRRecording;
26 class CGUIDialogPVRRecordingSettings : public CGUIDialogSettingsManualBase
28 public:
29 CGUIDialogPVRRecordingSettings();
31 void SetRecording(const std::shared_ptr<CPVRRecording>& recording);
32 static bool CanEditRecording(const CFileItem& item);
34 protected:
35 // implementation of ISettingCallback
36 bool OnSettingChanging(const std::shared_ptr<const CSetting>& setting) override;
37 void OnSettingChanged(const std::shared_ptr<const CSetting>& setting) override;
39 // specialization of CGUIDialogSettingsBase
40 bool AllowResettingSettings() const override { return false; }
41 bool Save() override;
42 void SetupView() override;
44 // specialization of CGUIDialogSettingsManualBase
45 void InitializeSettings() override;
47 private:
48 static void LifetimesFiller(const std::shared_ptr<const CSetting>& setting,
49 std::vector<IntegerSettingOption>& list,
50 int& current,
51 void* data);
53 std::shared_ptr<CPVRRecording> m_recording;
54 std::string m_strTitle;
55 int m_iPlayCount = 0;
56 int m_iLifetime = 0;
58 } // namespace PVR