VR-Exchange 2.5 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 <QtGui/QDialogButtonBox>
22 #include <QtGui/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 brokerShutdownCb( const DtBrokerExitingMessage& msg, void* usr );
138  virtual void brokerShutdownCb( DtU32 brokerId );
139 
140  protected slots:
141 
142  virtual void quitMe();
143  virtual void showAboutDialog();
144 
146  virtual void showHelp();
147  virtual void processHelpDialogClose();
148 
149  virtual void dockVisibilityChanged( bool state );
150  virtual void updateTimeLabel();
151  virtual void clearInteractions();
152  virtual void resetInteractionStatistics();
153 
154  virtual void launchCheckForUpdatesWebSite();
155  virtual const DtString& webSite( WebSiteId webSite ) const;
156 
157  virtual void brokerSelectedRunning( bool );
158 
159  virtual void updateBrokerTranslationSettings();
160 
161  private:
162 
164  DtPortalAppGui( const DtPortalAppGui& orig );
165 
167  DtPortalAppGui& operator = ( const DtPortalAppGui& orig );
168 
169  protected:
170 
171  static DtObjectViewComponentCreator theObjectViewComponentCreator;
172  static DtInteractionViewComponentCreator theInteractionViewComponentCreator;
173 
174  Ui::DtPortalAppGui myUi;
175 
183  QTimer* myDrainTimer;
187  QLabel* myTimeLabel;
191 
193  QProcess* myHelpAssistant;
194 
196 
199  QDialogButtonBox* myButtonBox;
200 
201  QDockWidget* myObjectDockWidget;
204  QDockWidget* myBrokerDockWidget;
205 
206  typedef std::map<WebSiteId,DtString> WebSites;
208 
209  };
210 
211 
213  {
214  return myQueueManager;
215  }
216 
217 } //end namespace MAKVrExchange

Document ID: Generated on Wed Dec 21 15:05:11 EST 2016 from SVN revision 171891
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)