Add full support to Qt4 in both CMakeLists and source code! config.h is now used
This commit is contained in:
1 parent
f00c91bf43
commit
9b980b1eaf
13 files changed
+58
-39
No files matched your search
+15
-4
@@ -83,9 +83,11 @@ ADD_OPTION(USE_OPENCV "Add OpenCV support" OFF )
|
||||
######################################################################################
|
||||
# Dependencies
|
||||
######################################################################################
|
||||
IF(HAVE_OpenCV)
|
||||
FIND_PACKAGE( OpenCV REQUIRED )
|
||||
#CMAKEDEFINE HAVE_MALLOC_H 1
|
||||
IF( USE_OPENCV )
|
||||
FIND_PACKAGE( OpenCV QUIET )
|
||||
IF( NOT OpenCV_FOUND)
|
||||
SET(USE_OPENCV FALSE)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
######################################################################################
|
||||
@@ -98,6 +100,10 @@ IF( USE_QT4 )
|
||||
ENDIF()
|
||||
INCLUDE( ${QT_USE_FILE} )
|
||||
ADD_DEFINITIONS( ${QT_DEFINITIONS} )
|
||||
|
||||
QT4_WRAP_UI( FORMS_HEADERS_FILES ${FORMS_FILES} )
|
||||
QT4_ADD_RESOURCES( RESOURCES_RCC_FILES ${RESOURCES_FILES} )
|
||||
|
||||
SET( CURR_QT_LINKER_LIBS ${QT_LIBRARIES} )
|
||||
ENDIF()
|
||||
|
||||
@@ -119,7 +125,6 @@ IF( NOT USE_QT4 )
|
||||
SET( CURR_QT_MODULES Core Gui Widgets )
|
||||
ENDIF()
|
||||
|
||||
|
||||
######################################################################################
|
||||
# External Libs
|
||||
######################################################################################
|
||||
@@ -130,6 +135,12 @@ ADD_LIBRARY( Scode ${EXTERNAL_SRC}/scode/viewarea.cpp ${EXTERNAL_SRC}/scode/grid
|
||||
|
||||
SET( LIST_EXTERNAL_LIBS Scode )
|
||||
|
||||
######################################################################################
|
||||
# Create config.h
|
||||
######################################################################################
|
||||
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h )
|
||||
|
||||
|
||||
######################################################################################
|
||||
# Target App
|
||||
######################################################################################
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
* \brief Dialog box to set the sequence resolution
|
||||
*/
|
||||
|
||||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
#include "ConfigureFormatDialog.h"
|
||||
#include "InputStream.h"
|
||||
|
||||
|
||||
@@ -24,15 +24,17 @@
|
||||
#ifndef __CONFIGURERESOLUTIONDIALOG_H__
|
||||
#define __CONFIGURERESOLUTIONDIALOG_H__
|
||||
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if( QT_VERSION_PLAYUVER == 5 )
|
||||
#include <QtWidgets>
|
||||
#elif( QT_VERSION_PLAYUVER == 4 )
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#include <QtCore>
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QComboBox>
|
||||
#include <QSpinBox>
|
||||
|
||||
|
||||
#include "TypeDef.h"
|
||||
|
||||
class QPixmap;
|
||||
|
||||
@@ -21,12 +21,6 @@
|
||||
* \brief Sub windows handling
|
||||
*/
|
||||
|
||||
#include <QtWidgets>
|
||||
#include <QWidget>
|
||||
#include <QPixmap>
|
||||
#include <QBitmap>
|
||||
#include <QColor>
|
||||
|
||||
#include "ConfigureFormatDialog.h"
|
||||
#include "ImageInterface.h"
|
||||
#include "viewarea.h"
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
#ifndef __IMAGEINTERFACE_H__
|
||||
#define __IMAGEINTERFACE_H__
|
||||
|
||||
#include <QMdiSubWindow>
|
||||
#include <QScrollArea>
|
||||
#include <QLabel>
|
||||
#include <QMdiArea>
|
||||
#include <QWidget>
|
||||
//#include <QPixmap>
|
||||
//#include <QBitmap>
|
||||
//#include <QColor>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if( QT_VERSION_PLAYUVER == 5 )
|
||||
#include <QtWidgets>
|
||||
#elif( QT_VERSION_PLAYUVER == 4 )
|
||||
#include <QtGui>
|
||||
#endif
|
||||
|
||||
|
||||
#include "TypeDef.h"
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtDebug>
|
||||
|
||||
#include "InputStream.h"
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef __INPUTSTREAM_H__
|
||||
#define __INPUTSTREAM_H__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef __LIBMEMALLOC_H__
|
||||
#define __LIBMEMALLOC_H__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "TypeDef.h"
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef __TYPEDEF_H__
|
||||
#define __TYPEDEF_H__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
// ====================================================================================================================
|
||||
// Basic type redefinition
|
||||
// ====================================================================================================================
|
||||
@@ -91,4 +93,14 @@ typedef UChar Pel; ///< 8-bit pixel type
|
||||
#define xFree( ptr ) free ( ptr )
|
||||
#endif
|
||||
|
||||
|
||||
// ====================================================================================================================
|
||||
// Qt functions
|
||||
// ====================================================================================================================
|
||||
|
||||
#if( QT_VERSION_PLAYUVER == 4 )
|
||||
#define QStringLiteral QString::fromUtf8
|
||||
#endif
|
||||
|
||||
|
||||
#endif // __TYPEDEF_H__
|
||||
@@ -21,8 +21,11 @@
|
||||
* \brief Main definition of the plaYUVerApp app
|
||||
*/
|
||||
|
||||
#if( QT_VERSION_PLAYUVER == 5 )
|
||||
#include <QtWidgets>
|
||||
#include <QMdiArea>
|
||||
#elif( QT_VERSION_PLAYUVER == 4 )
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#include <QtDebug>
|
||||
|
||||
#include "TypeDef.h"
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef __PLAYUVERAPP_H__
|
||||
#define __PLAYUVERAPP_H__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include "TypeDef.h"
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
* \brief plaYUVer app settings
|
||||
*/
|
||||
|
||||
#include <QDir>
|
||||
|
||||
#include "plaYUVerSettings.h"
|
||||
|
||||
namespace plaYUVer
|
||||
|
||||
@@ -24,14 +24,10 @@
|
||||
#ifndef __PLAYUVERSETTINGS_H__
|
||||
#define __PLAYUVERSETTINGS_H__
|
||||
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
#include <QSize>
|
||||
#include <QPoint>
|
||||
#include <QColor>
|
||||
#include <QString>
|
||||
#include "config.h"
|
||||
|
||||
#include <QtCore>
|
||||
|
||||
#include <QBitArray>
|
||||
#include "gridmanager.h"
|
||||
|
||||
namespace plaYUVer
|
||||
|
||||
Reference in new issue
Block a user