You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
3.0 KiB
123 lines
3.0 KiB
13 years ago
|
// This is the SIP interface definition for TQSpinBox.
|
||
13 years ago
|
//
|
||
|
// Copyright (c) 2007
|
||
|
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
|
||
|
//
|
||
13 years ago
|
// This file is part of PyTQt.
|
||
13 years ago
|
//
|
||
13 years ago
|
// This copy of PyTQt is free software; you can redistribute it and/or modify it
|
||
13 years ago
|
// under the terms of the GNU General Public License as published by the Free
|
||
|
// Software Foundation; either version 2, or (at your option) any later
|
||
|
// version.
|
||
|
//
|
||
13 years ago
|
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
|
||
13 years ago
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||
|
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||
|
// details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public License along with
|
||
13 years ago
|
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
|
||
13 years ago
|
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||
|
|
||
|
|
||
|
%ExportedDoc
|
||
13 years ago
|
<Sect2><Title>TQSpinBox</Title>
|
||
13 years ago
|
<FuncSynopsis>
|
||
|
<FuncDef>virtual int <Function>mapTextToValue</Function></FuncDef>
|
||
|
<ParamDef>bool *<Parameter>ok</Parameter></ParamDef>
|
||
|
</FuncSynopsis>
|
||
|
<Para>
|
||
|
This returns a tuple of the <Literal>int</Literal> result and the modified
|
||
|
<Literal>ok</Literal> value.
|
||
|
</Para>
|
||
|
</Sect2>
|
||
|
%End
|
||
|
|
||
|
|
||
13 years ago
|
class TQSpinBox : TQWidget, TQRangeControl
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqspinbox.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQSpinBox(TQWidget * /TransferThis/ = 0,const char * = 0);
|
||
|
TQSpinBox(int,int,int = 1,TQWidget * /TransferThis/ = 0,const char * = 0);
|
||
13 years ago
|
|
||
13 years ago
|
TQString text() const;
|
||
13 years ago
|
|
||
13 years ago
|
virtual TQString prefix() const;
|
||
|
virtual TQString suffix() const;
|
||
|
virtual TQString cleanText() const;
|
||
13 years ago
|
|
||
13 years ago
|
virtual void setSpecialValueText(const TQString &);
|
||
|
TQString specialValueText() const;
|
||
13 years ago
|
|
||
|
virtual void setWrapping(bool);
|
||
|
bool wrapping() const;
|
||
|
|
||
|
enum ButtonSymbols {
|
||
|
UpDownArrows,
|
||
|
PlusMinus
|
||
|
};
|
||
|
|
||
|
virtual void setButtonSymbols(ButtonSymbols);
|
||
|
ButtonSymbols buttonSymbols() const;
|
||
|
|
||
13 years ago
|
virtual void setValidator(const TQValidator *);
|
||
|
const TQValidator *validator() const;
|
||
13 years ago
|
|
||
13 years ago
|
TQSize sizeHint() const;
|
||
|
TQSize minimumSizeHint() const;
|
||
13 years ago
|
|
||
|
int minValue() const;
|
||
|
int maxValue() const;
|
||
|
void setMinValue(int);
|
||
|
void setMaxValue(int);
|
||
|
int lineStep() const;
|
||
|
void setLineStep(int);
|
||
|
int value() const;
|
||
|
|
||
13 years ago
|
TQRect upRect() const;
|
||
|
TQRect downRect() const;
|
||
13 years ago
|
|
||
|
public slots:
|
||
|
virtual void setValue(int);
|
||
13 years ago
|
virtual void setPrefix(const TQString &);
|
||
|
virtual void setSuffix(const TQString &);
|
||
13 years ago
|
virtual void stepUp();
|
||
|
virtual void stepDown();
|
||
|
virtual void setEnabled(bool);
|
||
|
virtual void selectAll();
|
||
|
|
||
|
signals:
|
||
|
void valueChanged(int);
|
||
13 years ago
|
void valueChanged(const TQString &);
|
||
13 years ago
|
|
||
|
protected:
|
||
13 years ago
|
virtual TQString mapValueToText(int);
|
||
13 years ago
|
virtual int mapTextToValue(bool *);
|
||
13 years ago
|
TQString currentValueText();
|
||
13 years ago
|
|
||
|
virtual void updateDisplay();
|
||
|
virtual void interpretText();
|
||
|
|
||
13 years ago
|
TQLineEdit *editor() const;
|
||
13 years ago
|
|
||
|
virtual void valueChange();
|
||
|
virtual void rangeChange();
|
||
|
|
||
13 years ago
|
bool eventFilter(TQObject *,TQEvent *);
|
||
|
void resizeEvent(TQResizeEvent *);
|
||
|
void wheelEvent(TQWheelEvent *);
|
||
|
void leaveEvent(TQEvent *);
|
||
13 years ago
|
|
||
13 years ago
|
void styleChange(TQStyle &);
|
||
13 years ago
|
|
||
|
protected slots:
|
||
|
void textChanged();
|
||
|
|
||
|
private:
|
||
13 years ago
|
TQSpinBox(const TQSpinBox &);
|
||
13 years ago
|
};
|