Jump to content

Kexi/Junior Jobs/Web Browser Form Widget: Difference between revisions

From KDE Community Wiki
Jstaniek (talk | contribs)
Created page with 'See also: Map Browser Form Widget Junior Job.'
 
Jstaniek (talk | contribs)
No edit summary
Line 1: Line 1:
Web  browser widget is a GUI element that displays web page and allows for navigation experience similar to regular web browsers.
See also: [[../Map_Browser_Form_Widget|Map Browser Form Widget]] Junior Job.
See also: [[../Map_Browser_Form_Widget|Map Browser Form Widget]] Junior Job.
==Definitions==
*See [[Kexi/Junior_Jobs/Map_Browser_Form_Widget#Definitions|Definitions]]
==The Goal==
Deliver extra "Web Browser" widget compatible with Kexi Forms.
==Requirements==
*Design and implement the widget and provide it through separate factory using the kexi widget factory API
*All the code should be stored in this tree in calligra/:
kexi/formeditor/factories/webbrowser/CMakeLists.txt
kexi/formeditor/factories/webbrowser/MapBrowserFactory.h
kexi/formeditor/factories/webrowser/MapBrowserFactory.cpp
kexi/formeditor/factories/webbrowser/MapBrowserWidget.h
kexi/formeditor/factories/webbrowser/MapBrowserWidget.cpp
*To implement the widget derive from QWebView class, part of the QtWebKit module
*Do not export the any class, just export the plugin using K_EXPORT_KEXI_FORM_WIDGET_FACTORY_PLUGIN(WebWidgetFactory, webbrowser) in WebBrowserFactory.cpp
*Class name of the widget should be KexiWebBrowser
*User-visible name of the widget should be "Web Browser"
*Name prefix of the widget should be "web"
*User-visible description of the widget should be "Web browser"
*class name of the factory should be WebBrowserFactory, and the name passed to the KFormDesigner::WidgetFactory constructor should be "webbrowser"
*provide translations (i18n()) for all user-visible property names in the factory constructor (see StdWidgetFactory for reference), e.g.
m_propDesc["url"] = i18n("Address");
*the build should be allowed for webbrowser/CMakeLists.txt only if the QtWebKit module is present, try to check it using cmake; usually the QtWebKit is present but it is not always the case
*Testing: proper implementation should after installing provide web browser widget within the widget palette of "Form Design" tab. Inserting the web browser widget should show it, changing properties through the property editor should work, switching to data view mode should display the browser properly and the browser's contents (map) should be available for zooming (using the wheel) and panning (using the mouse move). All these mouse actions should be disabled on the widget in design mode, so the user is able to drag and drop the widget within the form.
==Extensions==
*Data binding: the "url" property should be made available for data bindings, what would make the web browser widget data-aware
==Hints==
*The directory of the forms framework is kexi/kformeditor/, standard factory is implemented in kexi/formeditor/
*The widget factory API is provided by the KFormDesigner::WidgetFactory base class. Inherit it as StdWidgetFactory does.
*You can test QWebView widget in Qt Designer too.
==After implementation==
TODO: we have to update calligra/README.PACKAGERS document to indicate that the plugin has to be packaged separately to avoid hard dependency on QtWebKit
==Notes from the Developer==
(Please insert notes here)
[[Category:Kexi Junior Jobs]]

Revision as of 22:19, 17 February 2011

Web browser widget is a GUI element that displays web page and allows for navigation experience similar to regular web browsers.

See also: Map Browser Form Widget Junior Job.

Definitions

The Goal

Deliver extra "Web Browser" widget compatible with Kexi Forms.

Requirements

  • Design and implement the widget and provide it through separate factory using the kexi widget factory API
  • All the code should be stored in this tree in calligra/:
kexi/formeditor/factories/webbrowser/CMakeLists.txt
kexi/formeditor/factories/webbrowser/MapBrowserFactory.h
kexi/formeditor/factories/webrowser/MapBrowserFactory.cpp
kexi/formeditor/factories/webbrowser/MapBrowserWidget.h
kexi/formeditor/factories/webbrowser/MapBrowserWidget.cpp
  • To implement the widget derive from QWebView class, part of the QtWebKit module
  • Do not export the any class, just export the plugin using K_EXPORT_KEXI_FORM_WIDGET_FACTORY_PLUGIN(WebWidgetFactory, webbrowser) in WebBrowserFactory.cpp
  • Class name of the widget should be KexiWebBrowser
  • User-visible name of the widget should be "Web Browser"
  • Name prefix of the widget should be "web"
  • User-visible description of the widget should be "Web browser"
  • class name of the factory should be WebBrowserFactory, and the name passed to the KFormDesigner::WidgetFactory constructor should be "webbrowser"
  • provide translations (i18n()) for all user-visible property names in the factory constructor (see StdWidgetFactory for reference), e.g.
m_propDesc["url"] = i18n("Address");
  • the build should be allowed for webbrowser/CMakeLists.txt only if the QtWebKit module is present, try to check it using cmake; usually the QtWebKit is present but it is not always the case
  • Testing: proper implementation should after installing provide web browser widget within the widget palette of "Form Design" tab. Inserting the web browser widget should show it, changing properties through the property editor should work, switching to data view mode should display the browser properly and the browser's contents (map) should be available for zooming (using the wheel) and panning (using the mouse move). All these mouse actions should be disabled on the widget in design mode, so the user is able to drag and drop the widget within the form.

Extensions

  • Data binding: the "url" property should be made available for data bindings, what would make the web browser widget data-aware

Hints

  • The directory of the forms framework is kexi/kformeditor/, standard factory is implemented in kexi/formeditor/
  • The widget factory API is provided by the KFormDesigner::WidgetFactory base class. Inherit it as StdWidgetFactory does.
  • You can test QWebView widget in Qt Designer too.

After implementation

TODO: we have to update calligra/README.PACKAGERS document to indicate that the plugin has to be packaged separately to avoid hard dependency on QtWebKit

Notes from the Developer

(Please insert notes here)