1
0
forked from blue/squawk
squawk/ui/widgets/vcard.h

57 lines
1.3 KiB
C
Raw Normal View History

2019-10-20 19:39:11 +00:00
/*
* 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 VCARD_H
#define VCARD_H
#include <QWidget>
#include <QScopedPointer>
2019-10-21 15:02:41 +00:00
#include "../../global.h"
#include "../utils/image.h"
2019-10-20 19:39:11 +00:00
namespace Ui
{
class VCard;
}
/**
* @todo write docs
*/
class VCard : public QWidget
{
Q_OBJECT
public:
2019-10-21 15:02:41 +00:00
VCard(bool edit = false, QWidget* parent = nullptr);
2019-10-20 19:39:11 +00:00
~VCard();
2019-10-21 15:02:41 +00:00
void setVCard(const QString& jid, const Shared::VCard& card);
signals:
void saveVCard(const QString& jid, const Shared::VCard& card);
private slots:
void onButtonBoxAccepted();
2019-10-20 19:39:11 +00:00
private:
QScopedPointer<Ui::VCard> m_ui;
2019-10-21 15:02:41 +00:00
Image avatar;
2019-10-20 19:39:11 +00:00
};
#endif // VCARD_H