VR-Exchange 2.6 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
portalAppGui.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2015 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
16 #include <portalApp/ui_portalAppGui.h>
17 #include <portalApp/aboutBox.h>
18 
19 #include <portal/pControlMessage.h>
20 
21 #include <QDialogButtonBox>
22 #include <QMainWindow>
23 
24 #include <vlutil/vlTime.h>
25 
26 #include <map>
27 
28 class QTimer;
29 class QLabel;
30 class QHeader;
31 class QProcess;
32 class DtPrinter;
33 class QTreeWidgetItem;
34 class QAssistantClient;
35 
36 namespace MAKVrExchange
37 {
38 
39  class DtQueueManager;
40  class DtQueueInfoDlg;
41  class DtMarkingSymbols;
42  class DtPortalConnection;
43  class DtStatisticsViewComponent;
44  class DtBrokerErrorMessage;
45  class DtPortalAppInitializer;
46 
51  { Q_OBJECT;
52  public:
53 
54  typedef DtObjectViewComponent* (*DtObjectViewComponentCreator)
55  ( DtPortalConnection* pconn, QWidget* parent );
56 
57  typedef DtInteractionViewComponent* (*DtInteractionViewComponentCreator)
58  ( DtPortalConnection* pconn, QWidget* parent );
59 
60  protected:
61 
62  typedef enum
63  {
64  checkForUpdates = 0
65  } WebSiteId;
66 
67  public:
68 
71  DtQueueManager* qManager, QWidget* parent = 0 );
72 
74  virtual ~DtPortalAppGui();
75 
77  virtual DtQueueManager* queueManager() const;
78 
80  virtual const DtAppBrokerManager* brokerManager() const;
81 
83  virtual DtPortalConnection* portalConnection() const;
84 
86  virtual void loadGuiConfiguration();
87 
89  virtual void saveGuiConfiguration();
90 
91  public slots:
92 
93  virtual void show();
94  virtual void toggleShowObjects( bool state );
95  virtual void toggleShowInteractions( bool state );
96  virtual void toggleShowUpdates( bool state );
97  virtual void onFindObjectsAction();
98  virtual void toggleShowBrokers( bool state );
99  virtual void toggleShowStatisticsView( bool state );
100  virtual void onLegendVisibilityChanged( bool state );
101  virtual void toggleShowStatisticsViewLegend( bool state );
102  virtual void showQueueInfoDlg();
103  virtual void tick();
104  virtual void editConfiguration();
105 
106  public:
107 
109  static void setObjectViewComponentCreator(
110  DtObjectViewComponentCreator func );
111 
113  static void setInteractionViewComponentCreator(
114  DtInteractionViewComponentCreator func );
115 
116  protected:
117 
119  void initTimers();
120 
122  void initMenu();
123 
125  void initStatusBar();
126 
127  virtual QDockWidget* createDockWidget( QString name );
128 
129  virtual void closeEvent( QCloseEvent* e );
130 
131  protected:
132 
134  static void brokerErrorMessageCb( const DtBrokerErrorMessage& msg, void* usrData );
135 
137  static void brokerConnectedMessageCb( const DtBrokerStartedMessage& msg, void* usrData );
138  virtual void processBrokerConnect(const DtBrokerStartedMessage& msg);
139 
141  static void brokerConnectedReponseCb( const DtBrokerConnectingMessage& msg, void* usrData );
142  virtual void processBrokerConnectReponse(const DtBrokerConnectingMessage& msg);
143 
145  static void brokerShutdownCb( const DtBrokerExitingMessage& msg, void* usr );
146  virtual void brokerShutdownCb( DtU32 brokerId );
147 
148  protected slots:
149 
150  virtual void quitMe();
151  virtual void showAboutDialog();
152 
154  virtual void showHelp();
155  virtual void processHelpDialogClose();
156 
157  virtual void dockVisibilityChanged( bool state );
158  virtual void updateTimeLabel();
159  virtual void clearInteractions();
160  virtual void resetInteractionStatistics();
161 
162  virtual void launchCheckForUpdatesWebSite();
163  virtual const DtString& webSite( WebSiteId webSite ) const;
164 
165  virtual void brokerSelectedRunning( bool );
166 
167  virtual void updateBrokerTranslationSettings();
168 
169  private:
170 
172  DtPortalAppGui( const DtPortalAppGui& orig );
173 
175  DtPortalAppGui& operator = ( const DtPortalAppGui& orig );
176 
177  protected:
178 
179  static DtObjectViewComponentCreator theObjectViewComponentCreator;
180  static DtInteractionViewComponentCreator theInteractionViewComponentCreator;
181 
182  Ui::DtPortalAppGui myUi;
183 
191  QTimer* myDrainTimer;
195  QLabel* myTimeLabel;
199 
201  QProcess* myHelpAssistant;
202 
204 
207  QDialogButtonBox* myButtonBox;
208 
209  QDockWidget* myObjectDockWidget;
212  QDockWidget* myBrokerDockWidget;
213 
214  typedef std::map<WebSiteId,DtString> WebSites;
216 
217  };
218 
219 
221  {
222  return myQueueManager;
223  }
224 
225 } //end namespace MAKVrExchange

Document ID: Generated on Wed Jan 30 18:15:18 EST 2019 from SVN revision 195534
Copyright © 2005-2019 VT MÄK. All Rights Reserved (www.mak.com)