User:SreenathaB: Difference between revisions

From ASCEND
Jump to navigation Jump to search
SreenathaB (talk | contribs)
SreenathaB (talk | contribs)
Line 70: Line 70:
* Added a for loop to check if any of the items in the list selected for plotting against Y-axis is the same as the item selected for plotting against X-axis.
* Added a for loop to check if any of the items in the list selected for plotting against Y-axis is the same as the item selected for plotting against X-axis.
* Modified 'plot' function to display the plots of all the items in the list, y, passed as argument. Unfortunately, all the plot figures occur at the same location.
* Modified 'plot' function to display the plots of all the items in the list, y, passed as argument. Unfortunately, all the plot figures occur at the same location.
[[File:multi_select.png]]
[[File:plot.png]]

Revision as of 20:11, 30 June 2012

I am a Computer Science and Engineering student at "International Institute of Information Technology, Hyderabad"(IIITH) interested in GUI development for applications. Currently, I am involved in developing the PyGTK GUI of ASCEND.

Subversion account : sreenatha:

GSoC 2012 project : GUI Improvements and Bug Squashing

The original proposal is on the GSOC site.

The objectives of this project are

  • Develop the Integrator window
  • Add additional features to the PyGTK GUI
    • Improve IPython console support to the PyGTK GUI
    • Implement the "incidence graph" functionality in windows
  • Enable Loading/Saving changed models
  • Port the DISPLAY equivalent of the Tcl/Tk GUI to PyGTK GUI
  • Add an exit prompt dialog box to the PyGTK GUI
  • Bug fixing
  • Add a sub menu for selecting display options to the "Diagnose" window

Module 5

  • Patched up gtkbrowser.py to ensure that once a delete-event occurs(by clicking on the exit button on title bar), an exit pop-up fires up and asks the user to confirm his exit from the main window i.e, ASCEND browser.
  • Used gtk.MessageDialog instead of gtk.Dialog because according to the docs at pygtk.org, gtk.MessageDialog saves a bit of time when used for trivial purposes(displaying an exit pop-up in this case).
  • Ensured that the function do_quit() is called to perform the clean up procedures before exiting.
  • Here is the link to the patch http://code.ascend4.org/viewvc/code/branches/sreenatha/pygtk/gtkbrowser.py?r1=4124&r2=4165&view=patch
  • Here is an image of the exit pop-up

Module 4

  • Added view items in the GtkMenuItem with id='filemenu_menu' and the GtkToolbar with id='toolbar3' using the Glade Interface Designer for linux
  • Defined callback function 'view_click' in gtkbrowser.py for these added items
  • Replicated from 'open_click', the code for displaying the window to choose/select the location of the model, in view_click
  • Added a class 'ViewModel' to gtkbrowser.py which defines the view window that displays the actual content of the model selected
    • Used
      • gtk.Window for the view window
      • gtk.VBox for the vertical box inside the window
      • gtk.TextView for the viewing widget
      • gtk.ScrolledWindow for the scrollable window
    • The view window is the actual window that is displayed after selecting the file using a gtk.FileChooserDialog widget. It contains a vertical box container inside which is a scrollable window encapsulating the widget(gtk.TextView) that actually shows the content of the file.
    • TextView widgets don't have scroll-down/up options. That is why, it is placed in a scrollable window.
  • Initially tried editing the file ascend.glade in the directory pygtk/glade. Then, realized that editing the ascend.glade file at /usr/local/share directory made changes to the ascend browser(config.py helped).
  • Added tooltips for the menu items of the filemenu(to which the view menu item has been added).
  • Here is a patch for gtkbrowser.py http://code.ascend4.org/viewvc/code/branches/sreenatha/pygtk/gtkbrowser.py?r1=4168&r2=4175&view=patch

Image of the view window



Image of the glade interface designer



Plot functionality

  • Set the TreeSelection mode of the gtk.TreeView object 'treeview2'(represents Y-axis) in 'PlotDialog' class to gtk.SELECTION_MULTIPLE. The user can now select multiple items from the Y-axis column.
  • Used 'get_selected_rows' method instead of 'get_selection' to obtain the selected items of the treeview object because the later was giving errors when the mode of the TreeSelection is set to gtk.SELECTION_MULTIPLE
  • Changed the type of self.ycol in 'PlotDialog' class from ObserverColumn to list inorder to account for the multiple columns selected for plotting
  • Added a for loop to check if any of the items in the list selected for plotting against Y-axis is the same as the item selected for plotting against X-axis.
  • Modified 'plot' function to display the plots of all the items in the list, y, passed as argument. Unfortunately, all the plot figures occur at the same location.