2018-12-25 21:34:59 +01:00
|
|
|
/*******************************************************************************
|
|
|
|
* gui/MessengerWindow.h *
|
|
|
|
* *
|
|
|
|
* Copyright (c) 2006 Retroshare Team <retroshare.project@gmail.com> *
|
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Affero 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 Affero General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
*******************************************************************************/
|
2009-01-04 02:28:30 +00:00
|
|
|
|
2007-11-15 03:18:48 +00:00
|
|
|
#ifndef _MESSENGERWINDOW_H
|
2009-01-04 02:28:30 +00:00
|
|
|
#define _MESSENGERWINDOW_H
|
|
|
|
|
2007-11-17 01:35:52 +00:00
|
|
|
#include "ui_MessengerWindow.h"
|
2010-02-03 17:39:30 +00:00
|
|
|
|
2009-01-07 21:12:31 +00:00
|
|
|
#include <gui/common/rwindow.h>
|
2007-11-15 03:18:48 +00:00
|
|
|
|
2009-01-07 21:12:31 +00:00
|
|
|
class MessengerWindow : public RWindow
|
2009-01-04 02:28:30 +00:00
|
|
|
{
|
2010-06-17 17:39:32 +00:00
|
|
|
Q_OBJECT
|
2007-11-17 01:35:52 +00:00
|
|
|
|
2011-10-20 21:34:44 +00:00
|
|
|
public:
|
2010-07-18 11:43:39 +00:00
|
|
|
static void showYourself ();
|
2010-06-17 17:39:32 +00:00
|
|
|
static MessengerWindow* getInstance();
|
|
|
|
static void releaseInstance();
|
2007-11-15 03:18:48 +00:00
|
|
|
|
2009-01-04 02:28:30 +00:00
|
|
|
public slots:
|
2010-06-17 17:39:32 +00:00
|
|
|
void loadmystatusmessage();
|
2010-04-27 12:21:39 +00:00
|
|
|
|
2007-11-15 03:18:48 +00:00
|
|
|
protected:
|
2010-06-17 17:39:32 +00:00
|
|
|
/** Default Constructor */
|
2013-10-18 21:10:33 +00:00
|
|
|
MessengerWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
2010-06-17 17:39:32 +00:00
|
|
|
/** Default Destructor */
|
|
|
|
~MessengerWindow();
|
2009-01-04 02:28:30 +00:00
|
|
|
|
2010-06-17 17:39:32 +00:00
|
|
|
void closeEvent (QCloseEvent * event);
|
2009-01-04 02:28:30 +00:00
|
|
|
|
|
|
|
private slots:
|
2010-06-17 17:39:32 +00:00
|
|
|
/** Add a new friend */
|
|
|
|
void addFriend();
|
2010-07-15 11:25:34 +00:00
|
|
|
|
2010-06-17 17:39:32 +00:00
|
|
|
/** Open Shared Manager **/
|
|
|
|
void openShareManager();
|
|
|
|
|
2010-09-11 19:06:22 +00:00
|
|
|
void updateOwnStatus(const QString &peer_id, int status);
|
2010-06-17 17:39:32 +00:00
|
|
|
|
|
|
|
void savestatusmessage();
|
|
|
|
|
2009-01-04 02:28:30 +00:00
|
|
|
private:
|
2010-07-18 11:43:39 +00:00
|
|
|
static MessengerWindow *_instance;
|
2007-11-15 03:18:48 +00:00
|
|
|
|
2010-06-17 17:39:32 +00:00
|
|
|
void processSettings(bool bLoad);
|
2010-04-27 12:21:39 +00:00
|
|
|
|
2010-09-11 18:08:38 +00:00
|
|
|
QString m_nickName;
|
2010-06-17 17:39:32 +00:00
|
|
|
|
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::MessengerWindow ui;
|
2016-07-05 23:49:43 -04:00
|
|
|
|
2016-11-27 12:21:14 +01:00
|
|
|
static std::set<RsPgpId> expandedPeers ;
|
2016-07-05 23:49:43 -04:00
|
|
|
static std::set<RsNodeGroupId> expandedGroups ;
|
2009-01-04 02:28:30 +00:00
|
|
|
};
|
|
|
|
|
2011-09-05 21:19:07 +00:00
|
|
|
#endif
|