cmake: avoid de-duplication of user's CXXFLAGS
[quassel.git] / src / qtui / coreinfodlg.h
1 /***************************************************************************
2  *   Copyright (C) 2005-2019 by the Quassel Project                        *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
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 2 of the License, or     *
8  *   (at your option) version 3.                                           *
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, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
19  ***************************************************************************/
20
21 #pragma once
22
23 #include <QDialog>
24
25 #include "coreinfo.h"
26 #include "coresessionwidget.h"
27
28 #include "ui_coreinfodlg.h"
29
30 class CoreInfoDlg : public QDialog
31 {
32     Q_OBJECT
33
34 public:
35     explicit CoreInfoDlg(QWidget* parent = nullptr);
36
37 public slots:
38     void coreInfoChanged(const QVariantMap&);
39
40 protected:
41     void timerEvent(QTimerEvent*) override { updateUptime(); }
42
43 private slots:
44     /**
45      * Requests resynchronization of CoreInfo object for legacy (pre-0.13) cores
46      *
47      * This provides compatibility with updating core information for legacy cores, and can be
48      * removed after protocol break.
49      */
50     void refreshLegacyCoreInfo();
51
52     /**
53      * Handler for recreation of CoreInfo object, including first-time setup
54      *
55      * Applies existing CoreInfo information to the dialog, too.
56      */
57     void coreInfoResynchronized();
58
59     void on_closeButton_clicked() { reject(); }
60     void updateUptime();
61     void disconnectClicked(int peerId);
62
63     /**
64      * Event handler for core unspported Details button
65      */
66     void on_coreUnsupportedDetails_clicked();
67
68 private:
69     Ui::CoreInfoDlg ui;
70     QMap<int, CoreSessionWidget*> _widgets;
71 };