Gui Command

From FreeCAD Documentation
Revision as of 10:06, 30 March 2014 by Renatorivo (talk | contribs) (Created page with "=== Иконки === 400px|right")

GuiCommand одни из наиболее важных функций FreeCAD при взаимодействии с пользователем. Каждый раз когда пользователь выберает опцию в меню или нажимает на кнопку панели инструментов это активирует GuiCommand. Некоторые из атрибутов GuiCommand:

  • Задано имя
  • Содержит иконку
  • Определена возможности для отмены/повтора
  • Есть страница справки
  • Открывает и управляет диалогами
  • Записывается в макрос
  • и.т.д...

Назначение имен

GuiCommand именуются определенным образом: ИмяМодуля_ИмяКоманды т.е. "Base_Open" это команда Открыть(Open) графического интерфейса в Base(базоввой системе). GuiCommand определенная в модуле получает имя, включающее спереи имя модуля, наприер "Part_Cylinder".

Если документ не закончен(в смысле wiki статья) используйте шаблон Template:UnfinishedDocu

Страница справки

Каждая GuiCommand должна обладать страницей справки. Страница справки должна располагаться в FreeCAD wiki. В статье со схожим с именем GuiCommand, т.т. Std ViewScreenShot.

Чтобы создать ваши собственные справочные страницы используйте шаблон: GuiCommand model

Примеры:

Иконки

Every GuiCommand has to have an icon. We use the Tango icon set and its guidelines. On the right side you see the tango color palette.

Preferable all Icons are drafted with SVG with e.g. Inkscape. This makes it easier to apply changes and derive additional Icons in the same application space.

icons color coding chart

We try as much as possible to respect this chart, so the color of the icons has a direct meaning.

Quality requirements

There are a lot of GuiCommands (Features) in FreeCAD which are experimental or used shortly for implementation purposes. These GuiCommands are mostly in the dedicated workbenches like Part, Mesh or Cam. To ensure a good user experience the workbench Complete was created. This is the default start workbench of FreeCAD and incorporates all GuiCommands which meet certain Quality requirements which are described here:

  • The Command/Feature has to be finished. No work in progress!
  • Has to have a help page like Draft ShapeString
    • All the fields in Template:GuiCommand have to filled in
    • A picture of the dialogs the command eventually yield
    • detailed description of the command and all its parameters and settings
    • Description of the related python interfaces and classes with example code
  • Set up a proper Icon and menu position

Hopefully this becomes true for all GuiCommands in the List of Commands.