Browse Source

Initial work to build backend against Qt5

tags/1.9.4
falkTX 11 years ago
parent
commit
d6f58fc898
18 changed files with 145 additions and 37 deletions
  1. +10
    -2
      source/backend/engine/Makefile
  2. +8
    -1
      source/backend/native/Makefile
  3. +8
    -2
      source/backend/native/distrho/DistrhoPluginCarla.cpp
  4. +12
    -4
      source/backend/native/notes/DistrhoUINotes.hpp
  5. +6
    -1
      source/backend/plugin/CarlaPluginGui.hpp
  6. +11
    -3
      source/backend/plugin/Makefile
  7. +7
    -1
      source/backend/plugin/NativePlugin.cpp
  8. +5
    -5
      source/backend/standalone/CarlaStandalone.cpp
  9. +14
    -2
      source/backend/standalone/Makefile
  10. +9
    -4
      source/includes/CarlaDefines.hpp
  11. +7
    -1
      source/libs/distrho/DistrhoUIQt4.hpp
  12. +9
    -4
      source/libs/distrho/src/DistrhoUIInternal.hpp
  13. +8
    -2
      source/widgets/Makefile
  14. +6
    -1
      source/widgets/digitalpeakmeter.hpp
  15. +6
    -1
      source/widgets/ledbutton.hpp
  16. +7
    -1
      source/widgets/paramspinbox.hpp
  17. +6
    -1
      source/widgets/pixmapdial.hpp
  18. +6
    -1
      source/widgets/pixmapkeyboard.hpp

+ 10
- 2
source/backend/engine/Makefile View File

@@ -8,8 +8,16 @@ include ../Makefile.mk


# -------------------------------------------------------------- # --------------------------------------------------------------


BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore QtXml)
LINK_FLAGS += $(shell pkg-config --libs liblo QtCore QtXml)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo)
LINK_FLAGS += $(shell pkg-config --libs liblo)

ifeq ($(HAVE_QT5),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Xml)
LINK_FLAGS += $(shell pkg-config --libs Qt5Core Qt5Xml)
else
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtXml)
LINK_FLAGS += $(shell pkg-config --libs QtCore QtXml)
endif


# -------------------------------------------------------------- # --------------------------------------------------------------




+ 8
- 1
source/backend/native/Makefile View File

@@ -9,8 +9,15 @@ include ../Makefile.mk
# -------------------------------------------------------------- # --------------------------------------------------------------


BUILD_CXX_FLAGS += -I. -I../../libs/distrho -I../../widgets BUILD_CXX_FLAGS += -I. -I../../libs/distrho -I../../widgets
LINK_FLAGS += $(shell pkg-config --libs liblo)

ifeq ($(HAVE_QT5),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Widgets)
LINK_FLAGS += $(shell pkg-config --libs Qt5Core Qt5Widgets)
else
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui) BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui)
LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui liblo)
LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui)
endif


# -------------------------------------------------------------- # --------------------------------------------------------------




+ 8
- 2
source/backend/native/distrho/DistrhoPluginCarla.cpp View File

@@ -19,9 +19,15 @@


#include "DistrhoPluginMain.cpp" #include "DistrhoPluginMain.cpp"


#include <QtCore/Qt>

#if DISTRHO_PLUGIN_HAS_UI #if DISTRHO_PLUGIN_HAS_UI
#include <QtGui/QMainWindow>
#include "DistrhoUIMain.cpp"
# if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QMainWindow>
# else
# include <QtGui/QMainWindow>
# endif
# include "DistrhoUIMain.cpp"
#endif #endif


// ------------------------------------------------- // -------------------------------------------------


+ 12
- 4
source/backend/native/notes/DistrhoUINotes.hpp View File

@@ -21,10 +21,18 @@
#include "DistrhoUIQt4.hpp" #include "DistrhoUIQt4.hpp"
#include "paramspinbox.hpp" #include "paramspinbox.hpp"


#include <QtGui/QGridLayout>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QTextEdit>
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QProgressBar>
# include <QtWidgets/QGridLayout>
# include <QtWidgets/QLabel>
# include <QtWidgets/QPushButton>
# include <QtWidgets/QTextEdit>
#else
# include <QtGui/QGridLayout>
# include <QtGui/QLabel>
# include <QtGui/QPushButton>
# include <QtGui/QTextEdit>
#endif


class QResizeEvent; class QResizeEvent;




+ 6
- 1
source/backend/plugin/CarlaPluginGui.hpp View File

@@ -20,9 +20,14 @@


#include "CarlaPluginInternal.hpp" #include "CarlaPluginInternal.hpp"


#include <QtGui/QMainWindow>
#include <QtGui/QCloseEvent> #include <QtGui/QCloseEvent>


# if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QMainWindow>
#else
# include <QtGui/QMainWindow>
#endif

CARLA_BACKEND_START_NAMESPACE CARLA_BACKEND_START_NAMESPACE


class CarlaPluginGui : public QMainWindow class CarlaPluginGui : public QMainWindow


+ 11
- 3
source/backend/plugin/Makefile View File

@@ -8,8 +8,16 @@ include ../Makefile.mk


# -------------------------------------------------------------- # --------------------------------------------------------------


BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore QtGui QtXml)
LINK_FLAGS += $(shell pkg-config --libs liblo QtCore QtGui QtXml)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo)
LINK_FLAGS += $(shell pkg-config --libs liblo)

ifeq ($(HAVE_QT5),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Xml Qt5Widgets)
LINK_FLAGS += $(shell pkg-config --libs Qt5Core Qt5Xml Qt5Widgets)
else
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui QtXml)
LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui QtXml)
endif


# -------------------------------------------------------------- # --------------------------------------------------------------


@@ -19,7 +27,7 @@ LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
endif endif


ifeq ($(HAVE_LINUXSAMPLER),true) ifeq ($(HAVE_LINUXSAMPLER),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags linuxsampler) -DIS_CPP11=1
BUILD_CXX_FLAGS += $(shell pkg-config --cflags linuxsampler)
LINK_FLAGS += $(shell pkg-config --libs linuxsampler) LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
endif endif




+ 7
- 1
source/backend/plugin/NativePlugin.cpp View File

@@ -21,7 +21,13 @@


#include "CarlaNative.h" #include "CarlaNative.h"


#include <QtGui/QFileDialog>
#include <QtCore/Qt>

# if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QFileDialog>
#else
# include <QtGui/QFileDialog>
#endif


void carla_register_all_plugins() void carla_register_all_plugins()
{ {


+ 5
- 5
source/backend/standalone/CarlaStandalone.cpp View File

@@ -24,12 +24,12 @@
#include "CarlaMIDI.h" #include "CarlaMIDI.h"
#include "CarlaNative.h" #include "CarlaNative.h"


#include <QtGui/QApplication>
#include <QtCore/Qt>


#if 0
extern "C" {
#include "siginfo.c"
}
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QApplication>
#else
# include <QtGui/QApplication>
#endif #endif


using CarlaBackend::CarlaEngine; using CarlaBackend::CarlaEngine;


+ 14
- 2
source/backend/standalone/Makefile View File

@@ -8,12 +8,24 @@ include ../Makefile.mk


# -------------------------------------------------------------- # --------------------------------------------------------------


BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtGui)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo)

ifeq ($(HAVE_QT5),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core)
else
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore)
endif


# -------------------------------------------------------------- # --------------------------------------------------------------
# Common # Common


LINK_FLAGS += $(shell pkg-config --libs liblo QtCore QtGui QtXml)
LINK_FLAGS += $(shell pkg-config --libs liblo)

ifeq ($(HAVE_QT5),true)
LINK_FLAGS += $(shell pkg-config --libs Qt5Core Qt5Xml Qt5Widgets)
else
LINK_FLAGS += $(shell pkg-config --libs QtCore QtXml QtWidgets)
endif


# -------------------------------------------------------------- # --------------------------------------------------------------
# Engine # Engine


+ 9
- 4
source/includes/CarlaDefines.hpp View File

@@ -42,20 +42,25 @@
// Check for C++11 support // Check for C++11 support
#if defined(HAVE_CPP11_SUPPORT) #if defined(HAVE_CPP11_SUPPORT)
# define CARLA_PROPER_CPP11_SUPPORT # define CARLA_PROPER_CPP11_SUPPORT
# define IS_CPP11 1
#elif defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__) #elif defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__)
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
# define CARLA_PROPER_CPP11_SUPPORT # define CARLA_PROPER_CPP11_SUPPORT
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407
# define IS_CPP11 1
# endif
# endif # endif
#endif #endif


#ifdef CARLA_PROPER_CPP11_SUPPORT
# define IS_CPP11 1
#else
# define IS_CPP11 0
#ifndef CARLA_PROPER_CPP11_SUPPORT
# define noexcept # define noexcept
# define nullptr (0) # define nullptr (0)
#endif #endif


#ifndef IS_CPP11
# define IS_CPP11 0
#endif

// Common includes // Common includes
#ifdef CARLA_OS_WIN #ifdef CARLA_OS_WIN
# include <winsock2.h> # include <winsock2.h>


+ 7
- 1
source/libs/distrho/DistrhoUIQt4.hpp View File

@@ -19,7 +19,13 @@


#include "DistrhoUI.hpp" #include "DistrhoUI.hpp"


#include <QtGui/QWidget>
#include <QtCore/Qt>

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QWidget>
#else
# include <QtGui/QWidget>
#endif


START_NAMESPACE_DISTRHO START_NAMESPACE_DISTRHO




+ 9
- 4
source/libs/distrho/src/DistrhoUIInternal.hpp View File

@@ -27,10 +27,15 @@
# include "../DistrhoUIQt4.hpp" # include "../DistrhoUIQt4.hpp"
# include <QtGui/QMouseEvent> # include <QtGui/QMouseEvent>
# include <QtGui/QResizeEvent> # include <QtGui/QResizeEvent>
# include <QtGui/QSizeGrip>
# include <QtGui/QVBoxLayout>
# ifdef Q_WS_X11
# include <QtGui/QX11EmbedWidget>
# if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QSizeGrip>
# include <QtWidgets/QVBoxLayout>
# else
# include <QtGui/QSizeGrip>
# include <QtGui/QVBoxLayout>
# ifdef Q_WS_X11
# include <QtGui/QX11EmbedWidget>
# endif
# endif # endif
#endif #endif




+ 8
- 2
source/widgets/Makefile View File

@@ -9,8 +9,14 @@ include ../Makefile.mk
# -------------------------------------------------------------- # --------------------------------------------------------------


BUILD_CXX_FLAGS += -fvisibility=hidden -fPIC -I. BUILD_CXX_FLAGS += -fvisibility=hidden -fPIC -I.
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore)
LINK_FLAGS += $(shell pkg-config --libs QtCore)

ifeq ($(HAVE_QT5),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Widgets)
LINK_FLAGS += $(shell pkg-config --libs Qt5Core Qt5Widgets)
else
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui)
LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui)
endif


FILES = \ FILES = \
moc_paramspinbox.cpp \ moc_paramspinbox.cpp \


+ 6
- 1
source/widgets/digitalpeakmeter.hpp View File

@@ -19,7 +19,12 @@
#define __DIGITALPEAKMETER_HPP__ #define __DIGITALPEAKMETER_HPP__


#include <QtCore/QTimer> #include <QtCore/QTimer>
#include <QtGui/QWidget>

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QWidget>
#else
# include <QtGui/QWidget>
#endif


class DigitalPeakMeter : public QWidget class DigitalPeakMeter : public QWidget
{ {


+ 6
- 1
source/widgets/ledbutton.hpp View File

@@ -19,7 +19,12 @@
#define __LEDBUTTON_HPP__ #define __LEDBUTTON_HPP__


#include <QtGui/QPixmap> #include <QtGui/QPixmap>
#include <QtGui/QPushButton>

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QPushButton>
#else
# include <QtGui/QPushButton>
#endif


class LEDButton : public QPushButton class LEDButton : public QPushButton
{ {


+ 7
- 1
source/widgets/paramspinbox.hpp View File

@@ -18,7 +18,13 @@
#ifndef __PARAMSPINBOX_HPP__ #ifndef __PARAMSPINBOX_HPP__
#define __PARAMSPINBOX_HPP__ #define __PARAMSPINBOX_HPP__


#include <QtGui/QProgressBar>
#include <QtCore/Qt>

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QProgressBar>
#else
# include <QtGui/QProgressBar>
#endif


class TextCallback class TextCallback
{ {


+ 6
- 1
source/widgets/pixmapdial.hpp View File

@@ -18,9 +18,14 @@
#ifndef __PIXMAPDIAL_HPP__ #ifndef __PIXMAPDIAL_HPP__
#define __PIXMAPDIAL_HPP__ #define __PIXMAPDIAL_HPP__


#include <QtGui/QDial>
#include <QtGui/QPixmap> #include <QtGui/QPixmap>


#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QDial>
#else
# include <QtGui/QDial>
#endif

class PixmapDial : public QDial class PixmapDial : public QDial
{ {
public: public:


+ 6
- 1
source/widgets/pixmapkeyboard.hpp View File

@@ -20,7 +20,12 @@


#include <map> #include <map>
#include <QtGui/QPixmap> #include <QtGui/QPixmap>
#include <QtGui/QWidget>

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QWidget>
#else
# include <QtGui/QWidget>
#endif


class PixmapKeyboard : public QWidget class PixmapKeyboard : public QWidget
{ {


Loading…
Cancel
Save