summaryrefslogtreecommitdiff
path: root/column.h
blob: 44938142d081cb4381bd6dd814ea89c49a07f546 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * column.h
 */

#ifndef __COLUMN_H
#define __COLUMN_H

#include "browse-item.h"

#include <string>


enum eColumn {
	colEnd,
	colArtist,
	colTitle,
        colArtistTitle,
	colAlbum,
        colTrack,
        colYear,
	colGenre,
	colChannel,
	colEvent,
	colDate,
	colTime
};


class cColumn {
private:
	eColumn type;
	int width;
	bool join;
        bool cut;
	std::string filter, last_entry;
        cBrowseItem *item;
public:
	cColumn(void);
        
        void set(eColumn _type, int _width = 0, bool _join = false,
                bool _cut = false);
        
	void set_filter(std::string &_filter) { filter = _filter; }
        void set_last_entry(std::string &_last_entry)
                { last_entry = _last_entry; }
        void del_last_entry(void) { last_entry.erase(); }
        void set_main_item(cBrowseItem *_item) { item = _item; }
        
	eColumn get_type(void) const { return type; }
	int get_width(void) const { return width; }
        bool is_joined(void) const { return join; }
        bool get_cut(void) const { return cut; }
	const std::string &get_filter(void) const { return filter; }
        const std::string &get_last_entry(void) const { return last_entry; }
        cBrowseItem *get_main_item(void) const { return item; }
};

#endif /* __COLUMN_H */