Diffstat (limited to 'noncore/net/opieirc/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/mainwindow.cpp | 20 |
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 | |||
@@ -8,7 +8,11 @@ | |||
8 | #include "mainwindow.h" | 8 | #include "mainwindow.h" |
9 | #include "ircservertab.h" | 9 | #include "ircservertab.h" |
10 | #include "dcctransfertab.h" | ||
10 | #include "ircserverlist.h" | 11 | #include "ircserverlist.h" |
11 | #include "ircsettings.h" | 12 | #include "ircsettings.h" |
12 | 13 | ||
14 | #include <stdio.h> | ||
15 | |||
16 | |||
13 | QString MainWindow::appCaption() { | 17 | QString MainWindow::appCaption() { |
14 | return QObject::tr("Opie IRC"); | 18 | return QObject::tr("Opie IRC"); |
@@ -34,4 +38,5 @@ MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow( | |||
34 | connect(a, SIGNAL(activated()), this, SLOT(settings())); | 38 | connect(a, SIGNAL(activated()), this, SLOT(settings())); |
35 | a->addTo(irc); | 39 | a->addTo(irc); |
40 | m_dccTab = 0; | ||
36 | loadSettings(); | 41 | loadSettings(); |
37 | } | 42 | } |
@@ -78,4 +83,7 @@ void MainWindow::changeEvent(IRCTab *tab) { | |||
78 | 83 | ||
79 | void MainWindow::killTab(IRCTab *tab, bool imediate) { | 84 | void MainWindow::killTab(IRCTab *tab, bool imediate) { |
85 | if (tab == m_dccTab) | ||
86 | m_dccTab = 0; | ||
87 | |||
80 | m_toDelete.append( tab ); | 88 | m_toDelete.append( tab ); |
81 | 89 | ||
@@ -138,2 +146,14 @@ void MainWindow::slotPing( const QString& /*channel*/ ) { | |||
138 | } | 146 | } |
139 | 147 | ||
148 | void MainWindow::addDCC(DCCTransfer::Type type, Q_UINT32 ip4Addr, Q_UINT16 port, | ||
149 | const QString &filename, const QString &nickname, unsigned int size) { | ||
150 | |||
151 | if (!m_dccTab) { | ||
152 | m_dccTab = new DCCTransferTab(this); | ||
153 | addTab(m_dccTab); | ||
154 | m_dccTab->show(); | ||
155 | } | ||
156 | |||
157 | m_dccTab->addTransfer(type, ip4Addr, port, filename, nickname, size); | ||
158 | } | ||
159 | |||