Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ZMultiLineEdit Class Reference

the ZMainWidget class implements the EZX style's MultiLineEdit: for example: 1. More...

#include <ZMultiLineEdit.h>

Inheritance diagram for ZMultiLineEdit::

QTableView List of all members.

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

Detailed Description

the ZMainWidget class implements the EZX style's MultiLineEdit: for example: 1.

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;

 //add a 6 lines ZMultiLineEdit
 ml1 = new ZMultiLineEdit(sv->viewport(),true,6);

 //set filter
 QRegExp tmp("[.*]");
 ml1->setFilter(tmp);
 sv->addChild(ml1,0,0);

 //set indent
 ml1->setIndent(20);
 ml2 = new ZMultiLineEdit(sv->viewport());
 
 //need to change the widget when ZScrollView's scrollbar is shown/hidden
 sv->addChild(ml2,0,30,true);


Member Function Documentation

void ZMultiLineEdit::append ( const QString & ) [slot]
 

void ZMultiLineEdit::backspace ( ) [protected, virtual]
 

void ZMultiLineEdit::changeContentSize ( int lines,
QPoint cursorPos ) [virtual, slot]
 

change the content size.

Parameters:
lines   how many lines have be changed
cursorPos   cursor position

Note:
internal use

void ZMultiLineEdit::changeSizeHint ( QWidget * widget,
QSize size,
QPoint cusrorPos,
int larger ) [signal]
 

the signal is emitted when size hint is changed.

Note:
internal use

void ZMultiLineEdit::clear ( ) [slot]
 

void ZMultiLineEdit::clicked ( ) [signal]
 

void ZMultiLineEdit::copy ( ) const [slot]
 

void ZMultiLineEdit::copyAvailable ( bool ) [signal]
 

void ZMultiLineEdit::copyText ( ) const [slot]
 

void ZMultiLineEdit::cursorDown ( bool mark = FALSE ) [protected, virtual]
 

void ZMultiLineEdit::cursorLeft ( bool mark = FALSE,
bool wrap = TRUE ) [protected, virtual]
 

QPoint ZMultiLineEdit::cursorPoint ( ) const [protected]
 

void ZMultiLineEdit::cursorRight ( bool mark = FALSE,
bool wrap = TRUE ) [protected, virtual]
 

void ZMultiLineEdit::cursorUp ( bool mark = FALSE ) [protected, virtual]
 

void ZMultiLineEdit::cut ( ) [slot]
 

void ZMultiLineEdit::del ( ) [protected, virtual]
 

void ZMultiLineEdit::deleteText ( ) [slot]
 

void ZMultiLineEdit::deselect ( ) [slot]
 

void ZMultiLineEdit::dragEnterEvent ( QDragEnterEvent * ) [protected]
 

void ZMultiLineEdit::dragLeaveEvent ( QDragLeaveEvent * ) [protected]
 

void ZMultiLineEdit::dragMoveEvent ( QDragMoveEvent * ) [protected]
 

void ZMultiLineEdit::drawLineText ( QPainter * painter,
int x,
int y,
int width,
int height,
int flags,
const QString & lineStr ) [protected, virtual]
 

draw the line text override the function to draw own style's text.

for example: change color of the line text

Parameters:
x,y   ) the base line to draw
width   width of the area to draw
height   height of the area to draw
flags   alignment
flags   lineStr line text
lineStr   line text
marked   if true, the text is in the marked area, or it is not marked

Note:
all the params above have the right initial values

void ZMultiLineEdit::dropEvent ( QDropEvent * ) [protected]
 

void ZMultiLineEdit::end ( bool mark = FALSE ) [protected, virtual]
 

bool ZMultiLineEdit::event ( QEvent * ) [protected]
 

void ZMultiLineEdit::focusInEvent ( QFocusEvent * ) [protected]
 

bool ZMultiLineEdit::focusNextPrevChild ( bool ) [protected]
 

void ZMultiLineEdit::focusOutEvent ( QFocusEvent * ) [protected]
 

bool ZMultiLineEdit::getMarkedRegion ( int * line1,
int * col1,
int * line2,
int * col2 ) const [protected]
 

QString * ZMultiLineEdit::getString ( int row ) const [inline, protected]
 

QRect ZMultiLineEdit::globalRect ( int mx,
int my,
int mwidth,
int mheight ) [protected]
 

bool ZMultiLineEdit::hasMarkedText ( ) const [protected]
 

void ZMultiLineEdit::home ( bool mark = FALSE ) [protected, virtual]
 

void ZMultiLineEdit::insert ( const QString &,
bool mark ) [protected, virtual]
 

void ZMultiLineEdit::insert ( const QString & ) [slot]
 

void ZMultiLineEdit::insertChar ( QChar ) [protected]
 

bool ZMultiLineEdit::isEndOfParagraph ( int row ) const [protected]
 

void ZMultiLineEdit::keyPressEvent ( QKeyEvent * ) [protected]
 

void ZMultiLineEdit::killLine ( ) [protected, virtual]
 

void ZMultiLineEdit::leaveEvent ( QEvent * ) [protected]
 

int ZMultiLineEdit::lineLength ( int row ) const [inline, protected]
 

void ZMultiLineEdit::linesChanged ( int lines,
QPoint cursorPos ) [signal]
 

the signal is emitted when lines is changed.

Note:
internal use

QString ZMultiLineEdit::markedText ( ) const [protected]
 

void ZMultiLineEdit::mouseDoubleClickEvent ( QMouseEvent * ) [protected]
 

void ZMultiLineEdit::mouseMoveEvent ( QMouseEvent * ) [protected]
 

void ZMultiLineEdit::mousePressEvent ( QMouseEvent * ) [protected]
 

void ZMultiLineEdit::mouseReleaseEvent ( QMouseEvent * ) [protected]
 

void ZMultiLineEdit::newLine ( ) [protected, virtual]
 

void ZMultiLineEdit::pageDown ( bool mark = FALSE ) [protected, virtual]
 

void ZMultiLineEdit::pageUp ( bool mark = FALSE ) [protected, virtual]
 

void ZMultiLineEdit::paintCell ( QPainter *,
int row,
int col,
int xPos,
int yPos ) [protected]
 

void ZMultiLineEdit::paintEvent ( QPaintEvent * ) [protected]
 

void ZMultiLineEdit::paste ( ) [slot]
 

void ZMultiLineEdit::pasteSubType ( const QCString & subtype ) [slot]
 

void ZMultiLineEdit::pixelPosToCursorPos ( QPoint p,
int * x,
int * y ) const [protected]
 

void ZMultiLineEdit::redo ( ) [slot]
 

void ZMultiLineEdit::redoAvailable ( bool ) [signal]
 

void ZMultiLineEdit::resizeEvent ( QResizeEvent * ) [protected]
 

void ZMultiLineEdit::returnPressed ( ) [signal]
 

void ZMultiLineEdit::selectAll ( ) [slot]
 

int ZMultiLineEdit::sendPackage ( ) [protected, virtual]
 

int ZMultiLineEdit::sendPackageItem ( int mmix,
int mmiy,
int mmiwidth,
int mmiheight,
QString mmis ) [protected, virtual]
 

void ZMultiLineEdit::setCursorPixelPosition ( QPoint p,
bool clear_mark = true ) [protected]
 

void ZMultiLineEdit::setOverwriteMode ( bool on ) [inline, virtual, slot]
 

void ZMultiLineEdit::setReadOnly ( bool ) [virtual, slot]
 

void ZMultiLineEdit::setText ( const QString & ) [virtual, slot]
 

QString ZMultiLineEdit::stringShown ( int row ) const [protected]
 

void ZMultiLineEdit::textChanged ( ) [signal]
 

void ZMultiLineEdit::textTrancated ( ) [signal]
 

int ZMultiLineEdit::textWidth ( const QString & ) [protected]
 

int ZMultiLineEdit::textWidth ( int ) [protected]
 

void ZMultiLineEdit::timerEvent ( QTimerEvent * ) [protected]
 

void ZMultiLineEdit::undo ( ) [slot]
 

void ZMultiLineEdit::undoAvailable ( bool ) [signal]
 

void ZMultiLineEdit::updateMask ( ) [protected]
 

void ZMultiLineEdit::wheelEvent ( QWheelEvent * ) [protected]
 


Member Data Documentation

bool ZMultiLineEdit::cursorOn [protected]
 


The documentation for this class was generated from the following file:
Generated at Wed Mar 3 13:23:00 2004 by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001