wiki:GSoC/2016/PyQtGUI

Version 38 (modified by pesekon2, 8 years ago) ( diff )

--

GSoC 2016 PyQt based GUI of GRASS automatically generated from XML

Title: PyQt based GUI of GRASS automatically generated from XML
Student Name: Ondrej Pesek, Czech Technical University in Prague
Organization: OSGeo - Open Source Geospatial Foundation
Mentor Name: Vaclav Petras, Anna Petrasova
GSoC proposal: view proposal
Repository: github
Documentation: [TODO]

Abstract

GUI forms (module dialogs) are now automatically generated from XML into wxPython. My idea is to create code that is generating the same code into more powerful Qt.

Goal

Create a table of individual widgets, their features and when their are used. Existing GUI in GRASS GIS and also in QGIS GRASS plugin and QGIS Processing plugin are good starting points.

List of standard options in GRASS GIS https://grass.osgeo.org/grass71/manuals/parser_standard_options.html gives list of commonly used parameters which are likely to become specialized widgets (but it is not 1:1 - a lot of them are actually the same map selection widget just with different parameters). The general specification of options and flags is in the programming manual https://grass.osgeo.org/programming7/gislib_cmdline_parsing.html.

There is more ways to do it. We will try to make more files. Nowadays, it is just one file with more than 3000 lines. It is not very readable. We hope that we can change it.

Notes

In the first version, creating GUI will work just as script started from GRASS. Of course I want to implement it as normal function (there is variable "gui" in GRASS), but it's not necessary. When the GUI is ready and compatible with many functions, then tere is possibility to make it. (not in timeline, additional goal)

The same is with styling. I will try to make everything very similar to current GUI, but I didn't make any window in timeline for that. I will work on that within all the GSoC period assuming that I have the time.

I have a problem with the end of the june. I have Final Examinations at my school so maybe I won't have so much time. I will try to make everything here ahead of time. In the case I won't, I will definitely catch up it after this period. It will be same for every hiatus that can raise.

Timeline

timeline created during bonding
status
Community bounding period Familiarization with the existing code *
Let the summer begin
MAY 23 - 27 Creating empty generated GUI *
MAY 30 - JUNE 3 Creating basic GUI (just basic widgets) of some function - e.g. r.buffer *
JUNE 6 - 10 Updating GUI - using standard Qt widgets and creating the first version of copyable/runable code *
JUNE 13 - 24 Updating GUI - using standard Qt widgets
Mid term evaluation
JUNE 27 - JULY 8 Implementation of custom widgets (gselect.Select)
JULY 11 - 22 Linking widgets, dependencies (select map -> columns)
JULY 25 - 29 Clearing of code
AUGUST 1 - 5 Testing
AUGUST 8 - 13 Writing documentation
The end

Requirements

GRASS 7.1

Development

Weekly reports

May 23 - 27

Designed basic GUI shuck. From XML is now automatically generated GUI with name, keywords and basic layouts (description, tabs, buttons).

Code now works as a script with parameter - for example r.buffer

May 30 - June 3

I have made GUI using some basic widgets - checkboxs, labels, lineedits...

Now the code is reading those types - float, range, sql_query, flags

It also writes the label (or name) and type into GUI.

report2.1

June 6 - June 10

I have upgraded GUI - now it works also with the string and integer types. (on the basic level)

I also have made some changes - SqlQuery is now lineedit and when the float isn't multiple, the GUI generates QDoubleSpinBox.

The important thing is the first version of copyable/runable code. The buttons don't work yet, but user can see it and it automatically reads the code.

And one elegant thing - all the widgets are now stretched upper.

Attachments (19)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.