author | wazlaf <wazlaf> | 2002-10-16 21:04:15 (UTC) |
---|---|---|
committer | wazlaf <wazlaf> | 2002-10-16 21:04:15 (UTC) |
commit | 6ce0b792c67bf14db705c459a2690390aae70846 (patch) (unidiff) | |
tree | 3244d85cd7e57638bd11452ec7ed7bf51e633b89 | |
parent | 8834d3ee866fe9f0c093bf50fa78b4e0f5d2018c (diff) | |
download | opie-6ce0b792c67bf14db705c459a2690390aae70846.zip opie-6ce0b792c67bf14db705c459a2690390aae70846.tar.gz opie-6ce0b792c67bf14db705c459a2690390aae70846.tar.bz2 |
qwhatsthis are now complete
-rw-r--r-- | noncore/net/opieirc/ircchanneltab.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opieirc/ircquerytab.cpp | 3 | ||||
-rw-r--r-- | noncore/net/opieirc/ircservertab.cpp | 3 | ||||
-rw-r--r-- | noncore/net/opieirc/irctab.cpp | 3 | ||||
-rw-r--r-- | noncore/net/opieirc/opie-irc.control | 2 |
5 files changed, 13 insertions, 2 deletions
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp index f19e019..c1964c8 100644 --- a/noncore/net/opieirc/ircchanneltab.cpp +++ b/noncore/net/opieirc/ircchanneltab.cpp | |||
@@ -1,90 +1,92 @@ | |||
1 | #include <qpe/qpeapplication.h> | 1 | #include <qpe/qpeapplication.h> |
2 | #include <qpe/resource.h> | 2 | #include <qpe/resource.h> |
3 | #include <qcursor.h> | 3 | #include <qcursor.h> |
4 | #include <stdio.h> | 4 | #include <qwhatsthis.h> |
5 | #include <qhbox.h> | 5 | #include <qhbox.h> |
6 | #include "ircchanneltab.h" | 6 | #include "ircchanneltab.h" |
7 | #include "ircservertab.h" | 7 | #include "ircservertab.h" |
8 | 8 | ||
9 | IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { | 9 | IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { |
10 | m_mainWindow = mainWindow; | 10 | m_mainWindow = mainWindow; |
11 | m_parentTab = parentTab; | 11 | m_parentTab = parentTab; |
12 | m_channel = channel; | 12 | m_channel = channel; |
13 | m_description->setText(tr("Talking on channel") + " <b>" + channel->channelname() + "</b>"); | 13 | m_description->setText(tr("Talking on channel") + " <b>" + channel->channelname() + "</b>"); |
14 | QHBox *hbox = new QHBox(this); | 14 | QHBox *hbox = new QHBox(this); |
15 | m_textview = new QTextView(hbox); | 15 | m_textview = new QTextView(hbox); |
16 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); | 16 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); |
17 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); | 17 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); |
18 | m_listVisible = TRUE; | 18 | m_listVisible = TRUE; |
19 | m_listButton = new QPushButton(">", m_textview); | 19 | m_listButton = new QPushButton(">", m_textview); |
20 | m_textview->setCornerWidget(m_listButton); | 20 | m_textview->setCornerWidget(m_listButton); |
21 | m_textview->setTextFormat(RichText); | 21 | m_textview->setTextFormat(RichText); |
22 | QWhatsThis::add(m_textview, tr("Channel discussion")); | ||
22 | connect(m_listButton, SIGNAL(clicked()), this, SLOT(toggleList())); | 23 | connect(m_listButton, SIGNAL(clicked()), this, SLOT(toggleList())); |
23 | m_list = new IRCChannelList(m_channel, hbox); | 24 | m_list = new IRCChannelList(m_channel, hbox); |
24 | m_list->update(); | 25 | m_list->update(); |
25 | m_list->setMaximumWidth(LISTWIDTH); | 26 | m_list->setMaximumWidth(LISTWIDTH); |
26 | m_field = new IRCHistoryLineEdit(this); | 27 | m_field = new IRCHistoryLineEdit(this); |
28 | QWhatsThis::add(m_field, tr("Type your message here to participate in the channel discussion")); | ||
27 | m_popup = new QPopupMenu(m_list); | 29 | m_popup = new QPopupMenu(m_list); |
28 | m_lines = 0; | 30 | m_lines = 0; |
29 | /* Required so that embedded-style "right" clicks work */ | 31 | /* Required so that embedded-style "right" clicks work */ |
30 | QPEApplication::setStylusOperation(m_list->viewport(), QPEApplication::RightOnHold); | 32 | QPEApplication::setStylusOperation(m_list->viewport(), QPEApplication::RightOnHold); |
31 | connect(m_list, SIGNAL(mouseButtonPressed(int, QListBoxItem *, const QPoint&)), this, SLOT(mouseButtonPressed(int, QListBoxItem *, const QPoint &))); | 33 | connect(m_list, SIGNAL(mouseButtonPressed(int, QListBoxItem *, const QPoint&)), this, SLOT(mouseButtonPressed(int, QListBoxItem *, const QPoint &))); |
32 | 34 | ||
33 | /* Construct the popup menu */ | 35 | /* Construct the popup menu */ |
34 | QPopupMenu *ctcpMenu = new QPopupMenu(m_list); | 36 | QPopupMenu *ctcpMenu = new QPopupMenu(m_list); |
35 | m_popup->insertItem(Resource::loadPixmap("opieirc/ctcp"), tr("CTCP"), ctcpMenu); | 37 | m_popup->insertItem(Resource::loadPixmap("opieirc/ctcp"), tr("CTCP"), ctcpMenu); |
36 | m_popup->insertItem(Resource::loadPixmap("opieirc/query"), tr("Query"), this, SLOT(popupQuery())); | 38 | m_popup->insertItem(Resource::loadPixmap("opieirc/query"), tr("Query"), this, SLOT(popupQuery())); |
37 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/ping"), tr("Ping"), this, SLOT(popupPing())); | 39 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/ping"), tr("Ping"), this, SLOT(popupPing())); |
38 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/version"), tr("Version"), this, SLOT(popupVersion())); | 40 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/version"), tr("Version"), this, SLOT(popupVersion())); |
39 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/whois"), tr("Whois"), this, SLOT(popupWhois())); | 41 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/whois"), tr("Whois"), this, SLOT(popupWhois())); |
40 | 42 | ||
41 | m_layout->add(hbox); | 43 | m_layout->add(hbox); |
42 | hbox->show(); | 44 | hbox->show(); |
43 | m_layout->add(m_field); | 45 | m_layout->add(m_field); |
44 | m_field->setFocus(); | 46 | m_field->setFocus(); |
45 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 47 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
46 | settingsChanged(); | 48 | settingsChanged(); |
47 | } | 49 | } |
48 | 50 | ||
49 | void IRCChannelTab::appendText(QString text) { | 51 | void IRCChannelTab::appendText(QString text) { |
50 | /* not using append because it creates layout problems */ | 52 | /* not using append because it creates layout problems */ |
51 | QString txt = m_textview->text() + text + "\n"; | 53 | QString txt = m_textview->text() + text + "\n"; |
52 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 54 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
53 | int firstBreak = txt.find('\n'); | 55 | int firstBreak = txt.find('\n'); |
54 | if (firstBreak != -1) { | 56 | if (firstBreak != -1) { |
55 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); | 57 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); |
56 | } | 58 | } |
57 | } else { | 59 | } else { |
58 | m_lines++; | 60 | m_lines++; |
59 | } | 61 | } |
60 | m_textview->setText(txt); | 62 | m_textview->setText(txt); |
61 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 63 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
62 | emit changed(this); | 64 | emit changed(this); |
63 | } | 65 | } |
64 | 66 | ||
65 | IRCChannelTab::~IRCChannelTab() { | 67 | IRCChannelTab::~IRCChannelTab() { |
66 | m_parentTab->removeChannelTab(this); | 68 | m_parentTab->removeChannelTab(this); |
67 | } | 69 | } |
68 | 70 | ||
69 | void IRCChannelTab::processCommand() { | 71 | void IRCChannelTab::processCommand() { |
70 | QString text = m_field->text(); | 72 | QString text = m_field->text(); |
71 | if (text.length()>0) { | 73 | if (text.length()>0) { |
72 | if (session()->isSessionActive()) { | 74 | if (session()->isSessionActive()) { |
73 | if (text.startsWith("/") && !text.startsWith("//")) { | 75 | if (text.startsWith("/") && !text.startsWith("//")) { |
74 | /* Command mode */ | 76 | /* Command mode */ |
75 | m_parentTab->executeCommand(this, text);; | 77 | m_parentTab->executeCommand(this, text);; |
76 | } else { | 78 | } else { |
77 | if (text.startsWith("//")) | 79 | if (text.startsWith("//")) |
78 | text = text.right(text.length()-1); | 80 | text = text.right(text.length()-1); |
79 | session()->sendMessage(m_channel, m_field->text()); | 81 | session()->sendMessage(m_channel, m_field->text()); |
80 | appendText("<font color=\"" + m_textColor + "\"><</font><font color=\"" + m_selfColor + "\">"+m_parentTab->server()->nick()+"</font><font color=\"" + m_textColor + "\">> "+IRCOutput::toHTML(m_field->text())+"</font><br>"); | 82 | appendText("<font color=\"" + m_textColor + "\"><</font><font color=\"" + m_selfColor + "\">"+m_parentTab->server()->nick()+"</font><font color=\"" + m_textColor + "\">> "+IRCOutput::toHTML(m_field->text())+"</font><br>"); |
81 | } | 83 | } |
82 | } else { | 84 | } else { |
83 | appendText("<font color=\"" + m_errorColor + "\">"+tr("Disconnected")+"</font><br>"); | 85 | appendText("<font color=\"" + m_errorColor + "\">"+tr("Disconnected")+"</font><br>"); |
84 | } | 86 | } |
85 | } | 87 | } |
86 | m_field->clear(); | 88 | m_field->clear(); |
87 | } | 89 | } |
88 | 90 | ||
89 | void IRCChannelTab::settingsChanged() { | 91 | void IRCChannelTab::settingsChanged() { |
90 | m_textview->setText("<qt bgcolor=\"" + m_backgroundColor + "\"/>"); | 92 | m_textview->setText("<qt bgcolor=\"" + m_backgroundColor + "\"/>"); |
diff --git a/noncore/net/opieirc/ircquerytab.cpp b/noncore/net/opieirc/ircquerytab.cpp index 869e4f7..21a53dc 100644 --- a/noncore/net/opieirc/ircquerytab.cpp +++ b/noncore/net/opieirc/ircquerytab.cpp | |||
@@ -1,80 +1,83 @@ | |||
1 | #include <qhbox.h> | 1 | #include <qhbox.h> |
2 | #include <qwhatsthis.h> | ||
2 | #include "ircquerytab.h" | 3 | #include "ircquerytab.h" |
3 | #include "ircservertab.h" | 4 | #include "ircservertab.h" |
4 | 5 | ||
5 | IRCQueryTab::IRCQueryTab(IRCPerson *person, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { | 6 | IRCQueryTab::IRCQueryTab(IRCPerson *person, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { |
6 | m_mainWindow = mainWindow; | 7 | m_mainWindow = mainWindow; |
7 | m_parentTab = parentTab; | 8 | m_parentTab = parentTab; |
8 | m_lines = 0; | 9 | m_lines = 0; |
9 | m_person = new IRCPerson(*person); /* We need this (the person might sign off and the original IRCPerson gets deleted) */ | 10 | m_person = new IRCPerson(*person); /* We need this (the person might sign off and the original IRCPerson gets deleted) */ |
10 | m_description->setText(tr("Talking to ") + " <b>" + person->nick() + "</b>"); | 11 | m_description->setText(tr("Talking to ") + " <b>" + person->nick() + "</b>"); |
11 | QHBox *hbox = new QHBox(this); | 12 | QHBox *hbox = new QHBox(this); |
12 | m_textview = new QTextView(hbox); | 13 | m_textview = new QTextView(hbox); |
13 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); | 14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); |
14 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); | 15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); |
15 | m_textview->setTextFormat(RichText); | 16 | m_textview->setTextFormat(RichText); |
17 | QWhatsThis::add(m_textview, tr("Private discussion")); | ||
16 | m_field = new IRCHistoryLineEdit(this); | 18 | m_field = new IRCHistoryLineEdit(this); |
19 | QWhatsThis::add(m_field, tr("Type your text here in order to send a message to the other person")); | ||
17 | m_layout->add(hbox); | 20 | m_layout->add(hbox); |
18 | hbox->show(); | 21 | hbox->show(); |
19 | m_layout->add(m_field); | 22 | m_layout->add(m_field); |
20 | m_field->setFocus(); | 23 | m_field->setFocus(); |
21 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 24 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
22 | settingsChanged(); | 25 | settingsChanged(); |
23 | } | 26 | } |
24 | 27 | ||
25 | void IRCQueryTab::appendText(QString text) { | 28 | void IRCQueryTab::appendText(QString text) { |
26 | /* not using append because it creates layout problems */ | 29 | /* not using append because it creates layout problems */ |
27 | QString txt = m_textview->text() + text + "\n"; | 30 | QString txt = m_textview->text() + text + "\n"; |
28 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 31 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
29 | int firstBreak = txt.find('\n'); | 32 | int firstBreak = txt.find('\n'); |
30 | if (firstBreak != -1) { | 33 | if (firstBreak != -1) { |
31 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); | 34 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); |
32 | } | 35 | } |
33 | } else { | 36 | } else { |
34 | m_lines++; | 37 | m_lines++; |
35 | } | 38 | } |
36 | m_textview->setText(txt); | 39 | m_textview->setText(txt); |
37 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 40 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
38 | emit changed(this); | 41 | emit changed(this); |
39 | } | 42 | } |
40 | 43 | ||
41 | IRCQueryTab::~IRCQueryTab() { | 44 | IRCQueryTab::~IRCQueryTab() { |
42 | m_parentTab->removeQueryTab(this); | 45 | m_parentTab->removeQueryTab(this); |
43 | delete m_person; | 46 | delete m_person; |
44 | } | 47 | } |
45 | 48 | ||
46 | void IRCQueryTab::processCommand() { | 49 | void IRCQueryTab::processCommand() { |
47 | QString text = m_field->text(); | 50 | QString text = m_field->text(); |
48 | if (text.length()>0) { | 51 | if (text.length()>0) { |
49 | if (session()->isSessionActive()) { | 52 | if (session()->isSessionActive()) { |
50 | if (text.startsWith("/") && !text.startsWith("//")) { | 53 | if (text.startsWith("/") && !text.startsWith("//")) { |
51 | /* Command mode */ | 54 | /* Command mode */ |
52 | m_parentTab->executeCommand(this, text);; | 55 | m_parentTab->executeCommand(this, text);; |
53 | } else { | 56 | } else { |
54 | if (text.startsWith("//")) | 57 | if (text.startsWith("//")) |
55 | text = text.right(text.length()-1); | 58 | text = text.right(text.length()-1); |
56 | session()->sendMessage(m_person, m_field->text()); | 59 | session()->sendMessage(m_person, m_field->text()); |
57 | appendText("<font color=\"" + m_textColor + "\"><</font><font color=\"" + m_selfColor + "\">"+m_parentTab->server()->nick()+"</font><font color=\"" + m_textColor + "\">> "+IRCOutput::toHTML(m_field->text())+"</font><br>"); | 60 | appendText("<font color=\"" + m_textColor + "\"><</font><font color=\"" + m_selfColor + "\">"+m_parentTab->server()->nick()+"</font><font color=\"" + m_textColor + "\">> "+IRCOutput::toHTML(m_field->text())+"</font><br>"); |
58 | } | 61 | } |
59 | } else { | 62 | } else { |
60 | appendText("<font color=\"" + m_errorColor + "\">"+tr("Disconnected")+"</font><br>"); | 63 | appendText("<font color=\"" + m_errorColor + "\">"+tr("Disconnected")+"</font><br>"); |
61 | } | 64 | } |
62 | } | 65 | } |
63 | m_field->clear(); | 66 | m_field->clear(); |
64 | } | 67 | } |
65 | 68 | ||
66 | void IRCQueryTab::display(IRCOutput output) { | 69 | void IRCQueryTab::display(IRCOutput output) { |
67 | if (output.type() == OUTPUT_QUERYPRIVMSG) { | 70 | if (output.type() == OUTPUT_QUERYPRIVMSG) { |
68 | appendText("<font color=\"" + m_textColor + "\"><</font><font color=\"" + m_otherColor + "\">"+m_person->nick()+"</font><font color=\"" + m_textColor + "\">> " + output.htmlMessage() + "</font><br>"); | 71 | appendText("<font color=\"" + m_textColor + "\"><</font><font color=\"" + m_otherColor + "\">"+m_person->nick()+"</font><font color=\"" + m_textColor + "\">> " + output.htmlMessage() + "</font><br>"); |
69 | } else if (output.type() == OUTPUT_QUERYACTION) { | 72 | } else if (output.type() == OUTPUT_QUERYACTION) { |
70 | appendText("<font color=\"" + m_otherColor + "\">" + output.htmlMessage() + "<br>"); | 73 | appendText("<font color=\"" + m_otherColor + "\">" + output.htmlMessage() + "<br>"); |
71 | } | 74 | } |
72 | } | 75 | } |
73 | 76 | ||
74 | void IRCQueryTab::settingsChanged() { | 77 | void IRCQueryTab::settingsChanged() { |
75 | m_textview->setText("<qt bgcolor=\"" + m_backgroundColor + "\"/>"); | 78 | m_textview->setText("<qt bgcolor=\"" + m_backgroundColor + "\"/>"); |
76 | m_lines = 0; | 79 | m_lines = 0; |
77 | } | 80 | } |
78 | 81 | ||
79 | QString IRCQueryTab::title() { | 82 | QString IRCQueryTab::title() { |
80 | return m_person->nick(); | 83 | return m_person->nick(); |
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp index 5d1e290..a46f105 100644 --- a/noncore/net/opieirc/ircservertab.cpp +++ b/noncore/net/opieirc/ircservertab.cpp | |||
@@ -1,81 +1,84 @@ | |||
1 | #include <qpe/config.h> | 1 | #include <qpe/config.h> |
2 | #include <qtextstream.h> | 2 | #include <qtextstream.h> |
3 | #include <qwhatsthis.h> | ||
3 | #include "ircservertab.h" | 4 | #include "ircservertab.h" |
4 | 5 | ||
5 | IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { | 6 | IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { |
6 | m_server = server; | 7 | m_server = server; |
7 | m_session = new IRCSession(&m_server); | 8 | m_session = new IRCSession(&m_server); |
8 | m_mainWindow = mainWindow; | 9 | m_mainWindow = mainWindow; |
9 | m_close = FALSE; | 10 | m_close = FALSE; |
10 | m_lines = 0; | 11 | m_lines = 0; |
11 | 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>"); |
12 | m_textview = new QTextView(this); | 13 | m_textview = new QTextView(this); |
13 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); | 14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); |
14 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); | 15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); |
15 | m_textview->setTextFormat(RichText); | 16 | m_textview->setTextFormat(RichText); |
17 | QWhatsThis::add(m_textview, tr("Server messages")); | ||
16 | m_layout->add(m_textview); | 18 | m_layout->add(m_textview); |
17 | 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")); | ||
18 | m_layout->add(m_field); | 21 | m_layout->add(m_field); |
19 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 22 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
20 | m_field->setFocus(); | 23 | m_field->setFocus(); |
21 | connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput))); | 24 | connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput))); |
22 | settingsChanged(); | 25 | settingsChanged(); |
23 | } | 26 | } |
24 | 27 | ||
25 | void IRCServerTab::appendText(QString text) { | 28 | void IRCServerTab::appendText(QString text) { |
26 | /* not using append because it creates layout problems */ | 29 | /* not using append because it creates layout problems */ |
27 | QString txt = m_textview->text() + text + "\n"; | 30 | QString txt = m_textview->text() + text + "\n"; |
28 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 31 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
29 | int firstBreak = txt.find('\n'); | 32 | int firstBreak = txt.find('\n'); |
30 | if (firstBreak != -1) { | 33 | if (firstBreak != -1) { |
31 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); | 34 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); |
32 | } | 35 | } |
33 | } else { | 36 | } else { |
34 | m_lines++; | 37 | m_lines++; |
35 | } | 38 | } |
36 | m_textview->setText(txt); | 39 | m_textview->setText(txt); |
37 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 40 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
38 | emit changed(this); | 41 | emit changed(this); |
39 | } | 42 | } |
40 | 43 | ||
41 | IRCServerTab::~IRCServerTab() { | 44 | IRCServerTab::~IRCServerTab() { |
42 | delete m_session; | 45 | delete m_session; |
43 | } | 46 | } |
44 | 47 | ||
45 | void IRCServerTab::removeChannelTab(IRCChannelTab *tab) { | 48 | void IRCServerTab::removeChannelTab(IRCChannelTab *tab) { |
46 | m_channelTabs.remove(tab); | 49 | m_channelTabs.remove(tab); |
47 | } | 50 | } |
48 | 51 | ||
49 | void IRCServerTab::removeQueryTab(IRCQueryTab *tab) { | 52 | void IRCServerTab::removeQueryTab(IRCQueryTab *tab) { |
50 | m_queryTabs.remove(tab); | 53 | m_queryTabs.remove(tab); |
51 | } | 54 | } |
52 | 55 | ||
53 | void IRCServerTab::addQueryTab(IRCQueryTab *tab) { | 56 | void IRCServerTab::addQueryTab(IRCQueryTab *tab) { |
54 | m_queryTabs.append(tab); | 57 | m_queryTabs.append(tab); |
55 | } | 58 | } |
56 | 59 | ||
57 | QString IRCServerTab::title() { | 60 | QString IRCServerTab::title() { |
58 | return "Server"; | 61 | return "Server"; |
59 | } | 62 | } |
60 | 63 | ||
61 | IRCSession *IRCServerTab::session() { | 64 | IRCSession *IRCServerTab::session() { |
62 | return m_session; | 65 | return m_session; |
63 | } | 66 | } |
64 | 67 | ||
65 | IRCServer *IRCServerTab::server() { | 68 | IRCServer *IRCServerTab::server() { |
66 | return &m_server; | 69 | return &m_server; |
67 | } | 70 | } |
68 | 71 | ||
69 | void IRCServerTab::settingsChanged() { | 72 | void IRCServerTab::settingsChanged() { |
70 | m_textview->setText("<qt bgcolor=\"" + m_backgroundColor + "\"/>"); | 73 | m_textview->setText("<qt bgcolor=\"" + m_backgroundColor + "\"/>"); |
71 | m_lines = 0; | 74 | m_lines = 0; |
72 | } | 75 | } |
73 | 76 | ||
74 | void IRCServerTab::executeCommand(IRCTab *tab, QString line) { | 77 | void IRCServerTab::executeCommand(IRCTab *tab, QString line) { |
75 | QTextIStream stream(&line); | 78 | QTextIStream stream(&line); |
76 | QString command; | 79 | QString command; |
77 | stream >> command; | 80 | stream >> command; |
78 | command = command.upper().right(command.length()-1); | 81 | command = command.upper().right(command.length()-1); |
79 | 82 | ||
80 | if (command == "JOIN") { | 83 | if (command == "JOIN") { |
81 | QString channel; | 84 | QString channel; |
diff --git a/noncore/net/opieirc/irctab.cpp b/noncore/net/opieirc/irctab.cpp index 0bb9d4c..8a869d6 100644 --- a/noncore/net/opieirc/irctab.cpp +++ b/noncore/net/opieirc/irctab.cpp | |||
@@ -1,36 +1,39 @@ | |||
1 | #include <qpe/resource.h> | 1 | #include <qpe/resource.h> |
2 | #include <qpixmap.h> | 2 | #include <qpixmap.h> |
3 | #include <qpushbutton.h> | 3 | #include <qpushbutton.h> |
4 | #include <qwhatsthis.h> | ||
4 | #include "irctab.h" | 5 | #include "irctab.h" |
5 | 6 | ||
6 | QString IRCTab::m_errorColor; | 7 | QString IRCTab::m_errorColor; |
7 | QString IRCTab::m_serverColor; | 8 | QString IRCTab::m_serverColor; |
8 | QString IRCTab::m_textColor; | 9 | QString IRCTab::m_textColor; |
9 | QString IRCTab::m_backgroundColor; | 10 | QString IRCTab::m_backgroundColor; |
10 | QString IRCTab::m_selfColor; | 11 | QString IRCTab::m_selfColor; |
11 | QString IRCTab::m_otherColor; | 12 | QString IRCTab::m_otherColor; |
12 | QString IRCTab::m_notificationColor; | 13 | QString IRCTab::m_notificationColor; |
13 | int IRCTab::m_maxLines; | 14 | int IRCTab::m_maxLines; |
14 | 15 | ||
15 | IRCTab::IRCTab(QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) { | 16 | IRCTab::IRCTab(QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) { |
16 | m_layout = new QVBoxLayout(this); | 17 | m_layout = new QVBoxLayout(this); |
17 | QHBoxLayout *descLayout = new QHBoxLayout(m_layout); | 18 | QHBoxLayout *descLayout = new QHBoxLayout(m_layout); |
18 | descLayout->setMargin(5); | 19 | descLayout->setMargin(5); |
19 | m_description = new QLabel(tr("Missing description"), this); | 20 | m_description = new QLabel(tr("Missing description"), this); |
21 | QWhatsThis::add(m_description, tr("Description of the tab's content")); | ||
20 | descLayout->addWidget(m_description); | 22 | descLayout->addWidget(m_description); |
21 | descLayout->setStretchFactor(m_description, 5); | 23 | descLayout->setStretchFactor(m_description, 5); |
22 | QPushButton *close = new QPushButton(this); | 24 | QPushButton *close = new QPushButton(this); |
25 | QWhatsThis::add(close, tr("Close this tab")); | ||
23 | close->setPixmap(Resource::loadPixmap("close")); | 26 | close->setPixmap(Resource::loadPixmap("close")); |
24 | connect(close, SIGNAL(clicked()), this, SLOT(remove())); | 27 | connect(close, SIGNAL(clicked()), this, SLOT(remove())); |
25 | descLayout->addWidget(close); | 28 | descLayout->addWidget(close); |
26 | descLayout->setStretchFactor(m_description, 1); | 29 | descLayout->setStretchFactor(m_description, 1); |
27 | } | 30 | } |
28 | 31 | ||
29 | 32 | ||
30 | void IRCTab::setID(int id) { | 33 | void IRCTab::setID(int id) { |
31 | m_id = id; | 34 | m_id = id; |
32 | } | 35 | } |
33 | 36 | ||
34 | int IRCTab::id() { | 37 | int IRCTab::id() { |
35 | return m_id; | 38 | return m_id; |
36 | } | 39 | } |
diff --git a/noncore/net/opieirc/opie-irc.control b/noncore/net/opieirc/opie-irc.control index aada957..0bcdecd 100644 --- a/noncore/net/opieirc/opie-irc.control +++ b/noncore/net/opieirc/opie-irc.control | |||
@@ -1,8 +1,8 @@ | |||
1 | Files: bin/opieirc pics/opieirc apps/Applications/opieirc.desktop | 1 | Files: bin/opieirc pics/opieirc apps/Applications/opieirc.desktop help/en/html/opieirc.html help/en/html/opieirc |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: Communications | 3 | Section: Communications |
4 | Maintainer: Wenzel Jakob <root@wazlaf.de> | 4 | Maintainer: Wenzel Jakob <root@wazlaf.de> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: $QPE_VERSION-$SUB_VERSION | 6 | Version: $QPE_VERSION-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION) |
8 | Description: The Opie IRC client lets you chat on your favorite IRC server using your handheld computer | 8 | Description: The Opie IRC client lets you chat on your favorite IRC server using your handheld computer |