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

Resolve ODR violation with PhySim

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