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

TxqMasterIoFrame.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------
00002 //
00003 // File:    TxqMasterIoFrame.h
00004 //
00005 // Purpose: Implementation of a frame to be used for scientific modeling.
00006 //
00007 // Version: $Id: TxqMasterIoFrame.h,v 1.9 2002/02/08 23:28:26 kgl Exp $
00008 //
00009 // Copyright (c) 2000 by Tech-X Corporation.  All rights reserved.
00010 //
00011 // Author:  Kelly G. Luetkemeyer
00012 //
00013 //--------------------------------------------------------------------
00014 
00015 #ifndef TXQ_MASTER_IO_FRAME_H
00016 #define TXQ_MASTER_IO_FRAME_H 
00017 
00018 
00019 // txqbase includes
00020 #include "TxqLog.h"
00021 #include "TxqFrame.h"
00022 #include "TxqHelpWindow.h"
00023 #include "TxqTextView.h"
00024 #include <TxqProgressDialog.h>
00025 #include "TxqStringEvent.h"
00026 
00027 #if defined(QT_THREAD_SUPPORT)
00028 #include <qthread.h>
00029 #endif
00030 
00042 class TxqMasterIoFrame : public TxqFrame
00043 {
00044   Q_OBJECT
00045 
00046 public:
00047 
00057   TxqMasterIoFrame(QWidget* parent=0, const char *nm=0, WFlags f = WType_TopLevel);
00058 
00062   virtual ~TxqMasterIoFrame();
00063 
00068   void outlog(const QString &line);
00069 
00074   void errlog(const QString &line);
00075 
00080   virtual void setOutThroughStream(TxqLog& t); 
00081 
00086   TxqLog* getOutThroughStream() {return txcout;}
00087 
00092   virtual void setErrThroughStream(TxqLog& t); 
00093 
00098   TxqLog* getErrThroughStream() {return txcerr;}
00099 
00105   virtual void startBrowser(const QString &home, const QString &title);
00106 
00111   virtual void setAboutTitle(const QString &title);
00112 
00117   void setAboutText(const QString &text);
00118 
00123   QPopupMenu* getViewMenu() {return view;}
00124 
00129   QPopupMenu* getEditMenu() {return edit;}
00130 
00135   void createProgressDialog();
00136 
00140   TxqProgressDialog *getProgressDialog();
00141 
00146   bool hasThreadSupport();
00147 
00152   virtual void customEvent( QCustomEvent *e );
00153 
00157 #if defined(QT_THREAD_SUPPORT)
00158   void setThread(QThread *t);
00159 #endif
00160 
00165   void postOutlog(const QString s);
00166 
00171   void postErrlog(const QString s);
00172 
00178   void postProgress(const int index, const QString s);
00179 
00180 public slots:
00181 
00185   virtual void startHtmlBrowser();
00186 
00190   virtual void startTxtBrowser();
00191 
00195   void about();
00196 
00200   virtual void setNoLogMenu();
00201 
00205   virtual void setErrLogMenu();
00206 
00210   virtual void setOutLogMenu();
00211 
00212 protected:
00213 
00217   virtual void createWidgets();
00218 
00222   void createParamsMenu();
00223 
00227   void createLogMenu();
00228 
00232   virtual void addMenuBarItems();
00233 
00239   virtual void addSubMenuBarItems();
00240 
00246   virtual void addWidgets();
00247 
00251   virtual void addLogMenuItems();
00252 
00256   virtual void addViewMenuItems();
00257 
00261   virtual void addParamsMenuItems();
00262 
00266   virtual void createHelpMenu();
00267 
00271   virtual void addHelpMenuItems();
00272 
00276   bool checkThread();
00277 
00281   QPopupMenu *params;
00282 
00286   QPopupMenu *logging;
00287 
00305   TxqLog *txcout;
00306 
00324   TxqLog *txcerr;
00325 
00329  TxqTextView *out;
00330 
00334  TxqTextView *err;
00335 
00339  int oline;
00340 
00344  int eline;
00345 
00349   QPopupMenu *help;
00350 
00354   QString home;
00355 
00359   TxqHelpWindow *hw;
00360 
00364   QString aboutText;
00365 
00369   QString aboutTitle;
00370 
00374   int noLogId;
00375 
00379   int outLogId;
00383   int errLogId;
00384 
00389   bool errThruStrmOwner;
00390 
00395    bool outThruStrmOwner;
00396 
00400   TxqProgressDialog *progress;
00401 
00405 #if defined(QT_THREAD_SUPPORT)
00406   QThread *thread;
00407 #endif
00408 
00412   bool haveThread;
00413 
00414 };
00415 
00416 #endif
Copyright Tech-X Corporation, all rights reserved.