Skip to content
Snippets Groups Projects
Commit 6212292e authored by Dirk Wilden's avatar Dirk Wilden
Browse files

qwt only if available

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4857 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7286f2ec
No related branches found
No related tags found
No related merge requests found
......@@ -84,17 +84,21 @@ class TextureControlPlugin : public QObject, BaseInterface, TextureInterface, Me
enum TextureType { VERTEXBASED = 1 << 0, HALFEDGEBASED = 1 << 1};
signals:
// BaseInterface
void updateView();
// TextureInterface
void updateTexture( QString , int);
// LoggingInterface
void log(Logtype _type, QString _message);
void log(QString _message);
// MenuInterface
void addMenu(QMenu* _menu, MenuType _type);
private slots:
// BaseInterface
void pluginsInitialized();
void slotObjectUpdated(int _identifier);
// TextureInterface
void slotUpdateAllTextures( );
void slotTextureAdded( QString _textureName , QString _filename , uint _dimension );
void slotTextureUpdated( QString _textureName , int _identifier );
......@@ -102,17 +106,22 @@ class TextureControlPlugin : public QObject, BaseInterface, TextureInterface, Me
void slotSwitchTexture( QString _textureName );
private slots:
void slotSetTextureProperties();
/// Called when an action in the TextureMenu is triggered
void slotTextureMenu(QAction* _action);
/// Slot for showing the TextureProperties Dialog
void slotSetTextureProperties();
/// Called when Ok was clicked in the dialog
void slotTexturePropertiesOk();
/// Called when Cancel was clicked in the dialog
void slotTexturePropertiesCancel();
/// Called when Apply was clicked in the dialog
void slotTexturePropertiesApply();
void pluginsInitialized();
public :
/// Constructor
TextureControlPlugin() {};
/// Destructor
~TextureControlPlugin() {delete(settingsDialog_);};
QString name() { return (QString("TextureControl")); };
......
......@@ -34,9 +34,12 @@
#include "textureProperties.hh"
#ifdef QWT
#include <qwt_plot_grid.h>
#include <qwt_text.h>
#include <qwt_plot.h>
#endif
#include <float.h>
#include <QtGui>
......@@ -46,7 +49,9 @@ texturePropertiesWidget::texturePropertiesWidget(QWidget *parent)
{
setupUi(this);
#ifdef QWT
QGridLayout* layout = new QGridLayout( originalData);
originalDataHistogram_ = new QwtPlot(0);
layout->addWidget( originalDataHistogram_ , 0,0 );
......@@ -72,20 +77,14 @@ texturePropertiesWidget::texturePropertiesWidget(QWidget *parent)
histogramCurve_.setTitle(curve_title);
histogramCurve_.attach(originalDataHistogram_);
// connect(distanceCheckBox,SIGNAL(stateChanged ( int ) ) , this , SLOT (slotDistanceCheckbox(int)) );
// connect(normalCheckBox,SIGNAL(stateChanged ( int ) ) , this , SLOT (slotNormalCheckbox(int)) );
#endif
}
void texturePropertiesWidget::setOriginalData(std::vector< double > _x, std::vector< double > _y ) {
#ifdef QWT
double minx = FLT_MIN;
double maxx = FLT_MIN;
double miny = FLT_MAX;
......@@ -99,4 +98,5 @@ void texturePropertiesWidget::setOriginalData(std::vector< double > _x, std::vec
}
histogramCurve_.setData(&_x[0], &_y[0], _x.size());
originalDataHistogram_->replot();
#endif
}
......@@ -34,7 +34,10 @@
#include "ui_textureProperties.hh"
#include <QtGui>
#ifdef QWT
#include <qwt_plot_curve.h>
#endif
class texturePropertiesWidget : public QDialog, public Ui::Dialog
{
......@@ -46,8 +49,10 @@ class texturePropertiesWidget : public QDialog, public Ui::Dialog
void setOriginalData(std::vector< double > _x, std::vector< double > _y );
private:
#ifdef QWT
QwtPlot* originalDataHistogram_;
QwtPlotCurve histogramCurve_;
#endif
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment