Use platform-independent math

Uses qSqrt instead of the Windows sqrt in GridWindow
Add Linux intermediate files to .gitignore
X11 support

Implement NativeWindow for X11