Пример #1
0
Extensions::Extensions (QWebView *webView) : QObject(webView)
{
  m_frame = webView->page ()->mainFrame ();
  connect(m_frame, SIGNAL(javaScriptWindowObjectCleared()), SLOT(attachExtensions()));

  m_extensions["device"] = new DeviceInfo (this);
  m_extensions["GapDebugConsole"] = new DebugConsole (this);
  m_extensions["GapAccelerometer"] = new Accelerometer (this);
  m_extensions["GapCompass"] = new Compass (this);
  m_extensions["GapCore"] = this;

  m_plugins["ContactManager"] = new ContactManager (this);


  m_plugins["Network Status"] = new Connection (this);

  m_extensions["GapGeolocation"] = new Geolocation(this);
  m_extensions["GapApp"] = new App (this, webView);

  //    m_extensions["GapHash"] = new Hash(this);
//    m_extensions["GapNotification"] = new Notification(this);
//   m_extensions["GapUtility"] = new Utility(this);

#ifdef Q_WS_S60
  m_extensions["GapCamera"] = new Camera(this);
  m_extensions["GapMemoryWatcher"] = new MemoryWatcher(this);
#endif

  attachExtensions();
}
Пример #2
0
Extensions::Extensions(QWebView *webView) :
    QObject(webView) {

    m_frame = webView->page()->mainFrame();
    connect(m_frame, SIGNAL(javaScriptWindowObjectCleared()), SLOT(attachExtensions()));

    m_extensions["GapAccelerometer"] = new Accelerometer(this);
    m_extensions["GapDebugConsole"] = new DebugConsole(this);
    m_extensions["GapDeviceInfo"] = new DeviceInfo(this);
    m_extensions["GapHash"] = new Hash(this);
    m_extensions["GapNotification"] = new Notification(this);

#ifdef Q_WS_S60
    m_extensions["GapCamera"] = new Camera(this);
    m_extensions["GapMemoryWatcher"] = new MemoryWatcher(this);
#endif

    attachExtensions();
}