14/03/11

Permalink 04:49:26 pm, by mholmes, 68 words, 173 views   English (CA)
Categories: Activity log; Mins. worked: 120

Progress with ImtLinkSet

Began fleshing out the ImtLinkSet class, after some trouble deciding whether to base it off QAbstractTableModel or QStandardItemModel, and whether to keep the links in a QMap or QHash (chose the former in both cases). It compiles, but doesn't have enough functionality for testing yet.

I'm still unsure about QMap; it may be that a simple QList with some lookup functions would be way better in the end.

11/03/11

Permalink 02:26:24 pm, by mholmes, 66 words, 195 views   English (CA)
Categories: Activity log; Mins. worked: 180

Started again with links

After some experimentation, I realized my link setup was far too complicated, so I've thrown it away and started again, based on what I've learned from my home project. I've now rewritten ImtLink, and all links will be handled by a single ImtLinkSet class which will descend from QAbstractTableModel (not yet started). The end result should be much simpler, and easier to plug into the GUI.

04/03/11

Permalink 02:35:04 pm, by mholmes, 66 words, 193 views   English (CA)
Categories: Activity log; Mins. worked: 120

Began converting ImtLinkGrpSet to descendant of QAbstractTableModel

One thing I've learned from my home project GVT is that your core data model really should descend from an QT abstract model, and not anything else, so I've started converting the top-level link-handling class, ImtLinkGrpSet, to a descendant of QAbstractTableModel. This involves re-implementing inherited functions from ImtElement, and implementing the core virtual functions from the table model. It's about half done, with one outstanding difficulty.

Permalink 11:19:28 am, by mholmes, 226 words, 194 views   English (CA)
Categories: Activity log; Mins. worked: 60

Wireframe planning meeting

Interview with MT to complete a questionnaire from which she'll build a wireframe model. This was useful, and helped me to clarify a couple of ideas I haven't been sure about. I'm going to detail them here while they're fresh in my mind:

  • All main windows will be dockable.
  • The three main windows will be:
    • The Images window, looking much like our previous mockup.
    • The Links window, which will provide an accessible list of all the links made so far, organized by category.
    • The document browser, which will provide access by filterable xml:id to the ids already in the document, and also by means of a tree model of the document body.
  • Other windows will be modal dialogs:
    • The category manager (or should this tie into the links manager?).
    • The XML editor (pops up from the document browser when you elect to edit an element).
    • The Preferences window.
    • The Output options window (could this simply be integrated into Preferences?).
  • Still haven't decided how to handle translations -- presumably the easiest mechanism would be QT's built-in translation tools, but this might require separate compilation for each language -- check this out.
  • One issue which came up was accessibility: is it going to be possible to allow users to define zones using only the keyboard? It's conceivable, but it might be really difficult to design and code.

18/02/11

Permalink 11:28:50 am, by mholmes, 106 words, 1494 views   English (CA)
Categories: Activity log, Announcements; Mins. worked: 120

New release of the Image Markup Tool

A couple of bugfixes and enhancements have been made to the Image Markup Tool, resulting in the release of version 1.8.1.9. These are the changes:

  • A Hungarian interface translation was contributed by Kóta Péter.
  • Pressing the Delete key when an annotation zone was selected on the image didn't do anything; now it triggers a "Delete annotation(s)" action.
  • When clicking in the Annotation Title field, if the default text is still there as a guide, it should be removed automatically. However, this wasn't happening when an alternative language interface was loaded. That bug is now fixed.

The new version is available from the IMT website.

17/02/11

Permalink 05:29:39 pm, by mholmes, 132 words, 79 views   English (CA)
Categories: Activity log; Mins. worked: 180

Some work on the old IMT

Did some work on the old IMT to create a new release, adding a feature for MB:

  • You can now press Control + G or Control + Shift + G in the Annotation Text box, and get a dialog to select one or more images; for each image you select, you'll get a TEI <graphic> tag pointing to it, either just by file name or by relative path.
  • I've added a popup menu to the main image control and to the annotation list, allowing the three regular annotation actions.
  • I've hooked up Edit / Delete so that it can also (offer to) delete a selected annotation.

The latter two fix some annoyances that have been bugging me for a while. Also updated the documentation date, and sent the package out to MB for testing.

26/01/11

Permalink 03:27:00 pm, by mholmes, 27 words, 125 views   English (CA)
Categories: Activity log; Mins. worked: 60

Documentation for XML editor component

Started adding some doxygen documentation to the code for the XML editor. This is a way of getting back into the project after a few weeks break.

03/12/10

Permalink 11:24:52 am, by mholmes, 33 words, 191 views   English (CA)
Categories: Activity log; Mins. worked: 60

Created splash logo image and about box

Created a logo image (which may change, of course), and an About box class based on QDialog which retrieves application title and version information from the auto-generated version.h file, and displays it.

01/12/10

Permalink 02:28:09 pm, by mholmes, 888 words, 142 views   English (CA)
Categories: Activity log; Mins. worked: 150

Finished and tested appVersion.sh

This is now working well, and seems to be pretty solid; I've tested it in the context of the application itself, and it returns the right values. It can also compare another version number to determine whether it's older, newer or identical. I'm still not exactly clear on how I'll integrate this with compilation on other platforms. I've added version.sh to SVN, and the other platforms could just check out and use it (turning off the pre-compilation step that generates it); however, if version.sh is in SVN, we have the slight paradox that every compile will result in a new commit, because version.sh will be renewed each time and will therefore end up being committed. Maybe that's not a bad thing, actually; that has the effect of incrementing the SVN revision number for every build that's done, making the SVN revision work similarly to a build number. I've modified the script a bit so that it does a commit first, to update any other changed files; then it builds version.h; then it commits the rebuilt version.h right at the end. That means the committed version.h will always be one version behind the actual SVN version, but that's no bad thing unless we end up editing code on the other platforms, which I'm hoping will not happen.

#!/bin/bash

#Major version number (unlikely to change).
major=2

#Minor version number is changeable, but done manually.
minor=0

#Build number is yyyymmdd from today.
date=$(date +%Y%m%d)
dateDashed=$(date +%Y-%m-%d)
dateSeconds=$(date +%s)

#This is the file we're dealing with.
outfile="version.h"

#Do an SVN update, then commit to update the revision number.
svn update
svn commit --message "Committing any changed files before generating version.h for an application build."

#Empty the file.
echo "">$outfile

#Get the SVN revision number into a variable, and parse out the last version number.
svnrev=`svnversion | sed -e 's/.*://' -e 's/[A-Z]*$//'`

#echo the info into the output file.
#echo $svnrev>>$outfile
#echo $major"."$minor"."$build"."$svnrev>>$outfile

echo "//This is an auto-generated file, created at build time as part of a Custom Build Step.">>$outfile
echo "//Do not edit this file directly. It is generated from the bash script appversion.sh.">>$outfile
echo "#ifndef VERSION_H">>$outfile
echo "#define VERSION_H">>$outfile
echo "">>$outfile
echo "">>$outfile
echo "#include <QString>">>$outfile
echo "#include <QStringList>">>$outfile

echo "">>$outfile
echo "namespace Version">>$outfile
echo "{">>$outfile
echo "const int MAJOR = "$major";">>$outfile
echo "const int MINOR = "$minor";">>$outfile
echo "const int DATE = "$date";">>$outfile
echo "const int REVISION = "$svnrev";">>$outfile

echo "inline const char* strVersion(){return "$'\042'$major"."$minor"."$date"."$svnrev$'\042'";}">>$outfile
echo "inline const char* strVersionMajor(){return "$'\042'$major$'\042'";}">>$outfile
echo "inline const char* strVersionMinor(){return "$'\042'$minor$'\042'";}">>$outfile
echo "inline const char* strVersionDate(){return "$'\042'$dateDashed$'\042'";}">>$outfile
echo "inline const char* strVersionRevision(){return "$'\042'$svnrev$'\042'";}">>$outfile
echo "inline int intVersionMajor(){return $major;}">>$outfile
echo "inline int intVersionMinor(){return $minor;}">>$outfile
echo "inline int intVersionDate(){return $dateSeconds;}">>$outfile
echo "inline int intVersionRevision(){return $svnrev;}">>$outfile
echo "inline int versionComparedWithThis(QString &candidateVersion){">>$outfile
echo "//This returns -1 if the candidate version is older, 0 if it's the same, and 1 if it's newer.">>$outfile
echo -e "\t bool ok;">>$outfile
echo -e "\t QStringList verList = candidateVersion.split("$'\042'"."$'\042'");">>$outfile
echo -e "\t if (verList.count() < 1) return -1;">>$outfile
echo -e "\t int candMajor = verList.at(0).toInt(&ok, 10);">>$outfile
echo -e "\t if (candMajor < "$major") return -1;">>$outfile
echo -e "\t if (candMajor > "$major") return 1;">>$outfile
echo -e "\t if (verList.count() < 2) return -1;">>$outfile
echo -e "\t int candMinor = verList.at(1).toInt(&ok, 10);">>$outfile
echo -e "\t if (candMinor < "$minor") return -1;">>$outfile
echo -e "\t if (candMinor > "$minor") return 1;">>$outfile
echo -e "\t if (verList.count() < 3) return -1;">>$outfile
echo -e "\t int candDate = verList.at(2).toInt(&ok, 10);">>$outfile
echo -e "\t if (candDate < "$date") return -1;">>$outfile
echo -e "\t if (candDate > "$date") return 1;">>$outfile
echo -e "\t if (verList.count() < 4) return -1;">>$outfile
echo -e "\t int candRevision = verList.at(3).toInt(&ok, 10);">>$outfile
echo -e "\t if (candRevision < "$svnrev") return -1;">>$outfile
echo -e "\t if (candRevision > "$svnrev") return 1;">>$outfile
echo -e "\t return 0;">>$outfile
echo -e "\t">>$outfile
echo -e "\t">>$outfile
echo -e "\t">>$outfile
echo "}">>$outfile

echo "">>$outfile
echo "}">>$outfile

echo "">>$outfile
echo "">>$outfile
echo "#endif // VERSION_H">>$outfile

svn commit --message "Committing modified version.h before an application build."


25/11/10

Permalink 03:44:49 pm, by mholmes, 341 words, 165 views   English (CA)
Categories: Activity log; Mins. worked: 120

Figuring out how to put version info into the app automatically

The version information data is crucial for completing the <teiHeader> in a useful way, and I've been puzzling over how best to do it in an automated way. Following hints from this post: http://qtcreator.blogspot.com/2009/10/generating-automatic-version-numbers.html, I've written a bash script that creates a version.h header file, which provides all the key versioning info I'll want to include. Below is the script at the moment (it will probably get a bit more complicated later). I'll also want to figure out how to include the same info into a resource file in order to embed the correct versioning info into Windows builds, based on this post: http://stackoverflow.com/questions/2784697/setting-application-info-in-qt. I run the script automatically when doing a build, to get an up-to-date version.h file. This is done using a Custom Build Step in the Build Settings panel of QT (in "Projects").


#!/bin/bash

#Major version number (unlikely to change).
major=2

#Minor version number is changeable, but done manually.
minor=0

#Build number is yyyymmdd from today.
date=$(date +%Y%m%d)

#This is the file we're dealing with.
outfile="version.h"

#Remove the old file.
rm $outfile

#Do an SVN commit to update the revision number.
svn commit --message "Committing before an application build."

#Get the SVN revision number into a variable.
svnrev=`svnversion`

#echo the info into the output file.
#echo $svnrev>>$outfile
#echo $major"."$minor"."$build"."$svnrev>>$outfile

echo "#ifndef VERSION_H">>$outfile
echo "#define VERSION_H">>$outfile
echo "">>$outfile
echo "namespace Version">>$outfile
echo "{">>$outfile
echo "const int MAJOR = "$major";">>$outfile
echo "const int MINOR = "$minor";">>$outfile
echo "const int DATE = "$date";">>$outfile
echo "const int REVISION = "$svnrev";">>$outfile
echo "}">>$outfile
echo "inline const char* versionString(){return "$'\042'$major"."$minor"."$date"."$svnrev$'\042'"};">>$outfile
echo "">>$outfile
echo "">>$outfile
echo "">>$outfile
echo "#endif // VERSION_H">>$outfile

<< Previous Page :: Next Page >>

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