#include <assert.h>
-#include <boost/foreach.hpp>
-
#include <QApplication>
#include <QMenu>
#include <QMouseEvent>
int max_width = 0;
const vector< shared_ptr<Trace> > traces(_view.get_traces());
- BOOST_FOREACH(shared_ptr<Trace> t, traces) {
+ for (shared_ptr<Trace> t : traces) {
assert(t);
if (t->enabled()) {
const int w = width();
const vector< shared_ptr<Trace> > traces(_view.get_traces());
- BOOST_FOREACH(const shared_ptr<Trace> t, traces)
+ for (const shared_ptr<Trace> t : traces)
{
assert(t);
if (t->pt_in_label_rect(0, w, pt))
void Header::clear_selection()
{
const vector< shared_ptr<Trace> > traces(_view.get_traces());
- BOOST_FOREACH(const shared_ptr<Trace> t, traces) {
+ for (const shared_ptr<Trace> t : traces) {
assert(t);
t->select(false);
}
painter.setRenderHint(QPainter::Antialiasing);
const bool dragging = !_drag_traces.empty();
- BOOST_FOREACH(const shared_ptr<Trace> t, traces)
+ for (const shared_ptr<Trace> t : traces)
{
assert(t);
_mouse_down_point = event->pos();
// Save the offsets of any signals which will be dragged
- BOOST_FOREACH(const shared_ptr<Trace> t, traces)
+ for (const shared_ptr<Trace> t : traces)
if (t->selected())
_drag_traces.push_back(
make_pair(t, t->get_v_offset()));
if (~QApplication::keyboardModifiers() & Qt::ControlModifier) {
// Unselect all other signals because the Ctrl is not
// pressed
- BOOST_FOREACH(const shared_ptr<Trace> t, traces)
+ for (const shared_ptr<Trace> t : traces)
if (t != mouse_over_trace)
t->select(false);
}
case Qt::Key_Delete:
{
const vector< shared_ptr<Trace> > traces(_view.get_traces());
- BOOST_FOREACH(const shared_ptr<Trace> t, traces)
+ for (const shared_ptr<Trace> t : traces)
if (t->selected())
t->delete_pressed();
break;
void Header::on_signals_changed()
{
const vector< shared_ptr<Trace> > traces(_view.get_traces());
- BOOST_FOREACH(shared_ptr<Trace> t, traces) {
+ for (shared_ptr<Trace> t : traces) {
assert(t);
connect(t.get(), SIGNAL(visibility_changed()),
this, SLOT(on_trace_changed()));