qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
iaboutfriend.h
Go to the documentation of this file.
1 /*
2  Copyright © 2019 by The qTox Project Contributors
3 
4  This file is part of qTox, a Qt-based graphical interface for Tox.
5 
6  qTox is libre software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  qTox is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with qTox. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 
22 #include "util/interface.h"
24 
25 #include <QObject>
26 
28 {
29 public:
30  IAboutFriend() = default;
31  virtual ~IAboutFriend();
32  IAboutFriend(const IAboutFriend&) = default;
33  IAboutFriend& operator=(const IAboutFriend&) = default;
34  IAboutFriend(IAboutFriend&&) = default;
35  IAboutFriend& operator=(IAboutFriend&&) = default;
36 
37  virtual QString getName() const = 0;
38  virtual QString getStatusMessage() const = 0;
39  virtual ToxPk getPublicKey() const = 0;
40 
41  virtual QPixmap getAvatar() const = 0;
42 
43  virtual QString getNote() const = 0;
44  virtual void setNote(const QString& note) = 0;
45 
46  virtual QString getAutoAcceptDir() const = 0;
47  virtual void setAutoAcceptDir(const QString& path) = 0;
48 
49  virtual IFriendSettings::AutoAcceptCallFlags getAutoAcceptCall() const = 0;
50  virtual void setAutoAcceptCall(IFriendSettings::AutoAcceptCallFlags flag) = 0;
51 
52  virtual bool getAutoGroupInvite() const = 0;
53  virtual void setAutoGroupInvite(bool enabled) = 0;
54 
55  virtual bool clearHistory() = 0;
56  virtual bool isHistoryExistence() = 0;
57 
58  /* signals */
59  DECLARE_SIGNAL(nameChanged, const QString&);
60  DECLARE_SIGNAL(statusChanged, const QString&);
61  DECLARE_SIGNAL(publicKeyChanged, const QString&);
62 
63  DECLARE_SIGNAL(avatarChanged, const QPixmap&);
64  DECLARE_SIGNAL(noteChanged, const QString&);
65 
66  DECLARE_SIGNAL(autoAcceptDirChanged, const QString&);
67  DECLARE_SIGNAL(autoAcceptCallChanged, IFriendSettings::AutoAcceptCallFlags);
68  DECLARE_SIGNAL(autoGroupInviteChanged, bool);
69 };
IAboutFriend::getPublicKey
virtual ToxPk getPublicKey() const =0
IAboutFriend::clearHistory
virtual bool clearHistory()=0
IAboutFriend::setNote
virtual void setNote(const QString &note)=0
IAboutFriend::getAutoAcceptCall
virtual IFriendSettings::AutoAcceptCallFlags getAutoAcceptCall() const =0
ifriendsettings.h
IAboutFriend::getNote
virtual QString getNote() const =0
IAboutFriend::DECLARE_SIGNAL
DECLARE_SIGNAL(nameChanged, const QString &)
IAboutFriend::operator=
IAboutFriend & operator=(const IAboutFriend &)=default
IAboutFriend::isHistoryExistence
virtual bool isHistoryExistence()=0
IAboutFriend::getAutoAcceptDir
virtual QString getAutoAcceptDir() const =0
IAboutFriend
Definition: iaboutfriend.h:27
ToxPk
This class represents a Tox Public Key, which is a part of Tox ID.
Definition: toxpk.h:26
IAboutFriend::~IAboutFriend
virtual ~IAboutFriend()
IAboutFriend::getAvatar
virtual QPixmap getAvatar() const =0
IAboutFriend::IAboutFriend
IAboutFriend()=default
IAboutFriend::setAutoAcceptDir
virtual void setAutoAcceptDir(const QString &path)=0
IAboutFriend::setAutoAcceptCall
virtual void setAutoAcceptCall(IFriendSettings::AutoAcceptCallFlags flag)=0
IAboutFriend::getAutoGroupInvite
virtual bool getAutoGroupInvite() const =0
IAboutFriend::getStatusMessage
virtual QString getStatusMessage() const =0
IAboutFriend::setAutoGroupInvite
virtual void setAutoGroupInvite(bool enabled)=0
IAboutFriend::getName
virtual QString getName() const =0