qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
groupinvitewidget.h
Go to the documentation of this file.
1 /*
2  Copyright © 2017-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 "src/model/groupinvite.h"
23 
24 #include <QWidget>
25 
26 class CroppingLabel;
27 
28 class QHBoxLayout;
29 class QPushButton;
30 
31 class GroupInviteWidget : public QWidget
32 {
33  Q_OBJECT
34 public:
35  GroupInviteWidget(QWidget* parent, const GroupInvite& invite);
36  void retranslateUi();
37  const GroupInvite getInviteInfo() const;
38 
39 signals:
40  void accepted(const GroupInvite& invite);
41  void rejected(const GroupInvite& invite);
42 
43 private:
44  QPushButton* acceptButton;
45  QPushButton* rejectButton;
47  QHBoxLayout* widgetLayout;
49 };
GroupInviteWidget::accepted
void accepted(const GroupInvite &invite)
GroupInviteWidget::inviteMessageLabel
CroppingLabel * inviteMessageLabel
Definition: groupinvitewidget.h:46
GroupInviteWidget::widgetLayout
QHBoxLayout * widgetLayout
Definition: groupinvitewidget.h:47
CroppingLabel
Definition: croppinglabel.h:26
GroupInviteWidget::getInviteInfo
const GroupInvite getInviteInfo() const
Returns infomation about invitation - e.g., who and when sent.
Definition: groupinvitewidget.cpp:75
GroupInvite
This class contains information needed to create a group invite.
Definition: groupinvite.h:26
GroupInviteWidget
This class shows information about single group invite and provides buttons to accept/reject it.
Definition: groupinvitewidget.h:31
GroupInviteWidget::rejectButton
QPushButton * rejectButton
Definition: groupinvitewidget.h:45
GroupInviteWidget::inviteInfo
GroupInvite inviteInfo
Definition: groupinvitewidget.h:48
GroupInviteWidget::rejected
void rejected(const GroupInvite &invite)
GroupInviteWidget::GroupInviteWidget
GroupInviteWidget(QWidget *parent, const GroupInvite &invite)
Definition: groupinvitewidget.cpp:38
groupinvite.h
GroupInviteWidget::retranslateUi
void retranslateUi()
Retranslate all elements in the form.
Definition: groupinvitewidget.cpp:58
GroupInviteWidget::acceptButton
QPushButton * acceptButton
Definition: groupinvitewidget.h:44