X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fruler.cpp;h=be715ec104385576b3c66042325e51ddc14d982a;hp=393af57711c699732c84cfd05c1ee9933dff0f6d;hb=efdec55aec1a137460fa362a381ed1904182bfed;hpb=7c6cbdda4d7beaaf41c752826091b407a203df51
diff --git a/pv/view/ruler.cpp b/pv/view/ruler.cpp
index 393af577..be715ec1 100644
--- a/pv/view/ruler.cpp
+++ b/pv/view/ruler.cpp
@@ -14,8 +14,7 @@
* 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 .
*/
#include
@@ -33,12 +32,13 @@ using std::shared_ptr;
using std::vector;
namespace pv {
-namespace view {
+namespace views {
+namespace TraceView {
-const float Ruler::RulerHeight = 2.5f; // x Text Height
+const float Ruler::RulerHeight = 2.5f; // x Text Height
const int Ruler::MinorTickSubdivision = 4;
-const float Ruler::HoverArrowSize = 0.5f; // x Text Height
+const float Ruler::HoverArrowSize = 0.5f; // x Text Height
Ruler::Ruler(View &parent) :
MarginWidget(parent)
@@ -128,8 +128,7 @@ shared_ptr Ruler::get_mouse_over_item(const QPoint &pt)
void Ruler::paintEvent(QPaintEvent*)
{
if (!tick_position_cache_) {
- auto ffunc = [this](const pv::util::Timestamp& t)
- {
+ auto ffunc = [this](const pv::util::Timestamp& t) {
return format_time_with_distance(
this->view_.tick_period(),
t,
@@ -226,9 +225,9 @@ Ruler::TickPositions Ruler::calculate_tick_positions(
return tp;
}
-void Ruler::mouseDoubleClickEvent(QMouseEvent *e)
+void Ruler::mouseDoubleClickEvent(QMouseEvent *event)
{
- view_.add_flag(view_.offset() + ((double)e->x() + 0.5) * view_.scale());
+ view_.add_flag(view_.offset() + ((double)event->x() + 0.5) * view_.scale());
}
void Ruler::draw_hover_mark(QPainter &p, int text_height)
@@ -272,5 +271,6 @@ void Ruler::resizeEvent(QResizeEvent*)
invalidate_tick_position_cache();
}
-} // namespace view
+} // namespace TraceView
+} // namespace views
} // namespace pv