MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
consoleWidget.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2017 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vlutil/vlPrint.h>
13 #include <QWidget>
14 #include <list>
15 #include "rtiMsConfig.h"
16 #include "widgetDialog.h"
17 
18 class QToolBar;
19 class QComboBox;
20 class QGridLayout;
21 class QFrame;
22 class QTextDocument;
23 class QLineEdit;
24 class QPushButton;
25 class QSpacerItem;
26 class QShortcut;
27 #if QT_VERSION >= 0x040400
28 class QPlainTextEdit;
29 #else
30 class QTextEdit;
31 #endif
32 
35 {
36  Q_OBJECT
37 
38 public:
39 
41  DtConsoleWidget( QWidget* parent = 0, Qt::WindowFlags f = 0 );
42 
44  virtual ~DtConsoleWidget();
45 
48  virtual void writeText( const QString& st, QColor color = Qt::black );
49 
51  virtual void clear();
52 
54  virtual void setNotifyLevel( MAKRti::DtNotifyLevelType notifyLevel );
55 
58  virtual void setMaximumLines( int max );
59 
62  virtual void setDocument( QTextDocument* document );
63 
65 
66  virtual void showToolBar( bool showBar = true );
67  virtual void showClearButton( bool showButton = true );
68  virtual void showSaveButton( bool showButton = true );
69  virtual void showPauseResumeButton( bool showButton = true );
70  virtual void showNotifyLevelBox( bool showBox = true );
72 
74  virtual void removeNotifyComboBox();
75 
76 public slots:
77 
80  virtual void processNotifyComboxBoxUpdate( int level );
81 
83  virtual void processSave();
84 
86  virtual void processPause();
87 
89  virtual void processResume();
90 
92  virtual void processSearch();
93 
95  virtual void focusSearchEdit();
96 
97 signals:
98 
102  void notifyLevelUpdated( MAKRti::DtNotifyLevelType notifyLevel );
103 
104 protected:
105 
107  {
108  QString text;
109  QColor color;
110  };
111  typedef std::list< DtTextAndColor > DtTextAndColorList;
112 
115  virtual void saveToFile();
116 
118  QToolBar* myToolBar;
119 
121  QAction* myClearAction;
122 
124  QAction* mySaveAction;
125 
128  QAction* myPauseAction;
129 
131  QAction* myResumeAction;
132 
134  QComboBox* myNotifyComboBox;
135 
137 #if QT_VERSION >= 0x040400
138  QPlainTextEdit* myTextEdit;
139 #else
140  QTextEdit* myTextEdit;
141 #endif
142 
144  QFrame* myFrame;
145 
147  QGridLayout* myLayout;
148 
150  QGridLayout* myFrameLayout;
151 
153  QString mySavedFile;
154 
156  QLineEdit* mySearchEdit;
157 
159  QPushButton* mySearchPushButton;
160 
162  QSpacerItem* mySpacer;
163 
165  QShortcut* mySearchShortcut;
166 
169 
173 };
174 
177 {
178 
179 public:
180 
182  DtConsoleDialog( DtConsoleWidget* console = 0, QWidget* parent = 0, Qt::WindowFlags f = 0 ) :
183  DtWidgetDialog( 0, parent, f ) { setWidget( console? console : new DtConsoleWidget( this ) ); }
184 
186  virtual ~DtConsoleDialog(){}
187 
189  DtConsoleWidget* widget()
190  { return dynamic_cast<DtConsoleWidget*>(myWidget); }
191 };

Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)