Category: Half-Baked Contributions

14/06/10

Permalink 05:42:04 am, by mholmes, 168 words, 194 views   English (CA)
Categories: Activity log, Half-Baked Contributions; Mins. worked: 30

Moving on to next stage

The issue of synchronizing the two views of the document structure (list of xml:ids and tree view) is holding me up to a degree which is not commensurate with its importance. It's extremely complicated, because in fact the two views do not ultimately inherit from the same data source (the id list is constructed by parsing the document into a QStringList), so formally correct approaches to synchronizing selection using identification of equivalent QModelIndexes by tracing back to the source data won't fly, so some ad-hoc solution is going to be required. And in any case, it's by no means crucial that the two views stay in sync, at least initially. So I'm going to move on to the next stage, which will enable me to get some more code-writing experience in QT, and return to this issue at a much later stage.

The next stage is to plan the class structure that underlies the data model, by reviewing our previous plans, and starting from MJ's zone-defining code.

12/05/10

Permalink 05:51:04 am, by mholmes, 92 words, 233 views   English (CA)
Categories: Activity log, Half-Baked Contributions; Mins. worked: 45

Synchronizing two models

I'm currently re-reading all the material about model/view architecture in QT to figure out how best to approach the synchronization of two views which have two underlying models (one tree, one string list), and where the synchronization code should live (in the code for the dialog box holding the view controls, or in the HcmcImtDoc class). An added complication is that the QSortFilterProxyModel which is currently filtering the list view by regexp currently lives in the dialog box code, but I think it should almost certainly move to the HcmcImtDoc class.

11/05/10

Permalink 05:50:27 am, by mholmes, 169 words, 199 views   English (CA)
Categories: Activity log, Half-Baked Contributions; Mins. worked: 60

Bug fixed

Fixed the duplicate item bug in the string list filter, and fixed an unused parameter issue in the constructor of HcmcImtDoc. Also spent a bit of time narrowing down an error message when running the application: CRITICAL **: atk_object_set_name: assertion `name != NULL' failed. This turns out to be a bug in GTK/Gnome, which is Ubuntu's problem, not QT's. If you run the app with "-style windows" you don't see it. It doesn't affect anything.

The next task is to figure out how to hook together selections between the two views of the document (the tree view and the xml:id list), so that if you select something in one view, it gets selected in the other. I suspect this will be something like:

  • Get the model index for the selected item, and derive the source item from it.
  • Get the model index for the same item in the parallel view (if there is one).
  • Set the selection in the parallel view, without triggering the reverse process.

10/05/10

Permalink 05:44:34 am, by mholmes, 126 words, 251 views   English (CA)
Categories: Activity log, Half-Baked Contributions; Mins. worked: 60

Solved the id filter problem

Went back to square one and created a new QSortFilterProxyModel to filter the list of xml:ids coming from the HcmcImtDoc object. This has solved the problem; I now have a working regular expression filter in the GUI, which can be used to select items in the list.

A new problem has emerged, though: each xml:id in the list is duplicated. This is not caused by the new filter; if I change back to the original unfiltered behaviour, I still get two of each item in the list. So this is due to what looks like duplicated code in HcmcImtDoc, which I think ended up in there when I was making changes to allow switching on and off of namespace-awareness. Shouldn't be hard to fix.

07/05/10

Permalink 05:51:10 am, by mholmes, 31 words, 214 views   English (CA)
Categories: Activity log, Half-Baked Contributions; Mins. worked: 45

QT update doesn't fix the problem

Did a QT update, but the issue still remains: "source_parent was not valid", in either filterAcceptsRow or filterAcceptsColumn of HcmcIdFilter. I'll probably need to re-read all the documentation on QSortFilterProxyModel...

06/05/10

Permalink 05:53:22 am, by mholmes, 33 words, 207 views   English (CA)
Categories: Activity log, Half-Baked Contributions; Mins. worked: 60

Still working on QSortFilterProxyModel

Still working unsuccessfully on the QSortFilterProxyModel problem, but I've now discovered that a bug in that class was fixed in QT 4.6.2, so it may be solved by an update which I'll do tomorrow.

03/05/10

Permalink 05:51:12 am, by mholmes, 42 words, 206 views   English (CA)
Categories: Activity log, Half-Baked Contributions; Mins. worked: 45

Added namespace-awareness switching

Added bool properties for namespace awareness in the HcmcImtDoc and DlgXmlIndex classes, so we don't have to decide right now which approach is best for our purposes. These are set in the constructor, but there's also a setter to change them later.

27/04/10

Permalink 05:54:44 am, by mholmes, 51 words, 213 views   English (CA)
Categories: Activity log, Half-Baked Contributions; Mins. worked: 60

Working on namespace processing

Tested two approaches to handling XML documents, one of which is namespace-aware and the other which is not. Both have advantages and disadvantages, so it's not yet clear which approach we should take for IMT. I need to make this switchable at the level of DlgXmlIndex and HcmcImtDoc, via public properties.

26/04/10

Permalink 05:52:06 am, by mholmes, 123 words, 238 views   English (CA)
Categories: Activity log, Half-Baked Contributions; Mins. worked: 25

Half-Baked Software sponsorship of IMT

SA and I have decided that an effective way for Half-Baked to prepare for writing Hot Potatoes 7 would be to sponsor the development of the Image Markup Tool version 2, allowing us to develop a set of core libraries and functions, as well as gaining familiarity with the issues involved in compiling and releasing for different platforms. We also intend to use IMT 2 for creating end-user documentation in HotPot 7.

For this reason, Half-Baked will pay SA and myself to work on the development of IMT, and this work will be tracked in the "Half-Baked Contributions" post category, as well as in the "Activity Log" category.

I've started the process this morning by checking out the project and confirming I can build the DocModel subproject.

Image Markup Tool blog

The Image Markup Tool is a Windows application for annotating images, using TEI XML as its data format. Our aim is to produce a tool which creates conformant TEI P5 XML files, but which has a simple enough interface that it can be used by people with little or no experience in editing XML code.

Reports

May 2013
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

XML Feeds