MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
assistantMgr.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2013 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #ifndef assistantMgr_H_
7 #define assistantMgr_H_
8 
11 
12 #include "rtiMsConfig.h"
14 #include "assistantConfigWidget.h"
15 #include "assistantEnums.h"
16 #include <vlutil/vlSmartPointers.h>
17 #include <vlutil/vlPrint.h>
18 #include <vlutil/vlString.h>
19 #include <set>
20 
21 
23 class DtRtiAssistantPeer;
25 class QMainWindow;
26 
32 {
33  Q_OBJECT
34 
35 public:
36 
38  DtAssistantMgr( std::shared_ptr<DtRtiAssistantServer> server,
39  std::shared_ptr<DtRtiAssistantPeer> peer,
40  DtAssistantSignalRouter& signalRouter);
41 
43  virtual ~DtAssistantMgr();
44 
45 private:
46 
49 
51  DtAssistantMgr& operator= (DtAssistantMgr const& );
52 
53 public:
54 
56  virtual void initialize() {};
57 
59  virtual void tick() {};
60 
62  virtual void startShutdown() {};
63 
68  virtual bool dialogsVisible() const;
69 
72  virtual void configWidget( DtAssistantConfigWidget** widget, QIcon& icon,
73  QString& name, DtPreferencesPage& pageId ) {};
74 
76  virtual void updateConfigWidget() {};
77 
79  virtual void processConfigWidgetAccept() {};
80 
81 protected:
82 
88  void startDialog( QDialog* dlg, bool inTaskbar, bool warningDialog );
89 
91  void finishDialog( QDialog* dlg );
92 
95  void showDialog( QDialog* dlg );
96 
101  void startMainWindow( QMainWindow* dlg );
102 
104  void finishMainWindow( QMainWindow* dlg );
105 
108  void showMainWindow( QMainWindow* dlg );
109 
112  void showPopup(const MAKRti::DtString& text, int sourceCompId = -1,
113  const MAKRti::DtString& advancedText = MAKRti::DtString::nullString() );
114 
117  void showPopup(const MAKRti::DtString& text, const MAKRti::DtString& source,
118  const MAKRti::DtString& advancedText = MAKRti::DtString::nullString() );
119 
122  void displayNotification( const MAKRti::DtString& message,
123  MAKRti::DtNotifyLevelType notifyLevel, int sourceCompId = -1 );
124 
126  void displayNotification( const MAKRti::DtString& message,
127  MAKRti::DtNotifyLevelType notifyLevel, const MAKRti::DtString& source );
128 
131  void logNotification( const MAKRti::DtString& message,
132  MAKRti::DtNotifyLevelType notifyLevel, int sourceCompId = -1 );
133 
135  void logNotification( const MAKRti::DtString& message,
136  MAKRti::DtNotifyLevelType notifyLevel, const MAKRti::DtString& source );
137 
138  virtual DtAssistantInfo assistantInfoFromAssistantMsg(const DtAssistantMsg& assistantMsg, DtInetAddrSet* interfaces = 0);
139 
140 signals:
141 
143  void warningDialogDisplayed();
144 
146  void warningDialogDismissed();
147 
149  void popupRequested(const MAKRti::DtString& text, int sourceCompId,
150  const MAKRti::DtString& advancedText);
151 
153  void popupRequested(const MAKRti::DtString& text,
154  const MAKRti::DtString& source, const MAKRti::DtString& advancedText);
155 
157  void notificationRequested(const MAKRti::DtString& message,
158  MAKRti::DtNotifyLevelType notifyLevel, int sourceCompId, bool logOnly);
159 
161  void notificationRequested(const MAKRti::DtString& message,
162  MAKRti::DtNotifyLevelType notifyLevel, const MAKRti::DtString& source,
163  bool logOnly);
164 
165 public slots:
166 
168  void displayWarningDialogs();
169 
170 protected:
171 
174  std::shared_ptr<DtRtiAssistantServer> myServer;
175 
177  std::shared_ptr<DtRtiAssistantPeer> myPeer;
178 
181  std::set<QDialog *> myUnparentedDialogs;
182 
185  std::set<QMainWindow *> myMainWindows;
186 
189  std::set<QDialog*> myWarningDialogs;
190 
191  //@(
193  static QIcon theRtiIcon;
194  static QIcon theSmallRtiIcon;
195  static QIcon theWebIcon;
196  static QIcon theNotifyRtiIcon;
197  static QIcon theWarningRtiIcon;
198  static QIcon thePreferencesIcon;
199  static QIcon theAboutIcon;
200  static QIcon theHelpIcon;
202 
204  static bool theIconsAreLoaded;
205 
206 };
207 
208 #endif
This file contains the declaration of DtAssistantInfo.
DtPreferencesPage
Definition: assistantEnums.h:17
Contains the DtAssistantConfigWidget class declaration.
At startup all of the assistant manager classes will register their signals and slots with the signal...
Definition: assistantSignalRouter.h:29
virtual void processConfigWidgetAccept()
Process the changes that were accepted in the configuration widget.
Definition: assistantMgr.h:79
Stores basic information about a remote assistant.
Definition: assistantInfo.h:96
static QIcon theNotifyRtiIcon
Definition: assistantMgr.h:196
virtual void configWidget(DtAssistantConfigWidget **widget, QIcon &icon, QString &name, DtPreferencesPage &pageId)
Retrieves a widget which will be placed in the configuration dialog for configuring user preferences...
Definition: assistantMgr.h:72
std::set< QDialog * > myWarningDialogs
Set of the popup dialogs, either parented or unparented, which, when active, should cause a warning i...
Definition: assistantMgr.h:189
Base class for assistant Messages.
Definition: assistantMsg.h:153
static QIcon theAboutIcon
Definition: assistantMgr.h:199
virtual void startShutdown()
Performs any necessary processing at the start of shutdown.
Definition: assistantMgr.h:62
static bool theIconsAreLoaded
Whether or not the icons have yet been loaded.
Definition: assistantMgr.h:204
std::shared_ptr< DtRtiAssistantServer > myServer
The Assistant server from which new messages will arrive from local RTI components.
Definition: assistantMgr.h:174
static QIcon theSmallRtiIcon
Definition: assistantMgr.h:194
virtual void initialize()
Initializes this manager just prior to beginning assistant processing.
Definition: assistantMgr.h:56
Base class for all classes which perform management activities for the Assistant. ...
Definition: assistantMgr.h:31
static QIcon theWebIcon
Definition: assistantMgr.h:195
DtRtiAssistantPeer manages the sharing of information between one Assistant to other Assistants using...
Definition: rtiAssistantPeer.h:82
Manages the server connections of the RTI Assistant.
Definition: rtiAssistantServer.h:45
std::set< QDialog * > myUnparentedDialogs
All unparented dialogs that are created by the GUI should be added to this set.
Definition: assistantMgr.h:181
DT_DLL_RTIUTIL typedef std::set< MAKRti::DtInetAddr > DtInetAddrSet
Definition: rtiUtil.h:506
virtual void tick()
Performs tasks that need to be completed periodically.
Definition: assistantMgr.h:59
static QIcon theRtiIcon
The icons used by the RTI Assistant.
Definition: assistantMgr.h:193
virtual void updateConfigWidget()
Forces the configuration widget to be updated.
Definition: assistantMgr.h:76
#define DT_DLL_ASSISTANTAPP
Definition: rtiMsConfig.h:151
static QIcon thePreferencesIcon
Definition: assistantMgr.h:198
static QIcon theWarningRtiIcon
Definition: assistantMgr.h:197
std::shared_ptr< DtRtiAssistantPeer > myPeer
The Assistant peer which communicates with other Assistants.
Definition: assistantMgr.h:177
static QIcon theHelpIcon
Definition: assistantMgr.h:200
std::set< QMainWindow * > myMainWindows
All main windows that are created by the GUI should be added to this set.
Definition: assistantMgr.h:185
Widget which can be added as a configuration page to the DtAssistantConfigDialog. ...
Definition: assistantConfigWidget.h:18

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)