summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircchanneltab.cpp
Unidiff
Diffstat (limited to 'noncore/net/opieirc/ircchanneltab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircchanneltab.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp
index 581f9a5..4a35929 100644
--- a/noncore/net/opieirc/ircchanneltab.cpp
+++ b/noncore/net/opieirc/ircchanneltab.cpp
@@ -1,11 +1,14 @@
1#include <qpe/resource.h> 1#include <qpe/resource.h>
2#include <qwhatsthis.h> 2#include <qwhatsthis.h>
3#include <qhbox.h> 3#include <qhbox.h>
4#include <qdict.h>
4 5
5#include "ircchanneltab.h" 6#include "ircchanneltab.h"
6#include "ircservertab.h" 7#include "ircservertab.h"
7#include "ircmessageparser.h" 8#include "ircmessageparser.h"
8 9
10QDict<QString> IRCChannelTab::m_queuedMessages (17);
11
9IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { 12IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) {
10 m_mainWindow = mainWindow; 13 m_mainWindow = mainWindow;
11 m_parentTab = parentTab; 14 m_parentTab = parentTab;
@@ -53,6 +56,12 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW
53 connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); 56 connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand()));
54 connect(m_list, SIGNAL(doubleClicked ( QListBoxItem * ) ), this, SLOT(popupQuery( QListBoxItem * ) )); 57 connect(m_list, SIGNAL(doubleClicked ( QListBoxItem * ) ), this, SLOT(popupQuery( QListBoxItem * ) ));
55 settingsChanged(); 58 settingsChanged();
59
60 if(m_queuedMessages[m_channel->channelname()]) {
61 appendText(*m_queuedMessages[m_channel->channelname()]);
62 delete m_queuedMessages[m_channel->channelname()];
63 m_queuedMessages.remove(m_channel->channelname());
64 }
56} 65}
57 66
58void IRCChannelTab::scrolling(){ 67void IRCChannelTab::scrolling(){
@@ -182,6 +191,13 @@ void IRCChannelTab::remove() {
182 } 191 }
183} 192}
184 193
194void IRCChannelTab::enqueue(const QString &channel, const QString &message) {
195 if (m_queuedMessages.count() == (m_queuedMessages.size() - 1) )
196 /* 17 messages max */
197 return;
198 m_queuedMessages.insert(channel, new QString(message));
199}
200
185IRCChannel *IRCChannelTab::channel() { 201IRCChannel *IRCChannelTab::channel() {
186 return m_channel; 202 return m_channel;
187} 203}
@@ -189,3 +205,4 @@ IRCChannel *IRCChannelTab::channel() {
189IRCChannelList *IRCChannelTab::list() { 205IRCChannelList *IRCChannelTab::list() {
190 return m_list; 206 return m_list;
191} 207}
208