NeTrainSim 0.1.1 beta
The Open-Source Network Trains Simulator
 
Loading...
Searching...
No Matches
numericdelegate.h File Reference

This file contains the declaration of the NumericDelegate class. More...

#include <QItemDelegate>
#include <QDoubleSpinBox>

Go to the source code of this file.

Classes

class  NumericDelegate
 The NumericDelegate class provides a double spin box editor for numeric data in a view. More...
 

Detailed Description

This file contains the declaration of the NumericDelegate class.

The NumericDelegate class is a QItemDelegate subclass that provides a double spin box editor for numeric data in a view. It allows users to edit numeric values using double spin boxes in a model-based view. The NumericDelegate class sets the minimum and maximum values of the spin box to -1,000,000,000 and 1,000,000,000, respectively. It also sets the number of decimal places to 3. The NumericDelegate class is intended to be used with numeric data in a table or list view. It is typically used with a QAbstractItemModel-based model. The NumericDelegate class is derived from QItemDelegate and utilizes QDoubleSpinBox as the editor widget. This class is suitable for handling double numeric values in a table or list view with a QDoubleSpinBox editor. The NumericDelegate class can be used in a QWidget-based application. Note: The NumericDelegate class does not handle display text formatting.

Author
Ahmed Aredah
Date
6/7/2023