Fixes needed for RHEL compatibility

Outline of changes:
  * Downgraded CMake requirement to Cmake-2.6
  * Changed cmake if-statements from '''if(${var})''' to '''if(var)'''
  * Moved a function defined enum outside to an anonymous namespace (gcc-4.4 doesn't allow a std::vector of local types)
  * Properly called constructor of templated superclass
  * Used Qt::MidButton and not Qt::MiddleButton as the latter isn't available in Qt-4.6

Tested and works on:
   * Linux Mint (Ubuntu)
   * Visual Studio 2010
   * Visual Studio 2008
   * CentOS 6.4