Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
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
26
27namespace Jellyfin {
28
29class ApiClient;
30
31namespace ViewModel {
32
33
35 Q_OBJECT
38public:
39 explicit Settings(ApiClient *apiClient);
40 virtual ~Settings();
41
42 bool allowTranscoding() const;
44
45 int maxStreamingBitRate() const;
46 void setMaxStreamingBitRate(int newMaxBitRate);
47signals:
48 void allowTranscodingChanged(bool newAllowTranscoding);
49 void maxStreamingBitRateChanged(int newMaxBitRate);
50private:
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
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Almost-API reimplementation of https://github.com/sailfishos/mlite/blob/master/src/mdconfgroup....
Definition qobjectsettingswrapper.h:53
Definition settings.h:34
void allowTranscodingChanged(bool newAllowTranscoding)
int maxStreamingBitRate
Definition settings.h:37
void setAllowTranscoding(bool allowTranscoding)
Definition settings.cpp:41
bool allowTranscoding
Definition settings.h:36
void maxStreamingBitRateChanged(int newMaxBitRate)
void setMaxStreamingBitRate(int newMaxBitRate)
Definition settings.cpp:50