projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Session: Don't reset session name for file devices
[pulseview.git]
/
pv
/
view
/
header.cpp
diff --git
a/pv/view/header.cpp
b/pv/view/header.cpp
index bfb75532aa58ad7508db13b1243ce051613e131c..8849ee3fed2beb4b7fe8e9ba1fcfd445412c41df 100644
(file)
--- a/
pv/view/header.cpp
+++ b/
pv/view/header.cpp
@@
-14,8
+14,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "header.hpp"
*/
#include "header.hpp"
@@
-49,7
+48,8
@@
using std::stable_sort;
using std::vector;
namespace pv {
using std::vector;
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
const int Header::Padding = 12;
const int Header::BaselineOffset = 5;
const int Header::Padding = 12;
const int Header::BaselineOffset = 5;
@@
-105,18
+105,17
@@
void Header::paintEvent(QPaintEvent*)
// would be clipped away.
const QRect rect(0, 0, width() - BaselineOffset, height());
// would be clipped away.
const QRect rect(0, 0, width() - BaselineOffset, height());
- vector< shared_ptr<
TraceTree
Item> > items(
- view_.list_by_type<
TraceTree
Item>());
+ vector< shared_ptr<
Row
Item> > items(
+ view_.list_by_type<
Row
Item>());
stable_sort(items.begin(), items.end(),
stable_sort(items.begin(), items.end(),
- [](const shared_ptr<
TraceTreeItem> &a, const shared_ptr<TraceTree
Item> &b) {
- return a->
visual_v_offset() < b->visual_v_offset
(); });
+ [](const shared_ptr<
RowItem> &a, const shared_ptr<Row
Item> &b) {
+ return a->
point(QRect()).y() < b->point(QRect()).y
(); });
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
- for (const shared_ptr<TraceTreeItem> r : items)
- {
+ for (const shared_ptr<RowItem> r : items) {
assert(r);
const bool highlight = !item_dragging_ &&
assert(r);
const bool highlight = !item_dragging_ &&
@@
-154,15
+153,15
@@
void Header::contextMenuEvent(QContextMenuEvent *event)
menu->exec(event->globalPos());
}
menu->exec(event->globalPos());
}
-void Header::keyPressEvent(QKeyEvent *e)
+void Header::keyPressEvent(QKeyEvent *e
vent
)
{
{
- assert(e);
+ assert(e
vent
);
- MarginWidget::keyPressEvent(e);
+ MarginWidget::keyPressEvent(e
vent
);
- if (e
->key() == Qt::Key_G && e
->modifiers() == Qt::ControlModifier)
+ if (e
vent->key() == Qt::Key_G && event
->modifiers() == Qt::ControlModifier)
on_group();
on_group();
- else if (e
->key() == Qt::Key_U && e
->modifiers() == Qt::ControlModifier)
+ else if (e
vent->key() == Qt::Key_U && event
->modifiers() == Qt::ControlModifier)
on_ungroup();
}
on_ungroup();
}
@@
-219,5
+218,6
@@
void Header::on_ungroup()
} while (restart);
}
} while (restart);
}
-} // namespace view
+} // namespace TraceView
+} // namespace views
} // namespace pv
} // namespace pv