40 #ifndef __OPENFLUID_UICOMMON_UIHELPERS_HPP__ 41 #define __OPENFLUID_UICOMMON_UIHELPERS_HPP__ 49 namespace openfluid {
namespace ui {
namespace common {
54 return QColor(qrand() % 256,qrand() % 256,qrand() % 256);
62 inline void fixLineEdit(QLineEdit* LineEdit,QRegExp SearchRegExp = QRegExp(
"[^\\w]"),QString NewStr =
"_")
64 int CPos = LineEdit->cursorPosition();
65 LineEdit->setText(LineEdit->text().replace(SearchRegExp,NewStr));
66 LineEdit->setCursorPosition(CPos);
Definition: ApplicationException.hpp:47
void fixLineEdit(QLineEdit *LineEdit, QRegExp SearchRegExp=QRegExp("[^\\w]"), QString NewStr="_")
Definition: UIHelpers.hpp:62
QColor getRandomColor()
Definition: UIHelpers.hpp:52