Elegant Invention Blog

Archive for December, 2009

Toolbars, statusbars, menus!

by eric.agan on Dec.19, 2009, under eiCAD

Toolbars, statusbars, menus!

The UI design is coming along. The status bar is pretty well done, the tabs work, and the menus and toolbars are starting to take shape. It doesn’t look like much, but there’s plenty of back-end code making all that work. Short post today, not much to talk about here.. More fun to come soon.

Leave a Comment more...

Splittable Tabs!

by eric.agan on Dec.15, 2009, under eiCAD

Splittable Tabs

The main window is beginning to take shape! What you’re looking at here is two views into the same “page.” A page, in Qt terms, is a scene which contains items. Changes to the scene are reflected in all views, it is like looking at the same object from multiple points of view.

The main window is now tabbed. Presently each tab is tied to a particular page, which represents either a schematic sheet or a board. You can split the view in the tab numerous ways, vertically and horizontally. Making the addition and removable of splits intuitive won’t be trivial, but hopefully the end result will be simple and easy to use.

I think this feature will be most useful when doing board layout on a large and/or dense board, where you want a “supervisory” zoomed-out view of the entire board, along with a tightly zoomed-in view of what you’re currently working on. I don’t think it will find much use in schematic capture, but it can be used for either.

There’s one philosophy I will try to apply throughout the implementation of eiCAD: Every feature in an application should be intuitive for the novice, but customizable for the expert. That is to say: anyone should be able to start using an application as-is with little or no prior study, but the advanced user should be able to adjust every feature as they see fit, knowing exactly how they want the application to look and behave. Put another way: the application can assume it is smarter than the user, but only so long as its “intelligence” can be modified or disabled.

A good example of this is that modern smartphones, by default, auto-correct typos on the fly. This is a fantastic feature for most people, as those on-screen keyboards can be a bit tough to work with, and the built-in dictionaries are quite good. For some people though, whether it be a frequent use of uncommon words or a general distaste for machines that believe they’re smarter than the user, these automated “corrections” may not seem like corrections at all! In that case the feature should always have the ability to be tweaked (perhaps load a more appropriate dictionary), or disabled entirely.

1 Comment more...

Snappy items!

by eric.agan on Dec.09, 2009, under eiCAD

Snappy items!

Ok, so you can’t really tell from the picture, but the items now snap to the grid when moved around (if you enable that feature). Accomplishing that was a lot less trivial than I had hoped.

In short, the way Qt handles moving a QGraphicsItem around is by directing mouseMoveEvent()s to it. The default implementation grabs a list of the initial positions of all selected items in the scene (each movement of the mouse generates a call to this event handler, so this list is kept until the mouse button is released), checks for any necessary transforms, then simply adds the distance the mouse moved to the items’ position(s) and calls setPos() on them to apply the new position.

Unfortunately for me, QGraphicsItem::setPos() is not a virtual function, and since my shape primitive class is inheriting QGraphicsItem, that means when the default mouseMoveEvent() calls setPos() there’s no way for me to intercept it and replace the point with a “snapped” point. Several bottles of Bawls later, I had reimplemented mouseMoveEvent(). My implementation is very similar to the default one with the exception that, if enabled, it will snap the parts to the grid. The snapping is done by the following equation:

qRound(x / gridX) * gridX

Where x is either the x or y coordinate, gridX is the x or y spacing of the grid, and qRound() is a rounding function that returns the nearest integer (round up for ≥0.5, down for <0.5).

Leave a Comment more...

Hello, world!

by eric.agan on Dec.06, 2009, under eiCAD

Hi everyone! Thanks for visiting.

This is the blog of me, trying to start a company called Elegant Invention. There’s nothing on the main site yet, but when there is I will be sure to mention it here.

To keep things brief, I’m an electrical engineer and software developer. A few years ago, while using CadSoft EAGLE regularly, I realized it’s lacking quite a bit of advanced features that other ECAD programs offer. Things like high-speed design aids, semi-automatic routing (which they have since added!), etc. These may not be a big deal for the hobbyist, and they’re certainly not necessary , but they make life easier. Nothing personal, EAGLE, you’re my favorite ECAD solution.

The exorbitant pricing of more action-packed ECAD solutions like Altium or OrCAD led me to the idea of writing my own electronics design suite. Crazy! But I’m not smart enough to say no to a challenge like that. Already knee-deep in code, I have no intention of turning back. I’ve decided to start this company hoping that the end result of this project will be useful to others, particular those with money.

The name of my design suite is eiCAD, and I began development some months ago. Once the bulk of the back-end code was done I started in with the graphics, screenshots of which can be found in this flickr set. A friend of mine recently suggested that I blag about all this nonsense, so here it is! Future posts will be terse.

Direct all suggestions, questions, comments, etc. to:

eicad [at] elegantinvention [dot] com

Or for personal messages such as death threats, contact me at:

eric [at] elegantinvention [dot] com

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Archives

All entries, chronologically...