Skip to content

Commit

Permalink
Make Grid and Legend work with proxy objects. Re #1037.
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellTaylor committed Jan 9, 2012
1 parent 2c795e4 commit b026dc5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions Code/Mantid/MantidPlot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ set ( QTIPLOT_MOC_FILES src/ApplicationWindow.h
src/FunctionDialog.h
src/Graph3D.h
src/Graph.h
src/Grid.h
src/ImageDialog.h
src/ImageExportDialog.h
src/ImportASCIIDialog.h
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/MantidPlot/src/Grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#include <QPainter>

Grid::Grid() : QwtPlotGrid(),
Grid::Grid() : QObject(), QwtPlotGrid(),
d_maj_pen_y(QPen(Qt::blue, 0.5, Qt::SolidLine)),
d_min_pen_y(QPen(Qt::gray, 0.4, Qt::DotLine)),
mrkX(-1),
Expand Down
3 changes: 2 additions & 1 deletion Code/Mantid/MantidPlot/src/Grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
#include <qwt_plot_grid.h>
#include <qwt_plot_marker.h>

class Grid : public QwtPlotGrid
class Grid : public QObject, public QwtPlotGrid // Made a QObject just for our python proxies
{
Q_OBJECT
public:
Grid();

Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/MantidPlot/src/qti.sip
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ private:
ImageMarker(const ImageMarker&);
};

class LegendWidget // : QWidget /PyName=Legend/
class LegendWidget : QObject // : QWidget /PyName=Legend/
{
%TypeHeaderCode
#include "src/LegendWidget.h"
Expand Down Expand Up @@ -586,7 +586,7 @@ private:
};


class Grid // : QwtPlotGrid
class Grid : QObject // : QwtPlotGrid
{
%TypeHeaderCode
#include "src/Grid.h"
Expand Down

0 comments on commit b026dc5

Please sign in to comment.