GSoC 2019 : Week 1 - Implementing a Sample TreeView.

Posted 4 years ago

This blog post provides a brief note on the work I have done in the first week in the coding period of the Google Summer of Code program.

Work Planned to be Done:

  1. Create a Sample TreeView using Model-View Architecture
  2. Learn more about Class and Objects
  3. Work out some sample codes based on the Model/View Programming.

Work Done:

1.Constructing a TreeView

I have started the week by learning how to implement a TreeView using Model-View programming. I created a model using a QStandardItemModel which contain the palette Items as the elements in the tree structure. But using QStandardItemModel will not provide the logic for each of the palette Items. Therefore QAbstractItemModel is to be used in order to provide a backend logic to each of the palette Item. Later on, I made progress in learning how to implement a QAbtractItemModel but couldn’t succeed in making the TreeView completely.

2. Adding an option to move the palette Items.

By changing the index of the palette items of the QAbstractItemModel one can change the position of the palette Item in the TreeView. This feature allows one to recreate the move-up and move-down function of the Palette Item in the current PaletteBox

Currently, I am working on how to implement the TreeView using a QAbstractItemModel and also trying to assign icons for each of the Palette Items in the TreeView.