2007-11-14 22:18:48 -05:00
|
|
|
/****************************************************************
|
|
|
|
* RetroShare is distributed under the following license:
|
|
|
|
*
|
2007-11-18 18:35:53 -05:00
|
|
|
* Copyright (C) 2007, 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
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
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;
|
2009-01-03 21:28:30 -05:00
|
|
|
};
|
|
|
|
|
2011-09-05 17:19:07 -04:00
|
|
|
#endif
|