MAK RTIspy API Documentation for HLA 1.3
consoleWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2008 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: consoleWidget.h,v $ $Revision: 1.21 $ $State: Exp $
7 *******************************************************************************/
8 #ifndef consoleWidget_H_
9 #define consoleWidget_H_
10 
13 
14 #include <vlutil/vlPrint.h>
15 #include <qwidget.h>
16 #include <list>
17 #include "rtiMsConfig.h"
18 #include "widgetDialog.h"
19 
20 class QToolBar;
21 class QComboBox;
22 class QGridLayout;
23 class QFrame;
24 class QTextDocument;
25 class QLineEdit;
26 class QPushButton;
27 class QSpacerItem;
28 class QShortcut;
29 #if QT_VERSION >= 0x040400
30 class QPlainTextEdit;
31 #else
32 class QTextEdit;
33 #endif
34 
37 {
38  Q_OBJECT
39 
40 public:
41 
43  DtConsoleWidget( QWidget* parent = 0, Qt::WindowFlags f = 0 );
44 
46  virtual ~DtConsoleWidget();
47 
50  virtual void writeText( const QString& st, QColor color = Qt::black );
51 
53  virtual void clear();
54 
56  virtual void setNotifyLevel( MAKRti::DtNotifyLevelType notifyLevel );
57 
60  virtual void setMaximumLines( int max );
61 
64  virtual void setDocument( QTextDocument* document );
65 
67 
68  virtual void showToolBar( bool showBar = true );
69  virtual void showClearButton( bool showButton = true );
70  virtual void showSaveButton( bool showButton = true );
71  virtual void showPauseResumeButton( bool showButton = true );
72  virtual void showNotifyLevelBox( bool showBox = true );
74 
76  virtual void removeNotifyComboBox();
77 
78 public slots:
79 
82  virtual void processNotifyComboxBoxUpdate( int level );
83 
85  virtual void processSave();
86 
88  virtual void processPause();
89 
91  virtual void processResume();
92 
94  virtual void processSearch();
95 
97  virtual void focusSearchEdit();
98 
99 signals:
100 
104  void notifyLevelUpdated( MAKRti::DtNotifyLevelType notifyLevel );
105 
106 protected:
107 
109  {
110  QString text;
111  QColor color;
112  };
113  typedef std::list< DtTextAndColor > DtTextAndColorList;
114 
117  virtual void saveToFile();
118 
120  QToolBar* myToolBar;
121 
123  QAction* myClearAction;
124 
126  QAction* mySaveAction;
127 
130  QAction* myPauseAction;
131 
133  QAction* myResumeAction;
134 
136  QComboBox* myNotifyComboBox;
137 
139 #if QT_VERSION >= 0x040400
140  QPlainTextEdit* myTextEdit;
141 #else
142  QTextEdit* myTextEdit;
143 #endif
144 
146  QFrame* myFrame;
147 
149  QGridLayout* myLayout;
150 
152  QGridLayout* myFrameLayout;
153 
155  QString mySavedFile;
156 
158  QLineEdit* mySearchEdit;
159 
161  QPushButton* mySearchPushButton;
162 
164  QSpacerItem* mySpacer;
165 
167  QShortcut* mySearchShortcut;
168 
171 
175 };
176 
179 {
180 
181 public:
182 
184  DtConsoleDialog( DtConsoleWidget* console = 0, QWidget* parent = 0, Qt::WindowFlags f = 0 ) :
185  DtWidgetDialog( 0, parent, f ) { setWidget( console? console : new DtConsoleWidget( this ) ); }
186 
188  virtual ~DtConsoleDialog(){}
189 
191  DtConsoleWidget* widget()
192  { return dynamic_cast<DtConsoleWidget*>(myWidget); }
193 };
194 
195 #endif

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)