VR-Exchange 2.2 API Documentation
portalAppGui.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2013 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 
50  class DT_DLL_LIBPORTALAPP DtPortalAppGui : public QMainWindow
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 toggleShowStatisticsViewLegend( bool state );
101  virtual void showQueueInfoDlg();
102  virtual void tick();
103  virtual void editConfiguration();
104 
105  public:
106 
108  static void setObjectViewComponentCreator(
109  DtObjectViewComponentCreator func );
110 
112  static void setInteractionViewComponentCreator(
113  DtInteractionViewComponentCreator func );
114 
115  protected:
116 
118  void initTimers();
119 
121  void initMenu();
122 
124  void initStatusBar();
125 
126  virtual QDockWidget* createDockWidget( QString name );
127 
128  virtual void closeEvent( QCloseEvent* e );
129 
130  protected:
131 
133  static void brokerErrorMessageCb( const DtBrokerErrorMessage& msg, void* usrData );
134 
135  protected slots:
136 
137  virtual void quitMe();
138  virtual void showAboutDialog();
139 
141  virtual void showHelp();
142  virtual void processHelpDialogClose();
143 
144  virtual void dockVisibilityChanged( bool state );
145  virtual void updateTimeLabel();
146  virtual void clearInteractions();
147  virtual void resetInteractionStatistics();
148 
149  virtual void launchCheckForUpdatesWebSite();
150  virtual const DtString& webSite( WebSiteId webSite ) const;
151 
152  virtual void brokerSelectedRunning( bool );
153 
154  virtual void updateBrokerTranslationSettings();
155 
156  private:
157 
159  DtPortalAppGui( const DtPortalAppGui& orig );
160 
162  DtPortalAppGui& operator = ( const DtPortalAppGui& orig );
163 
164  protected:
165 
166  static DtObjectViewComponentCreator theObjectViewComponentCreator;
167  static DtInteractionViewComponentCreator theInteractionViewComponentCreator;
168 
169  Ui::DtPortalAppGui myUi;
170 
178  QTimer* myDrainTimer;
186 
188  QProcess* myHelpAssistant;
189 
191 
194  QDialogButtonBox* myButtonBox;
195 
200 
201  typedef std::map<WebSiteId,DtString> WebSites;
203 
204  };
205 
206 
208  {
209  return myQueueManager;
210  }
211 
212 } //end namespace MAKVrExchange

Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)