X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fwidgets%2Fwellarray.hpp;h=f1c25dc01fde9e0c39694594296c2bf265b6d2e5;hp=ebe3c00019023c7370c060ef3a59d6ba6319269c;hb=72486b789078f024e4f3404f81118c03b03e2b70;hpb=2acdb232d6bb452cfdfaea3ef5218fb4da592329 diff --git a/pv/widgets/wellarray.hpp b/pv/widgets/wellarray.hpp index ebe3c000..f1c25dc0 100644 --- a/pv/widgets/wellarray.hpp +++ b/pv/widgets/wellarray.hpp @@ -39,18 +39,24 @@ ** ****************************************************************************/ +#ifndef PULSEVIEW_PV_WIDGETS_WELLARRAY_HPP +#define PULSEVIEW_PV_WIDGETS_WELLARRAY_HPP + #include -struct QWellArrayData; +namespace pv { +namespace widgets { + +struct WellArrayData; -class QWellArray : public QWidget +class WellArray : public QWidget { Q_OBJECT Q_PROPERTY(int selectedColumn READ selectedColumn) Q_PROPERTY(int selectedRow READ selectedRow) public: - QWellArray(int rows, int cols, QWidget* parent=0); + WellArray(int rows, int cols, QWidget* parent = nullptr); QString cellContent(int row, int col) const; int selectedColumn() const { return selCol; } @@ -116,10 +122,10 @@ protected: void keyPressEvent(QKeyEvent*); void focusInEvent(QFocusEvent*); void focusOutEvent(QFocusEvent*); - void paintEvent(QPaintEvent *); + void paintEvent(QPaintEvent*); private: - Q_DISABLE_COPY(QWellArray) + Q_DISABLE_COPY(WellArray) int nrows; int ncols; @@ -129,5 +135,10 @@ private: int curCol; int selRow; int selCol; - QWellArrayData *d; + WellArrayData *d; }; + +} // namespace widgets +} // namespace pv + +#endif // PULSEVIEW_PV_WIDGETS_WELLARRAY_HPP