Commit 615f6215 authored by Jan Möbius's avatar Jan Möbius
Browse files

Support Builds with VS2010 and Qt 4.8

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13286 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 42a9a761
/*===========================================================================*\
* *
* OpenFlipper *
* Copyright (C) 2001-2011 by Computer Graphics Group, RWTH Aachen *
* www.openflipper.org *
* *
*--------------------------------------------------------------------------- *
* This file is part of OpenFlipper. *
* *
* OpenFlipper is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation, either version 3 of *
* the License, or (at your option) any later version with the *
* following exceptions: *
* *
* If other files instantiate templates or use macros *
* or inline functions from this file, or you compile this file and *
* link it with other files to produce an executable, this file does *
* not by itself cause the resulting executable to be covered by the *
* GNU Lesser General Public License. This exception does not however *
* invalidate any other reasons why the executable file might be *
* covered by the GNU Lesser General Public License. *
* *
* OpenFlipper is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU LesserGeneral Public *
* License along with OpenFlipper. If not, *
* see <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision$ *
* $LastChangedBy$ *
* $Date$ *
* *
\*===========================================================================*/
//=============================================================================
//
// Global defines for OpenFlipper
//
//=============================================================================
/**
* \file GlobalDefines.hh
* This File contains the required defines for the OpenFlipper Framework
*/
#ifndef GLOBALDEFINES_HH
#define GLOBALDEFINES_HH
/**
* Get GCC version and convert to MMmm where MM is the major
* and mm the minor release version.
* For example if GCC_VERSION == 4030, we consider gcc-4.3.
*/
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__ * 10)
#if QT_VERSION >= 0x040800
#ifdef WIN32
#pragma message("Detected QT Version 4.8 or higher!")
#pragma message("OpenFlipper has not been tested with this QT Version.")
#else
#warning Detected QT Version 4.8 or higher!
#warning OpenFlipper has not been tested with this QT Version.
#endif
#endif
//== DEEFINES =================================================================
/** Force static casts for Properties in OpenMesh.
* Cross Plugin dynamic casts are not possible due to locally defined symbols
*/
#define OM_FORCE_STATIC_CAST
/** Enable openmp where possible (for gcc version >= 4.3)
*/
#ifndef USE_OPENMP
#if GCC_VERSION >= 4030
#define USE_OPENMP
#endif
#endif
#ifndef DLLEXPORT
#ifdef WIN32
#ifdef PLUGINLIBDLL
#ifdef USEPLUGINLIBDLL
#define DLLEXPORT __declspec(dllimport)
#define DLLEXPORTONLY
#else
#define DLLEXPORT __declspec(dllexport)
#define DLLEXPORTONLY __declspec(dllexport)
#endif
#else
#define DLLEXPORT
#define DLLEXPORTONLY
#endif
#else
#define DLLEXPORT
#define DLLEXPORTONLY
#endif
#endif
//=============================================================================
#endif // GLOBALDEFINES_HH defined
//=============================================================================
/*===========================================================================*\
* *
* OpenFlipper *
* Copyright (C) 2001-2011 by Computer Graphics Group, RWTH Aachen *
* www.openflipper.org *
* *
*--------------------------------------------------------------------------- *
* This file is part of OpenFlipper. *
* *
* OpenFlipper is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation, either version 3 of *
* the License, or (at your option) any later version with the *
* following exceptions: *
* *
* If other files instantiate templates or use macros *
* or inline functions from this file, or you compile this file and *
* link it with other files to produce an executable, this file does *
* not by itself cause the resulting executable to be covered by the *
* GNU Lesser General Public License. This exception does not however *
* invalidate any other reasons why the executable file might be *
* covered by the GNU Lesser General Public License. *
* *
* OpenFlipper is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU LesserGeneral Public *
* License along with OpenFlipper. If not, *
* see <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision$ *
* $LastChangedBy$ *
* $Date$ *
* *
\*===========================================================================*/
//=============================================================================
//
// Global defines for OpenFlipper
//
//=============================================================================
/**
* \file GlobalDefines.hh
* This File contains the required defines for the OpenFlipper Framework
*/
#ifndef GLOBALDEFINES_HH
#define GLOBALDEFINES_HH
/**
* Get GCC version and convert to MMmm where MM is the major
* and mm the minor release version.
* For example if GCC_VERSION == 4030, we consider gcc-4.3.
*/
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__ * 10)
#if QT_VERSION > 0x040800
#ifdef WIN32
#pragma message("Detected QT Version higher than 4.8!")
#pragma message("OpenFlipper has not been tested with this QT Version.")
#else
#warning Detected QT Version higher than 4.8!
#warning OpenFlipper has not been tested with this QT Version.
#endif
#endif
//== DEEFINES =================================================================
/** Force static casts for Properties in OpenMesh.
* Cross Plugin dynamic casts are not possible due to locally defined symbols
*/
#define OM_FORCE_STATIC_CAST
/** Enable openmp where possible (for gcc version >= 4.3)
*/
#ifndef USE_OPENMP
#if GCC_VERSION >= 4030
#define USE_OPENMP
#endif
#endif
#ifndef DLLEXPORT
#ifdef WIN32
#ifdef PLUGINLIBDLL
#ifdef USEPLUGINLIBDLL
#define DLLEXPORT __declspec(dllimport)
#define DLLEXPORTONLY
#else
#define DLLEXPORT __declspec(dllexport)
#define DLLEXPORTONLY __declspec(dllexport)
#endif
#else
#define DLLEXPORT
#define DLLEXPORTONLY
#endif
#else
#define DLLEXPORT
#define DLLEXPORTONLY
#endif
#endif
//=============================================================================
#endif // GLOBALDEFINES_HH defined
//=============================================================================
......@@ -975,9 +975,6 @@ public:
private:
void writeImageQPixmap(QPixmap* _pixmap, const QString _name) const;
void writeImageQImage(QImage* _image, const QString _name) const;
// Store pointers to QFuture and QFutureWatcher
std::map<QFutureWatcher<void>*,QFuture<void>*> watcher_garbage_;
......
......@@ -770,10 +770,16 @@ void CoreWidget::applicationSnapshotName(QString _name) {
snapshotCounter_ = 0;
}
void writeImageQPixmap(QPixmap* _pixmap, const QString _name) {
_pixmap->save(_name);
delete _pixmap;
}
void CoreWidget::writeImageAsynchronously(QPixmap* _pixmap, const QString _name) {
QFuture<void>* future = new QFuture<void>();
*future = QtConcurrent::run(this, &CoreWidget::writeImageQPixmap, _pixmap, _name);
*future = QtConcurrent::run(writeImageQPixmap, _pixmap, _name);
QFutureWatcher<void>* watcher = new QFutureWatcher<void>();
watcher->setFuture(*future);
......@@ -782,16 +788,18 @@ void CoreWidget::writeImageAsynchronously(QPixmap* _pixmap, const QString _name)
connect(watcher, SIGNAL(finished()), this, SLOT(delete_garbage()));
}
void CoreWidget::writeImageQPixmap(QPixmap* _pixmap, const QString _name) const {
_pixmap->save(_name);
delete _pixmap;
void writeImageQImage(QImage* _image, const QString _name) {
_image->save(_name);
delete _image;
}
void CoreWidget::writeImageAsynchronously(QImage* _image, const QString _name) {
QFuture<void>* future = new QFuture<void>();
*future = QtConcurrent::run(this, &CoreWidget::writeImageQImage, _image, _name);
*future = QtConcurrent::run(writeImageQImage, _image, _name);
QFutureWatcher<void>* watcher = new QFutureWatcher<void>();
watcher->setFuture(*future);
......@@ -800,11 +808,7 @@ void CoreWidget::writeImageAsynchronously(QImage* _image, const QString _name) {
connect(watcher, SIGNAL(finished()), this, SLOT(delete_garbage()));
}
void CoreWidget::writeImageQImage(QImage* _image, const QString _name) const {
_image->save(_name);
delete _image;
}
void CoreWidget::delete_garbage() {
......
......@@ -56,18 +56,18 @@
#include <bitset>
const std::bitset<4> HIERARCHY (static_cast<unsigned long>(0));
const std::bitset<4> ROOT_DEFINITION (static_cast<unsigned long>(1));
const std::bitset<4> OPENED_BRACKET (static_cast<unsigned long>(2));
const std::bitset<4> CLOSED_BRACKET (static_cast<unsigned long>(3));
const std::bitset<4> OFFSET (static_cast<unsigned long>(4));
const std::bitset<4> CHANNELS (static_cast<unsigned long>(5));
const std::bitset<4> JOINT (static_cast<unsigned long>(6));
const std::bitset<4> ENDSITE (static_cast<unsigned long>(7));
const std::bitset<4> MOTION (static_cast<unsigned long>(8));
const std::bitset<4> FRAMES (static_cast<unsigned long>(9));
const std::bitset<4> FRAME_TIME (static_cast<unsigned long>(10));
const std::bitset<4> CHANNEL_DATA (static_cast<unsigned long>(11));
const std::bitset<4> HIERARCHY (static_cast<int>(0));
const std::bitset<4> ROOT_DEFINITION (static_cast<int>(1));
const std::bitset<4> OPENED_BRACKET (static_cast<int>(2));
const std::bitset<4> CLOSED_BRACKET (static_cast<int>(3));
const std::bitset<4> OFFSET (static_cast<int>(4));
const std::bitset<4> CHANNELS (static_cast<int>(5));
const std::bitset<4> JOINT (static_cast<int>(6));
const std::bitset<4> ENDSITE (static_cast<int>(7));
const std::bitset<4> MOTION (static_cast<int>(8));
const std::bitset<4> FRAMES (static_cast<int>(9));
const std::bitset<4> FRAME_TIME (static_cast<int>(10));
const std::bitset<4> CHANNEL_DATA (static_cast<int>(11));
//-----------------------------------------------------------------------------
//data structures used for parsing
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment