4 * Copyright (C) 2008 Jaroslav Reznik <rezzabuh@gmail.com>
7 #ifndef SESSIONTABMANAGER_H
8 #define SESSIONTABMANAGER_H
11 #include "../backend/session.h"
13 #include <QtGui/QWidget>
21 * This is session tab manager widget for Makneto
23 * @short Session tab manager widget
24 * @author Jaroslav Reznik <rezzabuh@gmail.com>
28 class SessionTabManager
: public QWidget
36 SessionTabManager(Makneto
*makneto
, QWidget
*parent
);
41 virtual ~SessionTabManager();
43 // SessionView *newSessionTab(const QString &text, ChatType type, const QString &nick = QString());
44 SessionView
*findSession(const QString
&jid
);
45 void bringToFront(SessionView
*session
);
46 Makneto
*makneto() { return m_makneto
; }
47 SessionView
*activeSession();
50 //SessionView* newSessionTab(MaknetoLib::Session *);
53 void newSessionRequested(const QModelIndex
&, MaknetoBackend::Session::SessionType
);
54 void callRequested(const QModelIndex
&);
57 void closeTab(int tabIndex
);
60 void onTextChatRequested(const QModelIndex
&);
61 void onCallRequested(const QModelIndex
&);
62 void onNewSession(MaknetoBackend::Session
*, bool, bool);
65 QVBoxLayout
*m_mainlayout
;
68 QStackedWidget
*m_widgets
;
72 #endif // SESSIONTABMANAGER_H