BPS C++ API  2.24.4
bpstextedit.h
Go to the documentation of this file.
1 
4 #ifndef BPSTEXTEDIT_H
5 #define BPSTEXTEDIT_H
6 
7 #include "bpsgui_global.h"
8 #include <QPlainTextEdit>
9 
10 class BpsDatastore;
11 
18 {
19  Q_OBJECT
21 
22 public:
23 
27  BpsTextEdit(QWidget* aParent = nullptr);
28 
33  BpsTextEdit(const QString& aText, QWidget* aParent = nullptr);
34 
35  virtual ~BpsTextEdit();
36 
47  void applyValidator(BpsDatastore* aDatastore, const QString& aTable, const QString& aColumn);
48 
54  void setLimits(int aMaxLines, int aMaxPerLine);
55 
60  void setEditText(const QString& aText);
61 
65  QString editText() const;
66 
67 signals:
68 
73  void editTextChanged(const QString& aText);
74 };
75 
76 #endif // BPSTEXTEDIT_H
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
Public include file for BPS GUI library macros.
#define BPSGUI_EXPORT
Declare class an import from the shared library.
Definition: bpsgui_global.h:22
BPS datastore class.
Definition: bpsdatastore.h:61
Convenience plain text edit with support for width and height limits.
Definition: bpstextedit.h:18
void setLimits(int aMaxLines, int aMaxPerLine)
Set max number of lines and characters per line.
void setEditText(const QString &aText)
Set the current text applying the limits if necessary.
void editTextChanged(const QString &aText)
Signal emitted whenever the text is changed, after applying the limits.
QString editText() const
BpsTextEdit(QWidget *aParent=nullptr)
void applyValidator(BpsDatastore *aDatastore, const QString &aTable, const QString &aColumn)
Get constraints from the central BPS settings as:
BpsTextEdit(const QString &aText, QWidget *aParent=nullptr)