From 95b6120e44ddddf7d8ae0ed1fa556a6b33324f2e Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 30 Mar 2016 15:10:55 +0300 Subject: [PATCH] Issue #1368: Creation of a Qt panel. documentation correction --- doc/tui/first_feature_help.doc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/tui/first_feature_help.doc b/doc/tui/first_feature_help.doc index 83d599db6..66c1ab157 100644 --- a/doc/tui/first_feature_help.doc +++ b/doc/tui/first_feature_help.doc @@ -144,14 +144,14 @@ Python: \endcode

Creation of a Qt panel and custom controls in the plugin

-Plugin allows creating of a specific property panel content and a custom widget. The specific property panel content will be shown in the application property panel. The custom widget will be shown in the Property Panel (possible among other standard and custom widgets, or just single widget per Property Panel). +Plugin allows creating of a specific property panel content and a custom widget. The panel content will be shown instead of controls container in the application property panel. The custom widget will be shown among other standard and custom widgets in the Property Panel. -To provide this SHAPER has a widget creator interface and a factory of the creators. Each plugin which creates panels or custom widgets should implement own creator and register it in this factory by some unique string-ID. This creator will make a new control by this name. +To provide this SHAPER has a widget creator interface and a factory of the creators. Each plugin which creates panels or custom widgets should implement own creator and register it in this factory by some unique string-ID. This creator will be obtained by this name and create new controls. Steps to create the Qt property panel content are the following:
  1. append Qt library dependencies in plugin project
  2. -
  3. write the custom panel content. It should be a child of a QWidget.
  4. -
  5. define a unique panel name. Put this name in the "property_panel_id" section of the feature. If this XML section is filled, possible XML children sections will be ignored. The following example serves to create custom panel:
  6. +
  7. write the custom panel content. It should be a child of a QWidget. It is necessary to put it in the application Property Panel.
  8. +
  9. define a unique panel name. Put this name in the "property_panel_id" section of the feature. If this XML section is filled, XML sections of feature attributes should not be defined, they will be ignored. The following example creates a custom panel:
  10. \code @@ -165,17 +165,17 @@ Steps to create the Qt property panel content are the following:
  11. write a widget creator, which will create an instance of a panel content by the unique name. This creator must inherit SHAPER widget creator interface. It will implement a virtual method of a panel creation.
  12. create an instance of the widget creator and register it in the widget creator factory.
-@ref SamplePanelPlugin_Plugin is an example plugin to create a custom property panel. +SamplePanelPlugin_Plugin is an example plugin to create a custom property panel. -Steps to create the custom widget are the following: +Steps to create a custom widget are the following:
  1. append Qt library dependencies in plugin project
  2. write the custom widget. It should be a child of a SHAPER model widget. It provides a set of standard Qt controls and methods to apply these controls content into the model and back. So, the next virtual methods should be implemented:
    1. provides all internal Qt widgets (to let application to listen "value changed" Qt events, etc.)
    2. - store of the values from controls to data model by request - fill Qt widgets with the values from data model by request +
    3. store of the values from controls to data model by request
    4. +
    5. fill Qt widgets with the values from data model by request
  3. define a unique key value for the custom widget, add a section with this key in the XML, for an example:
  4. \code -- 2.39.2