Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtGui.QPlainTextEdit Class Reference

The QPlainTextEdit class provides a widget that is used to edit and display plain text. More...

Inheritance diagram for QtGui.QPlainTextEdit:
Collaboration diagram for QtGui.QPlainTextEdit:

Public Types

enum  LineWrapMode { NoWrap = 0, WidgetWidth = 1 }
 

Public Member Functions

 QPlainTextEdit (QWidget parent=null)
 
 
 QPlainTextEdit (string text, QWidget parent=null)
 
 
override void CreateProxy ()
 
new string AnchorAt (QPoint pos)
 
 
new void AppendHtml (string html)
 
 
new void AppendPlainText (string text)
 
 
new bool CanPaste ()
 
 
new void CenterCursor ()
 
 
new void Clear ()
 
 
new void Copy ()
 
 
new QMenu CreateStandardContextMenu ()
 
 
new QTextCursor CursorForPosition (QPoint pos)
 
 
new QRect CursorRect ()
 
 
new QRect CursorRect (QTextCursor cursor)
 
 
new void Cut ()
 
 
new void EnsureCursorVisible ()
 
 
override bool OnEvent (QEvent e)
 
 
new bool Find (string exp, QTextDocument.FindFlag options=0)
 
 
override object InputMethodQuery (Qt.InputMethodQuery property)
 
 
new void InsertPlainText (string text)
 
 
virtual object LoadResource (int type, QUrl name)
 
 
new void MergeCurrentCharFormat (QTextCharFormat modifier)
 
 
new void MoveCursor (QTextCursor.MoveOperation operation, QTextCursor.MoveMode mode=QTextCursor.MoveMode.MoveAnchor)
 
 
new void Paste ()
 
 
new void Print (QPrinter printer)
 
 
new void Redo ()
 
 
new void SelectAll ()
 
 
new void SetTextInteractionFlags (Qt.TextInteractionFlag flags)
 
new Qt.TextInteractionFlag textInteractionFlags ()
 
new void Undo ()
 
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QAbstractScrollArea
 QAbstractScrollArea (QWidget parent=null)
 
 
new void AddScrollBarWidget (QWidget widget, Qt.AlignmentFlag alignment)
 
 
new QSize MaximumViewportSize ()
 
 
override QSize MinimumSizeHint ()
 
 
new
System.Collections.Generic.List
< QWidget
ScrollBarWidgets (Qt.AlignmentFlag alignment)
 
 
override QSize SizeHint ()
 
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QFrame
 QFrame (QWidget parent=null, Qt.WindowType f=0)
 
 
override QSize SizeHint ()
 
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QWidget
 QWidget (QWidget parent=null, Qt.WindowType f=0)
 
 
override void CreateProxy ()
 
new
System.Collections.Generic.List
< QAction
Actions ()
 
 
new void ActivateWindow ()
 
 
new void AddAction (QAction action)
 
 
new void AddActions (System.Collections.Generic.List< QAction > actions)
 
 
new void AdjustSize ()
 
 
new QWidget ChildAt (QPoint p)
 
 
new QWidget ChildAt (int x, int y)
 
 
new void ClearFocus ()
 
 
new void ClearMask ()
 
 
new bool Close ()
 
 
new QRect ContentsRect ()
 
 
new void CreateWinId ()
 
virtual int DevType ()
 
new NativeULong EffectiveWinId ()
 
 
new void EnsurePolished ()
 
 
override bool OnEvent (QEvent arg1)
 
 
new QWidget FocusWidget ()
 
 
new QFont font ()
 
new QFontInfo FontInfo ()
 
 
new QFontMetrics FontMetrics ()
 
 
new QRect geometry ()
 
new void GetContentsMargins (ref int left, ref int top, ref int right, ref int bottom)
 
 
virtual System.IntPtr GetDC ()
 
 
new void GrabGesture (Qt.GestureType type, Qt.GestureFlag flags=0)
 
 
new void GrabKeyboard ()
 
 
new void GrabMouse ()
 
 
new void GrabMouse (QCursor arg1)
 
 
new int GrabShortcut (QKeySequence key, Qt.ShortcutContext context=Qt.ShortcutContext.WindowShortcut)
 
 
new QGraphicsProxyWidget GraphicsProxyWidget ()
 
 
virtual int HeightForWidth (int arg1)
 
 
new void Hide ()
 
 
new Qt.InputMethodHint inputMethodHints ()
 
new void InsertAction (QAction before, QAction action)
 
 
new void InsertActions (QAction before, System.Collections.Generic.List< QAction > actions)
 
 
new NativeULong InternalWinId ()
 
new bool IsAncestorOf (QWidget child)
 
 
new bool IsEnabledTo (QWidget arg1)
 
 
new bool IsEnabledToTLW ()
 
 
new bool IsHidden ()
 
 
new bool IsLeftToRight ()
 
new bool IsRightToLeft ()
 
new bool IsTopLevel ()
 
 
new bool IsVisibleTo (QWidget arg1)
 
 
new bool IsWindow ()
 
 
new void Lower ()
 
 
new QPoint MapFrom (QWidget arg1, QPoint arg2)
 
 
new QPoint MapFromGlobal (QPoint arg1)
 
 
new QPoint MapFromParent (QPoint arg1)
 
 
new QPoint MapTo (QWidget arg1, QPoint arg2)
 
 
new QPoint MapToGlobal (QPoint arg1)
 
 
new QPoint MapToParent (QPoint arg1)
 
 
new void Move (int x, int y)
 
new QWidget NativeParentWidget ()
 
 
new QWidget NextInFocusChain ()
 
 
new void OverrideWindowFlags (Qt.WindowType type)
 
 
new void OverrideWindowState (Qt.WindowState state)
 
virtual QPaintEngine PaintEngine ()
 
 
new QPalette palette ()
 
new QWidget ParentWidget ()
 
 
new QWidget PreviousInFocusChain ()
 
 
new void Raise ()
 
 
virtual void ReleaseDC (System.IntPtr arg1)
 
 
new void ReleaseKeyboard ()
 
 
new void ReleaseMouse ()
 
 
new void ReleaseShortcut (int id)
 
 
new void RemoveAction (QAction action)
 
 
new void Render (IQPaintDevice target)
 
 
new void Render (QPainter painter)
 
 
new void Render (IQPaintDevice target, QPoint targetOffset)
 
 
new void Render (QPainter painter, QPoint targetOffset)
 
 
new void Render (IQPaintDevice target, QPoint targetOffset, QRegion sourceRegion, QWidget.RenderFlag renderFlags=QWidget.RenderFlag.DrawWindowBackground|QWidget.RenderFlag.DrawChildren)
 
 
new void Render (QPainter painter, QPoint targetOffset, QRegion sourceRegion, QWidget.RenderFlag renderFlags=QWidget.RenderFlag.DrawWindowBackground|QWidget.RenderFlag.DrawChildren)
 
 
new void Repaint ()
 
 
new void Repaint (QRect arg1)
 
 
new void Repaint (QRegion arg1)
 
 
new void Repaint (int x, int y, int w, int h)
 
 
new void Resize (int w, int h)
 
new bool RestoreGeometry (QByteArray geometry)
 
 
new QByteArray SaveGeometry ()
 
 
new void Scroll (int dx, int dy)
 
 
new void Scroll (int dx, int dy, QRect arg3)
 
 
new void SetAttribute (Qt.WidgetAttribute arg1, bool on=true)
 
 
new void SetBaseSize (int basew, int baseh)
 
new void SetContentsMargins (int left, int top, int right, int bottom)
 
 
new void SetDisabled (bool arg1)
 
 
new void SetFixedHeight (int h)
 
 
new void SetFixedSize (QSize arg1)
 
 
new void SetFixedSize (int w, int h)
 
 
new void SetFixedWidth (int w)
 
 
new void SetFocus ()
 
 
new void SetFocus (Qt.FocusReason reason)
 
 
new void SetGeometry (int x, int y, int w, int h)
 
new void SetHidden (bool hidden)
 
 
new void SetInputMethodHints (Qt.InputMethodHint hints)
 
new void SetMask (QBitmap arg1)
 
 
new void SetMaximumSize (int maxw, int maxh)
 
new void SetMinimumSize (int minw, int minh)
 
new void SetParent (QWidget parent)
 
 
new void SetParent (QWidget parent, Qt.WindowType f)
 
 
new void SetShortcutAutoRepeat (int id, bool enable=true)
 
 
new void SetShortcutEnabled (int id, bool enable=true)
 
 
new void SetShown (bool shown)
 
new void SetSizeIncrement (int w, int h)
 
new void SetSizePolicy (QSizePolicy.Policy horizontal, QSizePolicy.Policy vertical)
 
virtual void SetVisible (bool visible)
 
new void Show ()
 
 
new void ShowFullScreen ()
 
 
new void ShowMaximized ()
 
 
new void ShowMinimized ()
 
 
new void ShowNormal ()
 
 
new void StackUnder (QWidget arg1)
 
 
new bool TestAttribute (Qt.WidgetAttribute arg1)
 
 
new QWidget TopLevelWidget ()
 
 
new bool UnderMouse ()
 
 
new void UngrabGesture (Qt.GestureType type)
 
 
new void UnsetCursor ()
 
new void UnsetLayoutDirection ()
 
new void UnsetLocale ()
 
new void Update ()
 
 
new void Update (QRect arg1)
 
 
new void Update (QRegion arg1)
 
 
new void Update (int x, int y, int w, int h)
 
 
new void UpdateGeometry ()
 
 
new QRegion VisibleRegion ()
 
 
new NativeULong WinId ()
 
 
new QWidget Window ()
 
 
new Qt.WindowType WindowType ()
 
 
new void Dispose ()
 
new int ColorCount ()
 
new int Depth ()
 
new int HeightMM ()
 
new int LogicalDpiX ()
 
new int LogicalDpiY ()
 
new int NumColors ()
 
new bool PaintingActive ()
 
new int PhysicalDpiX ()
 
new int PhysicalDpiY ()
 
new int WidthMM ()
 
- Public Member Functions inherited from QtCore.QObject
 QObject (QObject parent=null)
 
 
new bool BlockSignals (bool b)
 
 
new
System.Collections.Generic.List
< QObject
Children ()
 
 
new bool Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
 
 
new void DeleteLater ()
 
 
new bool Disconnect (QObject receiver, string member=null)
 
 
new bool Disconnect (string signal=null, QObject receiver=null, string member=null)
 
 
new void DumpObjectInfo ()
 
 
new void DumpObjectTree ()
 
 
new
System.Collections.Generic.List
< QByteArray
DynamicPropertyNames ()
 
 
virtual bool EventFilter (QObject arg1, QEvent arg2)
 
 
new bool Inherits (string classname)
 
 
new void InstallEventFilter (QObject arg1)
 
 
new bool IsWidgetType ()
 
 
new void KillTimer (int id)
 
 
new object Property (string name)
 
 
new void RemoveEventFilter (QObject arg1)
 
 
new bool SetProperty (string name, object value)
 
 
new void SetUserData (uint id, QObjectUserData data)
 
new bool SignalsBlocked ()
 
 
new int StartTimer (int interval)
 
 
new QObjectUserData UserData (uint id)
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.Qt
delegate QTextStream FuncQTextStreamQTextStream (QTextStream qTextStream)
 
delegate string FuncStringQByteArray (QByteArray qByteArray)
 
delegate QByteArray FuncQByteArrayString (string @string)
 
delegate void ActionQtMsgTypeString (QtMsgType qtMsgType, string @string)
 
delegate QObject FuncQObject ()
 
- Public Member Functions inherited from QtGui.IQPaintDevice
new int ColorCount ()
 
new int Depth ()
 
int DevType ()
 
System.IntPtr GetDC ()
 
new int Height ()
 
new int HeightMM ()
 
new int LogicalDpiX ()
 
new int LogicalDpiY ()
 
new int NumColors ()
 
QPaintEngine PaintEngine ()
 
new bool PaintingActive ()
 
new int PhysicalDpiX ()
 
new int PhysicalDpiY ()
 
void ReleaseDC (System.IntPtr hdc)
 
new int Width ()
 
new int WidthMM ()
 

Static Public Member Functions

static string Tr (string s, string c=null)
 
static string Tr (string s, string c, int n)
 
static string TrUtf8 (string s, string c=null)
 
static string TrUtf8 (string s, string c, int n)
 
- Static Public Member Functions inherited from QtGui.QAbstractScrollArea
static string Tr (string s, string c=null)
 
static string Tr (string s, string c, int n)
 
static string TrUtf8 (string s, string c=null)
 
static string TrUtf8 (string s, string c, int n)
 
- Static Public Member Functions inherited from QtGui.QFrame
static string Tr (string s, string c=null)
 
static string Tr (string s, string c, int n)
 
static string TrUtf8 (string s, string c=null)
 
static string TrUtf8 (string s, string c, int n)
 
- Static Public Member Functions inherited from QtGui.QWidget
static QWidget Find (NativeULong arg1)
 
 
static QWidget KeyboardGrabber ()
 
 
static QWidget MouseGrabber ()
 
 
static void SetTabOrder (QWidget arg1, QWidget arg2)
 
 
static string Tr (string s, string c=null)
 
static string Tr (string s, string c, int n)
 
static string TrUtf8 (string s, string c=null)
 
static string TrUtf8 (string s, string c, int n)
 
- Static Public Member Functions inherited from QtCore.QObject
static bool Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
 
 
static bool Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType arg5=Qt.ConnectionType.AutoConnection)
 
 
static bool Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member)
 
 
static bool Disconnect (QObject sender, string signal, QObject receiver, string member)
 
 
static uint RegisterUserData ()
 
static string Tr (string s, string c=null)
 
 
static string Tr (string s, string c, int n)
 
 
static string TrUtf8 (string s, string c=null)
 
 
static string TrUtf8 (string s, string c, int n)
 
 
- Static Public Member Functions inherited from QtCore.Qt
static QDataStream Write (QDataStream s, object p)
 
static QDataStream Write (QDataStream arg1, QSizeF arg2)
 
static QTextStream Write (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Write (QDataStream arg1, QPoint arg2)
 
static QDataStream Write (QDataStream arg1, QLineF arg2)
 
static QDataStream Write (QDataStream arg1, QPointF arg2)
 
static QDataStream Write (QDataStream arg1, QChar arg2)
 
static QDataStream Write (QDataStream arg1, QByteArray arg2)
 
static QDataStream Write (QDataStream arg1, QEasingCurve arg2)
 
static QDataStream Write (QDataStream arg1, QRectF arg2)
 
static QDataStream Write (QDataStream arg1, QDateTime arg2)
 
static QDataStream Write (QDataStream arg1, QUrl arg2)
 
static QDataStream Write (QDataStream arg1, QTime arg2)
 
static QDataStream Write (QDataStream arg1, QLocale arg2)
 
static QDataStream Write (QDataStream arg1, QBitArray arg2)
 
static QDataStream Write (QDataStream arg1, QUuid arg2)
 
static QDataStream Write (QDataStream arg1, QLine arg2)
 
static QDataStream Write (QDataStream arg1, QDate arg2)
 
static QDataStream Write (QDataStream @out, QRegExp regExp)
 
static QDataStream Write (QDataStream arg1, QRect arg2)
 
static QDataStream Write (QDataStream arg1, QSize arg2)
 
static QDataStream Write (QDataStream s, QVariant.Type p)
 
static QDataStream Write (QDataStream arg1, string arg2)
 
static QDataStream Write (QDataStream @out, System.Collections.Generic.List< string > list)
 
static QDataStream Read (QDataStream arg1, QChar arg2)
 
static QDataStream Read (QDataStream arg1, QLocale arg2)
 
static QDataStream Read (QDataStream arg1, QRect arg2)
 
static QDataStream Read (QDataStream arg1, QEasingCurve arg2)
 
static QDataStream Read (QDataStream arg1, QDate arg2)
 
static QDataStream Read (QDataStream arg1, QUrl arg2)
 
static QDataStream Read (QDataStream arg1, QUuid arg2)
 
static QTextStream Read (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Read (QDataStream arg1, QLineF arg2)
 
static QDataStream Read (QDataStream arg1, QRectF arg2)
 
static QDataStream Read (QDataStream arg1, QPointF arg2)
 
static QDataStream Read (QDataStream arg1, QLine arg2)
 
static QDataStream Read (QDataStream arg1, QBitArray arg2)
 
static QDataStream Read (QDataStream arg1, QSize arg2)
 
static QDataStream Read (QDataStream arg1, QDateTime arg2)
 
static QDataStream Read (QDataStream arg1, QTime arg2)
 
static QDataStream Read (QDataStream arg1, QPoint arg2)
 
static QDataStream Read (QDataStream @in, QRegExp regExp)
 
static QDataStream Read (QDataStream s, object p)
 
static QDataStream Read (QDataStream arg1, QByteArray arg2)
 
static QDataStream Read (QDataStream arg1, QSizeF arg2)
 
static QDataStream Read (QDataStream arg1, string arg2)
 
static QDataStream Read (QDataStream s, QVariant.Type p)
 
static QDataStream Read (QDataStream @in, System.Collections.Generic.List< string > list)
 
static double qAcos (double v)
 
static void qAddPostRoutine (System.Action arg1)
 
static string qAppName ()
 
static double qAsin (double v)
 
static double qAtan (double v)
 
static double qAtan2 (double x, double y)
 
static void qBadAlloc ()
 
static int qCeil (double v)
 
static ushort qChecksum (string s, uint len)
 
static QByteArray qCompress (QByteArray data)
 
static QByteArray qCompress (QByteArray data, int compressionLevel=-1)
 
static QByteArray qCompress (Pointer< byte > data, int nbytes)
 
static QByteArray qCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1)
 
static double qCos (double v)
 
static double qExp (double v)
 
static double qFabs (double v)
 
static double qFastCos (double x)
 
static double qFastSin (double x)
 
static string qFlagLocation (string method)
 
static int qFloor (double v)
 
static bool qFuzzyCompare (double p1, double p2)
 
static bool qFuzzyCompare (float p1, float p2)
 
static bool qFuzzyIsNull (double d)
 
static bool qFuzzyIsNull (float f)
 
static uint qHash (QBitArray key)
 
static uint qHash (QChar key)
 
static uint qHash (QStringRef key)
 
static uint qHash (QUrl url)
 
static uint qHash (QPersistentModelIndex index)
 
static uint qHash (QByteArray key)
 
static uint qHash (QModelIndex index)
 
static uint qHash (uint key)
 
static uint qHash (sbyte key)
 
static uint qHash (byte key)
 
static uint qHash (short key)
 
static uint qHash (NativeLong key)
 
static uint qHash (ushort key)
 
static uint qHash (long key)
 
static uint qHash (ulong key)
 
static uint qHash (int key)
 
static uint qHash (string key)
 
static uint qHash (NativeULong key)
 
static double qInf ()
 
static Qt.ActionQtMsgTypeString qInstallMsgHandler (Qt.ActionQtMsgTypeString arg1)
 
static int qIntCast (float f)
 
static int qIntCast (double f)
 
static bool qIsFinite (double d)
 
static bool qIsFinite (float f)
 
static bool qIsInf (float f)
 
static bool qIsInf (double d)
 
static bool qIsNaN (float f)
 
static bool qIsNaN (double d)
 
static bool qIsNull (float f)
 
static bool qIsNull (double d)
 
static double qLn (double v)
 
static double qPow (double x, double y)
 
static double qQNaN ()
 
static void qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function)
 
static void qRemovePostRoutine (System.Action arg1)
 
static int qRound (double d)
 
static long qRound64 (double d)
 
static double qSNaN ()
 
static bool qSharedBuild ()
 
static double qSin (double v)
 
static double qSqrt (double v)
 
static bool qStringComparisonHelper (QStringRef s1, string s2)
 
static double qTan (double v)
 
static QByteArray qUncompress (QByteArray data)
 
static QByteArray qUncompress (Pointer< byte > data, int nbytes)
 
static string qVersion ()
 
static void Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size)
 
static QByteArray Qgetenv (string varName)
 
static bool Qputenv (string varName, QByteArray value)
 
static int Qrand ()
 
static void Qsrand (uint seed)
 
static int Qstrcmp (QByteArray str1, QByteArray str2)
 
static int Qstrcmp (QByteArray str1, string str2)
 
static int Qstrcmp (string str1, QByteArray str2)
 
static int Qstrcmp (string str1, string str2)
 
static Pointer< sbyte > Qstrcpy (Pointer< sbyte > dst, string src)
 
static Pointer< sbyte > Qstrdup (string arg1)
 
static int Qstricmp (string arg1, string arg2)
 
static uint Qstrlen (string str)
 
static int Qstrncmp (string str1, string str2, uint len)
 
static Pointer< sbyte > Qstrncpy (Pointer< sbyte > dst, string src, uint len)
 
static int Qstrnicmp (string arg1, string arg2, uint len)
 
static uint Qstrnlen (string str, uint maxlen)
 
static string QtTrId (string id, int n=-1)
 

Protected Member Functions

 QPlainTextEdit (System.Type dummy)
 
new QRectF BlockBoundingGeometry (QTextBlock block)
 
 
new QRectF BlockBoundingRect (QTextBlock block)
 
 
new void OnBlockCountChanged (int newBlockCount)
 
 
virtual bool CanInsertFromMimeData (QMimeData source)
 
 
override void OnChangeEvent (QEvent e)
 
 
new QPointF ContentOffset ()
 
 
override void OnContextMenuEvent (QContextMenuEvent e)
 
 
new void OnCopyAvailable (bool b)
 
 
virtual QMimeData CreateMimeDataFromSelection ()
 
 
new void OnCursorPositionChanged ()
 
 
override void OnDragEnterEvent (QDragEnterEvent e)
 
 
override void OnDragLeaveEvent (QDragLeaveEvent e)
 
 
override void OnDragMoveEvent (QDragMoveEvent e)
 
 
override void OnDropEvent (QDropEvent e)
 
 
new QTextBlock FirstVisibleBlock ()
 
 
override void OnFocusInEvent (QFocusEvent e)
 
 
override bool FocusNextPrevChild (bool next)
 
 
override void OnFocusOutEvent (QFocusEvent e)
 
 
new
QAbstractTextDocumentLayout.PaintContext 
GetPaintContext ()
 
 
override void OnInputMethodEvent (QInputMethodEvent arg1)
 
 
virtual void InsertFromMimeData (QMimeData source)
 
 
override void OnKeyPressEvent (QKeyEvent e)
 
 
override void OnKeyReleaseEvent (QKeyEvent e)
 
 
new void OnModificationChanged (bool arg1)
 
 
override void OnMouseDoubleClickEvent (QMouseEvent e)
 
 
override void OnMouseMoveEvent (QMouseEvent e)
 
 
override void OnMousePressEvent (QMouseEvent e)
 
 
override void OnMouseReleaseEvent (QMouseEvent e)
 
 
override void OnPaintEvent (QPaintEvent e)
 
 
new void OnRedoAvailable (bool b)
 
 
override void OnResizeEvent (QResizeEvent e)
 
 
override void ScrollContentsBy (int dx, int dy)
 
 
new void OnSelectionChanged ()
 
 
override void OnShowEvent (QShowEvent arg1)
 
 
new void OnTextChanged ()
 
 
override void OnTimerEvent (QTimerEvent e)
 
 
new void OnUndoAvailable (bool b)
 
 
new void OnUpdateRequest (QRect rect, int dy)
 
 
override void OnWheelEvent (QWheelEvent e)
 
 
- Protected Member Functions inherited from QtGui.QAbstractScrollArea
 QAbstractScrollArea (System.Type dummy)
 
new void SetViewportMargins (QMargins margins)
 
 
new void SetViewportMargins (int left, int top, int right, int bottom)
 
 
new void SetupViewport (QWidget viewport)
 
 
virtual bool OnViewportEvent (QEvent arg1)
 
 
- Protected Member Functions inherited from QtGui.QFrame
 QFrame (System.Type dummy)
 
new void DrawFrame (QPainter arg1)
 
- Protected Member Functions inherited from QtGui.QWidget
 QWidget (System.Type dummy)
 
virtual void OnActionEvent (QActionEvent arg1)
 
 
virtual void OnCloseEvent (QCloseEvent arg1)
 
 
new void Create ()
 
 
new void Create (NativeULong arg1, bool initializeWindow=true, bool destroyOldWindow=true)
 
 
new void OnCustomContextMenuRequested (QPoint pos)
 
 
new void Destroy (bool destroyWindow=true, bool destroySubWindows=true)
 
 
virtual void EnabledChange (bool arg1)
 
virtual void OnEnterEvent (QEvent arg1)
 
 
new bool FocusNextChild ()
 
 
new bool FocusPreviousChild ()
 
 
virtual void FontChange (QFont arg1)
 
virtual void OnHideEvent (QHideEvent arg1)
 
 
virtual void LanguageChange ()
 
 
virtual void OnLeaveEvent (QEvent arg1)
 
 
virtual int Metric (QPaintDevice.PaintDeviceMetric arg1)
 
 
virtual void OnMoveEvent (QMoveEvent arg1)
 
 
virtual void PaletteChange (QPalette arg1)
 
new void ResetInputContext ()
 
 
virtual void StyleChange (QStyle arg1)
 
virtual void OnTabletEvent (QTabletEvent arg1)
 
 
new void UpdateMicroFocus ()
 
 
virtual void WindowActivationChange (bool arg1)
 
- Protected Member Functions inherited from QtCore.QObject
 QObject (System.Type dummy)
 
virtual void OnChildEvent (QChildEvent arg1)
 
 
virtual void ConnectNotify (string signal)
 
 
virtual void OnCustomEvent (QEvent arg1)
 
 
new void OnDestroyed (QObject arg1=null)
 
 
virtual void DisconnectNotify (string signal)
 
 
new int Receivers (string signal)
 
 
new QObject Sender ()
 
 
new int SenderSignalIndex ()
 
 

Properties

Slot TextChanged
 
 
Slot< System.Boolean > UndoAvailable
 
 
Slot< System.Boolean > RedoAvailable
 
 
Slot< System.Boolean > CopyAvailable
 
 
Slot SelectionChanged
 
 
Slot CursorPositionChanged
 
 
Slot< QRect, System.Int32 > UpdateRequest
 
 
Slot< System.Int32 > BlockCountChanged
 
 
Slot< System.Boolean > ModificationChanged
 
 
new QTextCharFormat CurrentCharFormat [get, set]
 
 
new QTextDocument Document [get, set]
 
 
new
System.Collections.Generic.List
< QTextEdit.ExtraSelection
ExtraSelections [get, set]
 
 
new QTextCursor TextCursor [get, set]
 
 
new QTextOption.WrapMode WordWrapMode [get, set]
 
new bool TabChangesFocus [get, set]
 
 
new string DocumentTitle [get, set]
 
 
new bool UndoRedoEnabled [get, set]
 
 
new LineWrapMode lineWrapMode [get, set]
 
 
new bool ReadOnly [get, set]
 
 
new string PlainText [get, set]
 
 
new bool OverwriteMode [get, set]
 
 
new int TabStopWidth [get, set]
 
 
new int CursorWidth [get, set]
 
 
new Qt.TextInteractionFlag TextInteractionFlags [get, set]
 
new int BlockCount [get]
 
 
new int MaximumBlockCount [get, set]
 
 
new bool BackgroundVisible [get, set]
 
 
new bool CenterOnScroll [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
new IQPlainTextEditSignals Emit [get]
 
- Properties inherited from QtGui.QAbstractScrollArea
virtual EventHandler
< QEventArgs< QEvent > > 
ViewportEvent
 
 
new QWidget CornerWidget [get, set]
 
 
new QScrollBar HorizontalScrollBar [get, set]
 
 
new QScrollBar VerticalScrollBar [get, set]
 
 
new QWidget Viewport [get, set]
 
 
override EventHandler
< QEventArgs< QPaintEvent > > 
PaintEvent
 
 
override EventHandler
< QEventArgs< QActionEvent > > 
ActionEvent
 
 
override EventHandler
< QEventArgs< QEvent > > 
ChangeEvent
 
 
override EventHandler
< QEventArgs< QCloseEvent > > 
CloseEvent
 
 
override EventHandler
< QEventArgs
< QContextMenuEvent > > 
ContextMenuEvent
 
 
override EventHandler
< QEventArgs< QDragEnterEvent > > 
DragEnterEvent
 
 
override EventHandler
< QEventArgs< QDragLeaveEvent > > 
DragLeaveEvent
 
 
override EventHandler
< QEventArgs< QDragMoveEvent > > 
DragMoveEvent
 
 
override EventHandler
< QEventArgs< QDropEvent > > 
DropEvent
 
 
override EventHandler
< QEventArgs< QEvent > > 
EnterEvent
 
 
override EventHandler
< QEventArgs< QFocusEvent > > 
FocusInEvent
 
 
override EventHandler
< QEventArgs< QFocusEvent > > 
FocusOutEvent
 
 
override EventHandler
< QEventArgs< QHideEvent > > 
HideEvent
 
 
override EventHandler
< QEventArgs
< QInputMethodEvent > > 
InputMethodEvent
 
 
override EventHandler
< QEventArgs< QKeyEvent > > 
KeyPressEvent
 
 
override EventHandler
< QEventArgs< QKeyEvent > > 
KeyReleaseEvent
 
 
override EventHandler
< QEventArgs< QEvent > > 
LeaveEvent
 
 
override EventHandler
< QEventArgs< QMouseEvent > > 
MouseDoubleClickEvent
 
 
override EventHandler
< QEventArgs< QMouseEvent > > 
MouseMoveEvent
 
 
override EventHandler
< QEventArgs< QMouseEvent > > 
MousePressEvent
 
 
override EventHandler
< QEventArgs< QMouseEvent > > 
MouseReleaseEvent
 
 
override EventHandler
< QEventArgs< QMoveEvent > > 
MoveEvent
 
 
override EventHandler
< QEventArgs< QResizeEvent > > 
ResizeEvent
 
 
override EventHandler
< QEventArgs< QShowEvent > > 
ShowEvent
 
 
override EventHandler
< QEventArgs< QTabletEvent > > 
TabletEvent
 
 
override EventHandler
< QEventArgs< QWheelEvent > > 
WheelEvent
 
 
new Qt.ScrollBarPolicy VerticalScrollBarPolicy [get, set]
 
 
new Qt.ScrollBarPolicy HorizontalScrollBarPolicy [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
new IQAbstractScrollAreaSignals Emit [get]
 
- Properties inherited from QtGui.QFrame
new int FrameStyle [get, set]
 
 
new Shape FrameShape [get, set]
 
 
new Shadow FrameShadow [get, set]
 
 
new int LineWidth [get, set]
 
 
new int MidLineWidth [get, set]
 
 
new int FrameWidth [get]
 
 
new QRect FrameRect [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
new IQFrameSignals Emit [get]
 
- Properties inherited from QtGui.QWidget
virtual EventHandler
< QEventArgs< QActionEvent > > 
ActionEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
ChangeEvent
 
 
virtual EventHandler
< QEventArgs< QCloseEvent > > 
CloseEvent
 
 
virtual EventHandler
< QEventArgs
< QContextMenuEvent > > 
ContextMenuEvent
 
 
virtual EventHandler
< QEventArgs< QDragEnterEvent > > 
DragEnterEvent
 
 
virtual EventHandler
< QEventArgs< QDragLeaveEvent > > 
DragLeaveEvent
 
 
virtual EventHandler
< QEventArgs< QDragMoveEvent > > 
DragMoveEvent
 
 
virtual EventHandler
< QEventArgs< QDropEvent > > 
DropEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
EnterEvent
 
 
virtual EventHandler
< QEventArgs< QFocusEvent > > 
FocusInEvent
 
 
virtual EventHandler
< QEventArgs< QFocusEvent > > 
FocusOutEvent
 
 
virtual EventHandler
< QEventArgs< QHideEvent > > 
HideEvent
 
 
virtual EventHandler
< QEventArgs
< QInputMethodEvent > > 
InputMethodEvent
 
 
virtual EventHandler
< QEventArgs< QKeyEvent > > 
KeyPressEvent
 
 
virtual EventHandler
< QEventArgs< QKeyEvent > > 
KeyReleaseEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
LeaveEvent
 
 
virtual EventHandler
< QEventArgs< QMouseEvent > > 
MouseDoubleClickEvent
 
 
virtual EventHandler
< QEventArgs< QMouseEvent > > 
MouseMoveEvent
 
 
virtual EventHandler
< QEventArgs< QMouseEvent > > 
MousePressEvent
 
 
virtual EventHandler
< QEventArgs< QMouseEvent > > 
MouseReleaseEvent
 
 
virtual EventHandler
< QEventArgs< QMoveEvent > > 
MoveEvent
 
 
virtual EventHandler
< QEventArgs< QPaintEvent > > 
PaintEvent
 
 
virtual EventHandler
< QEventArgs< QResizeEvent > > 
ResizeEvent
 
 
virtual EventHandler
< QEventArgs< QShowEvent > > 
ShowEvent
 
 
virtual EventHandler
< QEventArgs< QTabletEvent > > 
TabletEvent
 
 
virtual EventHandler
< QEventArgs< QWheelEvent > > 
WheelEvent
 
 
Slot< QPointCustomContextMenuRequested
 
 
new QPalette.ColorRole BackgroundRole [get, set]
 
 
new QMargins ContentsMargins [get, set]
 
 
new QWidget FocusProxy [get, set]
 
 
new QPalette.ColorRole ForegroundRole [get, set]
 
 
new QGraphicsEffect GraphicsEffect [get, set]
 
 
new QInputContext InputContext [get, set]
 
 
new QLayout Layout [get, set]
 
 
new QRegion Mask [get, set]
 
 
new QStyle Style [get, set]
 
 
new Qt.WindowType WindowFlags [get, set]
 
new string WindowRole [get, set]
 
 
new Qt.WindowState WindowState [get, set]
 
 
new bool Modal [get]
 
 
new Qt.WindowModality WindowModality [get, set]
 
 
new bool Enabled [get, set]
 
 
new QRect Geometry [get, set]
 
 
new QRect FrameGeometry [get]
 
 
new QRect NormalGeometry [get]
 
 
new int X [get]
 
 
new int Y [get]
 
 
new QPoint Pos [get, set]
 
 
new QSize FrameSize [get]
 
 
new QSize Size [get, set]
 
 
new int Width [get]
 
 
new int Height [get]
 
 
new QRect Rect [get]
 
 
new QRect ChildrenRect [get]
 
 
new QRegion ChildrenRegion [get]
 
 
new QSizePolicy SizePolicy [get, set]
 
 
new QSize MinimumSize [get, set]
 
 
new QSize MaximumSize [get, set]
 
 
new int MinimumWidth [get, set]
 
 
new int MinimumHeight [get, set]
 
 
new int MaximumWidth [get, set]
 
 
new int MaximumHeight [get, set]
 
 
new QSize SizeIncrement [get, set]
 
 
new QSize BaseSize [get, set]
 
 
new QPalette Palette [get, set]
 
 
new QFont Font [get, set]
 
 
new QCursor Cursor [get, set]
 
 
new bool MouseTracking [get, set]
 
 
new bool IsActiveWindow [get]
 
 
new Qt.FocusPolicy FocusPolicy [get, set]
 
 
new bool Focus [get]
 
 
new Qt.ContextMenuPolicy ContextMenuPolicy [get, set]
 
 
new bool UpdatesEnabled [get, set]
 
 
new bool Visible [get, set]
 
 
new bool Minimized [get]
 
 
new bool Maximized [get]
 
 
new bool FullScreen [get]
 
 
new bool AcceptDrops [get, set]
 
 
new string WindowTitle [get, set]
 
 
new QIcon WindowIcon [get, set]
 
 
new string WindowIconText [get, set]
 
 
new double WindowOpacity [get, set]
 
 
new bool WindowModified [get, set]
 
 
new string ToolTip [get, set]
 
 
new string StatusTip [get, set]
 
 
new string WhatsThis [get, set]
 
 
new string AccessibleName [get, set]
 
 
new string AccessibleDescription [get, set]
 
 
new Qt.LayoutDirection LayoutDirection [get, set]
 
 
new bool AutoFillBackground [get, set]
 
 
new string StyleSheet [get, set]
 
 
new QLocale Locale [get, set]
 
 
new string WindowFilePath [get, set]
 
 
new Qt.InputMethodHint InputMethodHints [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
new ushort Painters [get, set]
 
new IQWidgetSignals Emit [get]
 
- Properties inherited from QtCore.QObject
virtual EventHandler
< QEventArgs< QChildEvent > > 
ChildEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
CustomEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
Event
 
 
virtual EventHandler
< QEventArgs< QTimerEvent > > 
TimerEvent
 
 
Slot< QObjectDestroyedQObject
 
Slot Destroyed
 
 
new QObject Parent [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 
new string ObjectName [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
 
static new QMetaObject StaticQtMetaObject [get]
 
new IQObjectSignals Emit [get]
 

Additional Inherited Members

- Protected Attributes inherited from QtCore.QObject
object Q_EMIT = null
 
SmokeInvocation interceptor
 
readonly List< QEventHandler > eventFilters = new List<QEventHandler>()
 

Detailed Description

The QPlainTextEdit class provides a widget that is used to edit and display plain text.

Introduction and Concepts

QPlainTextEdit is an advanced viewer/editor supporting plain text. It is optimized to handle large documents and to respond quickly to user input.

QPlainText uses very much the same technology and concepts as QTextEdit, but is optimized for plain text handling.

QPlainTextEdit works on paragraphs and characters. A paragraph is a formatted string which is word-wrapped to fit into the width of the widget. By default when reading plain text, one newline signifies a paragraph. A document consists of zero or more paragraphs. Paragraphs are separated by hard line breaks. Each character within a paragraph has its own attributes, for example, font and color.

The shape of the mouse cursor on a QPlainTextEdit is Qt::IBeamCursor by default. It can be changed through the viewport()'s cursor property.

Using QPlainTextEdit as a Display Widget

The text is set or replaced using setPlainText() which deletes the existing text and replaces it with the text passed to setPlainText().

Text can be inserted using the QTextCursor class or using the convenience functions insertPlainText(), appendPlainText() or paste().

By default, the text edit wraps words at whitespace to fit within the text edit widget. The setLineWrapMode() function is used to specify the kind of line wrap you want, WidgetWidth or NoWrap if you don't want any wrapping. If you use word wrap to the widget's width WidgetWidth, you can specify whether to break on whitespace or anywhere with setWordWrapMode().

The find() function can be used to find and select a given string within the text.

If you want to limit the total number of paragraphs in a QPlainTextEdit, as it is for example useful in a log viewer, then you can use the maximumBlockCount property. The combination of setMaximumBlockCount() and appendPlainText() turns QPlainTextEdit into an efficient viewer for log text. The scrolling can be reduced with the centerOnScroll() property, making the log viewer even faster. Text can be formatted in a limited way, either using a syntax highlighter (see below), or by appending html-formatted text with appendHtml(). While QPlainTextEdit does not support complex rich text rendering with tables and floats, it does support limited paragraph-based formatting that you may need in a log viewer.

Read-only Key Bindings

When QPlainTextEdit is used read-only the key bindings are limited to navigation, and text may only be selected with the mouse:

KeypressesAction

Qt::UpArrow Moves one line up.

Qt::DownArrow Moves one line down.

Qt::LeftArrow Moves one character to the left.

Qt::RightArrow Moves one character to the right.

PageUp Moves one (viewport) page up.

PageDown Moves one (viewport) page down.

Home Moves to the beginning of the text.

End Moves to the end of the text.

Alt+Wheel Scrolls the page horizontally (the Wheel is the mouse wheel).

Ctrl+Wheel Zooms the text.

Ctrl+A Selects all text.

Using QPlainTextEdit as an Editor

All the information about using QPlainTextEdit as a display widget also applies here.

Selection of text is handled by the QTextCursor class, which provides functionality for creating selections, retrieving the text contents or deleting selections. You can retrieve the object that corresponds with the user-visible cursor using the textCursor() method. If you want to set a selection in QPlainTextEdit just create one on a QTextCursor object and then make that cursor the visible cursor using setCursor(). The selection can be copied to the clipboard with copy(), or cut to the clipboard with cut(). The entire text can be selected using selectAll().

QPlainTextEdit holds a QTextDocument object which can be retrieved using the document() method. You can also set your own document object using setDocument(). QTextDocument emits a textChanged() signal if the text changes and it also provides a isModified() function which will return true if the text has been modified since it was either loaded or since the last call to setModified with false as argument. In addition it provides methods for undo and redo.

Syntax Highlighting

Just like QTextEdit, QPlainTextEdit works together with QSyntaxHighlighter.

Editing Key Bindings

The list of key bindings which are implemented for editing:

KeypressesAction

Backspace Deletes the character to the left of the cursor.

Delete Deletes the character to the right of the cursor.

Ctrl+C Copy the selected text to the clipboard.

Ctrl+Insert Copy the selected text to the clipboard.

Ctrl+K Deletes to the end of the line.

Ctrl+V Pastes the clipboard text into text edit.

Shift+Insert Pastes the clipboard text into text edit.

Ctrl+X Deletes the selected text and copies it to the clipboard.

Shift+Delete Deletes the selected text and copies it to the clipboard.

Ctrl+Z Undoes the last operation.

Ctrl+Y Redoes the last operation.

LeftArrow Moves the cursor one character to the left.

Ctrl+LeftArrow Moves the cursor one word to the left.

RightArrow Moves the cursor one character to the right.

Ctrl+RightArrow Moves the cursor one word to the right.

UpArrow Moves the cursor one line up.

Ctrl+UpArrow Moves the cursor one word up.

DownArrow Moves the cursor one line down.

Ctrl+Down Arrow Moves the cursor one word down.

PageUp Moves the cursor one page up.

PageDown Moves the cursor one page down.

Home Moves the cursor to the beginning of the line.

Ctrl+Home Moves the cursor to the beginning of the text.

End Moves the cursor to the end of the line.

Ctrl+End Moves the cursor to the end of the text.

Alt+Wheel Scrolls the page horizontally (the Wheel is the mouse wheel).

Ctrl+Wheel Zooms the text.

To select (mark) text hold down the Shift key whilst pressing one of the movement keystrokes, for example, Shift+Right Arrow will select the character to the right, and Shift+Ctrl+Right Arrow will select the word to the right, etc.

Differences to QTextEdit

QPlainTextEdit is a thin class, implemented by using most of the technology that is behind QTextEdit and QTextDocument. Its performance benefits over QTextEdit stem mostly from using a different and simplified text layout called QPlainTextDocumentLayout on the text document (see QTextDocument::setDocumentLayout()). The plain text document layout does not support tables nor embedded frames, and replaces a pixel-exact height calculation with a line-by-line respectively paragraph-by-paragraph scrolling approach. This makes it possible to handle significantly larger documents, and still resize the editor with line wrap enabled in real time. It also makes for a fast log viewer (see setMaximumBlockCount()).

See also QTextDocument, QTextCursor, Application Example, Code Editor Example, Syntax Highlighter Example, and Rich Text Processing.

Member Enumeration Documentation

Enumerator:
NoWrap 
WidgetWidth 

Constructor & Destructor Documentation

QtGui.QPlainTextEdit.QPlainTextEdit ( System.Type  dummy)
protected
QtGui.QPlainTextEdit.QPlainTextEdit ( QWidget  parent = null)

Constructs an empty QPlainTextEdit with parent parent.

QtGui.QPlainTextEdit.QPlainTextEdit ( string  text,
QWidget  parent = null 
)

Constructs a QPlainTextEdit with parent parent. The text edit will display the plain text text.

Member Function Documentation

new string QtGui.QPlainTextEdit.AnchorAt ( QPoint  pos)

Returns the reference of the anchor at position pos, or an empty string if no anchor exists at that point.

This function was introduced in Qt 4.7.

new void QtGui.QPlainTextEdit.AppendHtml ( string  html)

Appends a new paragraph with html to the end of the text edit.

appendPlainText()

new void QtGui.QPlainTextEdit.AppendPlainText ( string  text)

Appends a new paragraph with text to the end of the text edit.

See also appendHtml().

new QRectF QtGui.QPlainTextEdit.BlockBoundingGeometry ( QTextBlock  block)
protected

Returns the bounding rectangle of the text block in content coordinates. Translate the rectangle with the contentOffset() to get visual coordinates on the viewport.

See also firstVisibleBlock() and blockBoundingRect().

new QRectF QtGui.QPlainTextEdit.BlockBoundingRect ( QTextBlock  block)
protected

Returns the bounding rectangle of the text block in the block's own coordinates.

See also blockBoundingGeometry().

virtual bool QtGui.QPlainTextEdit.CanInsertFromMimeData ( QMimeData  source)
protectedvirtual

This function returns true if the contents of the MIME data object, specified by source, can be decoded and inserted into the document. It is called for example when during a drag operation the mouse enters this widget and it is necessary to determine whether it is possible to accept the drag.

new bool QtGui.QPlainTextEdit.CanPaste ( )

Returns whether text can be pasted from the clipboard into the textedit.

new void QtGui.QPlainTextEdit.CenterCursor ( )

Scrolls the document in order to center the cursor vertically.

See also ensureCursorVisible() and centerOnScroll.

new void QtGui.QPlainTextEdit.Clear ( )

Deletes all the text in the text edit.

Note that the undo/redo history is cleared by this function.

See also cut() and setPlainText().

new QPointF QtGui.QPlainTextEdit.ContentOffset ( )
protected

Returns the content's origin in viewport coordinates.

The origin of the content of a plain text edit is always the top left corner of the first visible text block. The content offset is different from (0,0) when the text has been scrolled horizontally, or when the first visible block has been scrolled partially off the screen, i.e. the visible text does not start with the first line of the first visible block, or when the first visible block is the very first block and the editor displays a margin.

See also firstVisibleBlock(), horizontalScrollBar(), and verticalScrollBar().

new void QtGui.QPlainTextEdit.Copy ( )

Copies any selected text to the clipboard.

See also copyAvailable().

virtual QMimeData QtGui.QPlainTextEdit.CreateMimeDataFromSelection ( )
protectedvirtual

This function returns a new MIME data object to represent the contents of the text edit's current selection. It is called when the selection needs to be encapsulated into a new QMimeData object; for example, when a drag and drop operation is started, or when data is copied to the clipboard.

If you reimplement this function, note that the ownership of the returned QMimeData object is passed to the caller. The selection can be retrieved by using the textCursor() function.

override void QtGui.QPlainTextEdit.CreateProxy ( )
virtual

Reimplemented from QtGui.QAbstractScrollArea.

new QMenu QtGui.QPlainTextEdit.CreateStandardContextMenu ( )

This function creates the standard context menu which is shown when the user clicks on the line edit with the right mouse button. It is called from the default contextMenuEvent() handler. The popup menu's ownership is transferred to the caller.

new QTextCursor QtGui.QPlainTextEdit.CursorForPosition ( QPoint  pos)

returns a QTextCursor at position pos (in viewport coordinates).

new QRect QtGui.QPlainTextEdit.CursorRect ( )

returns a rectangle (in viewport coordinates) that includes the cursor of the text edit.

new QRect QtGui.QPlainTextEdit.CursorRect ( QTextCursor  cursor)

returns a rectangle (in viewport coordinates) that includes the cursor.

new void QtGui.QPlainTextEdit.Cut ( )

Copies the selected text to the clipboard and deletes it from the text edit.

If there is no selected text nothing happens.

See also copy() and paste().

new void QtGui.QPlainTextEdit.Dispose ( )
new void QtGui.QPlainTextEdit.EnsureCursorVisible ( )

Ensures that the cursor is visible by scrolling the text edit if necessary.

See also centerCursor() and centerOnScroll.

new bool QtGui.QPlainTextEdit.Find ( string  exp,
QTextDocument.FindFlag  options = 0 
)

Finds the next occurrence of the string, exp, using the given options. Returns true if exp was found and changes the cursor to select the match; otherwise returns false.

new QTextBlock QtGui.QPlainTextEdit.FirstVisibleBlock ( )
protected

Returns the first visible block.

See also blockBoundingRect().

override bool QtGui.QPlainTextEdit.FocusNextPrevChild ( bool  next)
protectedvirtual

Reimplemented from QWidget::focusNextPrevChild().

Reimplemented from QtGui.QWidget.

new QAbstractTextDocumentLayout.PaintContext QtGui.QPlainTextEdit.GetPaintContext ( )
protected

Returns the paint context for the viewport(), useful only when reimplementing paintEvent().

override object QtGui.QPlainTextEdit.InputMethodQuery ( Qt.InputMethodQuery  property)
virtual

Reimplemented from QWidget::inputMethodQuery().

Reimplemented from QtGui.QWidget.

virtual void QtGui.QPlainTextEdit.InsertFromMimeData ( QMimeData  source)
protectedvirtual

This function inserts the contents of the MIME data object, specified by source, into the text edit at the current cursor position. It is called whenever text is inserted as the result of a clipboard paste operation, or when the text edit accepts data from a drag and drop operation.

new void QtGui.QPlainTextEdit.InsertPlainText ( string  text)

Convenience slot that inserts text at the current cursor position.

It is equivalent to

edit->textCursor().insertText(text);

virtual object QtGui.QPlainTextEdit.LoadResource ( int  type,
QUrl  name 
)
virtual

Loads the resource specified by the given type and name.

This function is an extension of QTextDocument::loadResource().

See also QTextDocument::loadResource().

new void QtGui.QPlainTextEdit.MergeCurrentCharFormat ( QTextCharFormat  modifier)

Merges the properties specified in modifier into the current character format by calling QTextCursor::mergeCharFormat on the editor's cursor. If the editor has a selection then the properties of modifier are directly applied to the selection.

See also QTextCursor::mergeCharFormat().

new void QtGui.QPlainTextEdit.MoveCursor ( QTextCursor.MoveOperation  operation,
QTextCursor.MoveMode  mode = QTextCursor.MoveMode.MoveAnchor 
)

Moves the cursor by performing the given operation.

If mode is QTextCursor::KeepAnchor, the cursor selects the text it moves over. This is the same effect that the user achieves when they hold down the Shift key and move the cursor with the cursor keys.

See also QTextCursor::movePosition().

new void QtGui.QPlainTextEdit.OnBlockCountChanged ( int  newBlockCount)
protected

This signal is emitted whenever the block count changes. The new block count is passed in newBlockCount.

override void QtGui.QPlainTextEdit.OnChangeEvent ( QEvent  e)
protectedvirtual

Reimplemented from QWidget::changeEvent().

Reimplemented from QtGui.QFrame.

override void QtGui.QPlainTextEdit.OnContextMenuEvent ( QContextMenuEvent  e)
protectedvirtual

Reimplemented from QWidget::contextMenuEvent().

Shows the standard context menu created with createStandardContextMenu().

If you do not want the text edit to have a context menu, you can set its contextMenuPolicy to Qt::NoContextMenu. If you want to customize the context menu, reimplement this function. If you want to extend the standard context menu, reimplement this function, call createStandardContextMenu() and extend the menu returned.

Information about the event is passed in the event object.

void MyQPlainTextEdit::contextMenuEvent(QContextMenuEvent *event)

{

QMenu *menu = createStandardContextMenu();

menu->addAction(tr("My Menu Item"));

//...

menu->exec(event->globalPos());

delete menu;

}

Reimplemented from QtGui.QAbstractScrollArea.

new void QtGui.QPlainTextEdit.OnCopyAvailable ( bool  b)
protected

This signal is emitted when text is selected or de-selected in the text edit.

When text is selected this signal will be emitted with yes set to true. If no text has been selected or if the selected text is de-selected this signal is emitted with yes set to false.

If yes is true then copy() can be used to copy the selection to the clipboard. If yes is false then copy() does nothing.

See also selectionChanged().

new void QtGui.QPlainTextEdit.OnCursorPositionChanged ( )
protected

This signal is emitted whenever the position of the cursor changed.

override void QtGui.QPlainTextEdit.OnDragEnterEvent ( QDragEnterEvent  e)
protectedvirtual

Reimplemented from QWidget::dragEnterEvent().

Reimplemented from QtGui.QAbstractScrollArea.

override void QtGui.QPlainTextEdit.OnDragLeaveEvent ( QDragLeaveEvent  e)
protectedvirtual

Reimplemented from QWidget::dragLeaveEvent().

Reimplemented from QtGui.QAbstractScrollArea.

override void QtGui.QPlainTextEdit.OnDragMoveEvent ( QDragMoveEvent  e)
protectedvirtual

Reimplemented from QWidget::dragMoveEvent().

Reimplemented from QtGui.QAbstractScrollArea.

override void QtGui.QPlainTextEdit.OnDropEvent ( QDropEvent  e)
protectedvirtual

Reimplemented from QWidget::dropEvent().

Reimplemented from QtGui.QAbstractScrollArea.

override bool QtGui.QPlainTextEdit.OnEvent ( QEvent  arg1)
virtual

Reimplemented from QObject::event().

This is the main event handler for the QAbstractScrollArea widget (not the scrolling area viewport()). The specified event is a general event object that may need to be cast to the appropriate class depending on its type.

See also QEvent::type().

Reimplemented from QtGui.QAbstractScrollArea.

override void QtGui.QPlainTextEdit.OnFocusInEvent ( QFocusEvent  e)
protectedvirtual

Reimplemented from QWidget::focusInEvent().

Reimplemented from QtGui.QWidget.

override void QtGui.QPlainTextEdit.OnFocusOutEvent ( QFocusEvent  e)
protectedvirtual

Reimplemented from QWidget::focusOutEvent().

Reimplemented from QtGui.QWidget.

override void QtGui.QPlainTextEdit.OnInputMethodEvent ( QInputMethodEvent  arg1)
protectedvirtual

Reimplemented from QWidget::inputMethodEvent().

Reimplemented from QtGui.QWidget.

override void QtGui.QPlainTextEdit.OnKeyPressEvent ( QKeyEvent  e)
protectedvirtual

Reimplemented from QWidget::keyPressEvent().

Reimplemented from QtGui.QAbstractScrollArea.

override void QtGui.QPlainTextEdit.OnKeyReleaseEvent ( QKeyEvent  e)
protectedvirtual

Reimplemented from QWidget::keyReleaseEvent().

Reimplemented from QtGui.QWidget.

new void QtGui.QPlainTextEdit.OnModificationChanged ( bool  arg1)
protected

This signal is emitted whenever the content of the document changes in a way that affects the modification state. If changed is true, the document has been modified; otherwise it is false.

For example, calling setModified(false) on a document and then inserting text causes the signal to get emitted. If you undo that operation, causing the document to return to its original unmodified state, the signal will get emitted again.

override void QtGui.QPlainTextEdit.OnMouseDoubleClickEvent ( QMouseEvent  e)
protectedvirtual

Reimplemented from QWidget::mouseDoubleClickEvent().

Reimplemented from QtGui.QAbstractScrollArea.

override void QtGui.QPlainTextEdit.OnMouseMoveEvent ( QMouseEvent  e)
protectedvirtual

Reimplemented from QWidget::mouseMoveEvent().

Reimplemented from QtGui.QAbstractScrollArea.

override void QtGui.QPlainTextEdit.OnMousePressEvent ( QMouseEvent  e)
protectedvirtual

Reimplemented from QWidget::mousePressEvent().

Reimplemented from QtGui.QAbstractScrollArea.

override void QtGui.QPlainTextEdit.OnMouseReleaseEvent ( QMouseEvent  e)
protectedvirtual

Reimplemented from QWidget::mouseReleaseEvent().

Reimplemented from QtGui.QAbstractScrollArea.

override void QtGui.QPlainTextEdit.OnPaintEvent ( QPaintEvent  e)
protectedvirtual

Reimplemented from QWidget::paintEvent().

Reimplemented from QtGui.QAbstractScrollArea.

new void QtGui.QPlainTextEdit.OnRedoAvailable ( bool  b)
protected

This signal is emitted whenever redo operations become available (available is true) or unavailable (available is false).

override void QtGui.QPlainTextEdit.OnResizeEvent ( QResizeEvent  e)
protectedvirtual

Reimplemented from QWidget::resizeEvent().

Reimplemented from QtGui.QAbstractScrollArea.

new void QtGui.QPlainTextEdit.OnSelectionChanged ( )
protected

This signal is emitted whenever the selection changes.

See also copyAvailable().

override void QtGui.QPlainTextEdit.OnShowEvent ( QShowEvent  arg1)
protectedvirtual

Reimplemented from QWidget::showEvent().

Reimplemented from QtGui.QWidget.

new void QtGui.QPlainTextEdit.OnTextChanged ( )
protected

This signal is emitted whenever the document's content changes; for example, when text is inserted or deleted, or when formatting is applied.

override void QtGui.QPlainTextEdit.OnTimerEvent ( QTimerEvent  arg1)
protectedvirtual

This event handler can be reimplemented in a subclass to receive timer events for the object.

QTimer provides a higher-level interface to the timer functionality, and also more general information about timers. The timer event is passed in the event parameter.

See also startTimer(), killTimer(), and event().

Reimplemented from QtCore.QObject.

new void QtGui.QPlainTextEdit.OnUndoAvailable ( bool  b)
protected

This signal is emitted whenever undo operations become available (available is true) or unavailable (available is false).

new void QtGui.QPlainTextEdit.OnUpdateRequest ( QRect  rect,
int  dy 
)
protected

This signal is emitted when the text document needs an update of the specified rect. If the text is scrolled, rect will cover the entire viewport area. If the text is scrolled vertically, dy carries the amount of pixels the viewport was scrolled.

The purpose of the signal is to support extra widgets in plain text edit subclasses that e.g. show line numbers, breakpoints, or other extra information.

override void QtGui.QPlainTextEdit.OnWheelEvent ( QWheelEvent  e)
protectedvirtual

Reimplemented from QWidget::wheelEvent().

Reimplemented from QtGui.QAbstractScrollArea.

new void QtGui.QPlainTextEdit.Paste ( )

Pastes the text from the clipboard into the text edit at the current cursor position.

If there is no text in the clipboard nothing happens.

To change the behavior of this function, i.e. to modify what QPlainTextEdit can paste and how it is being pasted, reimplement the virtual canInsertFromMimeData() and insertFromMimeData() functions.

See also cut() and copy().

new void QtGui.QPlainTextEdit.Print ( QPrinter  printer)

Convenience function to print the text edit's document to the given printer. This is equivalent to calling the print method on the document directly except that this function also supports QPrinter::Selection as print range.

See also QTextDocument::print().

new void QtGui.QPlainTextEdit.Redo ( )

Redoes the last operation.

If there is no operation to redo, i.e. there is no redo step in the undo/redo history, nothing happens.

See also undo().

override void QtGui.QPlainTextEdit.ScrollContentsBy ( int  dx,
int  dy 
)
protectedvirtual

Reimplemented from QAbstractScrollArea::scrollContentsBy().

Reimplemented from QtGui.QAbstractScrollArea.

new void QtGui.QPlainTextEdit.SelectAll ( )

Selects all text.

See also copy(), cut(), and textCursor().

new void QtGui.QPlainTextEdit.SetTextInteractionFlags ( Qt.TextInteractionFlag  flags)
new Qt.TextInteractionFlag QtGui.QPlainTextEdit.textInteractionFlags ( )
static string QtGui.QPlainTextEdit.Tr ( string  s,
string  c = null 
)
static
static string QtGui.QPlainTextEdit.Tr ( string  s,
string  c,
int  n 
)
static
static string QtGui.QPlainTextEdit.TrUtf8 ( string  s,
string  c = null 
)
static
static string QtGui.QPlainTextEdit.TrUtf8 ( string  s,
string  c,
int  n 
)
static
new void QtGui.QPlainTextEdit.Undo ( )

Undoes the last operation.

If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens.

See also redo().

Property Documentation

new bool QtGui.QPlainTextEdit.BackgroundVisible
getset

This property holds whether the palette background is visible outside the document area.

If set to true, the plain text edit paints the palette background on the viewport area not covered by the text document. Otherwise, if set to false, it won't. The feature makes it possible for the user to visually distinguish between the area of the document, painted with the base color of the palette, and the empty area not covered by any document.

The default is false.

new int QtGui.QPlainTextEdit.BlockCount
get

This property holds the number of text blocks in the document.

By default, in an empty document, this property contains a value of 1.

Slot<System.Int32> QtGui.QPlainTextEdit.BlockCountChanged
addremove

This signal is emitted whenever the block count changes. The new block count is passed in newBlockCount.

new bool QtGui.QPlainTextEdit.CenterOnScroll
getset

This property holds whether the cursor should be centered on screen.

If set to true, the plain text edit scrolls the document vertically to make the cursor visible at the center of the viewport. This also allows the text edit to scroll below the end of the document. Otherwise, if set to false, the plain text edit scrolls the smallest amount possible to ensure the cursor is visible. The same algorithm is applied to any new line appended through appendPlainText().

The default is false.

Slot<System.Boolean> QtGui.QPlainTextEdit.CopyAvailable
addremove

This signal is emitted when text is selected or de-selected in the text edit.

When text is selected this signal will be emitted with yes set to true. If no text has been selected or if the selected text is de-selected this signal is emitted with yes set to false.

If yes is true then copy() can be used to copy the selection to the clipboard. If yes is false then copy() does nothing.

See also selectionChanged().

new QTextCharFormat QtGui.QPlainTextEdit.CurrentCharFormat
getset

Returns the char format that is used when inserting new text.

Sets the char format that is be used when inserting new text to format by calling QTextCursor::setCharFormat() on the editor's cursor. If the editor has a selection then the char format is directly applied to the selection.

Slot QtGui.QPlainTextEdit.CursorPositionChanged
addremove

This signal is emitted whenever the position of the cursor changed.

new int QtGui.QPlainTextEdit.CursorWidth
getset

This property specifies the width of the cursor in pixels. The default value is 1.

new QTextDocument QtGui.QPlainTextEdit.Document
getset

Returns a pointer to the underlying document.

Makes document the new document of the text editor.

The parent QObject of the provided document remains the owner of the object. If the current document is a child of the text editor, then it is deleted.

The document must have a document layout that inherits QPlainTextDocumentLayout (see QTextDocument::setDocumentLayout()).

new string QtGui.QPlainTextEdit.DocumentTitle
getset

This property holds the title of the document parsed from the text.

By default, this property contains an empty string.

new IQPlainTextEditSignals QtGui.QPlainTextEdit.Emit
getprotected
new System.Collections.Generic.List<QTextEdit.ExtraSelection> QtGui.QPlainTextEdit.ExtraSelections
getset

Returns previously set extra selections.

This function allows temporarily marking certain regions in the document with a given color, specified as selections. This can be useful for example in a programming editor to mark a whole line of text with a given background color to indicate the existence of a breakpoint.

new LineWrapMode QtGui.QPlainTextEdit.lineWrapMode
getset

This property holds the line wrap mode.

The default mode is WidgetWidth which causes words to be wrapped at the right edge of the text edit. Wrapping occurs at whitespace, keeping whole words intact. If you want wrapping to occur within words use setWordWrapMode().

new int QtGui.QPlainTextEdit.MaximumBlockCount
getset

This property holds the limit for blocks in the document.

Specifies the maximum number of blocks the document may have. If there are more blocks in the document that specified with this property blocks are removed from the beginning of the document.

A negative or zero value specifies that the document may contain an unlimited amount of blocks.

The default value is 0.

Note that setting this property will apply the limit immediately to the document contents. Setting this property also disables the undo redo history.

Slot<System.Boolean> QtGui.QPlainTextEdit.ModificationChanged
addremove

This signal is emitted whenever the content of the document changes in a way that affects the modification state. If changed is true, the document has been modified; otherwise it is false.

For example, calling setModified(false) on a document and then inserting text causes the signal to get emitted. If you undo that operation, causing the document to return to its original unmodified state, the signal will get emitted again.

new bool QtGui.QPlainTextEdit.OverwriteMode
getset

This property holds whether text entered by the user will overwrite existing text.

As with many text editors, the plain text editor widget can be configured to insert or overwrite existing text with new text entered by the user.

If this property is true, existing text is overwritten, character-for-character by new text; otherwise, text is inserted at the cursor position, displacing existing text.

By default, this property is false (new text does not overwrite existing text).

new string QtGui.QPlainTextEdit.PlainText
getset

This property gets and sets the plain text editor's contents. The previous contents are removed and undo/redo history is reset when this property is set.

By default, for an editor with no contents, this property contains an empty string.

new bool QtGui.QPlainTextEdit.ReadOnly
getset

This property holds whether the text edit is read-only.

In a read-only text edit the user can only navigate through the text and select text; modifying the text is not possible.

This property's default is false.

Slot<System.Boolean> QtGui.QPlainTextEdit.RedoAvailable
addremove

This signal is emitted whenever redo operations become available (available is true) or unavailable (available is false).

Slot QtGui.QPlainTextEdit.SelectionChanged
addremove

This signal is emitted whenever the selection changes.

See also copyAvailable().

new QMetaObject QtGui.QPlainTextEdit.StaticMetaObject
staticget
new bool QtGui.QPlainTextEdit.TabChangesFocus
getset

This property holds whether Tab changes focus or is accepted as input.

In some occasions text edits should not allow the user to input tabulators or change indentation using the Tab key, as this breaks the focus chain. The default is false.

new int QtGui.QPlainTextEdit.TabStopWidth
getset

This property holds the tab stop width in pixels.

By default, this property contains a value of 80.

Slot QtGui.QPlainTextEdit.TextChanged
addremove

This signal is emitted whenever the document's content changes; for example, when text is inserted or deleted, or when formatting is applied.

new QTextCursor QtGui.QPlainTextEdit.TextCursor
getset

Returns a copy of the QTextCursor that represents the currently visible cursor. Note that changes on the returned cursor do not affect QPlainTextEdit's cursor; use setTextCursor() to update the visible cursor.

Sets the visible cursor.

new Qt.TextInteractionFlag QtGui.QPlainTextEdit.TextInteractionFlags
getset
Slot<System.Boolean> QtGui.QPlainTextEdit.UndoAvailable
addremove

This signal is emitted whenever undo operations become available (available is true) or unavailable (available is false).

new bool QtGui.QPlainTextEdit.UndoRedoEnabled
getset

This property holds whether undo and redo are enabled.

Users are only able to undo or redo actions if this property is true, and if there is an action that can be undone (or redone).

By default, this property is true.

Slot<QRect,System.Int32> QtGui.QPlainTextEdit.UpdateRequest
addremove

This signal is emitted when the text document needs an update of the specified rect. If the text is scrolled, rect will cover the entire viewport area. If the text is scrolled vertically, dy carries the amount of pixels the viewport was scrolled.

The purpose of the signal is to support extra widgets in plain text edit subclasses that e.g. show line numbers, breakpoints, or other extra information.

new QTextOption.WrapMode QtGui.QPlainTextEdit.WordWrapMode
getset