Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Toggle main menu visibility
Loading...
Searching...
No Matches
settings.h
Go to the documentation of this file.
1
/*
2
* Sailfin: a Jellyfin client written using Qt
3
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
4
*
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
9
*
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*/
19
#ifndef JELLYFIN_VIEWMODEL_SETTINGS_H
20
#define JELLYFIN_VIEWMODEL_SETTINGS_H
21
22
#include <QObject>
23
#include <QString>
24
25
#include "
JellyfinQt/qobjectsettingswrapper.h
"
26
27
namespace
Jellyfin
{
28
29
class
ApiClient
;
30
31
namespace
ViewModel
{
32
33
34
class
Settings
:
public
QObjectSettingsWrapper
{
35
Q_OBJECT
36
Q_PROPERTY(
bool
allowTranscoding
READ
allowTranscoding
WRITE
setAllowTranscoding
NOTIFY
allowTranscodingChanged
)
37
Q_PROPERTY(
int
maxStreamingBitRate
READ
maxStreamingBitRate
WRITE
setMaxStreamingBitRate
NOTIFY
maxStreamingBitRateChanged
)
38
public:
39
explicit
Settings
(
ApiClient
*apiClient);
40
virtual ~
Settings
();
41
42
bool
allowTranscoding
() const;
43
void
setAllowTranscoding
(
bool
allowTranscoding
);
44
45
int
maxStreamingBitRate
() const;
46
void
setMaxStreamingBitRate
(
int
newMaxBitRate);
47
signals:
48
void
allowTranscodingChanged
(
bool
newAllowTranscoding);
49
void
maxStreamingBitRateChanged
(
int
newMaxBitRate);
50
private:
51
bool
m_allowTranscoding = true;
52
int
m_maxStreamingBitRate = 5000000;
53
};
54
55
56
}
// NS ViewModel
57
}
// NS Jellyfin
58
59
#endif
// JELLYFIN_VIEWMODEL_SETTINGS_H
Jellyfin::ApiClient
An Api client for Jellyfin. Handles requests and authentication.
Definition
apiclient.h:90
Jellyfin::QObjectSettingsWrapper::QObjectSettingsWrapper
QObjectSettingsWrapper(QObject *parent=nullptr, BindOption option=DontBindProperties)
Definition
qobjectsettingswrapper.cpp:59
Jellyfin::ViewModel::Settings::allowTranscodingChanged
void allowTranscodingChanged(bool newAllowTranscoding)
Jellyfin::ViewModel::Settings::maxStreamingBitRate
int maxStreamingBitRate
Definition
settings.h:37
Jellyfin::ViewModel::Settings::setAllowTranscoding
void setAllowTranscoding(bool allowTranscoding)
Definition
settings.cpp:41
Jellyfin::ViewModel::Settings::allowTranscoding
bool allowTranscoding
Definition
settings.h:36
Jellyfin::ViewModel::Settings::Settings
Settings(ApiClient *apiClient)
Definition
settings.cpp:28
Jellyfin::ViewModel::Settings::maxStreamingBitRateChanged
void maxStreamingBitRateChanged(int newMaxBitRate)
Jellyfin::ViewModel::Settings::setMaxStreamingBitRate
void setMaxStreamingBitRate(int newMaxBitRate)
Definition
settings.cpp:50
Jellyfin::ViewModel
Contains all types exposed to QML.
Jellyfin
qobjectsettingswrapper.h
core
include
JellyfinQt
viewmodel
settings.h
Generated by
1.17.0