Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename MythUIEditBar::SetPosition() to SetEditPosition() to avoid con…

…fusion with the wider use of SetPosition() to set the x,y coords of a widget.
  • Loading branch information...
commit a336dc10d4a235e2909a1e4f6250914a7637a5b3 1 parent 6cfda0c
@stuartm stuartm authored
View
2  mythtv/libs/libmythtv/osd.cpp
@@ -373,7 +373,7 @@ void OSD::SetValues(const QString &window, QHash<QString,float> &map,
{
MythUIEditBar *edit = dynamic_cast<MythUIEditBar *> (win->GetChild("editbar"));
if (edit)
- edit->SetPosition(map.value("position"));
+ edit->SetEditPosition(map.value("position"));
}
if (found)
View
16 mythtv/libs/libmythui/mythuieditbar.cpp
@@ -2,7 +2,7 @@
#include "mythuieditbar.h"
MythUIEditBar::MythUIEditBar(MythUIType *parent, const QString &name)
- : MythUIType(parent, name), m_position(0.0), m_total(1.0)
+ : MythUIType(parent, name), m_editPosition(0.0), m_total(1.0)
{
}
@@ -28,15 +28,15 @@ void MythUIEditBar::SetTotal(double total)
Display();
}
-void MythUIEditBar::SetPosition(double position)
+void MythUIEditBar::SetEditPosition(double position)
{
float newpos = position / m_total;
if (newpos < 0.0f || newpos > 1.0f)
return;
- bool changed = m_position != newpos;
- m_position = newpos;
+ bool changed = m_editPosition != newpos;
+ m_editPosition = newpos;
if (changed)
Display();
@@ -54,9 +54,9 @@ void MythUIEditBar::SetTotal(long long total)
SetTotal((double)total);
}
-void MythUIEditBar::SetPosition(long long position)
+void MythUIEditBar::SetEditPosition(long long position)
{
- SetPosition((double)position);
+ SetEditPosition((double)position);
}
void MythUIEditBar::AddRegion(long long start, long long end)
@@ -111,7 +111,7 @@ void MythUIEditBar::Display(void)
if (position && keeparea.isValid())
{
int offset = position->GetArea().width() / 2;
- int newx = (int)(((float)keeparea.width() * m_position) + 0.5f);
+ int newx = (int)(((float)keeparea.width() * m_editPosition) + 0.5f);
int newy = position->GetArea().top();
position->SetPosition(newx - offset, newy);
position->SetVisible(true);
@@ -308,7 +308,7 @@ void MythUIEditBar::CopyFrom(MythUIType *base)
if (!editbar)
return;
- m_position = editbar->m_position;
+ m_editPosition = editbar->m_editPosition;
QListIterator<QPair<float, float> > it(m_regions);
View
6 mythtv/libs/libmythui/mythuieditbar.h
@@ -19,10 +19,10 @@ class MUI_PUBLIC MythUIEditBar : public MythUIType
~MythUIEditBar();
void SetTotal(double total);
- void SetPosition(double position);
+ void SetEditPosition(double position);
+ void SetEditPosition(long long position);
void AddRegion(double start, double end);
void SetTotal(long long total);
- void SetPosition(long long position);
void AddRegion(long long start, long long end);
void ClearRegions(void);
void Display(void);
@@ -41,7 +41,7 @@ class MUI_PUBLIC MythUIEditBar : public MythUIType
void CalcInverseRegions(void);
void ClearImages(void);
- float m_position;
+ float m_editPosition;
double m_total;
QList<QPair<float,float> > m_regions;
QList<QPair<float,float> > m_invregions;
Please sign in to comment.
Something went wrong with that request. Please try again.