/usr/include/CLAM/qtmonitors/ControlSurfaceWidget.hxx is in libclam-qtmonitors-dev 1.4.0-3.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | #ifndef ControlSurfaceWidget_hxx
#define ControlSurfaceWidget_hxx
#include <cmath>
#include "ControlSurface.hxx"
#include <QtGui/QWidget>
class QLabel;
class QDoubleSpinBox;
class ControlSurfaceWidget : public QWidget
{
Q_OBJECT
Q_PROPERTY(bool spinBoxesHidden READ spinBoxesHidden WRITE hideSpinBoxes)
Q_PROPERTY(QColor pointBrushColor READ pointBrushColor WRITE setPointBrushColor)
Q_PROPERTY(QColor pointPenColor READ pointPenColor WRITE setPointPenColor)
Q_PROPERTY(QString nameX READ nameX WRITE setNameX)
Q_PROPERTY(QString nameY READ nameY WRITE setNameY)
public:
ControlSurfaceWidget(CLAM::Processing * processing=0, QWidget * parent=0);
~ControlSurfaceWidget();
void paintEvent(QPaintEvent * event);
void mousePressEvent(QMouseEvent * event);
void mouseMoveEvent(QMouseEvent * event);
void mouseReleaseEvent(QMouseEvent * event) ;
void hideSpinBoxes(bool hide);
bool spinBoxesHidden();
const QColor & pointBrushColor() const { return _pointBrushColor; }
void setPointBrushColor(const QColor & color) { _pointBrushColor=color; }
const QColor & pointPenColor() const { return _pointPenColor; }
void setPointPenColor(const QColor & color) { _pointPenColor=color; }
const QString & nameX() const { return _nameX; }
void setNameX(const QString & name) { _nameX=name; }
const QString & nameY() const { return _nameY; }
void setNameY(const QString & name) { _nameY=name; }
private slots:
void moveSurface(int posX, int posY);
void spinBoxChanged();
signals:
void surfaceMoved(double posX, double posY);
void updatedX(double posX);
void updatedY(double posY);
private:
double mapX(int x) const;
double mapY(int y) const;
enum { pointSize=10 };
QLabel * _surface;
QDoubleSpinBox * _spinBoxX;
QDoubleSpinBox * _spinBoxY;
CLAM::ControlSurface * _sender;
double _minX;
double _minY;
double _maxX;
double _maxY;
double _defaultX;
double _defaultY;
bool _updating;
bool _dragging;
bool _areSpinBoxesHidden;
QColor _pointPenColor;
QColor _pointBrushColor;
QString _nameX;
QString _nameY;
};
#endif//ControlSurfaceWidget_hxx
|