MuseScore  3.4
Music composition and notation
Public Slots | Public Member Functions | Properties | Private Attributes | Related Functions | List of all members
Ms::PluginAPI::FractionWrapper Class Reference

Fraction object available to QML plugins. More...

#include <fraction.h>

Inheritance diagram for Ms::PluginAPI::FractionWrapper:
Inheritance graph
[legend]
Collaboration diagram for Ms::PluginAPI::FractionWrapper:
Collaboration graph
[legend]

Public Slots

void setFraction (Fraction _f)
 

Public Member Functions

 FractionWrapper ()=default
 
 FractionWrapper (const Ms::Fraction &_f)
 
Ms::Fraction fraction () const
 
int numerator () const
 
int denominator () const
 
int ticks () const
 
QString toString () const
 

Properties

int numerator
 Fraction numerator. More...
 
int denominator
 Fraction denominator. More...
 
int ticks
 MIDI ticks number equal to the number of the whole notes represented by this fraction. More...
 
QString str
 String representation of this fraction. More...
 

Private Attributes

Ms::Fraction f
 

Related Functions

(Note that these are not member functions.)

FractionWrapperwrap (Ms::Fraction f)
 

Detailed Description

Fraction object available to QML plugins.

Use PluginAPI::PluginAPI::fraction to create a fraction for usage within your plugin:

var ts = newElement(Element.TIMESIG);
ts.timesig = fraction(3, 4);

Constructor & Destructor Documentation

◆ FractionWrapper() [1/2]

Ms::PluginAPI::FractionWrapper::FractionWrapper ( )
default

◆ FractionWrapper() [2/2]

Ms::PluginAPI::FractionWrapper::FractionWrapper ( const Ms::Fraction _f)
inline

Member Function Documentation

◆ denominator()

int Ms::PluginAPI::FractionWrapper::denominator ( ) const
inline

◆ fraction()

Ms::Fraction Ms::PluginAPI::FractionWrapper::fraction ( ) const
inline

◆ numerator()

int Ms::PluginAPI::FractionWrapper::numerator ( ) const
inline

◆ setFraction

void Ms::PluginAPI::FractionWrapper::setFraction ( Fraction  _f)
inlineslot

◆ ticks()

int Ms::PluginAPI::FractionWrapper::ticks ( ) const
inline

◆ toString()

QString Ms::PluginAPI::FractionWrapper::toString ( ) const
inline

Friends And Related Function Documentation

◆ wrap()

FractionWrapper * wrap ( Ms::Fraction  f)
related

Member Data Documentation

◆ f

Ms::Fraction Ms::PluginAPI::FractionWrapper::f
private

Property Documentation

◆ denominator

int Ms::PluginAPI::FractionWrapper::denominator
read

Fraction denominator.

◆ numerator

int Ms::PluginAPI::FractionWrapper::numerator
read

Fraction numerator.

◆ str

QString Ms::PluginAPI::FractionWrapper::str
read

String representation of this fraction.

◆ ticks

int Ms::PluginAPI::FractionWrapper::ticks
read

MIDI ticks number equal to the number of the whole notes represented by this fraction.


The documentation for this class was generated from the following file: