Commit a5966892 authored by Jan Möbius's avatar Jan Möbius

Include guard for headers to support automoc (not enabled yet)

parent 244673b9
......@@ -85,8 +85,8 @@
#include "OpenFlipper/INIFile/INIFile.hh"
#include "OpenFlipper/Logging/Logging.hh"
#include "OpenFlipper/Scripting/Scripting.hh"
#include "OpenFlipper/Logging/PluginLogging.hh"
#include "OpenFlipper/Scripting/ScriptingWrapper.hh"
// Prototypes for scripting
#include "OpenFlipper/Scripting/scriptPrototypes/prototypeVec3d.hh"
......
......@@ -59,7 +59,7 @@
//== INCLUDES =================================================================
#include "Logging.hh"
#include "PluginLogging.hh"
#include <QStringList>
......
......@@ -56,8 +56,7 @@
//
//=============================================================================
#ifndef LOGGING_HH
#define LOGGING_HH
#pragma once
//=============================================================== INCLUDES ====
......@@ -115,5 +114,3 @@ class PluginLogger : public QObject {
//=============================================================================
#endif // LOGGING_HH
//=============================================================================
......@@ -60,7 +60,7 @@
//== INCLUDES =================================================================
// -------------------- mview
#include "Scripting.hh"
#include "ScriptingWrapper.hh"
//== IMPLEMENTATION ==========================================================
......
......@@ -56,8 +56,7 @@
//
//=============================================================================
#ifndef SCRIPTING_HH
#define SCRIPTING_HH
#pragma once
//=============================================================== INCLUDES ====
......@@ -76,7 +75,7 @@
*/
class ScriptingWrapper : public QObject {
Q_OBJECT
Q_OBJECT
signals:
/// complete signal for scripting plugins
......@@ -108,6 +107,3 @@ private:
};
//=============================================================================
#endif // SCRIPTING_HH
//=============================================================================
......@@ -58,7 +58,6 @@
#define BASEOBJECT_C
//== INCLUDES =================================================================
#include "BaseObjectCore.hh"
......@@ -71,8 +70,6 @@
//== Variables =================================================================
static ObjectManager objectManager_;
//== CLASS DEFINITION =========================================================
/** This counter is used to provide unique object ids. Every time a object is created
......@@ -141,7 +138,7 @@ BaseObject::BaseObject(const BaseObject& _object) :
// Add object to object container
PluginFunctions::addObjectToMap( id(), this );
objectManager_.objectCreated(id());
getObjectManager()->objectCreated(id());
}
BaseObject::BaseObject(BaseObject* _parent) :
......@@ -176,7 +173,7 @@ BaseObject::BaseObject(BaseObject* _parent) :
// Add object to object container
PluginFunctions::addObjectToMap( id(), this );
objectManager_.objectCreated(id());
getObjectManager()->objectCreated(id());
}
......@@ -189,7 +186,7 @@ BaseObject::~BaseObject() {
if ( target() )
PluginFunctions::decreaseTargetCount();
objectManager_.objectDeleted(id());
getObjectManager()->objectDeleted(id());
}
......@@ -837,32 +834,4 @@ QMap<QString, PerObjectData*>& BaseObject::getPerObjectDataMap() {
}
ObjectManager::ObjectManager() {
}
ObjectManager::~ObjectManager() {
}
void ObjectManager::objectCreated(int _objectId)
{
emit newObject(_objectId);
}
void ObjectManager::objectDeleted(int _objectId)
{
// Remove deleted object from object container
PluginFunctions::removeObjectFromMap( _objectId );
emit deletedObject(_objectId);
}
ObjectManager* getObjectManager() {
return &objectManager_;
}
//=============================================================================
/*===========================================================================*\
* *
* OpenFlipper *
* Copyright (c) 2001-2015, RWTH-Aachen University *
* Department of Computer Graphics and Multimedia *
* All rights reserved. *
* www.openflipper.org *
* *
*---------------------------------------------------------------------------*
* This file is part of OpenFlipper. *
*---------------------------------------------------------------------------*
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted provided that the following conditions *
* are met: *
* *
* 1. Redistributions of source code must retain the above copyright notice, *
* this list of conditions and the following disclaimer. *
* *
* 2. Redistributions in binary form must reproduce the above copyright *
* notice, this list of conditions and the following disclaimer in the *
* documentation and/or other materials provided with the distribution. *
* *
* 3. Neither the name of the copyright holder nor the names of its *
* contributors may be used to endorse or promote products derived from *
* this software without specific prior written permission. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision$ *
* $LastChangedBy$ *
* $Date$ *
* *
\*===========================================================================*/
#include "BaseObjectCore.hh"
#include <OpenFlipper/BasePlugin/PluginFunctionsCore.hh>
static ObjectManager objectManager_;
ObjectManager::ObjectManager() {
}
ObjectManager::~ObjectManager() {
}
void ObjectManager::objectCreated(int _objectId)
{
emit newObject(_objectId);
}
void ObjectManager::objectDeleted(int _objectId)
{
// Remove deleted object from object container
PluginFunctions::removeObjectFromMap( _objectId );
emit deletedObject(_objectId);
}
ObjectManager* getObjectManager() {
return &objectManager_;
}
//=============================================================================
......@@ -62,8 +62,7 @@
*/
#ifndef BASEOBJECTCORE_HH
#define BASEOBJECTCORE_HH
#pragma once
#include <OpenFlipper/common/GlobalDefines.hh>
#include <OpenFlipper/common/BaseObject.hh>
......@@ -91,6 +90,5 @@ class DLLEXPORT ObjectManager : public QObject {
DLLEXPORT
ObjectManager* getObjectManager();
//=============================================================================
#endif // BASEOBJECTCORE_HH defined
//=============================================================================
......@@ -47,6 +47,7 @@
* *
\*===========================================================================*/
#pragma once
#include "ui_aboutWidget.hh"
......
......@@ -47,6 +47,8 @@
* *
\*===========================================================================*/
#pragma once
#include "ui_postProcessorWidget.hh"
#include <vector>
......
/*===========================================================================*\
* *
* OpenFlipper *
* Copyright (c) 2001-2015, RWTH-Aachen University *
* Department of Computer Graphics and Multimedia *
* All rights reserved. *
* www.openflipper.org *
* *
*---------------------------------------------------------------------------*
* This file is part of OpenFlipper. *
*---------------------------------------------------------------------------*
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted provided that the following conditions *
* are met: *
* *
* 1. Redistributions of source code must retain the above copyright notice, *
* this list of conditions and the following disclaimer. *
* *
* 2. Redistributions in binary form must reproduce the above copyright *
* notice, this list of conditions and the following disclaimer in the *
* documentation and/or other materials provided with the distribution. *
* *
* 3. Neither the name of the copyright holder nor the names of its *
* contributors may be used to endorse or promote products derived from *
* this software without specific prior written permission. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision$ *
* $LastChangedBy$ *
* $Date$ *
* *
\*===========================================================================*/
#include "BlockingWidget.hh"
void BlockingWidget::cancelPressed() {
JobCancelButton* button = 0;
button = dynamic_cast<JobCancelButton*>(QObject::sender());
if(button != 0) {
emit cancelRequested(button->jobId());
}
};
BlockingWidget::BlockingWidget(QString _jobId, QString _description,
int _minSteps, int _maxSteps, QWidget* _parent ) : QWidget(_parent),
layout_(0),
description_(0),
progress_(0),
cancelButton_(0) {
// Block all other windows of application
setWindowModality(Qt::ApplicationModal);
setWindowTitle(_jobId);
// Set window size
QSize size(300, 150);
resize(size);
layout_ = new QVBoxLayout();
description_ = new QLabel(_description);
layout_->addWidget(description_);
progress_ = new QProgressBar();
progress_->setMinimum(_minSteps);
progress_->setMaximum(_maxSteps);
progress_->setValue(0);
progress_->setTextVisible(true);
layout_->addWidget(progress_);
cancelButton_ = new JobCancelButton("Cancel", _jobId, this);
layout_->addWidget(cancelButton_);
setLayout(layout_);
// Connect cancel button
connect(cancelButton_, SIGNAL(pressed()), this, SLOT(cancelPressed()));
};
void BlockingWidget::updateStatus(int _value) { progress_->setValue(_value); };
void BlockingWidget::setJobId(QString _jobId) { setWindowTitle(_jobId); };
void BlockingWidget::setJobDescription(QString _description) { description_->setText(_description); };
......@@ -47,8 +47,7 @@
* *
\*===========================================================================*/
#ifndef BLOCKINGWIDGET_HH
#define BLOCKINGWIDGET_HH
#pragma once
#include "processManagerWidget.hh"
......@@ -60,54 +59,16 @@ signals:
private slots:
void cancelPressed() {
JobCancelButton* button = 0;
button = dynamic_cast<JobCancelButton*>(QObject::sender());
if(button != 0) {
emit cancelRequested(button->jobId());
}
};
void cancelPressed();
public:
BlockingWidget(QString _jobId, QString _description,
int _minSteps, int _maxSteps, QWidget* _parent = 0) : QWidget(_parent),
layout_(0),
description_(0),
progress_(0),
cancelButton_(0) {
BlockingWidget(QString _jobId, QString _description, int _minSteps, int _maxSteps, QWidget* _parent = 0);
// Block all other windows of application
setWindowModality(Qt::ApplicationModal);
setWindowTitle(_jobId);
// Set window size
QSize size(300, 150);
resize(size);
void updateStatus(int _value);
layout_ = new QVBoxLayout();
description_ = new QLabel(_description);
layout_->addWidget(description_);
void setJobId(QString _jobId);
progress_ = new QProgressBar();
progress_->setMinimum(_minSteps);
progress_->setMaximum(_maxSteps);
progress_->setValue(0);
progress_->setTextVisible(true);
layout_->addWidget(progress_);
cancelButton_ = new JobCancelButton("Cancel", _jobId, this);
layout_->addWidget(cancelButton_);
setLayout(layout_);
// Connect cancel button
connect(cancelButton_, SIGNAL(pressed()), this, SLOT(cancelPressed()));
};
void updateStatus(int _value) { progress_->setValue(_value); };
void setJobId(QString _jobId) { setWindowTitle(_jobId); };
void setJobDescription(QString _description) { description_->setText(_description); };
void setJobDescription(QString _description);
private:
QVBoxLayout* layout_;
......@@ -116,4 +77,3 @@ private:
JobCancelButton* cancelButton_;
};
#endif // BLOCKINGWIDGET_HH
......@@ -47,6 +47,7 @@
* *
\*===========================================================================*/
#pragma once
/*
* processManagerWidget.hh
......@@ -55,10 +56,6 @@
* Author: kremer
*/
#ifndef PROCESSMANAGERWIDGET_HH_
#define PROCESSMANAGERWIDGET_HH_
#include "ui_processManagerWidget.hh"
#include <QtWidgets>
......@@ -130,5 +127,3 @@ class ProcessManagerWidget : public QWidget, public Ui::ProcessManagerWidget
QHash<QString, JobContainer> processMap_;
};
#endif /* PROCESSMANAGERWIDGET_HH_ */
......@@ -47,8 +47,7 @@
* *
\*===========================================================================*/
#ifndef TEXTBROWSERWIDGET_HH
#define TEXTBROWSERWIDGET_HH
#pragma once
#include <QPlainTextEdit>
#include <QObject>
......@@ -166,4 +165,3 @@ class TextBrowserSideArea : public QWidget
};
#endif // TEXTBROWSERWIDGET_HH
......@@ -47,6 +47,8 @@
* *
\*===========================================================================*/
#pragma once
#include "ui_rendererObjectWidget.hh"
#include <QDialog>
......
......@@ -47,6 +47,8 @@
* *
\*===========================================================================*/
#pragma once
#include "ui_rendererWidget.hh"
#include <QDialog>
#include <QVector>
......
......@@ -47,6 +47,7 @@
* *
\*===========================================================================*/
#pragma once
/*
* stereoSettingsWidget.hh
......
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