Source Code (Use browser search to find items of interest.)

Class Index

qt'QInsTextCmd (./qt-2.1.0/src/widgets/qmultilineedit.cpp:99)

class QInsTextCmd : public QDelTextCmd
{

public:
    QInsTextCmd(int offset,const QString &str )
	: QDelTextCmd( offset, str )
    {
    }

    Commands type() { return Insert; };

    bool merge( QMultiLineEditCommand* other)
    {
	if ( other->type() == type() ) {
	    QInsTextCmd* o = (QInsTextCmd*) other;
	    if ( mOffset == o->mOffset + int(o->mStr.length()) ) {
		o->mStr += mStr;
		return TRUE;
	    }
	}
	return FALSE;
    }
};


// NOT REVISED
/*!
  \class QMultiLineEdit qmultilineedit.h

  \brief The QMultiLineEdit widget is a simple editor for inputting text.

  \ingroup advanced

  The QMultiLineEdit widget provides multiple line text input and display.
  It is intended for moderate amounts of text. There are no arbitrary
  limitations, but if you try to handle megabytes of data, performance
  will suffer.

  Per default, the edit widget does not perform any word
  wrapping. This can be adjusted by calling setWordWrap(). Both
  dynamic wrapping according to the visible width or a fixed number of
  character or pixels is supported.

  The widget can be used to display text by calling setReadOnly(TRUE)

  The default key bindings are described in keyPressEvent(); they cannot
  be customized except by inheriting the class.

  <img src=qmlined-m.png> <img src=qmlined-w.png>
*/


qt'QInsTextCmd::merge() (./qt-2.1.0/src/widgets/qmultilineedit.cpp:110)

    bool merge( QMultiLineEditCommand* other)
    {
	if ( other->type() == type() ) {
	    QInsTextCmd* o = (QInsTextCmd*) other;
	    if ( mOffset == o->mOffset + int(o->mStr.length()) ) {
		o->mStr += mStr;
		return TRUE;
	    }
	}
	return FALSE;
    }
};


// NOT REVISED
/*!
  \class QMultiLineEdit qmultilineedit.h

  \brief The QMultiLineEdit widget is a simple editor for inputting text.

  \ingroup advanced

  The QMultiLineEdit widget provides multiple line text input and display.
  It is intended for moderate amounts of text. There are no arbitrary
  limitations, but if you try to handle megabytes of data, performance
  will suffer.

  Per default, the edit widget does not perform any word
  wrapping. This can be adjusted by calling setWordWrap(). Both
  dynamic wrapping according to the visible width or a fixed number of
  character or pixels is supported.

  The widget can be used to display text by calling setReadOnly(TRUE)

  The default key bindings are described in keyPressEvent(); they cannot
  be customized except by inheriting the class.

  <img src=qmlined-m.png> <img src=qmlined-w.png>
*/