Commit 0e7c1579 authored by Martin Heistermann's avatar Martin Heistermann
Browse files

Resolve ODR violation with PhySim

parent ee0c4de3
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#ifdef WITH_QWT #ifdef WITH_QWT
#include "QwtFunctionPlot.hh" #include "QwtFunctionPlotTC.hh"
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>
...@@ -90,9 +90,9 @@ namespace ACG { ...@@ -90,9 +90,9 @@ namespace ACG {
/// Default constructor /// Default constructor
QwtFunctionPlot::QwtFunctionPlot(QWidget* _parent) : QwtFunctionPlotTC::QwtFunctionPlotTC(QWidget* _parent) :
QDialog( _parent ), QDialog( _parent ),
Ui::QwtFunctionPlotBase(), Ui::QwtFunctionPlotTCBase(),
plot_zoomer_(0), plot_zoomer_(0),
clampMinMarker_(0), clampMinMarker_(0),
minSymbol_(0), minSymbol_(0),
...@@ -126,7 +126,7 @@ QwtFunctionPlot::QwtFunctionPlot(QWidget* _parent) : ...@@ -126,7 +126,7 @@ QwtFunctionPlot::QwtFunctionPlot(QWidget* _parent) :
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void QwtFunctionPlot::setFunction( std::vector<double>& _values) void QwtFunctionPlotTC::setFunction( std::vector<double>& _values)
{ {
values_ = _values; values_ = _values;
...@@ -143,12 +143,12 @@ void QwtFunctionPlot::setFunction( std::vector<double>& _values) ...@@ -143,12 +143,12 @@ void QwtFunctionPlot::setFunction( std::vector<double>& _values)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void QwtFunctionPlot::setParameters(const TexParameters& _parameters) void QwtFunctionPlotTC::setParameters(const TexParameters& _parameters)
{ {
parameters_ = _parameters; parameters_ = _parameters;
} }
void QwtFunctionPlot::setParameters( void QwtFunctionPlotTC::setParameters(
bool _repeat, bool _repeat,
double _repeatMax, double _repeatMax,
bool _clamp, bool _clamp,
...@@ -172,28 +172,28 @@ void QwtFunctionPlot::setParameters( ...@@ -172,28 +172,28 @@ void QwtFunctionPlot::setParameters(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void QwtFunctionPlot::setImage(QImage* _image) void QwtFunctionPlotTC::setImage(QImage* _image)
{ {
image_ = _image; image_ = _image;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void QwtFunctionPlot::zoomIn() void QwtFunctionPlotTC::zoomIn()
{ {
emit plot_zoomer_->zoom(1); emit plot_zoomer_->zoom(1);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void QwtFunctionPlot::zoomOut() void QwtFunctionPlotTC::zoomOut()
{ {
emit plot_zoomer_->zoom(-1); emit plot_zoomer_->zoom(-1);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void QwtFunctionPlot::clamp() void QwtFunctionPlotTC::clamp()
{ {
QRectF clamped = plot_zoomer_->zoomRect(); QRectF clamped = plot_zoomer_->zoomRect();
clamped.setLeft( min_ ); clamped.setLeft( min_ );
...@@ -203,7 +203,7 @@ void QwtFunctionPlot::clamp() ...@@ -203,7 +203,7 @@ void QwtFunctionPlot::clamp()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void QwtFunctionPlot::replot() void QwtFunctionPlotTC::replot()
{ {
//create intervals //create intervals
const int intervalCount = 100; const int intervalCount = 100;
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
//============================================================================= //=============================================================================
// //
// CLASS QwtFunctionPlot // CLASS QwtFunctionPlotTC
// //
// //
// Author: David Bommes <bommes@cs.rwth-aachen.de> // Author: David Bommes <bommes@cs.rwth-aachen.de>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
#include <QDialog> #include <QDialog>
// qmake users have to include pc // qmake users have to include pc
#include <ui_QwtFunctionPlotBase.hh> #include <ui_QwtFunctionPlotTCBase.hh>
// ACGMake users have to include // ACGMake users have to include
// #include "QtFunctionPlotBase.hh" // #include "QtFunctionPlotBase.hh"
...@@ -108,16 +108,16 @@ namespace ACG ...@@ -108,16 +108,16 @@ namespace ACG
class QwtFunctionPlot : public QDialog, public Ui::QwtFunctionPlotBase class QwtFunctionPlotTC : public QDialog, public Ui::QwtFunctionPlotTCBase
{ {
Q_OBJECT Q_OBJECT
public: public:
/// Default constructor /// Default constructor
explicit QwtFunctionPlot( QWidget* _parent = 0 ); explicit QwtFunctionPlotTC( QWidget* _parent = 0 );
/// Destructor /// Destructor
~QwtFunctionPlot() {} ~QwtFunctionPlotTC() {}
// set the function to plot // set the function to plot
void setFunction( std::vector<double>& _values ); void setFunction( std::vector<double>& _values );
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>QwtFunctionPlotBase</class> <class>QwtFunctionPlotTCBase</class>
<widget class="QWidget" name="QwtFunctionPlotBase"> <widget class="QWidget" name="QwtFunctionPlotTCBase">
<property name="windowModality"> <property name="windowModality">
<enum>Qt::NonModal</enum> <enum>Qt::NonModal</enum>
</property> </property>
......
...@@ -85,7 +85,7 @@ texturePropertiesWidget::texturePropertiesWidget(QWidget *parent) ...@@ -85,7 +85,7 @@ texturePropertiesWidget::texturePropertiesWidget(QWidget *parent)
#ifdef WITH_QWT #ifdef WITH_QWT
QGridLayout* layout = new QGridLayout( originalData); QGridLayout* layout = new QGridLayout( originalData);
functionPlot_ = new ACG::QwtFunctionPlot(0); functionPlot_ = new ACG::QwtFunctionPlotTC(0);
layout->addWidget( functionPlot_ , 0,0 ); layout->addWidget( functionPlot_ , 0,0 );
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
#endif #endif
#ifdef WITH_QWT #ifdef WITH_QWT
#include "QwtFunctionPlot.hh" #include "QwtFunctionPlotTC.hh"
#endif #endif
/** \class texturePropertiesWidget /** \class texturePropertiesWidget
...@@ -105,7 +105,7 @@ class texturePropertiesWidget : public QDialog, public Ui::Dialog ...@@ -105,7 +105,7 @@ class texturePropertiesWidget : public QDialog, public Ui::Dialog
int id_; int id_;
#ifdef WITH_QWT #ifdef WITH_QWT
ACG::QwtFunctionPlot* functionPlot_; ACG::QwtFunctionPlotTC* functionPlot_;
#endif #endif
}; };
......
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