Commit 933cc98e authored by Claudio Scafuri's avatar Claudio Scafuri 💬
Browse files

first release

parent 8398535c
.pydevproject
.project
.cproject
.settings
Makefile
moc
obj
bin
objects
core*
*~
*.pyc
*.so
*.so*
.pylintrc
.metadata
.idea
.cvsignore
.nse_depinfo
software
oldsrc
qrc_*.cpp
ui/ui*.h
src/ui_*.h
*.config
*.creator
*.files
*.includes
.qmake.stash
*.pro.user
release 1.0.0 : first release of the project "ngps".
isEmpty(CUMBIA_ROOT) {
CUMBIA_ROOT=/usr/local/cumbia-libs
}
include($${CUMBIA_ROOT}/include/quapps/quapps.pri)
# CONFIG += debug | release
DEFINES += QT_NO_DEBUG_OUTPUT
# RESOURCES +=
SOURCES += src/main.cpp \
src/ngps.cpp
HEADERS += src/ngps.h
# cuuimake runs uic
# FORMS = src/ngps.ui
# but we need to include ui_xxxx.h file amongst the headers
# in order to be recompiled when it changes
#
HEADERS += \
ui/ui_ngps.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
TARGET = ngps-gui
!wasm-emscripten {
TARGET = bin/$${TARGET}
} else {
TARGET = wasm/$${TARGET}
}
QMAKE_POST_LINK = $(STRIP) $(TARGET)
#
# make install works if INSTALL_DIR is given to qmake
#
!isEmpty(INSTALL_DIR) {
wasm-emscripten {
inst.files = wasm/*
} else {
inst.files = $${TARGET}
}
inst.path = $${INSTALL_DIR}
INSTALLS += inst
message("-")
message("INSTALLATION")
message(" execute `make install` to install 'ngps' under $${INSTALL_DIR} ")
message("-")
} else {
message("-")
message("INSTALLATION")
message(" call qmake INSTALL_DIR=/usr/local/bin to install ngps later with `make install` ")
message("-")
}
# unix:LIBS += -L. -lmylib
# 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("-")
#include <quapplication.h>
#include "ngps.h"
// cumbia
#include <cumbiapool.h>
#include <cuthreadfactoryimpl.h>
#include <qthreadseventbridgefactory.h>
// cumbia
#define VERSION "1.0"
int main(int argc, char *argv[])
{
QuApplication qu_app( argc, argv );
qu_app.setOrganizationName("Elettra");
qu_app.setApplicationName("Ngps");
QString version(VERSION);
qu_app.setApplicationVersion(version);
qu_app.setProperty("author", "Claudio Scafuri");
qu_app.setProperty("mail", "claudio.scafuri@elettra.eu");
qu_app.setProperty("phone", "8009");
qu_app.setProperty("office", "T2 ");
qu_app.setProperty("hwReferent", "$HW_REFERENT$"); /* name of the referent that provides the device server */
CumbiaPool *cu_p = new CumbiaPool();
Ngps *w = new Ngps(cu_p, NULL);
w->show();
// exec application loop
int ret = qu_app.exec();
// delete resources and return
delete w;
for(std::string n : cu_p->names())
if(cu_p->get(n))
delete cu_p->get(n);
return ret;
}
#include "ngps.h"
#include "ui_ngps.h"
// cumbia
#include <cumbiapool.h>
#include <cuserviceprovider.h>
#include <cumacros.h>
#include <quapps.h>
// cumbia
Ngps::Ngps(CumbiaPool *cumbia_pool, QWidget *parent) :
QWidget(parent)
{
// cumbia
CuModuleLoader mloader(cumbia_pool, &m_ctrl_factory_pool, &m_log_impl);
cu_pool = cumbia_pool;
ui = new Ui::Ngps;
ui->setupUi(this, cu_pool, m_ctrl_factory_pool);
// mloader.modules() to get the list of loaded modules
// cumbia
}
Ngps::~Ngps()
{
delete ui;
}
#ifndef Ngps_H
#define Ngps_H
#include <QWidget>
// cumbia
#include <qulogimpl.h>
#include <cucontrolsfactorypool.h>
class CumbiaPool;
// cumbia
namespace Ui {
class Ngps;
}
class Ngps : public QWidget
{
Q_OBJECT
public:
explicit Ngps(CumbiaPool *cu_p, QWidget *parent = 0);
~Ngps();
private:
Ui::Ngps *ui;
// cumbia
CumbiaPool *cu_pool;
QuLogImpl m_log_impl;
CuControlsFactoryPool m_ctrl_factory_pool;
// cumbia
};
#endif // Ngps_H
This diff is collapsed.
Markdown is supported
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