diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 4391c572e..563fc9dbd 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -657,6 +657,15 @@ void TableLayout::addWidget(int row, int column, QWidget * widget, Qt::Alignment #endif } +void TableLayout::addWidget(int fromRow, int fromColumn, int rowSpan, int colSpan, + QWidget * widget, Qt::Alignment alignment) +{ +#if defined(TABLE_LAYOUT) +#else + gridWidget->addWidget(widget, fromRow + 1, fromColumn, rowSpan, colSpan, alignment); +#endif +} + void TableLayout::addLayout(int row, int column, QLayout * layout, Qt::Alignment alignment) { #if defined(TABLE_LAYOUT) diff --git a/companion/src/helpers.h b/companion/src/helpers.h index 1a771a2f2..aec3ec99b 100644 --- a/companion/src/helpers.h +++ b/companion/src/helpers.h @@ -195,8 +195,12 @@ public: TableLayout(QWidget * parent, int rowCount, const QStringList & headerLabels); // ~TableLayout() ; - void addWidget(int row, int column, QWidget * widget, Qt::Alignment alignment = Qt::Alignment()); - void addLayout(int row, int column, QLayout * layout, Qt::Alignment alignment = Qt::Alignment()); + void addWidget(int row, int column, QWidget * widget, + Qt::Alignment alignment = Qt::Alignment()); + void addWidget(int fromRow, int fromColumn, int rowSpan, int colSpan, QWidget * widget, + Qt::Alignment alignment = Qt::Alignment()); + void addLayout(int row, int column, QLayout * layout, + Qt::Alignment alignment = Qt::Alignment()); void resizeColumnsToContents(); void setColumnWidth(int col, int width); diff --git a/companion/src/modeledit/gvars.cpp b/companion/src/modeledit/gvars.cpp index fb1304ac4..4fdf20fab 100644 --- a/companion/src/modeledit/gvars.cpp +++ b/companion/src/modeledit/gvars.cpp @@ -154,9 +154,13 @@ GlobalVariablesPanel::GlobalVariablesPanel(QWidget * parent, ModelData & model, col += colspan; } + QLabel *lblWarn = new QLabel(this); + lblWarn->setText(tr("WARNING: changing ranges or precision can affect configured Logical Switches and Special Functions")); + tableLayout->addWidget(gvars, 1, 1, -1, lblWarn); + disableMouseScrolling(); tableLayout->resizeColumnsToContents(); - tableLayout->pushRowsUp(gvars + 1); + tableLayout->pushRowsUp(gvars + 2); tableLayout->pushColumnsLeft(col); }