79 if (view ==
nullptr) {
103 if (symbol ==
"px") {
110 }
else if (symbol ==
"vw") {
114 }
else if (symbol ==
"vh") {
123 if (symbol ==
"vw") {
124 factor = 100.0/sizeX;
126 }
else if (symbol ==
"vh") {
127 factor = 100.0/sizeY;
134 qreal fps =
img->animationInterface()->framerate();
137 }
else if (symbol ==
"%") {
156 if (
dim ==
TIME && symbol ==
"%") {
KisSpinBoxUnitManager * buildUnitManager(QObject *parent) override
The KisDocumentAwareSpinBoxUnitManager class is a KisSpinBoxUnitManager that is able to connect to th...
virtual bool hasPercent(int unitDim) const override
qreal getConversionConstant(int dim, QString symbol) const override
static void setDocumentAwarenessToExistingUnitSpinBox(KisDoubleParseUnitSpinBox *spinBox, bool setUnitFromOutsideToggle=false)
configure a KisDocumentAwareSpinBoxUnitManager for the given spinbox (make the manager a child of the...
KisDocumentAwareSpinBoxUnitManager(QObject *parent=0, int pPixDir=PIX_DIR_X)
qreal getConversionFactor(int dim, QString psymbol) const override
static KisDoubleParseUnitSpinBox * createUnitSpinBoxWithDocumentAwareness(QWidget *parent=0)
create a unitSpinBox that is already document aware.
The KisDoubleParseUnitSpinBox class is an evolution of the.
void setUnitChangeFromOutsideBehavior(bool toggle)
void setUnitManager(KisSpinBoxUnitManager *unitManager)
QPointer< KisView > activeView
static KisPart * instance()
KisMainWindow * currentMainwindow() const
The KisSpinBoxUnitManager class is an abstract interface for the unitspinboxes classes to manage diff...
virtual qreal getConversionConstant(int dim, QString symbol) const
some units conversions are done via an affine transform, not just a linear transform....
virtual qreal getConversionFactor(int dim, QString symbol) const
gets the conversion factor of a managed unit, or -1 in case of error. This method is the one that nee...
KisSpinBoxUnitManager::UnitDimension dim
void grantDocumentRelativeUnits()
calling this method gives access to document relative units. Only subclasses that manage those units ...
virtual bool hasPercent(int unitDim) const
indicate if the unit manager has some kind of way of using a percent unit, used by the main class to ...
QPointer< KisDocument > document