Browse Source

Tweak frontend cpp code to make cmake autouic happy

Signed-off-by: falkTX <falktx@falktx.com>
pull/1775/head
falkTX 1 year ago
parent
commit
73642f9f6b
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
10 changed files with 101 additions and 80 deletions
  1. +76
    -0
      source/frontend/CarlaFrontend.h
  2. +12
    -6
      source/frontend/Makefile
  3. +3
    -2
      source/frontend/dialogs/aboutjucedialog.cpp
  4. +0
    -8
      source/frontend/dialogs/aboutjucedialog.hpp
  5. +4
    -3
      source/frontend/dialogs/jackappdialog.cpp
  6. +0
    -14
      source/frontend/dialogs/jackappdialog.hpp
  7. +3
    -2
      source/frontend/pluginlist/pluginlistdialog.cpp
  8. +1
    -31
      source/frontend/pluginlist/pluginlistdialog.hpp
  9. +2
    -1
      source/frontend/pluginlist/pluginlistrefreshdialog.cpp
  10. +0
    -13
      source/frontend/pluginlist/pluginlistrefreshdialog.hpp

+ 76
- 0
source/frontend/CarlaFrontend.h View File

@@ -0,0 +1,76 @@
/*
* Carla Plugin Host
* Copyright (C) 2011-2023 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or any later version.
*
* This program 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 General Public License for more details.
*
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/

#pragma once

#include "CarlaDefines.h"

#ifdef __cplusplus
extern "C" {
#endif

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

typedef struct {
const char* command;
const char* name;
const char* labelSetup;
} JackAppDialogResults;

typedef struct {
uint API;
uint build;
uint type;
uint hints;
const char* category;
const char* filename;
const char* name;
const char* label;
const char* maker;
uint64_t uniqueId;
uint audioIns;
uint audioOuts;
uint cvIns;
uint cvOuts;
uint midiIns;
uint midiOuts;
uint parametersIns;
uint parametersOuts;
} PluginListDialogResults;

struct PluginListRefreshDialogResults {
char todo;
};

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

CARLA_API
void carla_frontend_createAndExecAboutJuceDialog(void* parent);

CARLA_API JackAppDialogResults* carla_frontend_createAndExecJackAppDialog(void* parent, const char* projectFilename);

CARLA_API
PluginListDialogResults* carla_frontend_createAndExecPluginListDialog(void* parent/*, const HostSettings& hostSettings*/);

CARLA_API
PluginListRefreshDialogResults* carla_frontend_createAndExecPluginListRefreshDialog(void* parent, bool useSystemIcons);

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

#ifdef __cplusplus
}
#endif

+ 12
- 6
source/frontend/Makefile View File

@@ -20,7 +20,7 @@ endif

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

BUILD_CXX_FLAGS += -Iutils
BUILD_CXX_FLAGS += -I. -Iutils

BUILD_CXX_FLAGS += -I../backend
BUILD_CXX_FLAGS += -I../includes
@@ -132,11 +132,14 @@ endif
# ---------------------------------------------------------------------------------------------------------------------
# UI code

UI_FILES = $(wildcard dialogs/*.ui)
UI_FILES += $(wildcard pluginlist/*.ui)
DIALOG_UI_FILES = $(wildcard dialogs/*.ui)
PLUGINLIST_UI_FILES = $(wildcard pluginlist/*.ui)

UIs = $(UI_FILES:%.ui=%_ui.hpp)
UIs += $(UI_FILES:%.ui=%_ui.py)
UIs = $(DIALOG_UI_FILES:dialogs/%.ui=dialogs/ui_%.h)
UIs += $(PLUGINLIST_UI_FILES:pluginlist/%.ui=pluginlist/ui_%.h)

UIs += $(DIALOG_UI_FILES:%.ui=%_ui.py)
UIs += $(PLUGINLIST_UI_FILES:%.ui=%_ui.py)

# old stuff, not yet converted
UIs += \
@@ -162,7 +165,10 @@ all: $(BINDIR)/libcarla_frontend$(LIB_EXT) $(QMs) $(RES) $(UIs)

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

%_ui.hpp: %.ui
dialogs/ui_%.h: dialogs/%.ui
$(UIC_QT5) $< -o $@

pluginlist/ui_%.h: pluginlist/%.ui
$(UIC_QT5) $< -o $@

%_ui.py: %.ui


+ 3
- 2
source/frontend/dialogs/aboutjucedialog.cpp View File

@@ -1,6 +1,6 @@
/*
* Carla plugin host
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2023 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -27,7 +27,7 @@
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif

#include "aboutjucedialog_ui.hpp"
#include "ui_aboutjucedialog.h"

#ifdef __clang__
# pragma clang diagnostic pop
@@ -35,6 +35,7 @@
# pragma GCC diagnostic pop
#endif

#include "CarlaFrontend.h"
#include "CarlaUtils.h"

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


+ 0
- 8
source/frontend/dialogs/aboutjucedialog.hpp View File

@@ -53,11 +53,3 @@ public:
};

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

extern "C" {

CARLA_API void carla_frontend_createAndExecAboutJuceDialog(void* parent);

}

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

+ 4
- 3
source/frontend/dialogs/jackappdialog.cpp View File

@@ -1,6 +1,6 @@
/*
* Carla plugin host
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2023 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -27,7 +27,7 @@
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif

#include "jackappdialog_ui.hpp"
#include "ui_jackappdialog.h"
#include <QtCore/QFileInfo>
#include <QtCore/QVector>
#include <QtWidgets/QPushButton>
@@ -40,6 +40,7 @@

#include "qsafesettings.hpp"

#include "CarlaFrontend.h"
#include "CarlaLibJackHints.h"
#include "CarlaString.hpp"

@@ -93,7 +94,7 @@ JackAppDialog::JackAppDialog(QWidget* const parent, const char* const projectFil
// -------------------------------------------------------------------------------------------------------------
// Set-up connections

connect(this, &QDialog::finished,
connect(this, &QDialog::finished,
this, &JackAppDialog::slot_saveSettings);
connect(self.ui.cb_session_mgr, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &JackAppDialog::slot_sessionManagerChanged);


+ 0
- 14
source/frontend/dialogs/jackappdialog.hpp View File

@@ -78,17 +78,3 @@ private slots:
};

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

extern "C" {

struct JackAppDialogResults {
const char* command;
const char* name;
const char* labelSetup;
};

CARLA_API JackAppDialogResults* carla_frontend_createAndExecJackAppDialog(void* parent, const char* projectFilename);

}

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

+ 3
- 2
source/frontend/pluginlist/pluginlistdialog.cpp View File

@@ -1,6 +1,6 @@
/*
* Carla plugin host
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2023 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -27,7 +27,7 @@
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif

#include "pluginlistdialog_ui.hpp"
#include "ui_pluginlistdialog.h"
#include <QtCore/QList>

#ifdef __clang__
@@ -40,6 +40,7 @@
#include "qsafesettings.hpp"

#include "CarlaBackendUtils.hpp"
#include "CarlaFrontend.h"
#include "CarlaUtils.h"

#include "CarlaString.hpp"


+ 1
- 31
source/frontend/pluginlist/pluginlistdialog.hpp View File

@@ -1,6 +1,6 @@
/*
* Carla plugin host
* Copyright (C) 2011-2022 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2023 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -112,33 +112,3 @@ private slots:
};

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

extern "C" {

struct PluginListDialogResults {
uint API;
uint build;
uint type;
uint hints;
const char* category;
const char* filename;
const char* name;
const char* label;
const char* maker;
uint64_t uniqueId;
uint audioIns;
uint audioOuts;
uint cvIns;
uint cvOuts;
uint midiIns;
uint midiOuts;
uint parametersIns;
uint parametersOuts;
};

CARLA_API
PluginListDialogResults* carla_frontend_createAndExecPluginListDialog(void* parent/*, const HostSettings& hostSettings*/);

}

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

+ 2
- 1
source/frontend/pluginlist/pluginlistrefreshdialog.cpp View File

@@ -27,7 +27,7 @@
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif

#include "pluginlistrefreshdialog_ui.hpp"
#include "ui_pluginlistrefreshdialog.h"
#include <QtCore/QFileInfo>
#include <QtWidgets/QPushButton>

@@ -39,6 +39,7 @@

#include "qsafesettings.hpp"

#include "CarlaFrontend.h"
#include "CarlaUtils.h"

#include <cstring>


+ 0
- 13
source/frontend/pluginlist/pluginlistrefreshdialog.hpp View File

@@ -79,16 +79,3 @@ private slots:
};

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

extern "C" {

struct PluginListRefreshDialogResults {
char todo;
};

CARLA_API
PluginListRefreshDialogResults* carla_frontend_createAndExecPluginListRefreshDialog(void* parent, bool useSystemIcons);

}

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

Loading…
Cancel
Save