pv/views/trace/header.cpp
pv/views/trace/marginwidget.cpp
pv/views/trace/logicsignal.cpp
- pv/views/trace/rowitem.cpp
pv/views/trace/ruler.cpp
pv/views/trace/signal.cpp
pv/views/trace/timeitem.cpp
pv/views/trace/header.hpp
pv/views/trace/logicsignal.hpp
pv/views/trace/marginwidget.hpp
- pv/views/trace/rowitem.hpp
pv/views/trace/ruler.hpp
pv/views/trace/signal.hpp
pv/views/trace/timeitem.hpp
{
const QRect rect(0, 0, width(), height());
- vector< shared_ptr<RowItem> > items(view_.list_by_type<RowItem>());
+ vector< shared_ptr<ViewItem> > items(view_.list_by_type<ViewItem>());
stable_sort(items.begin(), items.end(),
- [](const shared_ptr<RowItem> &a, const shared_ptr<RowItem> &b) {
+ [](const shared_ptr<ViewItem> &a, const shared_ptr<ViewItem> &b) {
return a->drag_point(QRect()).y() < b->drag_point(QRect()).y(); });
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
- for (const shared_ptr<RowItem>& r : items) {
+ for (const shared_ptr<ViewItem>& r : items) {
assert(r);
const bool highlight = !item_dragging_ &&
+++ /dev/null
-/*
- * This file is part of the PulseView project.
- *
- * Copyright (C) 2015 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, see <http://www.gnu.org/licenses/>.
- */
-
-#include "rowitem.hpp"
-
-namespace pv {
-namespace views {
-namespace trace {
-
-void RowItem::hover_point_changed(const QPoint &hp)
-{
- (void)hp;
-}
-
-} // namespace trace
-} // namespace views
-} // 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, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_ROWITEM_HPP
-#define PULSEVIEW_PV_VIEWS_TRACEVIEW_ROWITEM_HPP
-
-#include "viewitem.hpp"
-
-namespace pv {
-namespace views {
-namespace trace {
-
-class RowItem : public ViewItem
-{
- Q_OBJECT
-
-public:
- virtual void hover_point_changed(const QPoint &hp);
-};
-
-} // namespace trace
-} // namespace views
-} // namespace pv
-
-#endif // PULSEVIEW_PV_VIEWS_TRACEVIEW_ROWITEM_HPP
#include <QPropertyAnimation>
-#include "rowitem.hpp"
+#include "viewitem.hpp"
using std::enable_shared_from_this;
using std::pair;
class TraceTreeItemOwner;
-class TraceTreeItem : public RowItem,
+class TraceTreeItem : public ViewItem,
public enable_shared_from_this<TraceTreeItem>
{
Q_OBJECT
return (background.lightness() > 110) ? Qt::black : Qt::white;
}
+void ViewItem::hover_point_changed(const QPoint &hp)
+{
+ (void)hp;
+}
+
} // namespace trace
} // namespace views
} // namespace pv
virtual void delete_pressed();
+ virtual void hover_point_changed(const QPoint &hp);
+
protected:
static QPen highlight_pen();
void Viewport::item_hover(const shared_ptr<ViewItem> &item, QPoint pos)
{
if (item && item->is_draggable(pos))
- setCursor(dynamic_pointer_cast<RowItem>(item) ?
+ setCursor(dynamic_pointer_cast<ViewItem>(item) ?
Qt::SizeVerCursor : Qt::SizeHorCursor);
else
unsetCursor();
&ViewItem::paint_back, &ViewItem::paint_mid,
&ViewItem::paint_fore, nullptr};
- vector< shared_ptr<RowItem> > row_items(view_.list_by_type<RowItem>());
+ vector< shared_ptr<ViewItem> > row_items(view_.list_by_type<ViewItem>());
assert(none_of(row_items.begin(), row_items.end(),
- [](const shared_ptr<RowItem> &r) { return !r; }));
+ [](const shared_ptr<ViewItem> &r) { return !r; }));
stable_sort(row_items.begin(), row_items.end(),
- [](const shared_ptr<RowItem> &a, const shared_ptr<RowItem> &b) {
+ [](const shared_ptr<ViewItem> &a, const shared_ptr<ViewItem> &b) {
return a->drag_point(QRect()).y() < b->drag_point(QRect()).y(); });
const vector< shared_ptr<TimeItem> > time_items(view_.time_items());
(t.get()->*(*paint_func))(p, time_pp);
ViewItemPaintParams row_pp(rect(), view_.scale(), view_.offset());
- for (const shared_ptr<RowItem>& r : row_items)
+ for (const shared_ptr<ViewItem>& r : row_items)
(r.get()->*(*paint_func))(p, row_pp);
}
bool item_dragged = false;
// Drag the row items
- const vector< shared_ptr<RowItem> > row_items(
- view_.list_by_type<RowItem>());
- for (const shared_ptr<RowItem>& r : row_items)
+ const vector< shared_ptr<ViewItem> > row_items(
+ view_.list_by_type<ViewItem>());
+ for (const shared_ptr<ViewItem>& r : row_items)
if (r->dragging()) {
r->drag_by(delta);
${PROJECT_SOURCE_DIR}/pv/views/trace/header.cpp
${PROJECT_SOURCE_DIR}/pv/views/trace/marginwidget.cpp
${PROJECT_SOURCE_DIR}/pv/views/trace/logicsignal.cpp
- ${PROJECT_SOURCE_DIR}/pv/views/trace/rowitem.cpp
${PROJECT_SOURCE_DIR}/pv/views/trace/ruler.cpp
${PROJECT_SOURCE_DIR}/pv/views/trace/signal.cpp
${PROJECT_SOURCE_DIR}/pv/views/trace/timeitem.cpp
${PROJECT_SOURCE_DIR}/pv/views/trace/header.hpp
${PROJECT_SOURCE_DIR}/pv/views/trace/logicsignal.hpp
${PROJECT_SOURCE_DIR}/pv/views/trace/marginwidget.hpp
- ${PROJECT_SOURCE_DIR}/pv/views/trace/rowitem.hpp
${PROJECT_SOURCE_DIR}/pv/views/trace/ruler.hpp
${PROJECT_SOURCE_DIR}/pv/views/trace/signal.hpp
${PROJECT_SOURCE_DIR}/pv/views/trace/timeitem.hpp