QGIS/python/gui/auto_generated/editorwidgets/qgsdoublespinbox.sip.in

151 lines
4.4 KiB
Plaintext
Raw Normal View History

2017-05-08 08:36:06 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/editorwidgets/qgsdoublespinbox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
%ModuleHeaderCode
// fix to allow compilation with sip that for some reason
// doesn't add this include to the file where the code from
// ConvertToSubClassCode goes.
#include <qgsdoublespinbox.h>
%End
2014-09-25 15:08:51 +02:00
class QgsDoubleSpinBox : QDoubleSpinBox
{
2017-05-08 08:36:06 +02:00
%Docstring
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
2017-12-15 10:36:55 -04:00
The clear value can be either the minimum or the maiximum value of the spin box or a custom value.
This value can then be handled by a special value text.
2014-09-25 15:08:51 +02:00
%End
2017-05-08 08:36:06 +02:00
%TypeHeaderCode
#include "qgsdoublespinbox.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsDoubleSpinBox *>( sipCpp ) )
sipType = sipType_QgsDoubleSpinBox;
else
sipType = NULL;
2017-05-08 08:36:06 +02:00
%End
2014-09-25 15:08:51 +02:00
public:
enum ClearValueMode
{
2017-05-08 08:36:06 +02:00
MinimumValue,
MaximumValue,
CustomValue,
};
2014-09-25 15:08:51 +02:00
explicit QgsDoubleSpinBox( QWidget *parent /TransferThis/ = 0 );
2017-05-08 08:36:06 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsDoubleSpinBox.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param parent: parent widget
2017-05-08 08:36:06 +02:00
%End
2014-09-25 15:08:51 +02:00
void setShowClearButton( bool showClearButton );
2017-05-08 08:36:06 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the widget will show a clear button. The clear button
allows users to reset the widget to a default or empty state.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param showClearButton: set to true to show the clear button, or false to hide it
.. seealso:: :py:func:`showClearButton`
2017-05-08 08:36:06 +02:00
%End
2014-09-25 15:08:51 +02:00
bool showClearButton() const;
2017-05-08 08:36:06 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether the widget is showing a clear button.
.. seealso:: :py:func:`setShowClearButton`
2017-05-08 08:36:06 +02:00
%End
2014-09-25 15:08:51 +02:00
void setExpressionsEnabled( bool enabled );
2017-05-08 08:36:06 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets if the widget will allow entry of simple expressions, which are
evaluated and then discarded.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param enabled: set to true to allow expression entry
2017-05-08 08:36:06 +02:00
.. versionadded:: 2.7
%End
bool expressionsEnabled() const;
2017-05-08 08:36:06 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether the widget will allow entry of simple expressions, which are
evaluated and then discarded.
:return: true if spin box allows expression entry
2017-05-08 08:36:06 +02:00
.. versionadded:: 2.7
%End
2014-09-25 15:08:51 +02:00
virtual void clear();
2017-05-08 08:36:06 +02:00
%Docstring
Sets the current value to the value defined by the clear value.
2017-05-08 08:36:06 +02:00
%End
2014-09-25 15:08:51 +02:00
void setClearValue( double customValue, const QString &clearValueText = QString() );
2017-05-08 08:36:06 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Defines the clear value as a custom value and will automatically set the clear value mode to CustomValue.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param customValue: defines the numerical value used as the clear value
:param clearValueText: is the text displayed when the spin box is at the clear value. If not specified, no special value text is used.
.. seealso:: :py:func:`setClearValue`
2017-05-08 08:36:06 +02:00
%End
void setClearValueMode( ClearValueMode mode, const QString &clearValueText = QString() );
2017-05-08 08:36:06 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Defines if the clear value should be the minimum or maximum values of the widget or a custom value.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param mode: mode to user for clear value
:param clearValueText: is the text displayed when the spin box is at the clear value. If not specified, no special value text is used.
2017-05-08 08:36:06 +02:00
%End
double clearValue() const;
2017-05-08 08:36:06 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the value used when clear() is called.
.. seealso:: :py:func:`setClearValue`
%End
void setLineEditAlignment( Qt::Alignment alignment );
%Docstring
Set alignment in the embedded line edit widget
:param alignment:
2017-05-08 08:36:06 +02:00
%End
virtual double valueFromText( const QString &text ) const;
virtual QValidator::State validate( QString &input, int &pos ) const;
2017-05-08 08:36:06 +02:00
virtual void paintEvent( QPaintEvent *e );
2014-09-25 15:08:51 +02:00
protected:
virtual void changeEvent( QEvent *event );
virtual void wheelEvent( QWheelEvent *event );
2017-05-08 08:36:06 +02:00
2014-09-25 15:08:51 +02:00
};
2017-05-08 08:36:06 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/editorwidgets/qgsdoublespinbox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/