main.cpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /********************************************************************************************
  2. ** Copyright © 2011 Nokia Corporation. All rights reserved.
  3. ** Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation.
  4. ** Java and all Java-based marks are trademarks or registered trademarks of
  5. ** Sun Microsystems, Inc. Other product and company names mentioned herein may be
  6. ** trademarks or trade names of their respective owners.
  7. **
  8. ** Subject to the conditions below, you may, without charge:
  9. **
  10. ** · Use, copy, modify and/or merge copies of this software and
  11. ** associated content and documentation files (the “Software”)
  12. **
  13. ** · Publish, distribute, sub-licence and/or sell new software
  14. ** derived from or incorporating the Software.
  15. **
  16. ** Some of the documentation, content and/or software maybe licensed under open source
  17. ** software or other licenses. To the extent such documentation, content and/or
  18. ** software are included, licenses and/or other terms and conditions shall apply
  19. ** in addition and/or instead of this notice. The exact terms of the licenses, disclaimers,
  20. ** acknowledgements and notices are reproduced in the materials provided.
  21. **
  22. ** This file, unmodified, shall be included with all copies or substantial portions
  23. ** of the Software that are distributed in source code form.
  24. **
  25. ** The Software cannot constitute the primary value of any new software derived
  26. ** from or incorporating the Software.
  27. **
  28. ** Any person dealing with the Software shall not misrepresent the source of the Software.
  29. **
  30. ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
  31. ** INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  32. ** PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  33. ** HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  34. ** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  35. ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  36. ********************************************************************************************/
  37. #include <QtGui/QApplication>
  38. #include <QDeclarativeEngine>
  39. #include <QDeclarativeComponent>
  40. #include "qmlapplicationviewer.h"
  41. #include <QNetworkProxy>
  42. #include "geohelper.h"
  43. #include "smshelper.h"
  44. int main(int argc, char *argv[])
  45. {
  46. QApplication app(argc, argv);
  47. qmlRegisterType<GeoHelper>("GeoHelper",1,0,"GeoHelper");
  48. qmlRegisterType<SMSHelper>("SMSHelper",1,0,"SMSHelper");
  49. /*
  50. Uncomment proxy settings if you use internal WLAN or emulator
  51. */
  52. /*
  53. QString proxyhostname = "<put your proxy hostname here>";
  54. int proxyport = 8080;
  55. QNetworkProxy proxy;
  56. proxy.setType(QNetworkProxy::HttpProxy);
  57. proxy.setHostName(proxyhostname);
  58. proxy.setPort(proxyport);
  59. QNetworkProxy::setApplicationProxy(proxy);
  60. */
  61. QmlApplicationViewer viewer;
  62. viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
  63. viewer.setMainQmlFile(QLatin1String("qml/Carpool/main.qml"));
  64. viewer.showFullScreen();
  65. return app.exec();
  66. }