projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ViewWidget: Moved in unified accept_drag
[pulseview.git]
/
pv
/
view
/
rowitemowner.cpp
diff --git
a/pv/view/rowitemowner.cpp
b/pv/view/rowitemowner.cpp
index dd41af05b6e900ce9a6c2dc25d34181be3d81836..8970f45a73727207fae763043efbb6df66467c21 100644
(file)
--- a/
pv/view/rowitemowner.cpp
+++ b/
pv/view/rowitemowner.cpp
@@
-20,8
+20,8
@@
#include <cassert>
#include <cassert>
-#include "rowitem.h"
-#include "rowitemowner.h"
+#include "rowitem.h
pp
"
+#include "rowitemowner.h
pp
"
using std::max;
using std::make_pair;
using std::max;
using std::make_pair;
@@
-35,28
+35,28
@@
namespace view {
vector< shared_ptr<RowItem> >& RowItemOwner::child_items()
{
vector< shared_ptr<RowItem> >& RowItemOwner::child_items()
{
- return
_items
;
+ return
items_
;
}
const vector< shared_ptr<RowItem> >& RowItemOwner::child_items() const
{
}
const vector< shared_ptr<RowItem> >& RowItemOwner::child_items() const
{
- return
_items
;
+ return
items_
;
}
void RowItemOwner::clear_child_items()
{
}
void RowItemOwner::clear_child_items()
{
- for (auto &i :
_items
) {
+ for (auto &i :
items_
) {
assert(i->owner() == this);
i->set_owner(nullptr);
}
assert(i->owner() == this);
i->set_owner(nullptr);
}
-
_items
.clear();
+
items_
.clear();
}
void RowItemOwner::add_child_item(std::shared_ptr<RowItem> item)
{
assert(!item->owner());
item->set_owner(this);
}
void RowItemOwner::add_child_item(std::shared_ptr<RowItem> item)
{
assert(!item->owner());
item->set_owner(this);
-
_items
.push_back(item);
+
items_
.push_back(item);
extents_changed(true, true);
}
extents_changed(true, true);
}
@@
-65,16
+65,16
@@
void RowItemOwner::remove_child_item(std::shared_ptr<RowItem> item)
{
assert(item->owner() == this);
item->set_owner(nullptr);
{
assert(item->owner() == this);
item->set_owner(nullptr);
- auto iter = std::find(
_items.begin(), _items
.end(), item);
- assert(iter !=
_items
.end());
-
_items
.erase(iter);
+ auto iter = std::find(
items_.begin(), items_
.end(), item);
+ assert(iter !=
items_
.end());
+
items_
.erase(iter);
extents_changed(true, true);
}
RowItemOwner::iterator RowItemOwner::begin()
{
extents_changed(true, true);
}
RowItemOwner::iterator RowItemOwner::begin()
{
- return iterator(this,
_items
.begin());
+ return iterator(this,
items_
.begin());
}
RowItemOwner::iterator RowItemOwner::end()
}
RowItemOwner::iterator RowItemOwner::end()
@@
-84,7
+84,7
@@
RowItemOwner::iterator RowItemOwner::end()
RowItemOwner::const_iterator RowItemOwner::begin() const
{
RowItemOwner::const_iterator RowItemOwner::begin() const
{
- return const_iterator(this,
_items
.cbegin());
+ return const_iterator(this,
items_
.cbegin());
}
RowItemOwner::const_iterator RowItemOwner::end() const
}
RowItemOwner::const_iterator RowItemOwner::end() const
@@
-94,7
+94,8
@@
RowItemOwner::const_iterator RowItemOwner::end() const
pair<int, int> RowItemOwner::v_extents() const
{
pair<int, int> RowItemOwner::v_extents() const
{
- pair<int, int> extents(0, 0);
+ pair<int, int> extents(INT_MAX, INT_MIN);
+
for (const shared_ptr<RowItem> r : child_items()) {
assert(r);
if (!r->enabled())
for (const shared_ptr<RowItem> r : child_items()) {
assert(r);
if (!r->enabled())
@@
-111,5
+112,9
@@
pair<int, int> RowItemOwner::v_extents() const
return extents;
}
return extents;
}
+void RowItemOwner::restack_items()
+{
+}
+
} // view
} // pv
} // view
} // pv