TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
TTKModule
TTKCore
musicNetworkKits
core
musicpagequeryrequest.h
Go to the documentation of this file.
1
#ifndef MUSICPAGEQUERYREQUEST_H
2
#define MUSICPAGEQUERYREQUEST_H
3
4
/***************************************************************************
5
* This file is part of the TTK Music Player project
6
* Copyright (C) 2015 - 2025 Greedysky Studio
7
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 3 of the License, or
11
* (at your option) any later version.
12
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
18
* You should have received a copy of the GNU General Public License along
19
* with this program; If not, see <http://www.gnu.org/licenses/>.
20
***************************************************************************/
21
22
#include "
musicabstractnetwork.h
"
23
24
#define SONG_PAGE_SIZE 30
25
#define COMMENT_PAGE_SIZE 20
26
#define TOPLIST_PAGE_SIZE 30
27
#define ARTIST_PAGE_SIZE 50
28
#define ARTIST_ATTR_PAGE_SIZE 12
29
#define ARTIST_LIST_PAGE_SIZE 100
30
#define MAX_PAGE_SIZE 1000
31
35
class
TTK_MODULE_EXPORT
MusicPageQueryRequest
:
public
MusicAbstractNetwork
36
{
37
Q_OBJECT
38
TTK_DECLARE_MODULE
(
MusicPageQueryRequest
)
39
public
:
43
explicit
MusicPageQueryRequest
(QObject *parent =
nullptr
);
44
48
virtual
void
startToPage(
int
offset
);
49
53
int
pageTotalSize()
const
noexcept;
54
58
inline
int
pageSize
()
const
noexcept {
return
m_pageSize; }
62
inline
int
totalSize
()
const
noexcept {
return
m_totalSize; }
66
inline
int
pageIndex
()
const
noexcept {
return
m_pageIndex; }
70
inline
bool
pageValid
()
const
noexcept {
return
pageIndex() + 1 < pageTotalSize(); }
71
72
protected
:
73
int
m_pageSize
;
74
int
m_totalSize
;
75
int
m_pageIndex
;
76
77
};
78
79
#endif // MUSICPAGEQUERYREQUEST_H
MusicPageQueryRequest::m_totalSize
int m_totalSize
Definition:
musicpagequeryrequest.h:74
MusicPageQueryRequest::pageValid
bool pageValid() const noexcept
Definition:
musicpagequeryrequest.h:70
TTK_MODULE_EXPORT
#define TTK_MODULE_EXPORT
Definition:
ttkmoduleexport.h:27
MusicPageQueryRequest::pageIndex
int pageIndex() const noexcept
Definition:
musicpagequeryrequest.h:66
MusicPageQueryRequest::m_pageIndex
int m_pageIndex
Definition:
musicpagequeryrequest.h:75
MusicPageQueryRequest
The class of the abstract download page query request.
Definition:
musicpagequeryrequest.h:35
offset
voidpf uLong offset
Definition:
ioapi.h:142
TTK_DECLARE_MODULE
#define TTK_DECLARE_MODULE(Class)
Definition:
ttkqtglobal.h:168
MusicAbstractNetwork
The class of the abstract network.
Definition:
musicabstractnetwork.h:35
MusicPageQueryRequest::m_pageSize
int m_pageSize
Definition:
musicpagequeryrequest.h:73
MusicPageQueryRequest::pageSize
int pageSize() const noexcept
Definition:
musicpagequeryrequest.h:58
const
#define const
Definition:
zconf.h:233
musicabstractnetwork.h
MusicPageQueryRequest::totalSize
int totalSize() const noexcept
Definition:
musicpagequeryrequest.h:62
Generated on Tue Jan 21 2025 21:07:12 for TTKMusicPlayer by
1.8.8