Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ircservertab.h

Go to the documentation of this file.
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 __IRCSERVERTAB_H
00022 #define __IRCSERVERTAB_H
00023 #include <qpe/qpeapplication.h>
00024 #include <qpe/qcopenvelope_qws.h>
00025 #include "irctab.h"
00026 #include "ircsession.h"
00027 #include "mainwindow.h"
00028 #include "ircchanneltab.h"
00029 #include "ircquerytab.h"
00030 #include "ircmisc.h"
00031 
00032 
00033 class IRCServerTab : public IRCTab {
00034     Q_OBJECT
00035 public:
00036     static bool containsPing(const QString& text, IRCServerTab *tab);
00037 
00038     /* IRCTab implementation */
00039     IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent = 0, const char *name = 0, WFlags f = 0);
00040     ~IRCServerTab();
00041     QString title();
00042     IRCSession *session();
00043     IRCServer *server();
00044     MainWindow *mainwindow();
00045 
00046     /* Start the server session */
00047     void doConnect();
00048 //    QString *mynick();
00049     /* Remove tabs from the internal tab lists */
00050     void removeChannelTab(IRCChannelTab *tab);
00051     void removeQueryTab(IRCQueryTab *tab);
00052     /* Return tabs from the internal tab lists */
00053     IRCChannelTab *getTabForChannel(IRCChannel *channel);
00054     IRCQueryTab *getTabForQuery(IRCPerson *person);
00055     /* Add tabs to the internal tab lists */
00056     void addQueryTab(IRCQueryTab *tab);
00057     /* Execute a user command such as /join, /msg etc */
00058     void executeCommand(IRCTab *tab, QString line);
00059 protected:
00060     void appendText(QString text);
00061 public slots:
00062     void scrolling();
00063     void remove();
00064     void processCommand();
00065     void settingsChanged();
00066     void slotUpdateChannels();
00067 protected slots:
00068     void display(IRCOutput output);
00069 protected:
00070     int                   m_lines;
00071     bool                  m_close;
00072     IRCServer             m_server;
00073     IRCSession           *m_session;
00074     MainWindow           *m_mainWindow;
00075     QTextView            *m_textview;
00076     IRCHistoryLineEdit   *m_field;
00077     /* Channel tabs associated with this server tab */
00078     QList<IRCChannelTab>  m_channelTabs;
00079     /* Query tabs associated with this server tab */
00080     QList<IRCQueryTab>    m_queryTabs;
00081 };
00082 
00083 #endif /* __IRCSERVERTAB_H */

Generated on Sat Nov 5 16:17:41 2005 for OPIE by  doxygen 1.4.2