2007-11-14 22:18:48 -05:00
|
|
|
/****************************************************************
|
|
|
|
* RShare is distributed under the following license:
|
|
|
|
*
|
2011-05-17 13:27:47 -04:00
|
|
|
* Copyright (C) 2006 - 2011 RetroShare Team
|
2007-11-14 22:18:48 -05:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2013-01-22 19:22:17 -05:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
2007-11-14 22:18:48 -05:00
|
|
|
* Boston, MA 02110-1301, USA.
|
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
|
|
|
|
2014-05-09 22:38:47 -04:00
|
|
|
#define IMAGE_PEERS ":/images/groupchat.png"
|
|
|
|
|
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. */
|
2014-09-10 04:37:27 -04:00
|
|
|
#ifdef RS_USE_CIRCLES
|
2014-05-07 19:45:53 -04:00
|
|
|
CirclesTab = 1, /** Circles page. */
|
2014-09-10 04:37:27 -04:00
|
|
|
#endif
|
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
|
|
|
|
2014-05-09 22:38:47 -04:00
|
|
|
virtual QIcon iconPixmap() const { return QIcon(IMAGE_PEERS) ; } //MainPage
|
|
|
|
virtual QString pageName() const { return tr("Network") ; } //MainPage
|
|
|
|
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
|
|
|
|
2014-09-10 04:37:27 -04:00
|
|
|
#ifdef RS_USE_CIRCLES
|
2014-05-07 19:45:53 -04:00
|
|
|
CirclesDialog *circlesDialog;
|
2014-09-10 04:37:27 -04:00
|
|
|
#endif
|
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
|
|
|
|
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
|