1 | /* |
2 | This file is part of KDE. |
3 | |
4 | SPDX-FileCopyrightText: 2010 Sebastian Kügler <sebas@kde.org> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
7 | */ |
8 | |
9 | #ifndef ATTICA_PUBLISHER_H |
10 | #define ATTICA_PUBLISHER_H |
11 | |
12 | #include <QDate> |
13 | #include <QList> |
14 | #include <QMap> |
15 | #include <QSharedDataPointer> |
16 | #include <QStringList> |
17 | #include <QUrl> |
18 | |
19 | #include "attica_export.h" |
20 | #include "buildservice.h" |
21 | |
22 | namespace Attica |
23 | { |
24 | |
25 | /** |
26 | * @class Field publisher.h <Attica/Publisher> |
27 | * |
28 | * Field as set for the class Publisher. |
29 | */ |
30 | struct Field { |
31 | QString type; |
32 | QString name; |
33 | int fieldsize; |
34 | bool required; |
35 | QStringList options; |
36 | }; |
37 | |
38 | /** |
39 | * @class Publisher publisher.h <Attica/Publisher> |
40 | * |
41 | * Represents a publisher. |
42 | */ |
43 | class ATTICA_EXPORT Publisher |
44 | { |
45 | public: |
46 | typedef QList<Publisher> List; |
47 | class Parser; |
48 | |
49 | Publisher(); |
50 | Publisher(const Publisher &other); |
51 | Publisher &operator=(const Publisher &other); |
52 | ~Publisher(); |
53 | |
54 | void setId(const QString &); |
55 | QString id() const; |
56 | |
57 | void setName(const QString &); |
58 | QString name() const; |
59 | |
60 | void setUrl(const QString &); |
61 | QString url() const; |
62 | |
63 | void addField(const Field &); |
64 | QList<Field> fields() const; |
65 | |
66 | void addTarget(const Target &); |
67 | QList<Target> targets() const; |
68 | |
69 | bool isValid() const; |
70 | |
71 | private: |
72 | class Private; |
73 | QSharedDataPointer<Private> d; |
74 | }; |
75 | |
76 | } |
77 | |
78 | #endif |
79 | |