summaryrefslogtreecommitdiff
authorwazlaf <wazlaf>2002-10-16 21:28:25 (UTC)
committer wazlaf <wazlaf>2002-10-16 21:28:25 (UTC)
commit98bf2fd8027b5e10a82c0f4bde27d7977b919bcc (patch) (unidiff)
treef512cd6b1d66ed69a33b57e2ffa07eb8a7e4dbb4
parentfd6aee0559a2f2f68b14f9913ebbf482c2561572 (diff)
downloadopie-98bf2fd8027b5e10a82c0f4bde27d7977b919bcc.zip
opie-98bf2fd8027b5e10a82c0f4bde27d7977b919bcc.tar.gz
opie-98bf2fd8027b5e10a82c0f4bde27d7977b919bcc.tar.bz2
qwhatsthis fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircservertab.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp
index a46f105..5aa447f 100644
--- a/noncore/net/opieirc/ircservertab.cpp
+++ b/noncore/net/opieirc/ircservertab.cpp
@@ -1,68 +1,68 @@
1#include <qpe/config.h> 1#include <qpe/config.h>
2#include <qtextstream.h> 2#include <qtextstream.h>
3#include <qwhatsthis.h> 3#include <qwhatsthis.h>
4#include "ircservertab.h" 4#include "ircservertab.h"
5 5
6IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { 6IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) {
7 m_server = server; 7 m_server = server;
8 m_session = new IRCSession(&m_server); 8 m_session = new IRCSession(&m_server);
9 m_mainWindow = mainWindow; 9 m_mainWindow = mainWindow;
10 m_close = FALSE; 10 m_close = FALSE;
11 m_lines = 0; 11 m_lines = 0;
12 m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>"); 12 m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>");
13 m_textview = new QTextView(this); 13 m_textview = new QTextView(this);
14 m_textview->setHScrollBarMode(QScrollView::AlwaysOff); 14 m_textview->setHScrollBarMode(QScrollView::AlwaysOff);
15 m_textview->setVScrollBarMode(QScrollView::AlwaysOn); 15 m_textview->setVScrollBarMode(QScrollView::AlwaysOn);
16 m_textview->setTextFormat(RichText); 16 m_textview->setTextFormat(RichText);
17 QWhatsThis::add(m_textview, tr("Server messages")); 17 QWhatsThis::add(m_textview, tr("Server messages"));
18 m_layout->add(m_textview); 18 m_layout->add(m_textview);
19 m_field = new IRCHistoryLineEdit(this); 19 m_field = new IRCHistoryLineEdit(this);
20 QWhatsThis::add(m_textview, tr("Type commands here. A list of available commands can be found inside the OpieIRC help")); 20 QWhatsThis::add(m_field, tr("Type commands here. A list of available commands can be found inside the OpieIRC help"));
21 m_layout->add(m_field); 21 m_layout->add(m_field);
22 connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); 22 connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand()));
23 m_field->setFocus(); 23 m_field->setFocus();
24 connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput))); 24 connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput)));
25 settingsChanged(); 25 settingsChanged();
26} 26}
27 27
28void IRCServerTab::appendText(QString text) { 28void IRCServerTab::appendText(QString text) {
29 /* not using append because it creates layout problems */ 29 /* not using append because it creates layout problems */
30 QString txt = m_textview->text() + text + "\n"; 30 QString txt = m_textview->text() + text + "\n";
31 if (m_maxLines > 0 && m_lines >= m_maxLines) { 31 if (m_maxLines > 0 && m_lines >= m_maxLines) {
32 int firstBreak = txt.find('\n'); 32 int firstBreak = txt.find('\n');
33 if (firstBreak != -1) { 33 if (firstBreak != -1) {
34 txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); 34 txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1));
35 } 35 }
36 } else { 36 } else {
37 m_lines++; 37 m_lines++;
38 } 38 }
39 m_textview->setText(txt); 39 m_textview->setText(txt);
40 m_textview->ensureVisible(0, m_textview->contentsHeight()); 40 m_textview->ensureVisible(0, m_textview->contentsHeight());
41 emit changed(this); 41 emit changed(this);
42} 42}
43 43
44IRCServerTab::~IRCServerTab() { 44IRCServerTab::~IRCServerTab() {
45 delete m_session; 45 delete m_session;
46} 46}
47 47
48void IRCServerTab::removeChannelTab(IRCChannelTab *tab) { 48void IRCServerTab::removeChannelTab(IRCChannelTab *tab) {
49 m_channelTabs.remove(tab); 49 m_channelTabs.remove(tab);
50} 50}
51 51
52void IRCServerTab::removeQueryTab(IRCQueryTab *tab) { 52void IRCServerTab::removeQueryTab(IRCQueryTab *tab) {
53 m_queryTabs.remove(tab); 53 m_queryTabs.remove(tab);
54} 54}
55 55
56void IRCServerTab::addQueryTab(IRCQueryTab *tab) { 56void IRCServerTab::addQueryTab(IRCQueryTab *tab) {
57 m_queryTabs.append(tab); 57 m_queryTabs.append(tab);
58} 58}
59 59
60QString IRCServerTab::title() { 60QString IRCServerTab::title() {
61 return "Server"; 61 return "Server";
62} 62}
63 63
64IRCSession *IRCServerTab::session() { 64IRCSession *IRCServerTab::session() {
65 return m_session; 65 return m_session;
66} 66}
67 67
68IRCServer *IRCServerTab::server() { 68IRCServer *IRCServerTab::server() {