BuildmLearn Toolkit  2.0.4
BuildmLearn Toolkit is an easy-to-use program that helps users make mobile apps without any knowledge of application development.
 All Classes Functions Enumerations Groups Pages
WebFactory Class Reference

Web-related functionality. More...

#include <webfactory.h>

Collaboration diagram for WebFactory:
Collaboration graph

Public Slots

bool openUrlInExternalBrowser (const QString &url)
 Opens given string URL in external browser. More...
 

Static Public Member Functions

static WebFactoryinstance ()
 

Detailed Description

Web-related functionality.

Definition at line 43 of file webfactory.h.

Member Function Documentation

bool WebFactory::openUrlInExternalBrowser ( const QString &  url)
slot

Opens given string URL in external browser.

Parameters
urlURL to open.
Returns
Returns true if URL was opened in external web browser.

Definition at line 54 of file webfactory.cpp.

54  {
55  qDebug("Opening url '%s' in external browser.",
56  qPrintable(url));
57 
58  if (qApp->settings()->value(APP_CFG_BROWSER,
59  "custom_external_browser",
60  false).toBool()) {
61  QString browser = qApp->settings()->value(APP_CFG_BROWSER,
62  "external_browser_executable").toString();
63  QString arguments = qApp->settings()->value(APP_CFG_BROWSER,
64  "external_browser_arguments",
65  "%1").toString();
66 
67  return QProcess::startDetached(browser, QStringList() << arguments.arg(url));
68  }
69  else {
70  return QDesktopServices::openUrl(url);
71  }
72 }

The documentation for this class was generated from the following files: