class KFormulaEdit

A WYSIWYG formula editor widget. More...

Definition#include <kformulaedit.h>
InheritsQWidget (kdecore)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Slots

Signals


Detailed Description

This guy is a formula editor--kind of like a line editor but you can do formulas. If you construct it with restricted set to true, it prevents you from typing things it doesn't know how to evaluate (like matrices, greek, integrals, etc.) If you want to use your own evaluation, but want to have the typing restrictions, you can use uglyForm() on a restricted formula to get a c-style expression and setExtraChars() to allow characters beyond the default allowed in restricted mode.

Features of KFormulaEdit include infinite undo/redo, cut/copy/paste, and you can enter almost anything KFormula can display (I think). To save a formula, use text(), save the returned string, and when loading use setText(QString) with the saved string.

Keyboard shortcuts are availiable, but it's probably easier to use a KFormulaToolBar (which see).

void  enableSizeHintSignal ( bool b)

By default this is turned off for performance reasons. If turned on, the signal sizeHint is emitted everytime the formula gets a new size.