diff --git a/DRAMSys/traceAnalyzer/CMakeLists.txt b/DRAMSys/traceAnalyzer/CMakeLists.txt index ef03cc71..37da1e4a 100644 --- a/DRAMSys/traceAnalyzer/CMakeLists.txt +++ b/DRAMSys/traceAnalyzer/CMakeLists.txt @@ -84,7 +84,7 @@ add_executable(TraceAnalyzer gototimedialog.cpp presentation/traceplot.cpp tracefiletab.cpp - presentation/pornotracescroller.cpp + presentation/tracescroller.cpp traceanalyzer.cpp presentation/transactiontreewidget.cpp presentation/commenttreewidget.cpp diff --git a/DRAMSys/traceAnalyzer/mainwindow.cpp b/DRAMSys/traceAnalyzer/mainwindow.cpp index 9bdc2565..0e911285 100644 --- a/DRAMSys/traceAnalyzer/mainwindow.cpp +++ b/DRAMSys/traceAnalyzer/mainwindow.cpp @@ -52,7 +52,7 @@ MainWindow::MainWindow(QWidget *parent) : db = new TraceDB("tpr.tdb", true); traceNavigator = new TraceNavigator(db->getGeneralInfo(), this); ui->tracePlot->init(traceNavigator, db); - ui->pornoTraceScroller->init(traceNavigator, db, ui->tracePlot); + ui->traceScroller->init(traceNavigator, db, ui->tracePlot); phases = db->getPhasesInTimespan( traceNavigator->GeneralTraceInfo().TraceSpan()); transactions = db->getTransactionsInTimespan( diff --git a/DRAMSys/traceAnalyzer/presentation/pornotracescroller.cpp b/DRAMSys/traceAnalyzer/presentation/tracescroller.cpp similarity index 91% rename from DRAMSys/traceAnalyzer/presentation/pornotracescroller.cpp rename to DRAMSys/traceAnalyzer/presentation/tracescroller.cpp index 8b66efd2..64506edf 100644 --- a/DRAMSys/traceAnalyzer/presentation/pornotracescroller.cpp +++ b/DRAMSys/traceAnalyzer/presentation/tracescroller.cpp @@ -38,11 +38,11 @@ #include #include #include -#include "pornotracescroller.h" +#include "tracescroller.h" #include "traceplotitem.h" #include "util/engineeringScaleDraw.h" -PornoTraceScroller::PornoTraceScroller(QWidget *parent): +TraceScroller::TraceScroller(QWidget *parent): QwtPlot(parent), isInitialized(false), drawingProperties(false, false, ColorGrouping::PhaseType) { @@ -53,7 +53,7 @@ PornoTraceScroller::PornoTraceScroller(QWidget *parent): canvasClip->attach(this); } -void PornoTraceScroller::init(TraceNavigator *navigator, TracePlot *tracePlot) +void TraceScroller::init(TraceNavigator *navigator, TracePlot *tracePlot) { Q_ASSERT(isInitialized == false); isInitialized = true; @@ -76,7 +76,7 @@ void PornoTraceScroller::init(TraceNavigator *navigator, TracePlot *tracePlot) } -void PornoTraceScroller::setUpTracePlotItem() +void TraceScroller::setUpTracePlotItem() { TracePlotItem *tracePlotItem = new TracePlotItem(transactions, *navigator, drawingProperties); @@ -84,7 +84,7 @@ void PornoTraceScroller::setUpTracePlotItem() tracePlotItem->attach(this); } -void PornoTraceScroller::setUpDrawingProperties() +void TraceScroller::setUpDrawingProperties() { drawingProperties.numberOfRanks = navigator->GeneralTraceInfo().numberOfRanks; drawingProperties.numberOfBanks = navigator->GeneralTraceInfo().numberOfBanks; @@ -96,14 +96,14 @@ void PornoTraceScroller::setUpDrawingProperties() } -void PornoTraceScroller::setUpAxis() +void TraceScroller::setUpAxis() { setAxisScale(yLeft, -1, navigator->GeneralTraceInfo().numberOfBanks + 2, 1.0); axisScaleDraw(yLeft)->enableComponent(QwtAbstractScaleDraw::Labels, false ); axisScaleDraw(yLeft)->enableComponent(QwtAbstractScaleDraw::Ticks, false ); } -void PornoTraceScroller::connectNavigatorQ_SIGNALS() +void TraceScroller::connectNavigatorQ_SIGNALS() { QObject::connect(navigator, SIGNAL(currentTraceTimeChanged()), this, SLOT(currentTraceTimeChanged())); @@ -113,15 +113,15 @@ void PornoTraceScroller::connectNavigatorQ_SIGNALS() SLOT(selectedTransactionsChanged())); } -Timespan PornoTraceScroller::GetCurrentTimespan() +Timespan TraceScroller::GetCurrentTimespan() { traceTime deltaOnTracePlot = navigator->GeneralTraceInfo().span.End() - tracePlot->ZoomLevel(); - traceTime deltaOnPornoTraceScroller = navigator->GeneralTraceInfo().span.End() - + traceTime deltaOnTraceScroller = navigator->GeneralTraceInfo().span.End() - zoomLevel; traceTime newBegin = static_cast - (tracePlot->GetCurrentTimespan().Begin() * (1.0 * deltaOnPornoTraceScroller) / + (tracePlot->GetCurrentTimespan().Begin() * (1.0 * deltaOnTraceScroller) / deltaOnTracePlot); Timespan span(newBegin, newBegin + zoomLevel); @@ -133,7 +133,7 @@ Timespan PornoTraceScroller::GetCurrentTimespan() } -void PornoTraceScroller::getAndDrawComments() +void TraceScroller::getAndDrawComments() { for (const auto &pair : navigator->getComments()) { const Comment &comment = pair.second; @@ -151,18 +151,18 @@ void PornoTraceScroller::getAndDrawComments() * */ -void PornoTraceScroller::selectedTransactionsChanged() +void TraceScroller::selectedTransactionsChanged() { replot(); } -void PornoTraceScroller::colorGroupingChanged(ColorGrouping colorGrouping) +void TraceScroller::colorGroupingChanged(ColorGrouping colorGrouping) { drawingProperties.colorGrouping = colorGrouping; replot(); } -void PornoTraceScroller::currentTraceTimeChanged() +void TraceScroller::currentTraceTimeChanged() { Timespan spanOnTracePlot = tracePlot->GetCurrentTimespan(); canvasClip->setInterval(spanOnTracePlot.Begin(), spanOnTracePlot.End()); @@ -172,21 +172,21 @@ void PornoTraceScroller::currentTraceTimeChanged() replot(); } -void PornoTraceScroller::commentsChanged() +void TraceScroller::commentsChanged() { detachItems(QwtPlotItem::Rtti_PlotMarker); getAndDrawComments(); replot(); } -void PornoTraceScroller::tracePlotZoomChanged() +void TraceScroller::tracePlotZoomChanged() { zoomLevel = tracePlot->ZoomLevel() * tracePlotEnlargementFactor; if (zoomLevel > navigator->GeneralTraceInfo().span.timeCovered()) zoomLevel = navigator->GeneralTraceInfo().span.timeCovered(); } -bool PornoTraceScroller::eventFilter( QObject *object, QEvent *event ) +bool TraceScroller::eventFilter( QObject *object, QEvent *event ) { if (object == canvas()) { static bool clipDragged = false; diff --git a/DRAMSys/traceAnalyzer/presentation/pornotracescroller.h b/DRAMSys/traceAnalyzer/presentation/tracescroller.h similarity index 93% rename from DRAMSys/traceAnalyzer/presentation/pornotracescroller.h rename to DRAMSys/traceAnalyzer/presentation/tracescroller.h index 98f5a97b..b9166f2e 100644 --- a/DRAMSys/traceAnalyzer/presentation/pornotracescroller.h +++ b/DRAMSys/traceAnalyzer/presentation/tracescroller.h @@ -35,8 +35,8 @@ * Matthias Jung */ -#ifndef PORNOTRACESCROLLER_H -#define PORNOTRACESCROLLER_H +#ifndef TRACESCROLLER_H +#define TRACESCROLLER_H #include #include @@ -45,7 +45,7 @@ #include "traceplot.h" -class PornoTraceScroller : public QwtPlot +class TraceScroller : public QwtPlot { Q_OBJECT private: @@ -67,7 +67,7 @@ private: TraceDrawingProperties drawingProperties; public: - PornoTraceScroller(QWidget *parent = NULL); + TraceScroller(QWidget *parent = NULL); void init(TraceNavigator *navigator, TracePlot *tracePlot); Timespan GetCurrentTimespan(); @@ -80,4 +80,4 @@ public Q_SLOTS: }; -#endif // PORNOTRACESCROLLER_H +#endif // TraceScroller_H diff --git a/DRAMSys/traceAnalyzer/tracefiletab.cpp b/DRAMSys/traceAnalyzer/tracefiletab.cpp index bf0ff6ef..a0d638f5 100644 --- a/DRAMSys/traceAnalyzer/tracefiletab.cpp +++ b/DRAMSys/traceAnalyzer/tracefiletab.cpp @@ -75,9 +75,9 @@ void TraceFileTab::initNavigatorAndItsDependentWidgets(QString path) ui->traceplot->init(navigator); - ui->pornoTraceScroller->init(navigator, ui->traceplot); + ui->traceScroller->init(navigator, ui->traceplot); connect(this, SIGNAL(colorGroupingChanged(ColorGrouping)), - ui->pornoTraceScroller, SLOT(colorGroupingChanged(ColorGrouping))); + ui->traceScroller, SLOT(colorGroupingChanged(ColorGrouping))); ui->selectedTransactionTree->init(navigator); //ui->debugMessages->init(navigator,ui->traceplot); diff --git a/DRAMSys/traceAnalyzer/tracefiletab.h b/DRAMSys/traceAnalyzer/tracefiletab.h index 3bef247c..5629a6c5 100644 --- a/DRAMSys/traceAnalyzer/tracefiletab.h +++ b/DRAMSys/traceAnalyzer/tracefiletab.h @@ -43,7 +43,7 @@ #include #include "presentation/tracenavigator.h" #include "presentation/traceplot.h" -#include "presentation/pornotracescroller.h" +#include "presentation/tracescroller.h" namespace Ui { class TraceFileTab; diff --git a/DRAMSys/traceAnalyzer/tracefiletab.ui b/DRAMSys/traceAnalyzer/tracefiletab.ui index e3d18d6f..d6951f1b 100644 --- a/DRAMSys/traceAnalyzer/tracefiletab.ui +++ b/DRAMSys/traceAnalyzer/tracefiletab.ui @@ -38,7 +38,7 @@ - + 4 @@ -162,9 +162,9 @@
presentation/traceplot.h
- PornoTraceScroller + TraceScroller QListView -
presentation/pornotracescroller.h
+
presentation/tracescroller.h
CommentTreeWidget