Commit 3cc4bc4c authored by Alexander Semke's avatar Alexander Semke

1. Cleanup in CMakeLists.txt

2. Streamlined header includes.
parent f2dfe7e6
......@@ -14,6 +14,12 @@ LabPlot requires Qt version 4.7 or newer. Please update your Qt installation if
# ./compile
Specify the path:
-DCMAKE_INSTALL_PREFIX=/usr
Specify the build type:
-DCMAKE_BUILD_TYPE = Release
Installation:
-------------
# cd build
......@@ -23,34 +29,5 @@ Clean-up:
---------
# rm -rf build
B. Building SciDAvis (Qt frontend):
--------------------------------
The Qt frontend is currently unsupported and not functional.
If you still want to compile it use:
# cd src/qtfrontend
# qmake scidavis.pro
# make
# make install (optional, not needed for most development tasks)
If the Qt frontend is build any other way, make sure that ACTIVATE_SCIDAVIS_SPECIFIC_CODE is defined in the Makefile.
###############
This project is currently under active development.
See https://sourceforge.net/apps/mediawiki/labplot/index.php?title=Main_Page for more informations.
SciDAVis introduces an abstraction of the application design called "aspect framework" or "5 layer model".
Very short description:
Every object (aspect) in a project is placed in a hierarchy with the project as the root node. Every aspect
itself has 5 layers of functionality:
layer 0: data
layer 1: undo commands
layer 2: public API
layer 3: Qt models
layer 4: GUI (including Qt views), scripting
Long description: see src/qtfrontend/doc/aspect-framework.dox
(or generate Doxygen docs by "doxygen Doxyfile" in the qtfrontend dir)
####################
#!/bin/bash
# for building KDE4 frontend (LabPlot):
#######################################
if [ -d build ]; then
echo "directory build/ exists! Please remove it."
else
if ! [ -d build ]; then
mkdir build
fi
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wundef -Wpointer-arith -Wcast-align -Wunreachable-code -fno-omit-frame-pointer -fstack-protector -fno-exceptions"&& make -j 2
#cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-fstack-protector -fno-exceptions" && make -j 2
# or
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=DebugFull -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wundef -Wpointer-arith -Wcast-align -Wunreachable-code -fno-omit-frame-pointer -fstack-protector -fno-exceptions" && make -j 2
#some other usefull flags, producing a lot of "noise" currently:
# -Weffc++ -Wshadow -Wconversion -Wfloat-equal -Wswitch-default -Wswitch-enum
# address sanitizer, available in gcc 4.8.0
# -fsanitize=address
#-DQT_QTCORE_LIBRARY_DEBUG=/usr/lib/debug/usr/lib/libQtCore.so.4.8.4
# optional:
#make install
# for building Qt Frontend (SciDAVis):
######################################
# cd src/qtfrontend && qmake scidavis.pro && make
......@@ -2,7 +2,6 @@ set(KDE_FRONTEND true)
set(KDEFRONTEND_DIR kdefrontend)
set(BACKEND_DIR backend)
set(COMMONFRONTEND_DIR commonfrontend)
set(DATASOURCES_DIR ${KDEFRONTEND_DIR}/datasources)
set(TOOLS_DIR tools)
set(GUI_SOURCES
......@@ -16,6 +15,11 @@ set(GUI_SOURCES
${KDEFRONTEND_DIR}/SettingsPage.cpp
${KDEFRONTEND_DIR}/SettingsPrintingPage.cpp
${KDEFRONTEND_DIR}/TemplateHandler.cpp
${KDEFRONTEND_DIR}/datasources/AsciiOptionsWidget.cpp
${KDEFRONTEND_DIR}/datasources/BinaryOptionsWidget.cpp
${KDEFRONTEND_DIR}/datasources/ImportFileWidget.cpp
${KDEFRONTEND_DIR}/datasources/ImportFileDialog.cpp
${KDEFRONTEND_DIR}/datasources/FileInfoDialog.cpp
${KDEFRONTEND_DIR}/dockwidgets/AxisDock.cpp
${KDEFRONTEND_DIR}/dockwidgets/CartesianPlotDock.cpp
${KDEFRONTEND_DIR}/dockwidgets/CartesianPlotLegendDock.cpp
......@@ -101,14 +105,6 @@ set(BACKEND_SOURCES
${BACKEND_DIR}/lib/SignallingUndoCommand.cpp
)
set(DATASOURCES_SOURCES
${DATASOURCES_DIR}/AsciiOptionsWidget.cpp
${DATASOURCES_DIR}/BinaryOptionsWidget.cpp
${DATASOURCES_DIR}/ImportFileWidget.cpp
${DATASOURCES_DIR}/ImportFileDialog.cpp
${DATASOURCES_DIR}/FileInfoDialog.cpp
)
set(COMMONFRONTEND_SOURCES
${COMMONFRONTEND_DIR}/spreadsheet/SpreadsheetCommentsHeaderModel.cpp
${COMMONFRONTEND_DIR}/spreadsheet/SpreadsheetDoubleHeaderView.cpp
......@@ -137,26 +133,23 @@ set(QTMOC_HDRS
${BACKEND_DIR}/core/datatypes/String2MonthFilter.h
)
qt4_wrap_cpp(QTMOC_HDRS ${QTMOC_HDRS})
add_custom_command (OUTPUT parser/parser.tab.c
COMMAND ${YACC_EXECUTABLE} ARGS -b parser parser.y
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/parser)
# add_custom_command (OUTPUT parser/parser.tab.c
# COMMAND ${YACC_EXECUTABLE} ARGS -b parser parser.y
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/parser)
add_subdirectory( pics )
##############################################################################
INCLUDE_DIRECTORIES(${BACKEND_DIR} ${COMMONFRONTEND_DIR} .)
# set(LABPLOT_SRCS ${GUI_SOURCES} ${PLOTS_SOURCES} parser/parser.tab.c)
set(LABPLOT_SRCS ${GUI_SOURCES} ${PLOTS_SOURCES})
INCLUDE_DIRECTORIES(.)
kde4_add_ui_files(LABPLOT_SRCS ${UI_SOURCES})
kde4_add_executable(labplot2 ${LABPLOT_SRCS} ${BACKEND_SOURCES} ${DATASOURCES_SOURCES} ${COMMONFRONTEND_SOURCES} ${TOOLS_SOURCES} ${QTMOC_HDRS})
target_link_libraries(labplot2 ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS}
${GSL_LIBRARIES} ${GSL_CBLAS_LIBRARIES})
target_link_libraries(labplot2 ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${GSL_LIBRARIES} ${GSL_CBLAS_LIBRARIES})
# ${OPJ_LIBRARY}
############## installation ################################
install(TARGETS labplot2 DESTINATION ${BIN_INSTALL_DIR})
# install(FILES LabPlotui.rc DESTINATION ${DATA_INSTALL_DIR}/LabPlot)
install(FILES ${KDEFRONTEND_DIR}/LabPlotui.rc DESTINATION ${DATA_INSTALL_DIR}/LabPlot)
......@@ -31,8 +31,8 @@
#ifndef ABSTRACT_COLUMN_PRIVATE_H
#define ABSTRACT_COLUMN_PRIVATE_H
#include "core/AbstractColumn.h"
#include "lib/IntervalAttribute.h"
#include "backend/core/AbstractColumn.h"
#include "backend/lib/IntervalAttribute.h"
class AbstractColumn::Private {
public:
......
......@@ -28,7 +28,7 @@
***************************************************************************/
#include "AbstractFilter.h"
#include "core/AbstractColumn.h"
#include "backend/core/AbstractColumn.h"
/**
* \class AbstractFilter
......
......@@ -28,8 +28,8 @@
* *
***************************************************************************/
#include "core/AbstractPart.h"
#include "core/PartMdiView.h"
#include "backend/core/AbstractPart.h"
#include "commonfrontend/core/PartMdiView.h"
#include <QMenu>
#include <QStyle>
......
......@@ -36,7 +36,7 @@
#include <QObject>
#include <QEvent>
#include "core/customevents.h"
#include "backend/core/customevents.h"
class AbstractScript;
class QString;
......
......@@ -35,7 +35,7 @@
#include <QtCore/QDate>
#include <QtCore/QTime>
#include <QtXml/QXmlStreamWriter>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
/**
* \class AbstractSimpleFilter
......
......@@ -32,9 +32,8 @@
#include "AbstractFilter.h"
#include "AbstractColumn.h"
#include "lib/IntervalAttribute.h"
#include "backend/lib/IntervalAttribute.h"
// forward declaration - class follows
class SimpleFilterColumn;
class AbstractSimpleFilter : public AbstractFilter
......
......@@ -29,17 +29,15 @@
* *
***************************************************************************/
#include "backend/core/Folder.h"
#include "core/Project.h"
#include "backend/core/Project.h"
#include "backend/lib/XmlStreamReader.h"
#include "backend/core/column/Column.h"
#include "backend/worksheet/Worksheet.h"
#include "backend/datasources/FileDataSource.h"
#include "backend/spreadsheet/Spreadsheet.h"
// #include <QApplication>
// #include <QStyle>
#include <QXmlStreamWriter>
#include <QtDebug>
// #include <QtDebug>
#ifdef ACTIVATE_SCIDAVIS_SPECIFIC_CODE
#include <QIcon>
......
......@@ -31,8 +31,8 @@
#ifndef PROJECT_H
#define PROJECT_H
#include "core/Folder.h"
#include "lib/macros.h"
#include "backend/core/Folder.h"
#include "backend/lib/macros.h"
class QString;
class AbstractScriptingEngine;
......
......@@ -27,9 +27,9 @@
* *
***************************************************************************/
#include "core/ScriptingEngineManager.h"
#include "core/AbstractScriptingEngine.h"
#include "core/plugin/PluginManager.h"
#include "backend/core/ScriptingEngineManager.h"
#include "backend/core/AbstractScriptingEngine.h"
#include "backend/core/plugin/PluginManager.h"
#include <QStringList>
......
......@@ -30,8 +30,8 @@
#ifndef COLUMNPRIVATE_H
#define COLUMNPRIVATE_H
#include "lib/IntervalAttribute.h"
#include "core/column/Column.h"
#include "backend/lib/IntervalAttribute.h"
#include "backend/core/column/Column.h"
class AbstractSimpleFilter;
class QString;
......
......@@ -31,8 +31,8 @@
#ifndef COLUMNCOMMANDS_H
#define COLUMNCOMMANDS_H
#include "lib/IntervalAttribute.h"
#include "core/column/Column.h"
#include "backend/lib/IntervalAttribute.h"
#include "backend/core/column/Column.h"
#include <QUndoCommand>
#include <QStringList>
......
......@@ -34,7 +34,7 @@
#include <QDateTime>
#include <QDate>
#include <QTime>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
#include <math.h>
......
......@@ -29,7 +29,7 @@
***************************************************************************/
#include "DateTime2StringFilter.h"
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QDateTime>
#include <QRegExp>
#include <QUndoCommand>
......
......@@ -30,7 +30,7 @@
#ifndef DATE_TIME2STRING_FILTER_H
#define DATE_TIME2STRING_FILTER_H
#include "core/AbstractSimpleFilter.h"
#include "backend/core/AbstractSimpleFilter.h"
class DateTime2StringFilterSetFormatCmd;
......
......@@ -32,7 +32,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
#include <math.h>
......
......@@ -34,7 +34,7 @@
#include <QDateTime>
#include <QDate>
#include <QTime>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
#include <math.h>
......
......@@ -32,7 +32,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
#include <math.h>
......
......@@ -33,7 +33,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include <math.h>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
//! Conversion filter double -> QDateTime, interpreting the input numbers as months of the year.
......
......@@ -28,7 +28,7 @@
***************************************************************************/
#include "Double2StringFilter.h"
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
#include <QUndoCommand>
......
......@@ -32,7 +32,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
#include <math.h>
......
......@@ -30,8 +30,8 @@
#ifndef SIMPLE_COPY_THROUGH_FILTER_H
#define SIMPLE_COPY_THROUGH_FILTER_H
#include "core/AbstractSimpleFilter.h"
#include "lib/XmlStreamReader.h"
#include "backend/core/AbstractSimpleFilter.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
/**
......
......@@ -29,7 +29,7 @@
***************************************************************************/
#include "String2DateTimeFilter.h"
#include <QStringList>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QUndoCommand>
#include <QDateTime>
#include <QTime>
......
......@@ -30,7 +30,7 @@
#ifndef STRING2DATE_TIME_FILTER_H
#define STRING2DATE_TIME_FILTER_H
#include "core/AbstractSimpleFilter.h"
#include "backend/core/AbstractSimpleFilter.h"
/**
* \brief Conversion filter QString -> QDateTime.
......
......@@ -33,7 +33,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include <math.h>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
//! Conversion filter String -> QDateTime, interpreting the input as days of the week (either numeric or "Mon" etc).
......
......@@ -31,7 +31,7 @@
#include "../AbstractSimpleFilter.h"
#include <QLocale>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
#include <math.h>
......
......@@ -33,7 +33,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include <math.h>
#include "lib/XmlStreamReader.h"
#include "backend/lib/XmlStreamReader.h"
#include <QXmlStreamWriter>
//! Conversion filter String -> QDateTime, interpreting the input as months of the year (either numeric or "Jan" etc).
......
......@@ -29,11 +29,8 @@
#ifndef INTERFACES_H
#define INTERFACES_H
#ifdef ACTIVATE_SCIDAVIS_SPECIFIC_CODE
#include "lib/ConfigPageWidget.h"
#endif
#include "core/AbstractAspect.h"
#include "lib/XmlStreamReader.h"
#include "backend/core/AbstractAspect.h"
#include "backend/lib/XmlStreamReader.h"
#include <QtPlugin>
......@@ -77,29 +74,6 @@ class FileFormat
Q_DECLARE_INTERFACE(FileFormat, "net.sf.scidavis.fileformat/0.1")
#ifdef ACTIVATE_SCIDAVIS_SPECIFIC_CODE
class ActionManagerOwner
{
public:
virtual ~ActionManagerOwner() {}
virtual ActionManager * actionManager() = 0;
virtual void initActionManager() {}
};
Q_DECLARE_INTERFACE(ActionManagerOwner, "net.sf.scidavis.actionmanagerowner/0.1")
class ConfigPageMaker {
public:
virtual ~ConfigPageMaker() {}
virtual ConfigPageWidget * makeConfigPage() = 0;
virtual QString configPageLabel() = 0;
// TODO (maybe): icons instead of tabs to select the pages
// virtual QIcon icon() = 0;
};
Q_DECLARE_INTERFACE(ConfigPageMaker, "net.sf.scidavis.configpagemaker/0.1")
#endif
class XmlElementAspectMaker
{
public:
......
......@@ -27,9 +27,9 @@
* *
***************************************************************************/
#include "core/plugin/PluginLoader.h"
#include "core/globals.h"
#include "core/interfaces.h"
#include "backend/core/plugin/PluginLoader.h"
#include "backend/core/globals.h"
#include "backend/core/interfaces.h"
/**
* \class PluginLoader
......
......@@ -27,11 +27,10 @@
* *
***************************************************************************/
#include "core/plugin/PluginManager.h"
#include "core/plugin/PluginLoader.h"
#include "core/globals.h"
#include "backend/core/plugin/PluginManager.h"
#include "backend/core/plugin/PluginLoader.h"
#include "backend/core/globals.h"
#include <QPluginLoader>
#include <QString>
#include <QSettings>
#include <QtDebug>
#include <QSet>
......
......@@ -29,8 +29,8 @@
#ifndef ABSTRACTDATASOURCE_H
#define ABSTRACTDATASOURCE_H
#include "core/AbstractPart.h"
#include "core/AbstractScriptingEngine.h"
#include "backend/core/AbstractPart.h"
#include "backend/core/AbstractScriptingEngine.h"
class AbstractDataSource : public AbstractPart, public scripted{
......
......@@ -29,7 +29,7 @@ Email (use @ for *) : alexander.semke*web.de
#define ASCIIFILTER_H
#include <QStringList>
#include "datasources/filters/AbstractFileFilter.h"
#include "backend/datasources/filters/AbstractFileFilter.h"
class AsciiFilterPrivate;
class AsciiFilter : public AbstractFileFilter{
......
......@@ -27,8 +27,7 @@
* *
***************************************************************************/
#include "lib/XmlStreamReader.h"
#include <QtDebug>
#include "backend/lib/XmlStreamReader.h"
XmlStreamReader::XmlStreamReader()
{
......
......@@ -32,7 +32,7 @@
#include <QXmlStreamReader>
#include <QString>
#include <QStringList>
#include "lib/macros.h"
#include "backend/lib/macros.h"
//! XML stream parser that supports errors as well as warnings
/**
......
......@@ -32,7 +32,7 @@
#include <QUndoCommand>
#include "lib/Loki/TypeTraits.h"
#include "backend/lib/Loki/TypeTraits.h"
template <class target_class, typename value_type>
class StandardSetterCmd: public QUndoCommand {
......
......@@ -28,9 +28,9 @@
* *
***************************************************************************/
#include "core/column/Column.h"
#include "spreadsheet/Spreadsheet.h"
#include "spreadsheet/SpreadsheetModel.h"
#include "backend/core/column/Column.h"
#include "backend/spreadsheet/Spreadsheet.h"
#include "backend/spreadsheet/SpreadsheetModel.h"
#include <QString>
#include <QBrush>
#include <QIcon>
......@@ -223,6 +223,7 @@ QModelIndex SpreadsheetModel::parent(const QModelIndex & child) const
}
bool SpreadsheetModel::hasChildren(const QModelIndex& parent) const {
Q_UNUSED(parent)
return false;
}
......
......@@ -27,7 +27,7 @@
* *
***************************************************************************/
#include "worksheet/AbstractCurveSymbol.h"
#include "backend/worksheet/AbstractCurveSymbol.h"
/**
* \class AbstractCurveSymbol
......
......@@ -27,7 +27,7 @@
* *
***************************************************************************/
#include "worksheet/AbstractWorksheetDecorationElement.h"
#include "backend/worksheet/AbstractWorksheetDecorationElement.h"
/**
* \class WorksheetDecorationElement
......