diff options
author | David Robillard <d@drobilla.net> | 2015-09-12 16:03:03 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-09-12 16:03:03 +0000 |
commit | 98703d8c9944016b90f673cf00521125ada5a4c8 (patch) | |
tree | d8ccc7382f982d6b062a457c4ca6dd03f2befb2b /src | |
parent | ef6f6a6718b7b1e9a326b75ad6e4069274a4314f (diff) | |
download | jalv-98703d8c9944016b90f673cf00521125ada5a4c8.tar.gz jalv-98703d8c9944016b90f673cf00521125ada5a4c8.tar.bz2 jalv-98703d8c9944016b90f673cf00521125ada5a4c8.zip |
Add Qt5 version.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5726 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/jalv_qt.cpp (renamed from src/jalv_qt4.cpp) | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/src/jalv_qt4.cpp b/src/jalv_qt.cpp index 38dc3cf..88a024d 100644 --- a/src/jalv_qt4.cpp +++ b/src/jalv_qt.cpp @@ -22,7 +22,26 @@ #include "lv2/lv2plug.in/ns/ext/patch/patch.h" #include "lv2/lv2plug.in/ns/ext/port-props/port-props.h" -#include <QtGui> +#include <qglobal.h> + +#if QT_VERSION >= 0x050000 +# include <QAction> +# include <QApplication> +# include <QDial> +# include <QGroupBox> +# include <QLabel> +# include <QLayout> +# include <QMainWindow> +# include <QMenu> +# include <QMenuBar> +# include <QScrollArea> +# include <QStyle> +# include <QTimer> +# include <QWidget> +# include <QWindow> +#else +# include <QtGui> +#endif #define CONTROL_WIDTH 150 #define DIAL_STEPS 10000 @@ -296,7 +315,11 @@ private: std::map<float, const char*> scaleMap; }; -#include "jalv_qt4_meta.hpp" +#if QT_VERSION >= 0x050000 +# include "jalv_qt5_meta.hpp" +#else +# include "jalv_qt4_meta.hpp" +#endif extern "C" { @@ -312,7 +335,11 @@ jalv_init(int* argc, char*** argv, JalvOptions* opts) const char* jalv_native_ui_type(Jalv* jalv) { +#if QT_VERSION >= 0x050000 + return "http://lv2plug.in/ns/extensions/ui#Qt5UI"; +#else return "http://lv2plug.in/ns/extensions/ui#Qt4UI"; +#endif } int @@ -658,7 +685,7 @@ jalv_open_ui(Jalv* jalv) quit_action->setShortcuts(QKeySequence::Quit); quit_action->setStatusTip("Quit Jalv"); file_menu->addAction(quit_action); - jalv->has_ui = TRUE; + jalv->has_ui = true; jalv_load_presets(jalv, add_preset_to_menu, presets_menu); |