summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/mainwindow.cpp
authorskyhusker <skyhusker>2005-02-03 21:47:50 (UTC)
committer skyhusker <skyhusker>2005-02-03 21:47:50 (UTC)
commit8aaae9e3eca7853e9c693d2401f721d75209acf7 (patch) (side-by-side diff)
tree6f700d154fac8510b322242496604d0ad7589377 /noncore/net/opieirc/mainwindow.cpp
parent875b3b63624308f4e50f82e17db27edeb9609d6c (diff)
downloadopie-8aaae9e3eca7853e9c693d2401f721d75209acf7.zip
opie-8aaae9e3eca7853e9c693d2401f721d75209acf7.tar.gz
opie-8aaae9e3eca7853e9c693d2401f721d75209acf7.tar.bz2
Added DCC receive support
Diffstat (limited to 'noncore/net/opieirc/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/mainwindow.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp
index 1811a0c..3d60107 100644
--- a/noncore/net/opieirc/mainwindow.cpp
+++ b/noncore/net/opieirc/mainwindow.cpp
@@ -7,9 +7,13 @@
#include "mainwindow.h"
#include "ircservertab.h"
+#include "dcctransfertab.h"
#include "ircserverlist.h"
#include "ircsettings.h"
+#include <stdio.h>
+
+
QString MainWindow::appCaption() {
return QObject::tr("Opie IRC");
}
@@ -33,6 +37,7 @@ MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(
a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance"));
connect(a, SIGNAL(activated()), this, SLOT(settings()));
a->addTo(irc);
+ m_dccTab = 0;
loadSettings();
}
@@ -77,6 +82,9 @@ void MainWindow::changeEvent(IRCTab *tab) {
}
void MainWindow::killTab(IRCTab *tab, bool imediate) {
+ if (tab == m_dccTab)
+ m_dccTab = 0;
+
m_toDelete.append( tab );
if ( imediate )
@@ -137,3 +145,15 @@ void MainWindow::slotPing( const QString& /*channel*/ ) {
raise();
}
+void MainWindow::addDCC(DCCTransfer::Type type, Q_UINT32 ip4Addr, Q_UINT16 port,
+ const QString &filename, const QString &nickname, unsigned int size) {
+
+ if (!m_dccTab) {
+ m_dccTab = new DCCTransferTab(this);
+ addTab(m_dccTab);
+ m_dccTab->show();
+ }
+
+ m_dccTab->addTransfer(type, ip4Addr, port, filename, nickname, size);
+}
+