Some more translation. Added a missing tr() in qtui/serverlist.cpp (ha! beat you...
[quassel.git] / src / qtui / bufferwidget.h
1 /***************************************************************************
2  *   Copyright (C) 2005-07 by the Quassel IRC Team                         *
3  *   devel@quassel-irc.org                                                 *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) version 3.                                           *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20
21 #ifndef _BUFFERWIDGET_H_
22 #define _BUFFERWIDGET_H_
23
24 #include "ui_bufferwidget.h"
25
26 #include "chatview.h"
27 #include "types.h"
28
29 class Buffer;
30 class ChatView;
31 class ChatWidget;
32 class LayoutThread;
33
34 //! Displays the contents of a Buffer.
35 /**
36 */
37 class BufferWidget : public QWidget {
38   Q_OBJECT
39
40 public:
41   BufferWidget(QWidget *parent = 0);
42   virtual ~BufferWidget();
43   void init();
44
45   QSize sizeHint() const;
46
47 signals:
48   void userInput(QString msg);
49   void aboutToClose();
50
51 public slots:
52   void setBuffer(Buffer *);
53   void saveState();
54
55 private slots:
56   void enterPressed();
57   void setActive(bool act = true);
58   void bufferDestroyed(QObject *);
59
60
61 private:
62   Ui::BufferWidget ui;
63   //QHash<BufferId, ChatView*> _chatViews;
64   QHash<Buffer *, ChatWidget *> _chatWidgets;
65   bool active;
66
67   QString _networkName;
68   QString _bufferName;
69 };
70
71
72 #endif