2018-12-25 15:34:59 -05:00
|
|
|
/*******************************************************************************
|
|
|
|
* gui/FriendsDialog.h *
|
|
|
|
* *
|
|
|
|
* Copyright (C) 2012 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-22 20:58:56 -05:00
|
|
|
|
2011-05-17 13:27:47 -04:00
|
|
|
#ifndef _FRIENDSDIALOG_H
|
|
|
|
#define _FRIENDSDIALOG_H
|
2009-01-22 20:58:56 -05:00
|
|
|
|
2012-02-19 10:03:07 -05:00
|
|
|
#include "retroshare-gui/RsAutoUpdatePage.h"
|
2009-01-22 20:58:56 -05:00
|
|
|
|
2011-05-17 13:27:47 -04:00
|
|
|
#include "ui_FriendsDialog.h"
|
2010-08-31 16:00:49 -04:00
|
|
|
|
2016-08-16 16:02:30 -04:00
|
|
|
#define IMAGE_NETWORK ":/icons/png/network.png"
|
2014-05-09 22:38:47 -04:00
|
|
|
|
2008-07-10 06:34:49 -04:00
|
|
|
class QAction;
|
2013-02-22 16:42:27 -05:00
|
|
|
class NetworkDialog;
|
|
|
|
class NetworkView;
|
2014-05-07 19:45:53 -04:00
|
|
|
class IdDialog;
|
|
|
|
class CirclesDialog;
|
2007-11-14 22:18:48 -05:00
|
|
|
|
2011-10-20 17:34:44 -04:00
|
|
|
class FriendsDialog : public RsAutoUpdatePage
|
2009-01-22 20:58:56 -05:00
|
|
|
{
|
2010-09-22 18:37:57 -04:00
|
|
|
Q_OBJECT
|
2009-10-04 18:27:42 -04:00
|
|
|
|
2010-01-31 17:29:30 -05:00
|
|
|
public:
|
2013-02-23 09:29:36 -05:00
|
|
|
enum Page {
|
|
|
|
/* Fixed numbers for load and save the last page */
|
2014-05-07 19:45:53 -04:00
|
|
|
IdTab = 0, /** Identities page. */
|
2019-06-20 16:07:08 -04:00
|
|
|
// CirclesTab = 1, /** Circles page - DEPRECATED - please keep the numbering. */
|
2014-05-07 19:45:53 -04:00
|
|
|
NetworkTab = 2, /** Network page. */
|
|
|
|
NetworkViewTab = 3, /** Network new graph. */
|
|
|
|
BroadcastTab = 4 /** Old group chat page. */
|
|
|
|
|
2013-02-23 09:29:36 -05:00
|
|
|
};
|
|
|
|
|
2010-09-22 18:37:57 -04:00
|
|
|
/** Default Constructor */
|
2011-05-17 13:27:47 -04:00
|
|
|
FriendsDialog(QWidget *parent = 0);
|
2010-09-22 18:37:57 -04:00
|
|
|
/** Default Destructor */
|
2011-05-17 13:27:47 -04:00
|
|
|
~FriendsDialog ();
|
2009-10-04 18:27:42 -04:00
|
|
|
|
2015-01-23 09:42:28 -05:00
|
|
|
virtual QIcon iconPixmap() const { return QIcon(IMAGE_NETWORK) ; } //MainPage
|
2017-02-26 15:41:45 -05:00
|
|
|
virtual QString pageName() const { return tr("Network") ; } //MainPage
|
2014-05-09 22:38:47 -04:00
|
|
|
virtual QString helpText() const { return ""; } //MainPage
|
|
|
|
|
2012-08-05 16:12:55 -04:00
|
|
|
virtual UserNotify *getUserNotify(QObject *parent);
|
|
|
|
|
2010-09-22 18:37:57 -04:00
|
|
|
virtual void updateDisplay() ; // overloaded from RsAutoUpdatePage
|
2009-10-04 18:27:42 -04:00
|
|
|
|
2012-03-30 19:02:52 -04:00
|
|
|
static bool isGroupChatActive();
|
|
|
|
static void groupChatActivate();
|
2012-01-18 15:02:19 -05:00
|
|
|
|
2013-02-23 09:29:36 -05:00
|
|
|
void activatePage(FriendsDialog::Page page) ;
|
|
|
|
|
2013-02-22 16:42:27 -05:00
|
|
|
NetworkDialog *networkDialog ;
|
|
|
|
NetworkView *networkView ;
|
2014-05-07 19:45:53 -04:00
|
|
|
|
|
|
|
IdDialog *idDialog;
|
|
|
|
|
2010-01-31 17:29:30 -05:00
|
|
|
protected:
|
2010-09-04 10:23:30 -04:00
|
|
|
void showEvent (QShowEvent *event);
|
2009-10-04 18:27:42 -04:00
|
|
|
|
2010-01-31 17:29:30 -05:00
|
|
|
private slots:
|
2014-12-29 16:41:05 -05:00
|
|
|
void chatMessageReceived(const ChatMessage& msg);
|
|
|
|
void chatStatusReceived(const ChatId& chat_id, const QString& status_string);
|
2009-10-04 18:27:42 -04:00
|
|
|
|
2010-09-29 15:30:59 -04:00
|
|
|
void addFriend();
|
2010-07-15 07:25:34 -04:00
|
|
|
|
2010-09-22 18:37:57 -04:00
|
|
|
void statusmessage();
|
2009-10-04 18:27:42 -04:00
|
|
|
|
2010-09-22 18:37:57 -04:00
|
|
|
void getAvatar();
|
2009-10-04 18:27:42 -04:00
|
|
|
|
2010-09-22 18:37:57 -04:00
|
|
|
void loadmypersonalstatus();
|
2009-10-04 18:27:42 -04:00
|
|
|
|
2015-01-10 08:13:41 -05:00
|
|
|
void clearChatNotify();
|
|
|
|
|
2013-02-22 16:42:27 -05:00
|
|
|
//void newsFeedChanged(int count);
|
2010-11-10 07:24:36 -05:00
|
|
|
|
2009-05-15 08:07:37 -04:00
|
|
|
signals:
|
2010-09-22 18:37:57 -04:00
|
|
|
void notifyGroupChat(const QString&,const QString&) ;
|
2009-10-04 18:27:42 -04:00
|
|
|
|
2010-01-31 17:29:30 -05:00
|
|
|
private:
|
2010-09-22 18:37:57 -04:00
|
|
|
void processSettings(bool bLoad);
|
2010-11-10 07:24:36 -05:00
|
|
|
|
2010-09-22 18:37:57 -04:00
|
|
|
/** Qt Designer generated object */
|
2011-05-17 13:27:47 -04:00
|
|
|
Ui::FriendsDialog ui;
|
2009-01-22 20:58:56 -05:00
|
|
|
};
|
|
|
|
|
2011-08-14 18:31:05 -04:00
|
|
|
#endif
|