TimeSpinBox

Search for usage in LXR

#include <timespinbox.h>

Inherits SpinBox.

Properties

int allunits
 
bool daysOnly
 
int dayunits
 
int maxUnitValue
 
int minUnitValue
 
double secs_per_day
 
double sidereal_year
 
int spacingg
 
var timeScale
 
var timeString
 
double tropical_year
 
var unitStep
 
int unitValue
 

Signals

void scaleChanged (float s)
 

Public Slots

void changeScale (float s)
 

Public Member Functions

 TimeSpinBox (QWidget *parent, bool daysOnly=false)
 
 ~TimeSpinBox () override=default
 
bool daysOnly () const
 
void decreaseTimeUnit ()
 
void getTimeScale ()
 
void getUnitValue ()
 
void increaseTimeUnit ()
 
void reportChange ()
 
void setDaysOnly ()
 
void setDaysOnly (bool daysonly)
 
QString textFromValue (int value) const override
 
float timeScale () const
 
void unitValueFromNum (val)
 
int valueFromText (const QString &text) const override
 

Protected Slots

void reportChange ()
 

Detailed Description

Custom spinbox to handle selection of timestep values with variable units.

Note
this should only be used internally, embedded in a TimeStepBox widget.
Author
Jason Harris
Version
1.0

Definition at line 5 of file TimeSpinBox.qml.

Constructor & Destructor Documentation

◆ TimeSpinBox()

TimeSpinBox::TimeSpinBox ( QWidget parent,
bool  daysOnly = false 
)
explicit

Constructor.

Definition at line 30 of file timespinbox.cpp.

◆ ~TimeSpinBox()

TimeSpinBox::~TimeSpinBox ( )
overridedefault

Destructor (empty)

Member Function Documentation

◆ textFromValue()

QString TimeSpinBox::textFromValue ( int  value) const
override

Convert the internal value to a display string.

Note
reimplemented from QSpinBox value the internal value to convert to a display string
Returns
the display string

◆ timeScale()

float TimeSpinBox::timeScale ( ) const
Returns
the current TimeStep setting

◆ valueFromText()

int TimeSpinBox::valueFromText ( const QString text) const
override

Convert the displayed string to an internal value.

Note
reimplemented from QSpinBox ok bool pointer set to true if conversion was successful
Returns
internal value converted from displayed text

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 18 2022 03:56:49 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.