diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 90825e2392b2d70e43c7a25b8a3752299a933894 (patch) | |
tree | e33aa27f02b74604afbfd0ea4f1cfca8833d882a /python/pyqt/sip/qt/qlineedit.sip | |
download | tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'python/pyqt/sip/qt/qlineedit.sip')
-rw-r--r-- | python/pyqt/sip/qt/qlineedit.sip | 427 |
1 files changed, 427 insertions, 0 deletions
diff --git a/python/pyqt/sip/qt/qlineedit.sip b/python/pyqt/sip/qt/qlineedit.sip new file mode 100644 index 00000000..47bd3fa0 --- /dev/null +++ b/python/pyqt/sip/qt/qlineedit.sip @@ -0,0 +1,427 @@ +// This is the SIP interface definition for QLineEdit. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyQt. +// +// This copy of PyQt is free software; you can redistribute it and/or modify it +// 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. +// +// PyQt is supplied in the hope that it will be useful, but WITHOUT ANY +// 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 +// PyQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +%ExportedDoc +<Sect2><Title>QLineEdit</Title> +<FuncSynopsis> + <FuncDef>int <Function>characterAt</Function></FuncDef> + <ParamDef>int <Parameter>xpos</Parameter></ParamDef> + <ParamDef>QChar *<Parameter>chr</Parameter></ParamDef> +</FuncSynopsis> +<Para> +This takes only the <Literal>xpos</Literal> parameter and returns the int +result and the <Literal>chr</Literal> value as a tuple. (Qt v3+) +</Para> + +<FuncSynopsis> + <FuncDef>void <Function>del</Function></FuncDef> + <ParamDef></ParamDef> +</FuncSynopsis> +<Para> +This has been renamed <Literal>delChar</Literal> in Python. (Qt v2+) +</Para> + +<FuncSynopsis> + <FuncDef>bool <Function>getSelection</Function></FuncDef> + <ParamDef>int *<Parameter>start</Parameter></ParamDef> + <ParamDef>int *<Parameter>end</Parameter></ParamDef> +</FuncSynopsis> +<Para> +This takes no parameters and returns the bool result and the +<Literal>start</Literal> and <Literal>end</Literal> values as a tuple. +(Qt v3+) +</Para> +</Sect2> +%End + + +%If (Qt_3_0_0 -) + +class QLineEdit : QFrame +{ +%TypeHeaderCode +#include <qlineedit.h> +%End + +public: + QLineEdit(QWidget * /TransferThis/,const char * = 0); + QLineEdit(const QString &,QWidget * /TransferThis/,const char * = 0); +%If (Qt_3_2_0 -) + QLineEdit(const QString &,const QString &,QWidget * /TransferThis/, + const char * = 0); +%End + + QString text() const; + + QString displayText() const; + + int maxLength() const; + + bool frame() const; + + enum EchoMode { + Normal, + NoEcho, + Password + }; + + EchoMode echoMode() const; + + bool isReadOnly() const; + + const QValidator *validator() const; + + QSize sizeHint() const; + QSize minimumSizeHint() const; + + int cursorPosition() const; + // Obsolete. + bool validateAndSet(const QString &,int,int,int); + + int alignment() const; + + void cursorForward(bool,int = 1); + void cursorBackward(bool,int = 1); + void cursorWordForward(bool); + void cursorWordBackward(bool); + void backspace(); + void del() /PyName=delChar/; + void home(bool); + void end(bool); + +%If (Qt_3_2_0 -) + bool isModified() const; + void clearModified(); +%End + + // Obsolete. + bool edited() const; + // Obsolete. + void setEdited(bool); + + bool hasSelectedText() const; + QString selectedText() const; +%If (Qt_3_2_0 -) + int selectionStart() const; +%End + + bool isUndoAvailable() const; + bool isRedoAvailable() const; + + bool dragEnabled() const; + +%If (Qt_3_2_0 -) + QString inputMask() const; + void setInputMask(const QString &); + bool hasAcceptableInput() const; +%End + +public slots: + virtual void setText(const QString &); + virtual void selectAll(); + virtual void deselect(); + virtual void clearValidator(); + virtual void insert(const QString &); + virtual void clear(); + virtual void undo(); + virtual void redo(); + virtual void setMaxLength(int); + virtual void setFrame(bool); + virtual void setEchoMode(EchoMode); + virtual void setReadOnly(bool); + virtual void setValidator(const QValidator *); + virtual void setFont(const QFont &); + virtual void setPalette(const QPalette &); + virtual void setSelection(int,int); + virtual void setCursorPosition(int); + virtual void setAlignment(int); +%If (Qt_CLIPBOARD) + virtual void cut(); + virtual void copy() const; + virtual void paste(); +%End + virtual void setDragEnabled(bool); + +signals: + void textChanged(const QString &); + void returnPressed(); +%If (Qt_3_1_0 -) + void lostFocus(); +%End + void selectionChanged(); + +protected: + bool event(QEvent *); + void mousePressEvent(QMouseEvent *); + void mouseMoveEvent(QMouseEvent *); + void mouseReleaseEvent(QMouseEvent *); + void mouseDoubleClickEvent(QMouseEvent *); + void keyPressEvent(QKeyEvent *); + void imStartEvent(QIMEvent *); + void imComposeEvent(QIMEvent *); + void imEndEvent(QIMEvent *); + void focusInEvent(QFocusEvent *); + void focusOutEvent(QFocusEvent *); + void resizeEvent(QResizeEvent *); + void drawContents(QPainter *); +%If (Qt_DRAGANDDROP) + void dragEnterEvent(QDragEnterEvent *); + void dragMoveEvent(QDragMoveEvent *); + void dragLeaveEvent(QDragLeaveEvent *); + void dropEvent(QDropEvent *); +%End + void contextMenuEvent(QContextMenuEvent *); + virtual QPopupMenu *createPopupMenu() /Factory/; + void windowActivationChange(bool); + +public: + // These appeared in v3.0.2 but defined as incompatible 3.0 addons, + // until v3.1.0. v3.2.0 then defined them as internal and obsolete. +%If (Qt_3_1_0 -) + void setPasswordChar(QChar); + QChar passwordChar() const; +%End + + // Obsolete. + SIP_PYTUPLE characterAt(int) const; +%MethodCode + int res; + QChar *chr; + + Py_BEGIN_ALLOW_THREADS + chr = new QChar(); + res = sipCpp -> characterAt(a0,chr); + Py_END_ALLOW_THREADS + + sipRes = sipBuildResult(&sipIsErr,"(iB)",res,chr,sipClass_QChar,NULL); +%End + + // Obsolete. + bool getSelection(int *,int *); + +private: + QLineEdit(const QLineEdit &); +}; + +%End + + +%If (- Qt_3_0_0) + +class QLineEdit : QWidget +{ +%TypeHeaderCode +#include <qlineedit.h> +%End + +public: +%If (- Qt_2_00) + QLineEdit(QWidget * /TransferThis/ = 0,const char * = 0); +%End +%If (Qt_2_00 -) + QLineEdit(QWidget * /TransferThis/,const char * = 0); + QLineEdit(const QString &,QWidget * /TransferThis/,const char * = 0); +%End + +%If (- Qt_2_00) + const char *text() const; +%End +%If (Qt_2_00 -) + QString text() const; + + QString displayText() const; +%End + +%If (- Qt_2_00) + void setMaxLength(int); +%End +%If (Qt_2_00 -) + virtual void setMaxLength(int); +%End + int maxLength() const; + +%If (- Qt_2_00) + void setFrame(bool); +%End +%If (Qt_2_00 -) + virtual void setFrame(bool); +%End + bool frame() const; + + enum EchoMode { + Normal, + NoEcho, + Password + }; + +%If (- Qt_2_00) + void setEchoMode(EchoMode); +%End +%If (Qt_2_00 -) + virtual void setEchoMode(EchoMode); +%End + EchoMode echoMode() const; + +%If (Qt_2_1_0 -) + void setReadOnly(bool); +%End +%If (Qt_2_1_0 -) + bool isReadOnly() const; +%End + +%If (- Qt_2_00) + void setValidator(QValidator *); + QValidator *validator() const; +%End +%If (Qt_2_00 -) + virtual void setValidator(QValidator *); +%End +%If (Qt_2_00 -) + const QValidator *validator() const; +%End + + QSize sizeHint() const; +%If (Qt_2_00 -) + QSize minimumSizeHint() const; +%End +%If (Qt_2_00 -) + QSizePolicy sizePolicy() const; +%End + +%If (- Qt_2_00) + void setCursorPosition(int); +%End +%If (Qt_2_00 -) + virtual void setCursorPosition(int); +%End + int cursorPosition() const; +%If (- Qt_2_00) + bool validateAndSet(const char *,int,int,int); +%End +%If (Qt_2_00 -) + bool validateAndSet(const QString &,int,int,int); +%End + +%If (Qt_2_00 -) + int alignment() const; +%End + +%If (Qt_2_00 -) + void cursorLeft(bool,int = 1); + void cursorRight(bool,int = 1); + void cursorWordForward(bool); + void cursorWordBackward(bool); + void backspace(); + void del() /PyName=delChar/; + void home(bool); + void end(bool); + + void setEdited(bool); + bool edited() const; +%End + +%If (Qt_2_00 -) + bool hasMarkedText() const; + QString markedText() const; +%End + +%If (Qt_CLIPBOARD) + void cut(); + void copy() const; + void paste(); +%End + +%If (- Qt_2_00) + void setEnabled(bool); + void setFont(const QFont &); + void setPalette(const QPalette &); + void setSelection(int,int); +%End +%If (Qt_2_00 -) + virtual void setEnabled(bool); + virtual void setFont(const QFont &); + virtual void setPalette(const QPalette &); + virtual void setSelection(int,int); + + void setAlignment(int); +%End + +public slots: +%If (- Qt_2_00) + void setText(const char *); +%End +%If (Qt_2_00 -) + virtual void setText(const QString &); +%End + void selectAll(); + void deselect(); + void clearValidator(); +%If (- Qt_2_00) + void insert(const char *); +%End +%If (Qt_2_00 -) + void insert(const QString &); +%End + void clear(); + +signals: +%If (- Qt_2_00) + void textChanged(const char *); +%End +%If (Qt_2_00 -) + void textChanged(const QString &); +%End + void returnPressed(); + +protected: +%If (Qt_2_2_0 -) + bool event(QEvent *); +%End + void mousePressEvent(QMouseEvent *); + void mouseMoveEvent(QMouseEvent *); + void mouseReleaseEvent(QMouseEvent *); + void mouseDoubleClickEvent(QMouseEvent *); + void keyPressEvent(QKeyEvent *); + void focusInEvent(QFocusEvent *); + void focusOutEvent(QFocusEvent *); + void paintEvent(QPaintEvent *); + void resizeEvent(QResizeEvent *); + void leaveEvent(QEvent *); + void repaintArea(int,int); +%If (- Qt_2_00) + void timerEvent(QTimerEvent *); + bool event(QEvent *); + bool hasMarkedText() const; + QString markedText() const; +%End +%If (Qt_2_00 -) +%If (Qt_DRAGANDDROP) + void dragEnterEvent(QDragEnterEvent *); + void dropEvent(QDropEvent *); +%End +%End + +private: + QLineEdit(const QLineEdit &); +}; + +%End |