source: SMSSender/common/domain/scontact.h @ 316:16f8e7f93ca4

separation-frontend-backend
Last change on this file since 316:16f8e7f93ca4 was 316:16f8e7f93ca4, checked in by Sämy Zehnder <saemy.zehnder@…>, 8 years ago
  • Adds the copyright header to each file and updates the development period.
File size: 1.7 KB
Line 
1/*
2 smssender - A frontend for fast and easy SMS sending over different gateways.
3 Copyright (C) 2007-2014, gorrión. See http://smssender.gorrion.ch
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 */
18#ifndef SCONTACT_H_
19#define SCONTACT_H_
20
21#include <QMetaType>
22#include <QStringList>
23
24#ifdef FRONTEND_GUI
25#include <QtGui/QImage>
26#endif
27
28#include "common/domain/snumber.h"
29#include "common/global.h"
30
31class COMMON_EXPORT SContact : public QObject {
32    Q_OBJECT
33
34public:
35    SContact();
36    ~SContact();
37
38    int id() const;
39    QString name() const;
40    SNumber number() const;
41    QStringList aliases() const;
42
43    void setId(int id);
44    void setName(const QString& name);
45    void setNumber(const SNumber& number);
46    void setAliases(const QStringList& aliases);
47
48#ifdef FRONTEND_GUI
49    QImage image() const;
50    void setImage(const QImage& image);
51#endif
52
53signals:
54    void idChanged(SContact *contact, int oldId);
55    void dataChanged(SContact *contact);
56
57private:
58    int m_id;
59    QString m_name;
60    SNumber m_number;
61    QStringList m_aliases;
62
63#ifdef FRONTEND_GUI
64    QImage m_image;
65#endif
66
67    Q_DISABLE_COPY(SContact)
68};
69
70#endif /* SCONTACT_H_ */
Note: See TracBrowser for help on using the repository browser.