~ubuntu-branches/ubuntu/quantal/psi/quantal

« back to all changes in this revision

Viewing changes to src/tabdlg.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-04-14 18:57:30 UTC
  • mfrom: (2.1.9 hardy)
  • Revision ID: james.westby@ubuntu.com-20080414185730-528re3zp0m2hdlhi
Tags: 0.11-8
* added CONFIG -= link_prl to .pro files and removed dependencies
  which are made unnecessary by this change
* Fix segfault when closing last chat tab with qt4.4
  (This is from upstream svn, rev. 1101) (Closes: Bug#476122)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef TABDLG_H
22
22
#define TABDLG_H
23
23
 
24
 
#include <qwidget.h>
25
 
#include <qptrlist.h>
26
 
#include <qtabwidget.h>
27
 
#include <qlayout.h>
28
 
#include <qpushbutton.h>
29
 
#include "im.h"
30
 
#include <qmap.h>
31
 
#include "psitabwidget.h"
 
24
#include <QWidget>
 
25
#include <QSize>
 
26
#include <QMap>
 
27
#include <Q3PtrList>
 
28
 
 
29
#include "xmpp_chatstate.h"
32
30
#include "advwidget.h"
33
 
using namespace XMPP;
34
31
 
35
 
class ChatDlg;
36
32
class PsiCon;
37
33
class ChatTabs;
38
 
 
39
 
class QDragObject;
 
34
class ChatDlg;
 
35
class QPushButton;
 
36
class QMenu;
 
37
class QString;
 
38
class Q3DragObject;
40
39
class QContextMenuEvent;
41
 
 
42
 
/*class PsiAccount;
43
 
class UserListItem;
44
 
class QDropEvent;
45
 
class QDragEnterEvent;*/
46
 
 
47
 
class TabDlg : public AdvancedWidget<QWidget>//, public QWidget
 
40
class PsiTabWidget;
 
41
 
 
42
class TabDlg : public AdvancedWidget<QWidget>
48
43
{
49
44
        Q_OBJECT
50
45
public:
53
48
        bool managesChat(ChatDlg*);
54
49
        bool chatOnTop(ChatDlg*);
55
50
        QString getName();
 
51
        ChatDlg *getTab(int i);
56
52
        
57
53
signals:
58
54
        void isDying(TabDlg*);
59
55
protected:
 
56
        void setShortcuts();
60
57
        void closeEvent( QCloseEvent* );
61
58
        void keyPressEvent(QKeyEvent *);
62
59
        void windowActivationChange(bool);
63
 
        void resizeEvent(QResizeEvent *);       
 
60
        void resizeEvent(QResizeEvent *);
 
61
        void dragEnterEvent(QDragEnterEvent *event);
 
62
        void dropEvent(QDropEvent *event);
64
63
protected slots:
65
64
        void detachChat();
66
65
        void detachChat(QWidget*);
67
66
        void closeChat();
68
67
        void closeChat(QWidget*);
69
 
        void buildTabMenu();    
70
68
        void sendChatTo(QWidget*, TabDlg *);
 
69
        void queuedSendChatTo(QWidget*, TabDlg *);
71
70
public slots:
72
71
        void addChat(ChatDlg *chat);
73
72
        void setLooks();
74
73
        void closeChat(ChatDlg*,bool);
75
74
        void selectTab(ChatDlg*);
76
75
        void activated();
 
76
        void optionsUpdate();
77
77
private slots:
78
78
        void tabSelected(QWidget* chat);
79
79
        void checkHasChats();
81
81
        void updateTab(ChatDlg*);
82
82
        void nextTab();
83
83
        void previousTab();
84
 
        void setTabComposing(ChatDlg*, bool);   
 
84
        void setTabState( XMPP::ChatState );
85
85
        void setTabHasMessages(ChatDlg*, int);
86
 
        void tabTestCanDecode(const QDragMoveEvent*, bool&);
87
 
        void tabReceivedDropEvent(QDropEvent*);
88
 
        void tabReceivedDropEvent(QWidget*, QDropEvent*);
89
 
        void startDrag(QWidget*);
 
86
        void tab_aboutToShowMenu(QMenu *menu);
 
87
        void menu_sendChatTo(QAction *act);
 
88
        void showTabMenu(int tab, QPoint pos, QContextMenuEvent * event);
 
89
 
90
90
        
91
91
public:
92
92
        ChatDlg* getChatPointer(QString fullJid);
93
93
private:
94
94
        void updateCaption();
95
95
        PsiCon *psi;
96
 
        QPtrList<ChatDlg> chats;
97
 
        KTabWidget *tabs;
 
96
        Q3PtrList<ChatDlg> chats;
 
97
        PsiTabWidget *tabs;
98
98
        QPushButton *detachButton, *closeButton, *closeCross;
99
 
        QPopupMenu *tabMenu;
 
99
        QMenu *tabMenu;
100
100
        QMap<ChatDlg*, bool> tabIsComposing;
101
101
        QMap<ChatDlg*, bool> tabHasMessages;
 
102
        QAction *act_close, *act_next, *act_prev;
102
103
 
103
104
        QSize chatSize;
104
105
};