Muc participants are displayed now in the roster

This commit is contained in:
Blue 2019-09-02 14:17:28 +03:00
parent 70f9739cf5
commit 5547d78608
16 changed files with 350 additions and 7 deletions

52
ui/models/participant.h Normal file
View file

@ -0,0 +1,52 @@
/*
* Squawk messenger.
* Copyright (C) 2019 Yury Gubich <blue@macaw.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MODELS_PARTICIPANT_H
#define MODELS_PARTICIPANT_H
#include "abstractparticipant.h"
namespace Models {
class Participant : public Models::AbstractParticipant
{
public:
Participant(const QMap<QString, QVariant> &data, Item *parentItem = 0);
~Participant();
int columnCount() const override;
QVariant data(int column) const override;
void update(const QString& key, const QVariant& value) override;
Shared::Affiliation getAffiliation() const;
void setAffiliation(Shared::Affiliation p_aff);
void setAffiliation(unsigned int aff);
Shared::Role getRole() const;
void setRole(Shared::Role p_role);
void setRole(unsigned int role);
private:
Shared::Affiliation affiliation;
Shared::Role role;
};
}
#endif // MODELS_PARTICIPANT_H