VR-Forces 4.1 Class Documentation
DtOsgEarthStartupDialogLogic.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtOsgEarthStartupDialogLogic.h,v $ $Revision: 1.1 $ $State: Exp $
7 ******************************************************************************/
8 
11 
12 #pragma once
13 
17 
18 #include <QtNetwork/QNetworkReply>
19 #include <QtNetwork/QNetworkAccessManager>
20 #include <QtCore/QUrl>
21 
22 namespace osgEarth
23 {
24  class Config;
25 }
26 
27 namespace makVrv
28 {
29  class DtOsgEarthStartupDialogInterface;
30  class DtServerAvailable;
31 
35  {
36  public:
37 
40 
43 
44  protected:
46  virtual void slot_neverShowAgain(bool neverShow);
47 
49  virtual void slot_connectToServer(const std::string& server);
50 
52  virtual void slot_loadTerrain(const std::string& terrain);
53 
56  bool processServers();
57 
60  bool processTerrain();
61 
64  bool processScenes();
65 
67  virtual void slot_checkServerAvailability(const std::string&);
68 
70  virtual void slot_serverIsAvailable(const std::string& desc, bool, const std::string& reason);
71 
72  protected:
75  virtual QUrl urlFromServer(const std::string&) const;
76  virtual QUrl urlFromEarthFile(const std::string&) const;
77  virtual QUrl urlFromEarthConfig(const osgEarth::Config&) const;
78 
79  protected:
80 
86  std::map<std::string, std::string> myServersNameToPathMap;
87  std::map<std::string, std::string> myTerrainNameToPathMap;
88  std::map<std::string, std::string> mySceneNameToPathMap;
89  };
90 
94  {
95  public:
96 
98  static DtOsgEarthStartupDialogLogicCreator& instance(DtDe&);
99 
101  static void registerInstance(DtDe& de, DtOsgEarthStartupDialogLogicCreator* instance);
102 
105 
108 
110  virtual DtVirtualBaseClass* create(DtDe& de, DtOsgEarthStartupDialogInterface& iFace );
111  };
112 
116  {
117  Q_OBJECT
118 
119  public:
121  DtServerAvailable(const std::string& serverKey, const QUrl& page);
122 
124  virtual ~DtServerAvailable();
125 
127  void processRequest();
128 
129  boost::signal<void (const std::string&, bool, const std::string&)> signal_serverAvailable;
130 
131  protected slots:
133  virtual void finished(QNetworkReply*);
134 
135  protected:
136  QNetworkAccessManager myManager;
137  QUrl myUrl;
138  std::string myKey;
139  };
140 }
141 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)