create PresenceManager that manage global presence state and message
[makneto-zunavac1.git] / src / ui-kde / sessiontabmanager.h
blobed6e64da2617e30713ac94d639b5eb59320edec5
1 /*
2 * sessiontabmanager.h
4 * Copyright (C) 2008 Jaroslav Reznik <rezzabuh@gmail.com>
5 */
7 #ifndef SESSIONTABMANAGER_H
8 #define SESSIONTABMANAGER_H
10 #include "makneto.h"
11 #include "../backend/session.h"
13 #include <QtGui/QWidget>
15 class QStackedWidget;
16 class QVBoxLayout;
17 class KTabBar;
18 class SessionView;
20 /**
21 * This is session tab manager widget for Makneto
23 * @short Session tab manager widget
24 * @author Jaroslav Reznik <rezzabuh@gmail.com>
25 * @version 0.1
28 class SessionTabManager : public QWidget
30 Q_OBJECT
32 public:
33 /**
34 * Default constructor
36 SessionTabManager(Makneto *makneto, QWidget *parent);
38 /**
39 * Destructor
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();
49 //vtheman
50 //SessionView* newSessionTab(MaknetoLib::Session *);
52 Q_SIGNALS:
53 void newSessionRequested(const QModelIndex &, MaknetoBackend::Session::SessionType);
54 void callRequested(const QModelIndex &);
56 public Q_SLOTS:
57 void closeTab(int tabIndex);
59 //vtheman
60 void onTextChatRequested(const QModelIndex &);
61 void onCallRequested(const QModelIndex &);
62 void onNewSession(MaknetoBackend::Session *, bool, bool);
64 private:
65 QVBoxLayout *m_mainlayout;
67 KTabBar *m_tab;
68 QStackedWidget *m_widgets;
69 Makneto *m_makneto;
72 #endif // SESSIONTABMANAGER_H