Commit 987d00b5 authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

project created

parent 5d463932
release_01: first release of the project "i0mapmon".
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/i0mapmon.cpp
HEADERS += src/i0mapmon.h
# cuuimake runs uic
# FORMS = src/i0mapmon.ui
# but we need to include ui_xxxx.h file amongst the headers
# in order to be recompiled when it changes
#
HEADERS += \
ui/ui_i0mapmon.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 = i0mapmon
!wasm-emscripten {
TARGET = bin/$${TARGET}
} else {
TARGET = wasm/$${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 'i0mapmon' under $${INSTALL_DIR} ")
message("-")
} else {
message("-")
message("INSTALLATION")
message(" call qmake INSTALL_DIR=/usr/local/bin to install i0mapmon 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("-")
DISTFILES +=
#include "i0mapmon.h"
#include "ui_i0mapmon.h"
// cumbia
#include <cumbiapool.h>
#include <cuserviceprovider.h>
#include <cumacros.h>
#include <quapps.h>
// cumbia
I0mapmon::I0mapmon(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::I0mapmon;
ui->setupUi(this, cu_pool, m_ctrl_factory_pool);
// mloader.modules() to get the list of loaded modules
// cumbia
}
I0mapmon::~I0mapmon()
{
delete ui;
}
#ifndef I0mapmon_H
#define I0mapmon_H
#include <QWidget>
// cumbia
#include <qulogimpl.h>
#include <cucontrolsfactorypool.h>
class CumbiaPool;
// cumbia
namespace Ui {
class I0mapmon;
}
class I0mapmon : public QWidget
{
Q_OBJECT
public:
explicit I0mapmon(CumbiaPool *cu_p, QWidget *parent = 0);
~I0mapmon();
private:
Ui::I0mapmon *ui;
// cumbia
CumbiaPool *cu_pool;
QuLogImpl m_log_impl;
CuControlsFactoryPool m_ctrl_factory_pool;
// cumbia
};
#endif // I0mapmon_H
<ui version="4.0">
<class>I0mapmon</class>
<widget class="QWidget" name="I0mapmon" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle" >
<string>I0mapmon</string>
</property>
</widget>
<layoutDefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>
#include <quapplication.h>
#include "i0mapmon.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("I0mapmon");
QString version(VERSION);
qu_app.setApplicationVersion(version);
qu_app.setProperty("author", "Giacomo");
qu_app.setProperty("mail", "giacomo.strangolino@elettra.eu");
qu_app.setProperty("phone", "0403758073");
qu_app.setProperty("office", "T2PT025");
qu_app.setProperty("hwReferent", "Michele M."); /* name of the referent that provides the device server */
CumbiaPool *cu_p = new CumbiaPool();
I0mapmon *w = new I0mapmon(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;
}
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