octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #9993] Property inspector GUI


From: Remi Thebault
Subject: [Octave-patch-tracker] [patch #9993] Property inspector GUI
Date: Tue, 10 Nov 2020 18:11:55 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0

URL:
  <https://savannah.gnu.org/patch/?9993>

                 Summary: Property inspector GUI
                 Project: GNU Octave
            Submitted by: rtbo
            Submitted on: Tue 10 Nov 2020 11:11:54 PM UTC
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Initial implementation of Property Inspector


HIGHLIGHTS

  * a widget with two main views
    - a tree to display and interact with graphics object tree
    - a table, displaying the properties of the object selected in the
      tree

  * the tree receive notifications of graphics object creation/deletion
    to update itself

  * the table provides display and edition of most types of properties


SHORTCOMINGS

  * Not all property types have yet proper editors/painting

  * Updating properties does not always reflect in the figures.
    - updating line color for example not always trigger redraw.
    - when redraw happens, all previous property editions are visible

  * No link to help is provided. 2 possible strategies:
    - compute URL to online help from handle type and property name
    - embed the help in the executable. I have no clue how to do this.


DETAILED CHANGELOG

  * liboctave/util/oct-mutex.h
    - adding unique_lock template class that encapsulate a critical resource
      providing lock/unlock methods. unique_lock is moveable but non-copiable
      and also acts like a smart pointer.
      - not a strictly needed addition, but is used to provide safely the
        gh_manager instance to the GUI

  * libinterp/corefcn/graphics.in.h
    - adding some introspection of graphics properties
      - prop_type() method (returning new property_type enum)
      - as_base_property() method to retrieve a pointer that can be casted
      - as_[type]_property() that dynamic_cast the base property to derived
        type (not used - compiled out at the moment)

  * libinterp/corefcn/event-manager.h
    - adding lifetime events of graphics objects in the interpreter events
      interface. Needed to track creation and removal of graphics objects in
      the tree.

  * libinterp/corefcn/graphics.cc
   - fire the graphics objects lifetime events

  * libui/src/qt-interpreter-events.h
  * libui/src/qt-interpreter-events.cc
    - adding signals for the new graphics objects

  * libgui/src/interpreter-qobject.h
  * libgui/src/interpreter-qobject.cc
    - provide access to the gh_manager through a unique_lock
    - the GUI cannot use the gh_manager without locking it
    - Not very useful today because the gh_manager is not consistently locked
      in the interpreter thread (e.g. when setting/reading properties).
      This could lead to race conditions (although I didn't observe any).
    - May be a better strategy is to have fine grain (per property) locking.

  * libgui/src/property-inspector.h
  * libgui/src/property-inspector.cc
    - implementation of the property inspector
      - simple widget that instantiate the more complex views and models and
        make them talk together

  * libgui/src/property-inspector-tree.h
  * libgui/src/property-inspector-tree.cc
    - implementation of the graphics handle tree model
    - quite straightforward Qt tree model code

  * libgui/src/property-inspector-table.h
  * libgui/src/property-inspector-table.cc
    - implementation of the graphics properties table model and item
delegate.
    - to keep code flexible, I tried to take the best decisions based on the
      octave_value of the property rather than based on the derived property
      type, but this is not always possible. (hence the properties
      introspection)
    - there (at the moment) two specific widgets used as cell editors:
      - matrix_widget
      - color_editor_widget (this one use a *.ui designer file)

  * libgui/src/property-inspector-color-editor.ui
    - Qt Designer file for the color_editor_widget

  * libgui/src/main-window.h
  * libgui/src/main-window.cc
  * libgui/src/gui-preferences-sc.h
    - instantiate the property inspector and setup shortcuts

  * libgui/src/module.mk
    - adding new property inspector files




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 10 Nov 2020 11:11:54 PM UTC  Name: property-inspector-1.patch  Size:
120KiB   By: rtbo

<http://savannah.gnu.org/patch/download.php?file_id=50239>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?9993>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]