Added tabbed PopupChatWindow. You can switch to tabbed chat window in the settings (NotifyPage).

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3797 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-11-15 20:49:24 +00:00
parent 1e28183c2d
commit 39907c1afc
14 changed files with 1504 additions and 1036 deletions

View file

@ -0,0 +1,72 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2006, crypton
*
* 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.
****************************************************************/
#ifndef _POPUPCHATWINDOW_H
#define _POPUPCHATWINDOW_H
#include <QTimer>
#include "ui_PopupChatWindow.h"
class PopupChatDialog;
class PopupChatWindow : public QMainWindow
{
Q_OBJECT
public:
static PopupChatWindow *getWindow(bool needSingleWindow);
static void cleanup();
public:
void addDialog(PopupChatDialog *dialog);
void removeDialog(PopupChatDialog *dialog);
void showDialog(PopupChatDialog *dialog, uint chatflags);
void alertDialog(PopupChatDialog *dialog);
void calculateTitle(PopupChatDialog *dialog);
protected:
/** Default constructor */
PopupChatWindow(bool tabbed, QWidget *parent = 0, Qt::WFlags flags = 0);
/** Default destructor */
~PopupChatWindow();
virtual void showEvent(QShowEvent *event);
virtual void changeEvent(QEvent *event);
private slots:
void getAvatar();
void tabCloseRequested(int tab);
void tabCurrentChanged(int tab);
void dockTab();
void undockTab();
private:
bool tabbedWindow;
bool firstShow;
std::string peerId;
PopupChatDialog *chatDialog;
/** Qt Designer generated object */
Ui::PopupChatWindow ui;
};
#endif