From 16434e5519f6224e231bc5f7202f0e495eda7bb7 Mon Sep 17 00:00:00 2001 From: Slávek Banko Date: Tue, 3 Jan 2023 00:52:18 +0100 Subject: Do rename qt=>tqt on source files, directories and libraries. Rename pyuic=>pytquic, pylupdate=>pytqlupdate. Do rename qt=>tqt on constants and variables. Do rename QT=>TQT on constants. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- sip/tqt/tqlineedit.sip | 209 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 sip/tqt/tqlineedit.sip (limited to 'sip/tqt/tqlineedit.sip') diff --git a/sip/tqt/tqlineedit.sip b/sip/tqt/tqlineedit.sip new file mode 100644 index 0000000..23488c3 --- /dev/null +++ b/sip/tqt/tqlineedit.sip @@ -0,0 +1,209 @@ +// This is the SIP interface definition for TQLineEdit. +// +// Copyright (c) 2007 +// Riverbank Computing Limited +// +// This file is part of PyTQt. +// +// This copy of PyTQt 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. +// +// PyTQt 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 +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +%ExportedDoc +TQLineEdit + + int characterAt + int xpos + TQChar *chr + + +This takes only the xpos parameter and returns the int +result and the chr value as a tuple. (TQt v3+) + + + + void del + + + +This has been renamed delChar in Python. (TQt v2+) + + + + bool getSelection + int *start + int *end + + +This takes no parameters and returns the bool result and the +start and end values as a tuple. +(TQt v3+) + + +%End + + +class TQLineEdit : TQFrame +{ +%TypeHeaderCode +#include +%End + +public: + TQLineEdit(TQWidget * /TransferThis/,const char * = 0); + TQLineEdit(const TQString &,TQWidget * /TransferThis/,const char * = 0); + TQLineEdit(const TQString &,const TQString &,TQWidget * /TransferThis/, + const char * = 0); + + TQString text() const; + + TQString displayText() const; + + int maxLength() const; + + bool frame() const; + + enum EchoMode { + Normal, + NoEcho, + Password + }; + + EchoMode echoMode() const; + + bool isReadOnly() const; + + const TQValidator *validator() const; + + TQSize sizeHint() const; + TQSize minimumSizeHint() const; + + int cursorPosition() const; + // Obsolete. + bool validateAndSet(const TQString &,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); + + bool isModified() const; + void clearModified(); + + // Obsolete. + bool edited() const; + // Obsolete. + void setEdited(bool); + + bool hasSelectedText() const; + TQString selectedText() const; + int selectionStart() const; + + bool isUndoAvailable() const; + bool isRedoAvailable() const; + + bool dragEnabled() const; + + TQString inputMask() const; + void setInputMask(const TQString &); + bool hasAcceptableInput() const; + +public slots: + virtual void setText(const TQString &); + virtual void selectAll(); + virtual void deselect(); + virtual void clearValidator(); + virtual void insert(const TQString &); + 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 TQValidator *); + virtual void setFont(const TQFont &); + virtual void setPalette(const TQPalette &); + virtual void setSelection(int,int); + virtual void setCursorPosition(int); + virtual void setAlignment(int); +%If (TQt_CLIPBOARD) + virtual void cut(); + virtual void copy() const; + virtual void paste(); +%End + virtual void setDragEnabled(bool); + +signals: + void textChanged(const TQString &); + void returnPressed(); + void lostFocus(); + void selectionChanged(); + +protected: + bool event(TQEvent *); + void mousePressEvent(TQMouseEvent *); + void mouseMoveEvent(TQMouseEvent *); + void mouseReleaseEvent(TQMouseEvent *); + void mouseDoubleClickEvent(TQMouseEvent *); + void keyPressEvent(TQKeyEvent *); + void imStartEvent(TQIMEvent *); + void imComposeEvent(TQIMEvent *); + void imEndEvent(TQIMEvent *); + void focusInEvent(TQFocusEvent *); + void focusOutEvent(TQFocusEvent *); + void resizeEvent(TQResizeEvent *); + void drawContents(TQPainter *); +%If (TQt_DRAGANDDROP) + void dragEnterEvent(TQDragEnterEvent *); + void dragMoveEvent(TQDragMoveEvent *); + void dragLeaveEvent(TQDragLeaveEvent *); + void dropEvent(TQDropEvent *); +%End + void contextMenuEvent(TQContextMenuEvent *); + virtual TQPopupMenu *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. + void setPasswordChar(TQChar); + TQChar passwordChar() const; + + // Obsolete. + SIP_PYTUPLE characterAt(int) const; +%MethodCode + int res; + TQChar *chr; + + Py_BEGIN_ALLOW_THREADS + chr = new TQChar(); + res = sipCpp -> characterAt(a0,chr); + Py_END_ALLOW_THREADS + + sipRes = sipBuildResult(&sipIsErr,"(iB)",res,chr,sipClass_TQChar,NULL); +%End + + // Obsolete. + bool getSelection(int *,int *); + +private: + TQLineEdit(const TQLineEdit &); +}; -- cgit v1.2.3