Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::CustomDoubleSpinBoxQt Class Reference

#include <customdoublespinboxqt.h>

+ Inheritance diagram for inviwo::CustomDoubleSpinBoxQt:

Public Member Functions

 CustomDoubleSpinBoxQt (QWidget *parent=0)
 
virtual QString textFromValue (double value) const
 
QSize sizeHint () const
 
void setDecimals (int decimals)
 
virtual void timerEvent (QTimerEvent *event)
 Overrides the timerEvent to prevent spinbox to be updated twice in case of calculations being slows.
 

Protected Attributes

QSize cachedSizeHint_
 
int displayDecimals_
 

Detailed Description

Enables displaying a value with a certain precision without truncating the actual value, which QDoubleSpinBox does.

Member Function Documentation

◆ setDecimals()

void inviwo::CustomDoubleSpinBoxQt::setDecimals ( int decimals)

Override QDoubleSpinBox decimals so that we can cache size and decimals to display.

◆ sizeHint()

QSize inviwo::CustomDoubleSpinBoxQt::sizeHint ( ) const
inline

Override QDoubleSpinBox size hint so that it does not use the one for many decimals.


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