hi, > -----Original Message----- > From: Malmqvist Mathias (Nokia-MS/London) > Sent: Sunday, December 19, 2010 2:31 AM > > Another thing; that do we need to expose any of those functions for? > Won't > all the text editors' text selection and copy/paste functionality be > offered directly > to the user, through integrated UI (e.g. popup menus or keyboard > shortcuts)?
these functions apis are for the app developer, not the end user. it is useful to have cut/copy/paste to mv content to/from the clipboard to your Text entries programmatically. > If so, perhaps these properties are unnecessary too? > > property int cursorPosition > > property string selectedText // read-only > > property int selectionEnd // read-only > > property int selectionStart // read-only > > Should we leave them out of the API for now and only add them later if > someone finds a use for them? these are ready-only properties to query the selection and cursor position. we definitely need those if we want to provide a Text entry that is somewhat extensible. cheers, // leo > ________________________________________ > From: qt-components-bounces+mathias.malmqvist=nokia....@qt.nokia.com > [qt-components-bounces+mathias.malmqvist=nokia....@qt.nokia.com] On > Behalf Of Cunha Leo (Nokia-MS-Qt/Oslo) > Sent: Friday, December 17, 2010 4:50 PM > To: qt-compone...@trolltech.com > Subject: [Qt-components] [API Proposal] TextField & TextArea > > hi, > > I updated the http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-200 > task with a proposal > of common apis for TextField (prev: LineEdit) and TextArea (prev: > MultiLineEdit). > > the names were extensively discussed and in the end we chose for using > the HTML reference (TextField&TextArea). > > below are the apis pasted (both are basically a simplified subset of > TextInput&TextEdit): > > TextField > --------- > Item { > property string placeholderText > property int inputMethodHint > property font font // alias to textInput.font > > property int cursorPosition > property bool readOnly // defaults to false > property bool passwordMode > property bool acceptableInput // this is a read-only property > property string inputMask > property Validator validator > property string selectedText // read-only > property int selectionEnd // read-only > property int selectionStart // read-only > property string text > > // functions > copy > paste > cut > select(int start, int end) > selectAll > selectWord > positionAt(int x) > positionToRectangle(int pos) > } > > TextArea > -------- > Item { > property font font // alias to textEdit.font > > property int cursorPosition > property int horizontalAlignment // enumeration > property int verticalAlignment // enumeration > property bool readOnly // defaults to false > property string selectedText // read-only > property int selectionEnd // read-only > property int selectionStart // read-only > property string text > property int textFormat // enumeration > property int wrapMode // enumeration > > // functions > copy > paste > cut > select(int start, int end) > selectAll > selectWord > positionAt(int x, int y) > positionToRectangle (int pos) > } > > comments welcome! > > cheers, > // leo > _______________________________________________ > Qt-components mailing list > Qt-components@qt.nokia.com > http://lists.qt.nokia.com/mailman/listinfo/qt-components _______________________________________________ Qt-components mailing list Qt-components@qt.nokia.com http://lists.qt.nokia.com/mailman/listinfo/qt-components