2021-02-21 04:02:05 +00:00
|
|
|
/*
|
|
|
|
* Sailfin: a Jellyfin client written using Qt
|
|
|
|
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
|
|
|
* OVERWRITTEN AT SOME POINT!
|
|
|
|
*
|
|
|
|
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
|
|
|
* core/openapigenerator.d.
|
|
|
|
*
|
|
|
|
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
|
|
|
* file with a newer file if needed instead of manually updating the files.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef JELLYFIN_DTO_DISPLAYPREFERENCESDTO_H
|
|
|
|
#define JELLYFIN_DTO_DISPLAYPREFERENCESDTO_H
|
|
|
|
|
|
|
|
#include <QJsonObject>
|
2021-03-20 02:30:50 +00:00
|
|
|
#include <QJsonValue>
|
2021-02-21 04:02:05 +00:00
|
|
|
#include <QString>
|
2021-03-20 02:30:50 +00:00
|
|
|
#include <optional>
|
2021-02-21 04:02:05 +00:00
|
|
|
|
|
|
|
#include "JellyfinQt/DTO/scrolldirection.h"
|
|
|
|
#include "JellyfinQt/DTO/sortorder.h"
|
2021-03-20 02:30:50 +00:00
|
|
|
#include "JellyfinQt/support/jsonconv.h"
|
2021-02-21 04:02:05 +00:00
|
|
|
|
|
|
|
namespace Jellyfin {
|
|
|
|
namespace DTO {
|
|
|
|
|
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
class DisplayPreferencesDto {
|
2021-03-24 19:04:03 +00:00
|
|
|
public:DisplayPreferencesDto();DisplayPreferencesDto(const DisplayPreferencesDto &other);
|
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
static DisplayPreferencesDto fromJson(QJsonObject source);
|
|
|
|
void setFromJson(QJsonObject source);
|
|
|
|
QJsonObject toJson();
|
|
|
|
|
|
|
|
// Properties
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the user id.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString jellyfinId() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the user id.
|
|
|
|
*/
|
|
|
|
void setJellyfinId(QString newJellyfinId);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the type of the view.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString viewType() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the type of the view.
|
|
|
|
*/
|
|
|
|
void setViewType(QString newViewType);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the sort by.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString sortBy() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the sort by.
|
|
|
|
*/
|
|
|
|
void setSortBy(QString newSortBy);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the index by.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString indexBy() const;
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
2021-03-20 02:30:50 +00:00
|
|
|
* @brief Gets or sets the index by.
|
|
|
|
*/
|
|
|
|
void setIndexBy(QString newIndexBy);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
2021-03-20 02:30:50 +00:00
|
|
|
* @brief Gets or sets a value indicating whether [remember indexing].
|
2021-02-21 04:02:05 +00:00
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
bool rememberIndexing() const;
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
2021-03-20 02:30:50 +00:00
|
|
|
* @brief Gets or sets a value indicating whether [remember indexing].
|
|
|
|
*/
|
|
|
|
void setRememberIndexing(bool newRememberIndexing);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
2021-03-20 02:30:50 +00:00
|
|
|
* @brief Gets or sets the height of the primary image.
|
2021-02-21 04:02:05 +00:00
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 primaryImageHeight() const;
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
2021-03-20 02:30:50 +00:00
|
|
|
* @brief Gets or sets the height of the primary image.
|
|
|
|
*/
|
|
|
|
void setPrimaryImageHeight(qint32 newPrimaryImageHeight);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
2021-03-20 02:30:50 +00:00
|
|
|
* @brief Gets or sets the width of the primary image.
|
2021-02-21 04:02:05 +00:00
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 primaryImageWidth() const;
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
2021-03-20 02:30:50 +00:00
|
|
|
* @brief Gets or sets the width of the primary image.
|
|
|
|
*/
|
|
|
|
void setPrimaryImageWidth(qint32 newPrimaryImageWidth);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
2021-03-20 02:30:50 +00:00
|
|
|
* @brief Gets or sets the custom prefs.
|
2021-02-21 04:02:05 +00:00
|
|
|
*/
|
|
|
|
QJsonObject customPrefs() const;
|
2021-03-20 02:30:50 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the custom prefs.
|
|
|
|
*/
|
2021-02-21 04:02:05 +00:00
|
|
|
void setCustomPrefs(QJsonObject newCustomPrefs);
|
2021-03-20 02:30:50 +00:00
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
ScrollDirection scrollDirection() const;
|
2021-03-20 02:30:50 +00:00
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
void setScrollDirection(ScrollDirection newScrollDirection);
|
2021-03-20 02:30:50 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether to show backdrops on this item.
|
|
|
|
*/
|
2021-02-21 04:02:05 +00:00
|
|
|
bool showBackdrop() const;
|
2021-03-20 02:30:50 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether to show backdrops on this item.
|
|
|
|
*/
|
2021-02-21 04:02:05 +00:00
|
|
|
void setShowBackdrop(bool newShowBackdrop);
|
2021-03-20 02:30:50 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether [remember sorting].
|
|
|
|
*/
|
2021-02-21 04:02:05 +00:00
|
|
|
bool rememberSorting() const;
|
2021-03-20 02:30:50 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether [remember sorting].
|
|
|
|
*/
|
2021-02-21 04:02:05 +00:00
|
|
|
void setRememberSorting(bool newRememberSorting);
|
2021-03-20 02:30:50 +00:00
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
SortOrder sortOrder() const;
|
2021-03-20 02:30:50 +00:00
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
void setSortOrder(SortOrder newSortOrder);
|
2021-03-20 02:30:50 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether [show sidebar].
|
|
|
|
*/
|
2021-02-21 04:02:05 +00:00
|
|
|
bool showSidebar() const;
|
2021-03-20 02:30:50 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether [show sidebar].
|
|
|
|
*/
|
2021-02-21 04:02:05 +00:00
|
|
|
void setShowSidebar(bool newShowSidebar);
|
2021-03-20 02:30:50 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the client.
|
|
|
|
*/
|
2021-02-21 04:02:05 +00:00
|
|
|
QString client() const;
|
2021-03-20 02:30:50 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the client.
|
|
|
|
*/
|
2021-02-21 04:02:05 +00:00
|
|
|
void setClient(QString newClient);
|
2021-03-20 02:30:50 +00:00
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
protected:
|
|
|
|
QString m_jellyfinId;
|
|
|
|
QString m_viewType;
|
|
|
|
QString m_sortBy;
|
|
|
|
QString m_indexBy;
|
|
|
|
bool m_rememberIndexing;
|
|
|
|
qint32 m_primaryImageHeight;
|
|
|
|
qint32 m_primaryImageWidth;
|
|
|
|
QJsonObject m_customPrefs;
|
|
|
|
ScrollDirection m_scrollDirection;
|
|
|
|
bool m_showBackdrop;
|
|
|
|
bool m_rememberSorting;
|
|
|
|
SortOrder m_sortOrder;
|
|
|
|
bool m_showSidebar;
|
|
|
|
QString m_client;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // NS Jellyfin
|
|
|
|
} // NS DTO
|
|
|
|
|
|
|
|
#endif // JELLYFIN_DTO_DISPLAYPREFERENCESDTO_H
|