Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

qnet.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2002 by Yann Hodique                                    *
00003  *   Yann.Hodique@lifl.fr                                                  *
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 
00011 #ifndef _QMTP_H_
00012 #define _QMTP_H_
00013 
00014 #include <qwidget.h>
00015 #include "qnet_base.h"
00016 #include <qdom.h>
00017 #include <qmap.h>
00018 #include <qprocess.h>
00019 
00020 class ChatSession;
00021 class MtpSettings;
00022 class MtpFiltersSettings;
00023 class UrlSettings;
00024 class Page;
00025 class RemoteControlServerInfo;
00026 
00031 class QMtp : public QMtp_base {
00032     Q_OBJECT
00033 
00034     friend class RemoteControlServerInfo;
00035     
00036 public:
00037 /*
00038     typedef enum {
00039         TELL,
00040         BROWSER,
00041   DRAWING,
00042   SPLASH
00043     } PageType;
00044 */
00045     QMtp(QWidget *parent = 0, const char *name = 0);
00046     ~QMtp();
00047 
00048     bool loadConfigFile();
00049     bool saveConfigFile();
00050     Page * getNewPage(const QString&, const QString&, ChatSession *);
00051 
00052 public slots:
00053     void slotConfigure();
00054     void fileNew();
00055     void fileSessions();
00056     void fileExit();
00057     void closeCurrentTab();
00058     void closeTab(QWidget *);
00059     void gotoPreviousTab();
00060     void gotoNextTab();
00061     void helpAbout();
00062     void slotTextDisplayed(QWidget* w);
00063     void slotCurrentPageChanged(QWidget* w);
00064     void slotDisplayFortune();
00065     void readFortune();
00066     void endFortune();
00067     
00068     void loadPlugin(const QString&);
00069 
00070 private:
00071     QDomDocument m_document;
00072     QMap<QWidget*,ChatSession*> tab_map;
00073     QMap<QString,void*> plugins_map;
00074     QValueList<ChatSession*> sessions;
00075     QTextBrowser *fortune_page;
00076     QProcess *fproc;
00077     
00078     RemoteControlServerInfo *rctl;
00079     
00080 private:
00081     void launchSession(const QString& name);
00082 };
00083 
00084 #endif

Generated on Sat May 10 15:09:27 2003 for qnet by doxygen1.3