root/trunk/qt4-gui/src/userevents/usereventtabdlg.h

Revision 6463, 2.0 kB (checked in by flynd, 4 months ago)

Use a const pointer for user objects that are only fetched for read access. Fixed some places where we changed the user even though we just had a read lock.

Line 
1// -*- c-basic-offset: 2 -*-
2/*
3 * This file is part of Licq, an instant messaging client for UNIX.
4 * Copyright (C) 2000-2006 Licq developers
5 *
6 * Licq is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * Licq is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Licq; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19 */
20
21#ifndef USEREVENTTABDLG_H
22#define USEREVENTTABDLG_H
23
24#include "config.h"
25
26#include <QWidget>
27
28class ICQUser;
29
30namespace LicqQtGui
31{
32class TabWidget;
33class UserEventCommon;
34
35class UserEventTabDlg : public QWidget
36{
37  Q_OBJECT
38
39public:
40  UserEventTabDlg(QWidget* parent = 0, const char* name = 0);
41  ~UserEventTabDlg();
42
43  void addTab(UserEventCommon* tab, int index = -1);
44  void selectTab(QWidget* tab);
45  void replaceTab(QWidget* oldTab, UserEventCommon* newTab);
46  bool tabIsSelected(QWidget* tab);
47  bool tabExists(QWidget* tab);
48  void updateConvoLabel(UserEventCommon* tab);
49  void updateTabLabel(const ICQUser* u);
50  void updateTabLabel(UserEventCommon* tab, const ICQUser* u = NULL);
51  void setTyping(const ICQUser* u, int convoId);
52
53#ifdef USE_KDE
54  virtual void setIcon(const QPixmap& icon);
55#endif
56
57signals:
58  void signal_done();
59
60public slots:
61  void currentChanged(int index);
62  void moveLeft();
63  void moveRight();
64  void removeTab(QWidget* tab);
65  void setMsgWinSticky(bool sticky = true);
66
67private:
68  TabWidget* myTabs;
69
70  void updateTitle(QWidget* tab);
71  void clearEvents(QWidget* tab);
72  void saveGeometry();
73
74  virtual void moveEvent(QMoveEvent* e);
75  virtual void resizeEvent(QResizeEvent* e);
76};
77
78} // namespace LicqQtGui
79
80#endif
Note: See TracBrowser for help on using the browser.