This past week, our staff worked on graphics for our new accounting software.
First on the list were rectangles, ovals and lines. Some of our layouts use them to help organize data entry screens and printed forms. Now they draw and print properly.
Graphic shapes had one quirk to deal with: pen patterns. It’s left over from the early days of our accounting software, when some users still had 1-bit black & white monitors. For them, dots were the only way to get shades of gray. Qt supports pen patterns, but they don’t make much sense for business use. So, we wrote code to convert patterns to matching shades of gray. It looks better, and draws faster.
Next was the company logo. It prints on many of the stock business forms. You change it via File–Company Info. That way you can tweak your logo, and automatically update all the layouts that use it.
The logo also had its quirks. Goldenseal currently uses PICT for all images. It was the standard Mac graphic format for many years, but Apple abandoned it in the 64-bit OS. For TurtleSoft Pro, we need to convert all pictures to .png, .jpg or .pdf.
It’s also time to change how we store graphics. Goldenseal has them as binary data inside the company file. That’s not ideal. Pictures are much bigger then business records, and less vital. Store a lot of them, and the database grows cluttered and huge.
The modern approach is to put each graphic into a separate file. They can be resources inside the app, or regular files on your drive. For the first release, TurtleSoft Pro will store the company logo in a special folder. Replace logo.png, and it will update all your layouts. Eventually, the app will store all graphics that way. Small files are easier to back up, and easier to manage.
Next up were dimension layouts for construction estimating. Those have simple pictures (currently binary PICT data inside the layout). We saved the pix into resource files, then added one-time code to draw them onscreen. It’s not elegant, but it works. Future versions will do it better.
There are a couple more types of graphics inside Goldenseal. Users can paste pictures into records, or add them to custom layouts. Sadly, we can’t move either of those to TurtleSoft Pro. Qt can’t read PICT. Nor could we find other source code to convert it to newer formats. Writing a translator from scratch would take months.
Fortunately, image storage is only a small part of our accounting/estimating software. Most users never even discovered it. If you did add pictures, you can salvage them with a paste into Adobe Acrobat, Macintosh Preview, or MS Office (most versions).
Dennis Kolva
Programming Director
TurtleSoft.com