pv/view/cursor.cpp
pv/view/cursorpair.cpp
pv/view/header.cpp
+ pv/view/marginwidget.cpp
pv/view/logicsignal.cpp
pv/view/ruler.cpp
pv/view/selectableitem.cpp
pv/toolbars/samplingbar.h
pv/view/cursor.h
pv/view/header.h
+ pv/view/marginwidget.h
pv/view/ruler.h
pv/view/selectableitem.h
pv/view/signal.h
namespace view {
Header::Header(View &parent) :
- QWidget(&parent),
- _view(parent),
+ MarginWidget(parent),
_action_set_name(new QAction(tr("Set &Name..."), this)),
_action_set_colour(new QAction(tr("Set &Colour..."), this))
{
#include <list>
#include <utility>
-#include <QWidget>
+#include "marginwidget.h"
namespace pv {
namespace view {
class Signal;
class View;
-class Header : public QWidget
+class Header : public MarginWidget
{
Q_OBJECT
void signals_moved();
private:
- View &_view;
-
QPoint _mouse_point;
QPoint _mouse_down_point;
--- /dev/null
+/*
+ * This file is part of the PulseView project.
+ *
+ * Copyright (C) 2013 Joel Holdsworth <joel@airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "view.h"
+
+#include "marginwidget.h"
+
+namespace pv {
+namespace view {
+
+MarginWidget::MarginWidget(View &parent) :
+ QWidget(&parent),
+ _view(parent)
+{
+}
+
+} // namespace view
+} // namespace pv
--- /dev/null
+/*
+ * This file is part of the PulseView project.
+ *
+ * Copyright (C) 2013 Joel Holdsworth <joel@airwebreathe.org.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef PULSEVIEW_PV_MARGINWIDGET_H
+#define PULSEVIEW_PV_MARGINWIDGET_H
+
+#include <QWidget>
+
+namespace pv {
+namespace view {
+
+class View;
+
+class MarginWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MarginWidget(pv::view::View &parent);
+
+protected:
+ pv::view::View &_view;
+};
+
+} // namespace view
+} // namespace pv
+
+#endif // PULSEVIEW_PV_MARGINWIDGET_H
const int Ruler::HoverArrowSize = 5;
Ruler::Ruler(View &parent) :
- QWidget(&parent),
- _view(parent),
+ MarginWidget(parent),
_grabbed_marker(NULL)
{
setMouseTracking(true);
#ifndef PULSEVIEW_PV_VIEW_RULER_H
#define PULSEVIEW_PV_VIEW_RULER_H
-#include <QWidget>
+#include "marginwidget.h"
namespace pv {
namespace view {
class TimeMarker;
class View;
-class Ruler : public QWidget
+class Ruler : public MarginWidget
{
Q_OBJECT
void hover_point_changed();
private:
- View &_view;
-
TimeMarker *_grabbed_marker;
};