Skip to content
Snippets Groups Projects
Commit 513d91f4 authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

set up new project - cumbia 2.1 cuuimake free

parent 1f07ab8b
No related branches found
No related tags found
No related merge requests found
......@@ -31,23 +31,11 @@ HEADERS += \
src/gofbpm.h \
src/gofbpmplot.h
# cuuimake runs uic
# FORMS = src/bpm.ui
#
FORMS = src/gofbpm.ui
# but we need to include ui_xxxx.h file amongst the headers
# in order to be recompiled when it changes
#
HEADERS += \
ui_bpm.h
# - ui: where to find cuuimake ui_*.h files
# since FORMS is not used
# - src: where to find headers included by
# ui_*.h (e.g. for custom widget promoted
# from the Qt designer)
#
INCLUDEPATH += ui src
INCLUDEPATH += src
TARGET = gofbpm-gui
!wasm-emscripten {
......@@ -82,13 +70,4 @@ TARGET = gofbpm-gui
# unix:INCLUDEPATH += . ../../src
message("-")
message("NOTE")
message("You need to run cuuimake in order to build the project")
message("-")
message(" cuuimake --show-config to see cuuimake configuration options")
message(" cuuimake --configure to configure cuuimake")
message(" cuuimake -jN to execute cuuimake and then make -jN")
message(" cuuimake --make to run cuuimake and then make")
message("-")
......@@ -48,18 +48,14 @@
#include <qulabelbase.h>
#include <quplotoptions.h>
#include <quwatcher.h>
#include <quapplication.h>
gofbpm::gofbpm(CumbiaPool *cumbia_pool, QWidget *parent) : QWidget(parent)
{
gofbpm::gofbpm(QWidget *parent) : QWidget(parent) {
// cumbia
CuModuleLoader mloader(cumbia_pool, &m_ctrl_factory_pool, &m_log_impl);
cu_pool = cumbia_pool;
QuApplication *a = static_cast<QuApplication *>(QCoreApplication::instance());
CuModuleLoader mloader(a->cumbiaPool(), a->fpool(), &m_log_impl);
ui = new Ui::bpm;
ui->setupUi(this, cu_pool, m_ctrl_factory_pool);
// provide access to the engine in case of runtime swap
new CuEngineAccessor(this, &cu_pool, &m_ctrl_factory_pool);
ui->setupUi(this);
// mloader.modules() to get the list of loaded modules
// cumbia
......
......@@ -29,7 +29,7 @@ class CumbiaPool;
class QuLabelBase;
// cumbia
#include "ui_liberabpm.h"
#include "ui_gofbpm.h"
class gofbpm: public QWidget
......@@ -39,7 +39,7 @@ class gofbpm: public QWidget
public:
enum Pages { Slow = 0, Fast, FastFFT, Event, EventFFT, RAW };
gofbpm(CumbiaPool *cu_p, QWidget * =NULL);
gofbpm(QWidget * =NULL);
~gofbpm(){};
protected:
......
File moved
......@@ -19,15 +19,16 @@
***************************************************************************/
#include <cuengineaccessor.h>
#include <cucontrolsfactorypool.h>
#include <cumbiapool.h>
#include <cuthreadfactoryimpl.h>
#include <qthreadseventbridgefactory.h>
#include <quapplication.h>
#include "gofbpm.h"
int main( int argc, char ** argv ) {
CumbiaPool *p = new CumbiaPool();
CuControlsFactoryPool fpool;
QuApplication qu_app( argc, argv, p, &fpool);
QString version("2.0");
QuApplication qu_app( argc, argv );
qu_app.setOrganizationName("Elettra");
qu_app.setApplicationName("LiberaBpm");
qu_app.setApplicationVersion(version);
......@@ -42,21 +43,19 @@ int main( int argc, char ** argv ) {
exit(1);
}
CumbiaPool *cu_p = new CumbiaPool();
gofbpm *w = new gofbpm(cu_p, 0);
CuEngineAccessor *a = new CuEngineAccessor(&qu_app, &p, &fpool);
gofbpm *w = new gofbpm(nullptr);
w->show();
int ret = qu_app.exec();
// delete resources and return
// make sure to be operating on a valid cu_p in case of engine swap at runtime
CuEngineAccessor *c = w->findChild<CuEngineAccessor *>();
if(c)
cu_p = c->cu_pool();
// make sure to be operating on a valid cumbia pool in case of engine swap at runtime
p = a->cu_pool();
delete w;
for(std::string n : cu_p->names())
if(cu_p->get(n))
delete cu_p->get(n);
for(std::string n : p->names())
if(p->get(n))
delete p->get(n);
return ret;
}
......
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