Public Slots |
virtual void | changeContentSize (int lines, QPoint cursorPos) |
| change the content size. More...
|
virtual void | setText (const QString &) |
virtual void | setReadOnly (bool) |
virtual void | setOverwriteMode (bool) |
void | clear () |
void | append (const QString &) |
void | deselect () |
void | selectAll () |
void | paste () |
void | pasteSubType (const QCString &subtype) |
void | copyText () const |
void | copy () const |
void | cut () |
void | deleteText () |
void | insert (const QString &) |
void | undo () |
void | redo () |
Signals |
void | clicked () |
void | textTrancated () |
void | textChanged () |
void | returnPressed () |
void | undoAvailable (bool) |
void | redoAvailable (bool) |
void | copyAvailable (bool) |
void | changeSizeHint (QWidget *widget, QSize size, QPoint cusrorPos, int larger) |
| the signal is emitted when size hint is changed. More...
|
void | linesChanged (int lines, QPoint cursorPos) |
| the signal is emitted when lines is changed. More...
|
Protected Methods |
void | updateMask () |
void | pixelPosToCursorPos (QPoint p, int *x, int *y) const |
void | setCursorPixelPosition (QPoint p, bool clear_mark=true) |
void | paintEvent (QPaintEvent *) |
void | paintCell (QPainter *, int row, int col, int xPos, int yPos) |
virtual void | drawLineText (QPainter *painter, int x, int y, int width, int height, int flags, const QString &lineStr) |
| draw the line text override the function to draw own style's text. More...
|
bool | event (QEvent *) |
void | mousePressEvent (QMouseEvent *) |
void | mouseMoveEvent (QMouseEvent *) |
void | mouseReleaseEvent (QMouseEvent *) |
void | mouseDoubleClickEvent (QMouseEvent *) |
void | wheelEvent (QWheelEvent *) |
void | keyPressEvent (QKeyEvent *) |
void | focusInEvent (QFocusEvent *) |
void | focusOutEvent (QFocusEvent *) |
void | timerEvent (QTimerEvent *) |
void | leaveEvent (QEvent *) |
void | resizeEvent (QResizeEvent *) |
bool | focusNextPrevChild (bool) |
void | dragMoveEvent (QDragMoveEvent *) |
void | dragEnterEvent (QDragEnterEvent *) |
void | dropEvent (QDropEvent *) |
void | dragLeaveEvent (QDragLeaveEvent *) |
bool | hasMarkedText () const |
QString | markedText () const |
int | textWidth (int) |
int | textWidth (const QString &) |
QPoint | cursorPoint () const |
virtual void | insert (const QString &, bool mark) |
virtual void | newLine () |
virtual void | killLine () |
virtual void | pageUp (bool mark=FALSE) |
virtual void | pageDown (bool mark=FALSE) |
virtual void | cursorLeft (bool mark=FALSE, bool wrap=TRUE) |
virtual void | cursorRight (bool mark=FALSE, bool wrap=TRUE) |
virtual void | cursorUp (bool mark=FALSE) |
virtual void | cursorDown (bool mark=FALSE) |
virtual void | backspace () |
virtual void | del () |
virtual void | home (bool mark=FALSE) |
virtual void | end (bool mark=FALSE) |
bool | getMarkedRegion (int *line1, int *col1, int *line2, int *col2) const |
int | lineLength (int row) const |
QString* | getString (int row) const |
bool | isEndOfParagraph (int row) const |
QString | stringShown (int row) const |
void | insertChar (QChar) |
QRect | globalRect (int mx, int my, int mwidth, int mheight) |
virtual int | sendPackage () |
virtual int | sendPackageItem (int mmix, int mmiy, int mmiwidth, int mmiheight, QString mmis) |
Protected Attributes |
bool | cursorOn |
support indent 2. support resize automatically(work with ZScrollView) 3. support under line 4. support input text filter
the ZMultiLineEdit is based on the QMultiLineEdit, so for the most functions please refer to the doc of the QMultiLineEdit, except for these: setIndent(), getIndent(), getLineHeight(), setUnderline(), setFilter(),getFilter(), drawLineText()
ZScrollView* sv = new ZScrollView( this, "sv" );
UTIL_MulitLineEdit *ml1, *ml2;
ml1 = new ZMultiLineEdit(sv->viewport(),true,6);
QRegExp tmp("[.*]");
ml1->setFilter(tmp);
sv->addChild(ml1,0,0);
ml1->setIndent(20);
ml2 = new ZMultiLineEdit(sv->viewport());
sv->addChild(ml2,0,30,true);