Introduction
============

QwtPolar uses qmake to build all its components and examples.
qmake is part of any Qt distribution.

qmake reads project files, that contain the options and rules how to
build a certain project. A project file ends with the suffix "*.pro".
Files that end with the suffix "*.pri" are included by the project
files and contain definitions, that are common for several project files.

qwtpolarbuild.pri and qwtpolarconfig.pri are read by all project files 
of the QwtPolar package. So the first step is to edit the *.pri files to adjust
them to your needs. 

QwtPolar 1.1 needs a proper installation of Qwt >= 6.1. For building 
QwtPolar you need to configure qmake to find the installed Qwt features
file qwt.prf. Read "http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html#adding-new-configuration-features".

The subdirs template of qmake is known to be buggy when using spaces
in path names. So better don't build QwtPolar below a path name with spaces.
( Otherwise you might have to run qmake in all subdirs manually ).


Documentation
==========================

QwtPolar includes a class documentation, that is available in various formats:

- Html files
- PDF document
- Qt Compressed Help (*.qch ) for the Qt assistant or creator.
  You can load it "Edit Preferences" -> "Documentation" -> "Add..."
- Man pages ( UNIX only )


Building QwtPolar
==========================

The easiest way to build QwtPolar is from the command line - but when you 
insist on using an IDE don't forget the "make install" step.

A) Unix
--------

qmake qwtpolar.pro
make
make install

If you have installed a shared library it's path has to be known to
the run-time linker of your operating system. On Linux systems read
"man ldconfig" ( or google for it ). Another option is to use
the LD_LIBRARY_PATH (on some systems LIBPATH is used instead, on MacOSX
it is called DYLD_LIBRARY_PATH) environment variable.

If you only want to check the QwtPolar examples without installing something,
you can set the LD_LIBRARY_PATH to the lib directory
of your local build.

If you didn't enable autobuilding of the examples in qwtconfig.pri
you have to build the examples this way:

cd examples
qmake
make

B) Win32/MSVC
--------

Check that your Qt and Qwt versions have been built with MSVC - not with MinGW !

Please read the qmake documentation how to convert
your *.pro files into your development environment.

F.e MSVC with nmake:
qmake qwtpolar.pro
nmake
nmake install

If you didn't enable autobuilding of the examples in qwtpolarconfig.pri
you have to build the examples this way:

cd examples
qmake examples.pro
nmake

Windows doesn't like mixing of debug and release binaries. Most
of the problems with using the QwtPolar designer plugin are because
of trying to load a QwtPolar debug library into a designer release
executable.

It's not possible to load a plugin, that has been built with MinGW
into a Qt Designer/Creator, that has been built with MSVC ( and v.v ).
This is a common reason for problems, when working with prebuild
binaries of the Qt Creator.

C) Win32/MinGW
--------

Check that your Qt and Qwt version have been built with MinGW - not with MSVC !

Start a Shell, where Qt4 is initialized. ( F.e. with
"Programs->Qt by Trolltech ...->Qt 4.x.x Command Prompt" ).
Check if you can execute "make" or something like "mingw32-make".

qmake qwtpolar.pro
make
make install

If you didn't enable autobuilding of the examples in qwtpolarconfig.pri
you have to build the examples this way:

cd examples
qmake examples.pro
make

Windows doesn't like mixing of debug and release binaries. Most
of the problems with using the QwtPolar designer plugin are because
of trying to load a QwtPolar debug library into a designer release
executable.

Don't forget to tell qmake where to find qwt.prf and qwtpolar.prf:
qmake -set QMAKEFEATURES ...


D) MacOSX
--------

Well, the Mac is only another Unix system. So read the instructions in A).

In the recent Qt4 releases the default target of qmake is to generate
XCode project files instead of makefiles. So you might need to do the
following:

qmake -spec macx-g++ qwtpolar.pro
...

E) Qt Embedded
--------

I only tested QwtPolar with Qt Embedded in qvfb (Virtual Framebuffer Devivce)
Emulator on my Linux box. To build QwtPolar for the emulator was as simple as
for a regular Unix build.

F) Symbian
--------

I never tried this platform myself.


Using QwtPolar
==========================

For building a QwtPolar application with qmake use the QwtPolar configuration 
features file, that has been installed by "make install". When qmake is able to find
it ( http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html#adding-new-configuration-features )
you can simply add "CONFIG += qwt qwtpolar" to your application project file.

Good luck !
