MAK RTIspy API Documentation for HLA 1516
consoleWidget.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2008 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: consoleWidget.h,v $ $Revision: 1.21 $ $State: Exp $
00007 *******************************************************************************/
00008 #ifndef consoleWidget_H_
00009 #define consoleWidget_H_
00010 
00013 
00014 #include <vlutil/vlPrint.h>
00015 #include <qwidget.h>
00016 #include <list>
00017 #include "rtiMsConfig.h"
00018 #include "widgetDialog.h"
00019 
00020 class QToolBar;
00021 class QComboBox;
00022 class QGridLayout;
00023 class QFrame;
00024 class QTextDocument;
00025 class QLineEdit;
00026 class QPushButton;
00027 class QSpacerItem;
00028 class QShortcut;
00029 #if QT_VERSION >= 0x040400
00030 class QPlainTextEdit;
00031 #else
00032 class QTextEdit;
00033 #endif
00034 
00036 class DT_DLL_ASSISTANTAPP DtConsoleWidget : public QWidget
00037 {
00038    Q_OBJECT
00039 
00040 public:
00041 
00043    DtConsoleWidget( QWidget* parent = 0, Qt::WindowFlags f = 0 );
00044 
00046    virtual ~DtConsoleWidget();
00047 
00050    virtual void writeText( const QString& st, QColor color = Qt::black );
00051 
00053    virtual void clear();
00054 
00056    virtual void setNotifyLevel( MAKRti::DtNotifyLevelType notifyLevel );
00057 
00060    virtual void setMaximumLines( int max );
00061 
00064    virtual void setDocument( QTextDocument* document );
00065 
00067 
00068    virtual void showToolBar( bool showBar = true );
00069    virtual void showClearButton( bool showButton = true );
00070    virtual void showSaveButton( bool showButton = true );
00071    virtual void showPauseResumeButton( bool showButton = true );
00072    virtual void showNotifyLevelBox( bool showBox = true );
00074 
00076    virtual void removeNotifyComboBox();
00077 
00078 public slots:
00079 
00082    virtual void processNotifyComboxBoxUpdate( int level );
00083 
00085    virtual void processSave();
00086 
00088    virtual void processPause();
00089 
00091    virtual void processResume();
00092 
00094    virtual void processSearch();
00095 
00097    virtual void focusSearchEdit();
00098 
00099 signals:
00100 
00104    void notifyLevelUpdated( MAKRti::DtNotifyLevelType notifyLevel );
00105 
00106 protected:
00107 
00108    struct DtTextAndColor
00109    {
00110       QString text;
00111       QColor color;
00112    };
00113    typedef std::list< DtTextAndColor > DtTextAndColorList;
00114 
00117    virtual void saveToFile();
00118 
00120    QToolBar* myToolBar;
00121 
00123    QAction* myClearAction;
00124 
00126    QAction* mySaveAction;
00127 
00130    QAction* myPauseAction;
00131 
00133    QAction* myResumeAction;
00134 
00136    QComboBox* myNotifyComboBox;
00137 
00139 #if QT_VERSION >= 0x040400
00140    QPlainTextEdit* myTextEdit;
00141 #else
00142    QTextEdit* myTextEdit;
00143 #endif
00144 
00146    QFrame* myFrame;
00147 
00149    QGridLayout* myLayout;
00150 
00152    QGridLayout* myFrameLayout;
00153 
00155    QString mySavedFile;
00156 
00158    QLineEdit* mySearchEdit;
00159 
00161    QPushButton* mySearchPushButton;
00162 
00164    QSpacerItem* mySpacer;
00165 
00167    QShortcut* mySearchShortcut;
00168 
00170    bool myIsPaused;
00171 
00174    DtTextAndColorList myPauseText;
00175 };
00176 
00178 class DT_DLL_ASSISTANTAPP DtConsoleDialog : public DtWidgetDialog
00179 {
00180 
00181 public:
00182 
00184    DtConsoleDialog( DtConsoleWidget* console = 0, QWidget* parent = 0, Qt::WindowFlags f = 0 ) :
00185       DtWidgetDialog( 0, parent, f ) { setWidget( console? console : new DtConsoleWidget( this ) ); }
00186 
00188    virtual ~DtConsoleDialog(){}
00189 
00191    DtConsoleWidget* widget() 
00192       { return dynamic_cast<DtConsoleWidget*>(myWidget); }
00193 };
00194 
00195 #endif

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)