00001 /* 00002 OpieIRC - An embedded IRC client 00003 Copyright (C) 2002 Wenzel Jakob 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 */ 00020 00021 #ifndef __MAINWINDOW_H 00022 #define __MAINWINDOW_H 00023 00024 #include <qmainwindow.h> 00025 #include <qaction.h> 00026 #include <qlist.h> 00027 00028 #include "dcctransfer.h" 00029 #include "ircmisc.h" 00030 #include "irctab.h" 00031 00032 class DCCTransferTab; 00033 00034 class MainWindow : public QMainWindow { 00035 Q_OBJECT 00036 public: 00037 MainWindow(QWidget *parent = 0, const char *name = 0, WFlags f = 0); 00038 // IRCTabWidget getTabWidget(); 00039 void addTab(IRCTab *tab); 00040 void killTab(IRCTab *tab, bool now = false); 00041 static QString appName() { return QString::fromLatin1("opieirc"); } 00042 static QString appCaption(); 00043 void addDCC(DCCTransfer::Type type, Q_UINT32 ip4Addr, Q_UINT16 port, 00044 const QString &filename, const QString &nickname, unsigned int size); 00045 signals: 00046 void updateScroll(); 00047 protected slots: 00048 void newConnection(); 00049 void settings(); 00050 void selected(QWidget *); 00051 void changeEvent(IRCTab *); 00052 00053 void slotNextTab(); 00054 void slotPrevTab(); 00055 void slotPing(const QString&); 00056 void slotKillTabsLater(); 00057 00058 protected: 00059 void loadSettings(); 00060 protected: 00061 IRCTabWidget *m_tabWidget; 00062 QList<IRCTab> m_tabs; 00063 QList<IRCTab> m_toDelete; 00064 DCCTransferTab *m_dccTab; 00065 }; 00066 00067 #endif /* __MAINWINDOW_H */
1.4.2