Sayonara Player
src
Gui
Library
Header
ColumnHeader.h
1
/* MyColumnHeader.h */
2
3
/* Copyright 2011-2019 Lucio Carreras
4
*
5
* This file is part of sayonara player
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
/*
22
*
23
* Created on: 19.12.2012
24
* Author: luke
25
*/
26
27
#ifndef MYCOLUMNHEADER_H_
28
#define MYCOLUMNHEADER_H_
29
30
#include "Utils/Library/Sortorder.h"
31
#include "Utils/Pimpl.h"
32
33
#include <QObject>
34
35
class
QAction;
36
namespace
Library
37
{
38
43
class
ColumnHeader
:
public
QObject
44
{
45
Q_OBJECT
46
PIMPL(
ColumnHeader
)
47
48
public
:
49
enum
HeaderType
50
{
51
Sharp,
52
Artist
,
53
Album
,
54
Discnumber,
55
Title,
56
NumTracks,
57
Duration,
58
DurationShort,
59
Year,
60
Rating,
61
Bitrate,
62
Filesize
63
};
64
65
public
:
66
ColumnHeader
(HeaderType type,
bool
switchable,
SortOrder
sort_asc,
SortOrder
sort_desc,
int
preferred_size,
bool
stretchable=
false
);
67
virtual
~
ColumnHeader
();
68
69
bool
stretchable()
const
;
70
int
default_size()
const
;
71
int
preferred_size()
const
;
72
void
set_preferred_size(
int
size);
73
74
SortOrder
sortorder_asc()
const
;
75
SortOrder
sortorder_desc()
const
;
76
77
void
retranslate();
78
79
QString title()
const
;
80
QAction* action();
81
bool
is_action_checked()
const
;
82
};
83
84
using
ColumnHeaderPtr = std::shared_ptr<ColumnHeader>;
85
using
ColumnHeaderList
=
QList<ColumnHeaderPtr>
;
86
}
87
88
#endif
/* MYCOLUMNHEADER_H_ */
Album
The Album class.
Definition:
Album.h:39
QList
Definition:
EngineUtils.h:33
Library::ColumnHeader
The ColumnHeader class.
Definition:
ColumnHeader.h:43
Library
An interface class needed when implementing a library plugin.
Definition:
LocalLibraryWatcher.h:32
Artist
The Artist class.
Definition:
Artist.h:36
Library::SortOrder
SortOrder
The SortOrder enum.
Definition:
Sortorder.h:31
Generated on Thu Jan 30 2020 00:00:00 for Sayonara Player by
1.8.17