forked from lindenle/QTpapers
/
Entry.h
executable file
·62 lines (42 loc) · 1.02 KB
/
Entry.h
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
59
60
61
62
#ifndef __ENTRY_H__
#define __ENTRY_H__
#include <QObject>
#include <QString>
#include <QDate>
// This is the base clase for any entry in a library
// This can be inheritted by other types of entry classes.
class Entry
{
public:
Entry( QString author="",
QString title="")
{ set_author(author);
set_title(title);}
QString get_author(void) const
{return _author;}
QString get_author_short(int number=3) const;
QString get_title(void) const
{return _title;}
QDate get_date(void) const
{return _date;}
QString get_file_name(void)
{return _file_name;}
void set_author(const QString& s)
{_author=s;}
void set_title(const QString& s)
{_title=s;}
void set_date(const QDate& d)
{_date=d;}
void set_date(const QString& s)
{_date.fromString(s);}
void set_file_name(const QString& s)
{_file_name=s;}
virtual int open_new_dialog();
protected:
QString _author;
QString _title;
QDate _date;
QString _file_name;
int _entry_id;
};
#endif //__ENTRY_H__