author | wazlaf <wazlaf> | 2002-09-23 22:12:39 (UTC) |
---|---|---|
committer | wazlaf <wazlaf> | 2002-09-23 22:12:39 (UTC) |
commit | 074769a4adb816153e47d63087e9e326bd3a04bf (patch) (unidiff) | |
tree | cc69651d9e9e5901696a55d9523e343125780705 /noncore/net/opieirc/ircservertab.cpp | |
parent | e0b04701b3c9182ba22f56e329f98c57af4e1fe2 (diff) | |
download | opie-074769a4adb816153e47d63087e9e326bd3a04bf.zip opie-074769a4adb816153e47d63087e9e326bd3a04bf.tar.gz opie-074769a4adb816153e47d63087e9e326bd3a04bf.tar.bz2 |
configuration dialog + color configurability throughout the program + popup menu on the channel person list
Diffstat (limited to 'noncore/net/opieirc/ircservertab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircservertab.cpp | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp index 8b8771f..4be60ef 100644 --- a/noncore/net/opieirc/ircservertab.cpp +++ b/noncore/net/opieirc/ircservertab.cpp | |||
@@ -1,2 +1,2 @@ | |||
1 | #include <stdio.h> | 1 | #include <qpe/config.h> |
2 | #include <qtextstream.h> | 2 | #include <qtextstream.h> |
@@ -20,2 +20,3 @@ IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *pa | |||
20 | connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput))); | 20 | connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput))); |
21 | settingsChanged(); | ||
21 | } | 22 | } |
@@ -40,2 +41,6 @@ void IRCServerTab::removeQueryTab(IRCQueryTab *tab) { | |||
40 | 41 | ||
42 | void IRCServerTab::addQueryTab(IRCQueryTab *tab) { | ||
43 | m_queryTabs.append(tab); | ||
44 | } | ||
45 | |||
41 | QString IRCServerTab::title() { | 46 | QString IRCServerTab::title() { |
@@ -52,2 +57,6 @@ IRCServer *IRCServerTab::server() { | |||
52 | 57 | ||
58 | void IRCServerTab::settingsChanged() { | ||
59 | m_textview->setText("<qt bgcolor=\"" + m_backgroundColor + "\"/>"); | ||
60 | } | ||
61 | |||
53 | void IRCServerTab::executeCommand(IRCTab *tab, QString line) { | 62 | void IRCServerTab::executeCommand(IRCTab *tab, QString line) { |
@@ -64,3 +73,3 @@ void IRCServerTab::executeCommand(IRCTab *tab, QString line) { | |||
64 | } else { | 73 | } else { |
65 | tab->appendText("<font color=\"#ff0000\">Unknown channel format!</font><br>"); | 74 | tab->appendText("<font color=\"" + m_errorColor + "\">Unknown channel format!</font><br>"); |
66 | } | 75 | } |
@@ -70,9 +79,9 @@ void IRCServerTab::executeCommand(IRCTab *tab, QString line) { | |||
70 | if (tab->isA("IRCChannelTab")) { | 79 | if (tab->isA("IRCChannelTab")) { |
71 | tab->appendText("<font color=\"#cc0000\">*" + IRCOutput::toHTML(m_server.nick()) + " " + IRCOutput::toHTML(text) + "</font><br>"); | 80 | tab->appendText("<font color=\"" + m_selfColor + "\">*" + IRCOutput::toHTML(m_server.nick()) + " " + IRCOutput::toHTML(text) + "</font><br>"); |
72 | m_session->sendAction(((IRCChannelTab *)tab)->channel(), text); | 81 | m_session->sendAction(((IRCChannelTab *)tab)->channel(), text); |
73 | } else if (tab->isA("IRCQueryTab")) { | 82 | } else if (tab->isA("IRCQueryTab")) { |
74 | tab->appendText("<font color=\"#cc0000\">*" + IRCOutput::toHTML(m_server.nick()) + " " + IRCOutput::toHTML(text) + "</font><br>"); | 83 | tab->appendText("<font color=\"" + m_selfColor + "\">*" + IRCOutput::toHTML(m_server.nick()) + " " + IRCOutput::toHTML(text) + "</font><br>"); |
75 | m_session->sendAction(((IRCQueryTab *)tab)->person(), text); | 84 | m_session->sendAction(((IRCQueryTab *)tab)->person(), text); |
76 | } else { | 85 | } else { |
77 | tab->appendText("<font color=\"#ff0000\">Invalid tab for this command</font><br>"); | 86 | tab->appendText("<font color=\"" + m_errorColor + "\">Invalid tab for this command</font><br>"); |
78 | } | 87 | } |
@@ -87,3 +96,3 @@ void IRCServerTab::executeCommand(IRCTab *tab, QString line) { | |||
87 | person.setNick(nickname); | 96 | person.setNick(nickname); |
88 | tab->appendText("><font color=\"#0000dd\">"+IRCOutput::toHTML(nickname)+"</font>< "+IRCOutput::toHTML(text)+"<br>"); | 97 | tab->appendText("<font color=\"" + m_textColor + "\">></font><font color=\"" + m_otherColor + "\">"+IRCOutput::toHTML(nickname)+"</font><font color=\"" + m_textColor + "\">< "+IRCOutput::toHTML(text)+"</font><br>"); |
89 | m_session->sendMessage(&person, text); | 98 | m_session->sendMessage(&person, text); |
@@ -92,3 +101,3 @@ void IRCServerTab::executeCommand(IRCTab *tab, QString line) { | |||
92 | } else { | 101 | } else { |
93 | tab->appendText("<font color=\"#ff0000\">Unknown command</font><br>"); | 102 | tab->appendText("<font color=\"" + m_errorColor + "\">Unknown command</font><br>"); |
94 | } | 103 | } |
@@ -165,6 +174,6 @@ void IRCServerTab::display(IRCOutput output) { | |||
165 | } else { | 174 | } else { |
166 | appendText("<font color=\"#0000dd\">" + output.htmlMessage() +"</font><br>"); | 175 | appendText("<font color=\"" + m_errorColor + "\">" + output.htmlMessage() +"</font><br>"); |
167 | QListIterator<IRCChannelTab> it(m_channelTabs); | 176 | QListIterator<IRCChannelTab> it(m_channelTabs); |
168 | for (; it.current(); ++it) { | 177 | for (; it.current(); ++it) { |
169 | it.current()->appendText("<font color=\"#0000dd\">" + output.htmlMessage() +"</font><br>"); | 178 | it.current()->appendText("<font color=\"" + m_serverColor + "\">" + output.htmlMessage() +"</font><br>"); |
170 | } | 179 | } |
@@ -180,3 +189,3 @@ void IRCServerTab::display(IRCOutput output) { | |||
180 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 189 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
181 | channelTab->appendText("<<font color=\"#0000dd\">"+IRCOutput::toHTML(((IRCChannelPerson *)output.getParam(1))->person->nick())+"</font>> "+output.htmlMessage()+"<br>"); | 190 | channelTab->appendText("<font color=\"" + m_textColor + "\"><</font><font color=\"" + m_otherColor + "\">"+IRCOutput::toHTML(((IRCChannelPerson *)output.getParam(1))->person->nick())+"</font><font color=\"" + m_textColor + "\">> " + output.htmlMessage()+"</font><br>"); |
182 | } | 191 | } |
@@ -201,3 +210,3 @@ void IRCServerTab::display(IRCOutput output) { | |||
201 | case OUTPUT_SELFKICK: { | 210 | case OUTPUT_SELFKICK: { |
202 | appendText("<font color=\"#ff0000\">" + output.htmlMessage() + "</font><br>"); | 211 | appendText("<font color=\"" + m_errorColor + "\">" + output.htmlMessage() + "</font><br>"); |
203 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 212 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
@@ -209,3 +218,3 @@ void IRCServerTab::display(IRCOutput output) { | |||
209 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 218 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
210 | channelTab->appendText("<font color=\"#cc0000\">"+output.htmlMessage()+"</font><br>"); | 219 | channelTab->appendText("<font color=\"" + m_otherColor + "\">"+output.htmlMessage()+"</font><br>"); |
211 | } | 220 | } |
@@ -217,3 +226,3 @@ void IRCServerTab::display(IRCOutput output) { | |||
217 | if (it.current()->list()->hasPerson(nick)) { | 226 | if (it.current()->list()->hasPerson(nick)) { |
218 | it.current()->appendText("<font color=\"#aa3e00\">"+output.htmlMessage()+"</font><br>"); | 227 | it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); |
219 | it.current()->list()->update(); | 228 | it.current()->list()->update(); |
@@ -228,3 +237,3 @@ void IRCServerTab::display(IRCOutput output) { | |||
228 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 237 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
229 | channelTab->appendText("<font color=\"#aa3e00\">"+output.htmlMessage()+"</font><br>"); | 238 | channelTab->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); |
230 | channelTab->list()->update(); | 239 | channelTab->list()->update(); |
@@ -233,9 +242,9 @@ void IRCServerTab::display(IRCOutput output) { | |||
233 | case OUTPUT_CTCP: | 242 | case OUTPUT_CTCP: |
234 | appendText("<font color=\"#00bb00\">" + output.htmlMessage() + "</font><br>"); | 243 | appendText("<font color=\"" + m_notificationColor + "\">" + output.htmlMessage() + "</font><br>"); |
235 | break; | 244 | break; |
236 | case OUTPUT_ERROR: | 245 | case OUTPUT_ERROR: |
237 | appendText("<font color=\"#ff0000\">" + output.htmlMessage() + "</font><br>"); | 246 | appendText("<font color=\"" + m_errorColor + "\">" + output.htmlMessage() + "</font><br>"); |
238 | break; | 247 | break; |
239 | default: | 248 | default: |
240 | appendText("<font color=\"#0000dd\">" + output.htmlMessage() + "</font><br>"); | 249 | appendText("<font color=\"" + m_serverColor + "\">" + output.htmlMessage() + "</font><br>"); |
241 | break; | 250 | break; |