Did some minor edits to the DH2010 proposal and uploaded an ODF version to ConfTool (deadline is tomorrow, so I've been procrastinating).
Just spent an hour trying to get an app to compile using my MdhXmlEditor class. Although I was declaring the header file for the class in the header file for the main window, it couldn't find the class. Eventually I discovered that I had to manually add the header and cpp files for the two libraries I'm using to the QT .pro file, like this:
# -------------------------------------------------
# Project created by QtCreator 2010-03-10T14:41:22
# -------------------------------------------------
QT += xml \
xmlpatterns
TARGET = createImtFiles
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp \
../imagemarkuptool/trunk/projXmlEditor/mdhxmleditor.cpp \
../imagemarkuptool/trunk/projXmlEditor/mdhxmlhighlighter.cpp
HEADERS += mainwindow.h \
../imagemarkuptool/trunk/projXmlEditor/mdhxmleditor.h \
../imagemarkuptool/trunk/projXmlEditor/mdhxmlhighlighter.h
FORMS +=
There's no equivalent of Delphi's "Add file to project", but obviously the pre-processor needs to know about this stuff; it can't rely on the compiler to find all the header files.
Copied all the JPGs into a thumbs directory and created all the thumbnails thus:
mogrify -resize 100 *.jpg
Ready to start looking at how to generate all the XML files. That's going to be a bit of a hard one, but I think it might be possible to do it with a little QT app, and it might save an awful lot of time.
After a process of careful renaming, as well as checking against the spreadsheet to correct original naming errors and replacing some more unstitched components with complete versions, I now have 220 maps with relatively useful filenames which are designed for the web. Many of the filenames do not yet reflect the contents or include the year, but that can be done later. We have enough to be working with for the moment.
Did some reading and thinking, to come to this conclusion:
- Each image and its annotation areas should be handled using an MdhSurface class.
- The display of the image and zones should be handled using a QGraphicsScene descendant, which is a member of MdhSurface.
- The image might be rendered as a background using QBrush, or it might be a QGraphicsPixmap item (item 0 in the array held by QGraphicsScene).
- The zones should be handled either by QGraphicsRectItem descendants (if we handle only rectangles), or QGraphicsPolygonItem descendants (if we handle polygons -- see below).
- The actual view should be handled by a QGraphicsView. I'm not sure yet whether that should be part of MdhSurface, or external to it; and I'm not sure at what level we should create an actual widget to be instantiated on a panel. Probably the widget would be MdhSurface, and would have the QGraphicsView as a member, but I'm still fuzzy on that.
I've also figured out a way of encoding polygonal zones in P5. Here's a brief description I sent to the TEI list for some feedback:
The current spec for <facsimile> and its children allows only rectangular zones on a surface:
<surface> <zone ulx="10" uly="10" lrx="50" lry="50"></zone> <zone ulx="60" uly="100" lrx="90" lry="200"></zone> </surface>
specifying two rectangular zones on the surface.
Digging around a bit, I noticed that <zone> can contain <desc>, <desc> can contain <dim>. <dim> "contains any single measurement forming part of a dimensional specification of some sort." So I'm thinking that I can do polygons like this:
<surface>
<zone ulx="10" uly="10" lrx="50" lry="50">
<desc>
<dim type="point">10,10</dim>
<dim type="point">30,30</dim>
<dim type="point">50,50</dim>
</desc>
</zone>
</surface>
The standard attributes on <zone> define the bounding rectangle for the polygon (enabling processing by any agent that only handles rectangles), while the points of the polygon (triangle in this case) are defined in the <dim> elements for IMT and any suitably-aware processor to handle.
We need a space between the <phr> and the <seg><gloss> in all dictegs.
Right now, dictegs in the affix file are displaying on the database site with the gloss jammed right up against the ] of the <phr>.
I will fix this by adding a space between </phr> and <seg> throughout the affix file, with find & replace.
I now have a collection of usable maps (226 in all), sorted by year. Next steps:
- Filename-normalization
- Auto-generation of 1000px variants and thumbnails
- Auto-generation of XML files.
Worked through the 30 or so new maps from DVDs (and created a local copy of the DVDs). These are now sorted by year, and their filenames have some useful info in them. Next I have to find all the stitched items that JF did, and replace my unstitched fragments with them.
In all projects, add this:
div.tabCaptions{
[...]
line-height: 200%;
}
Makes the tabs wrap properly when they won't fit on a line. Implemented in the Siberian project.