2018-12-25 15:34:59 -05: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-03 21:28:30 -05:00
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
#ifndef _MESSENGERWINDOW_H
|
2009-01-03 21:28:30 -05:00
|
|
|
#define _MESSENGERWINDOW_H
|
|
|
|
|
2007-11-16 20:35:52 -05:00
|
|
|
#include "ui_MessengerWindow.h"
|
2010-02-03 12:39:30 -05:00
|
|
|
|
2009-01-07 16:12:31 -05:00
|
|
|
#include <gui/common/rwindow.h>
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2009-01-07 16:12:31 -05:00
|
|
|
class MessengerWindow : public RWindow
|
2009-01-03 21:28:30 -05:00
|
|
|
{
|
2010-06-17 13:39:32 -04:00
|
|
|
Q_OBJECT
|
2007-11-16 20:35:52 -05:00
|
|
|
|
2011-10-20 17:34:44 -04:00
|
|
|
public:
|
2010-07-18 07:43:39 -04:00
|
|
|
static void showYourself ();
|
2010-06-17 13:39:32 -04:00
|
|
|
static MessengerWindow* getInstance();
|
|
|
|
static void releaseInstance();
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2009-01-03 21:28:30 -05:00
|
|
|
public slots:
|
2010-06-17 13:39:32 -04:00
|
|
|
void loadmystatusmessage();
|
2010-04-27 08:21:39 -04:00
|
|
|
|
2007-11-14 22:18:48 -05:00
|
|
|
protected:
|
2010-06-17 13:39:32 -04:00
|
|
|
/** Default Constructor */
|
2013-10-18 17:10:33 -04:00
|
|
|
MessengerWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
2010-06-17 13:39:32 -04:00
|
|
|
/** Default Destructor */
|
|
|
|
~MessengerWindow();
|
2009-01-03 21:28:30 -05:00
|
|
|
|
2010-06-17 13:39:32 -04:00
|
|
|
void closeEvent (QCloseEvent * event);
|
2009-01-03 21:28:30 -05:00
|
|
|
|
|
|
|
private slots:
|
2010-06-17 13:39:32 -04:00
|
|
|
/** Add a new friend */
|
|
|
|
void addFriend();
|
2010-07-15 07:25:34 -04:00
|
|
|
|
2010-06-17 13:39:32 -04:00
|
|
|
/** Open Shared Manager **/
|
|
|
|
void openShareManager();
|
|
|
|
|
2010-09-11 15:06:22 -04:00
|
|
|
void updateOwnStatus(const QString &peer_id, int status);
|
2010-06-17 13:39:32 -04:00
|
|
|
|
|
|
|
void savestatusmessage();
|
|
|
|
|
2009-01-03 21:28:30 -05:00
|
|
|
private:
|
2010-07-18 07:43:39 -04:00
|
|
|
static MessengerWindow *_instance;
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2010-06-17 13:39:32 -04:00
|
|
|
void processSettings(bool bLoad);
|
2010-04-27 08:21:39 -04:00
|
|
|
|
2010-09-11 14:08:38 -04:00
|
|
|
QString m_nickName;
|
2010-06-17 13:39:32 -04:00
|
|
|
|
|
|
|
/** Qt Designer generated object */
|
|
|
|
Ui::MessengerWindow ui;
|
2016-07-05 23:49:43 -04:00
|
|
|
|
2016-11-27 06:21:14 -05:00
|
|
|
static std::set<RsPgpId> expandedPeers ;
|
2016-07-05 23:49:43 -04:00
|
|
|
static std::set<RsNodeGroupId> expandedGroups ;
|
2009-01-03 21:28:30 -05:00
|
|
|
};
|
|
|
|
|
2011-09-05 17:19:07 -04:00
|
|
|
#endif
|