ivoflipse / Pawlabeling

Tool for processing and analyzing pressure measurements
Other
18 stars 1 forks source link

Switch to QAbstractItemModels for storing some of the data #107

Closed ivoflipse closed 10 years ago

ivoflipse commented 10 years ago

PyQt/PySide is giving me headaches when it comes to keeping things sorted. This is off course all my own fault, I should have used Qt's Model/View implementation.

So now I'm going to switch to QAbstractItemModel's for managing the subjects, sessions, measurements and contacts in the GUI.

Now I only need to figure out how...

ivoflipse commented 10 years ago

Since the QAbstractItemModel is so hierarchical in nature. Perhaps I should consider adding the measurements to the session_widget, so you can directly see what measurements are present.

ivoflipse commented 10 years ago

Well that didn't go the way I planned. I couldn't figure out how to properly subclass it so it would render the items I wanted. Furthermore, I wonder if its really that much more flexible, given that I'm not sure whether it would keep track of all the items I was interested in. Worse, I had to write my own functions to tell the View what to get from the Model anyway, so I might as well keep it to native Python

ivoflipse commented 10 years ago

Well I did learn one good lesson out of all of this. I can just add another column, that I won't be showing (because of the column count) which will hold the id of the item I care about. Problem solved!