blob: 584bed74a3bcf22fcf0ffaaf32b447f34997210f [file] [log] [blame]
Olivier SOLDANO57442b22017-04-20 11:56:57 -04001/***************************************************************************
Sébastien Blin68abac92019-01-02 17:41:31 -05002 * Copyright (C) 2019-2019 by Savoir-faire Linux *
Andreas Traczykb8b13ba2018-08-21 16:30:16 -04003 * Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> *
Olivier SOLDANO57442b22017-04-20 11:56:57 -04004 * *
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 **************************************************************************/
Andreas Traczykb8b13ba2018-08-21 16:30:16 -040018#pragma once
Olivier SOLDANO57442b22017-04-20 11:56:57 -040019
Andreas Traczykb8b13ba2018-08-21 16:30:16 -040020#include "api/profile.h"
21#include "smartlistselectorbuttonnotifier.h"
Olivier SOLDANO57442b22017-04-20 11:56:57 -040022
23#include <QWidget>
24
Andreas Traczyk43c08232018-10-31 13:42:09 -040025class ConversationsFilterWidget : public QWidget
26{
27 Q_OBJECT
28
29public:
30 explicit ConversationsFilterWidget(QWidget *parent = 0);
31
Andreas Traczyk1d8159a2018-12-13 15:48:24 -050032 void updateBadges();
33
Andreas Traczyk43c08232018-10-31 13:42:09 -040034protected:
35 void resizeEvent(QResizeEvent * event);
36
37private:
38 void updateNotifier(lrc::api::profile::Type typeFilter);
Andreas Traczykb8b13ba2018-08-21 16:30:16 -040039 void handleNotifierOverlay(const QString& buttonName,
40 SmartlistSelectorButtonNotifier*& notifier,
Andreas Traczyk43c08232018-10-31 13:42:09 -040041 lrc::api::profile::Type filter);
42 SmartlistSelectorButtonNotifier* unreadMessagesNotifier_{ nullptr };
43 SmartlistSelectorButtonNotifier* pendingInvitesNotifier_{ nullptr };
Andreas Traczykb8b13ba2018-08-21 16:30:16 -040044};