summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircservertab.cpp
Unidiff
Diffstat (limited to 'noncore/net/opieirc/ircservertab.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opieirc/ircservertab.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp
index 5ca7a29..e031d4d 100644
--- a/noncore/net/opieirc/ircservertab.cpp
+++ b/noncore/net/opieirc/ircservertab.cpp
@@ -1,27 +1,29 @@
1#include <qtextstream.h> 1#include <qtextstream.h>
2#include <qwhatsthis.h> 2#include <qwhatsthis.h>
3
3#include "ircservertab.h" 4#include "ircservertab.h"
5#include "ircmessageparser.h"
4 6
5 7
6bool IRCServerTab::containsPing( const QString& text, IRCServerTab* tab ) { 8bool IRCServerTab::containsPing( const QString& text, IRCServerTab* tab ) {
7 return (text.contains(IRCMessageParser::tr("Received a CTCP PING from "))) || 9 return (text.contains(IRCMessageParser::tr("Received a CTCP PING from "))) ||
8 (text.find("ping") != -1 && text.find( tab->server()->nick() != -1)); 10 (text.find("ping") != -1 && text.find( tab->server()->nick() != -1));
9} 11}
10 12
11 13
12IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { 14IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) {
13 m_server = server; 15 m_server = server;
14 m_session = new IRCSession(&m_server); 16 m_session = new IRCSession(&m_server);
15 m_mainWindow = mainWindow; 17 m_mainWindow = mainWindow;
16 m_close = FALSE; 18 m_close = FALSE;
17 m_lines = 0; 19 m_lines = 0;
18 m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>"); 20 m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>");
19 m_textview = new QTextView(this); 21 m_textview = new QTextView(this);
20 m_textview->setHScrollBarMode(QScrollView::AlwaysOff); 22 m_textview->setHScrollBarMode(QScrollView::AlwaysOff);
21 m_textview->setVScrollBarMode(QScrollView::AlwaysOn); 23 m_textview->setVScrollBarMode(QScrollView::AlwaysOn);
22 m_textview->setTextFormat(RichText); 24 m_textview->setTextFormat(RichText);
23 QWhatsThis::add(m_textview, tr("Server messages")); 25 QWhatsThis::add(m_textview, tr("Server messages"));
24 m_layout->add(m_textview); 26 m_layout->add(m_textview);
25 m_field = new IRCHistoryLineEdit(this); 27 m_field = new IRCHistoryLineEdit(this);
26 connect(m_field, SIGNAL(nextTab()), this, SIGNAL(nextTab())); 28 connect(m_field, SIGNAL(nextTab()), this, SIGNAL(nextTab()));
27 connect(m_field, SIGNAL(prevTab()), this, SIGNAL(prevTab())); 29 connect(m_field, SIGNAL(prevTab()), this, SIGNAL(prevTab()));