more methods for tools that rely on meta object data
This commit is contained in:
parent
cea3828e3d
commit
e9364e0f11
@ -181,7 +181,6 @@ QskScaleTickmarks QskScaleEngine::divideScale(
|
|||||||
stepSize = divideInterval( interval.width(), maxMajorSteps );
|
stepSize = divideInterval( interval.width(), maxMajorSteps );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ( stepSize != 0.0 )
|
if ( stepSize != 0.0 )
|
||||||
{
|
{
|
||||||
tickmarks = buildTicks( interval, stepSize, maxMinorSteps );
|
tickmarks = buildTicks( interval, stepSize, maxMinorSteps );
|
||||||
|
@ -44,6 +44,11 @@ void QskScaleTickmarks::setTicks(TickType type, const QVector< qreal >& ticks )
|
|||||||
m_ticks[ type ] = ticks;
|
m_ticks[ type ] = ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qreal QskScaleTickmarks::tickAt( TickType type, int index ) const
|
||||||
|
{
|
||||||
|
return m_ticks[ type ].at( index );
|
||||||
|
}
|
||||||
|
|
||||||
void QskScaleTickmarks::reset()
|
void QskScaleTickmarks::reset()
|
||||||
{
|
{
|
||||||
m_ticks[ 0 ].clear();
|
m_ticks[ 0 ].clear();
|
||||||
|
@ -34,7 +34,7 @@ class QSK_EXPORT QskScaleTickmarks
|
|||||||
bool operator!=( const QskScaleTickmarks& ) const noexcept;
|
bool operator!=( const QskScaleTickmarks& ) const noexcept;
|
||||||
|
|
||||||
int tickCount() const noexcept;
|
int tickCount() const noexcept;
|
||||||
int tickCount( TickType ) const noexcept;
|
Q_INVOKABLE int tickCount( TickType ) const noexcept;
|
||||||
|
|
||||||
QVector< qreal > ticks( TickType ) const noexcept;
|
QVector< qreal > ticks( TickType ) const noexcept;
|
||||||
void setTicks( TickType, const QVector< qreal >& );
|
void setTicks( TickType, const QVector< qreal >& );
|
||||||
@ -48,6 +48,8 @@ class QSK_EXPORT QskScaleTickmarks
|
|||||||
void setMajorTicks( const QVector< qreal >& );
|
void setMajorTicks( const QVector< qreal >& );
|
||||||
QVector< qreal > majorTicks() const noexcept;
|
QVector< qreal > majorTicks() const noexcept;
|
||||||
|
|
||||||
|
Q_INVOKABLE qreal tickAt( TickType, int index ) const;
|
||||||
|
|
||||||
void invert();
|
void invert();
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user