Documents > BPS V2 C++ API
BpsTextEdit Class Reference

Convenience plain text edit with support for width and height limits. More...

#include <bpstextedit.h>

List of all members.

Signals

void editTextChanged (const QString &aText)
 Signal emitted whenever the text is changed, after applying the limits.

Public Member Functions

void applyValidator (BpsDatastore *aDatastore, const QString &aTable, const QString &aColumn)
 Get constraints from the central BPS settings as:
 BpsTextEdit (QWidget *aParent=0)
 BpsTextEdit (const QString &aText, QWidget *aParent=0)
QString editText () const
void setEditText (const QString &aText)
 Set the current text applying the limits if necessary.
void setLimits (int aMaxLines, int aMaxPerLine)
 Set max number of lines and characters per line.

Detailed Description

Convenience plain text edit with support for width and height limits.

The class is based on QPlainTextEdit. Initial limits are 5 lines by 60 characters.


Constructor & Destructor Documentation

BpsTextEdit::BpsTextEdit ( QWidget *  aParent = 0)
Parameters:
[in]aParentThe parent widget.
BpsTextEdit::BpsTextEdit ( const QString &  aText,
QWidget *  aParent = 0 
)
Parameters:
[in]aTextInitial text to set, watch out for default limits.
[in]aParentThe parent widget.

Member Function Documentation

void BpsTextEdit::applyValidator ( BpsDatastore aDatastore,
const QString &  aTable,
const QString &  aColumn 
)

Get constraints from the central BPS settings as:

  • Max number of lines = Settings/Validators/aTable/aColumn.maxlines
  • Max number of chars per line = Settings/Validators/aTable/aColumn.maxperline
  • Default text = Settings/Validators/aTable/aColumn.default
    Parameters:
    [in]aDatastoreThe current datastore.
    [in]aTableThe table name
    [in]aColumnThe column name
    Exceptions:
    BpsExceptionthrown on datastore errors.
QString BpsTextEdit::editText ( ) const
Returns:
Get current edit text.
void BpsTextEdit::editTextChanged ( const QString &  aText) [signal]

Signal emitted whenever the text is changed, after applying the limits.

Parameters:
aTextThe new edit text.
void BpsTextEdit::setEditText ( const QString &  aText)

Set the current text applying the limits if necessary.

Parameters:
[in]aTextThe new edit text to set.
void BpsTextEdit::setLimits ( int  aMaxLines,
int  aMaxPerLine 
)

Set max number of lines and characters per line.

Parameters:
[in]aMaxLinesThe maximum number of lines.
[in]aMaxPerLineThe maximum number of chars per line.

The documentation for this class was generated from the following file: