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

cmake makefile and code changes to support qwt


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5667 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 34980eb7
include(plugin)
find_package(Qwt5)
if(Qwt5_Qt4_FOUND)
add_definitions(-DWITH_QWT)
MESSAGE(STATUS, "include path: ${Qwt5_INCLUDE_DIR}")
openflipper_plugin(INCDIRS ${Qwt5_INCLUDE_DIR} LIBRARIES ${Qwt5_Qt4_LIBRARY})
else()
openflipper_plugin()
endif()
......@@ -34,7 +34,8 @@
#include "textureProperties.hh"
#ifdef QWT
#ifdef WITH_QWT
#warning qwt defined in texturecontrol
#include <qwt_plot_grid.h>
#include <qwt_text.h>
#include <qwt_plot.h>
......@@ -67,29 +68,29 @@ texturePropertiesWidget::texturePropertiesWidget(QWidget *parent)
texData_ = 0;
#ifdef QWT
#ifdef WITH_QWT
QGridLayout* layout = new QGridLayout( originalData);
originalDataHistogram_ = new QwtPlot(0);
layout->addWidget( originalDataHistogram_ , 0,0 );
QwtText axis_title_x("value");
// axis_title_x.setFont(arial);
QwtText axis_title_y("count");
// axis_title_y.setFont(arial);
originalDataHistogram_->setAxisTitle(QwtPlot::xBottom, axis_title_x);
originalDataHistogram_->setAxisTitle(QwtPlot::yLeft, axis_title_y);
originalDataHistogram_->setCanvasBackground(Qt::white);
QwtPlotGrid *grid2 = new QwtPlotGrid;
grid2->enableYMin(true);
grid2->enableXMin(true);
grid2->setMajPen(QPen(Qt::black, 0, Qt::DotLine));
grid2->setMinPen(QPen(Qt::gray, 0 , Qt::DotLine));
grid2->attach(originalDataHistogram_);
QwtText curve_title("Delay Spread Histogram");
// curve_title.setFont(arial);
histogramCurve_.setTitle(curve_title);
......@@ -206,12 +207,12 @@ void texturePropertiesWidget::textureChanged(QListWidgetItem* _item){
void texturePropertiesWidget::setOriginalData(std::vector< double > _x, std::vector< double > _y ) {
#ifdef QWT
#ifdef WITH_QWT
double minx = FLT_MIN;
double maxx = FLT_MIN;
double miny = FLT_MAX;
double maxy = FLT_MIN;
for ( uint i = 0 ; i < _x.size(); ++ i ) {
minx = std::min(minx,_x[0]);
maxx = std::max(maxx,_x[0]);
......
......@@ -36,7 +36,7 @@
#include "TextureData.hh"
#include <QtGui>
#ifdef QWT
#ifdef WITH_QWT
#include <qwt_plot_curve.h>
#endif
......@@ -73,7 +73,7 @@ class texturePropertiesWidget : public QDialog, public Ui::Dialog
QString textureName_;
int id_;
#ifdef QWT
#ifdef WITH_QWT
QwtPlot* originalDataHistogram_;
QwtPlotCurve histogramCurve_;
#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