OSDN Git Service

Automatically align underspecified tasks boundaries on project boundaries when possible.
[tjqt4port/tj2qt4.git] / taskjuggler / ReferenceAttribute.h
1 /*
2  * ReferenceAttribute.h - TaskJuggler
3  *
4  * Copyright (c) 2001, 2002, 2003, 2004 by Chris Schlaeger <cs@kde.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * $Id$
11  */
12 #ifndef _ReferenceAttribute_h_
13 #define _ReferenceAttribute_h_
14
15 #include <qstring.h>
16
17 #include "CustomAttribute.h"
18
19 /*
20  * @short User defined attribute that holds a text and a link.
21  * @author Chris Schlaeger <cs@kde.org>
22  */
23 class ReferenceAttribute : public CustomAttribute
24 {
25 public:
26     ReferenceAttribute() :
27         CustomAttribute(),
28         url(),
29         label()
30     { }
31
32     ReferenceAttribute(const ReferenceAttribute& ra) :
33         CustomAttribute(ra),
34         url(ra.url),
35         label(ra.label)
36     { }
37
38     ReferenceAttribute(const QString& u, const QString& l) :
39         CustomAttribute(),
40         url(u),
41         label(l)
42     { }
43
44     virtual ~ReferenceAttribute() { }
45
46     CustomAttributeType getType() const { return CAT_Reference; }
47     void setUrl(const QString& u) { url = u; }
48     const QString& getURL() const { return url; }
49
50     void setLabel(const QString& l) { label = l; }
51     const QString& getLabel() const { return label; }
52
53 private:
54     QString url;
55     QString label;
56 } ;
57
58 #endif
59
60