DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dbe::widgets::editors::numericattr Class Reference

#include <BuildingBlockEditors.hpp>

Inheritance diagram for dbe::widgets::editors::numericattr:
[legend]
Collaboration diagram for dbe::widgets::editors::numericattr:
[legend]

Public Types

typedef dunedaq::conffwk::attribute_t t_virtue
typedef editor_data< t_virtue > t_build_block_editor

Signals

void signal_value_duplicated ()
Signals inherited from dbe::widgets::editors::base
void signal_force_close ()
void signal_edit_end ()
void signal_internal_value_change ()
void signal_value_change ()

Public Member Functions

 numericattr (t_virtue const &attr, QWidget *parent=nullptr, bool owned=false, bool readonly=false)
void SetEditor () override
QLineEdit * GetLineEdit () const
virtual void setdefaults (const QString &ValueDefault)
Public Member Functions inherited from dbe::widgets::editors::base
template<typename T = editor_data_state>
std::shared_ptr< T > dataeditor ()
virtual void setdata (QStringList const &)
void setchanged (bool)
bool ischanged () const
virtual QStringList getdata ()
template<>
std::shared_ptr< editor_data_state > dataeditor ()

Private Slots

void checkIfDuplicated ()
void AddToList ()
void ChangeFormat (int i)
void UpdateActions (QString Dummy)
void ChangeFormatDec ()
void ChangeFormatHex ()
void ChangeFormatOct ()

Private Member Functions

void buildtooltip () override
void closeEvent (QCloseEvent *Event)
void SetController ()
void ShowWarning (QString Format="", QString Range="")
bool ValidateIntegerValue (QString const &)
bool ValidateFloatValue (QString const &)
bool checkRange (QString const &)

Private Attributes

std::shared_ptr< t_build_block_editor > this_base_data_editor
bool m_readonly
int this_base
int this_native_base

Additional Inherited Members

Public Slots inherited from dbe::widgets::editors::base
virtual void slot_set_initial_loaded ()
Public Attributes inherited from dbe::widgets::editors::base
const QString c_input_placeholder { "Add a new value" }
const QString c_no_object_placeholder { "No Object currently set" }
Protected Member Functions inherited from dbe::widgets::editors::base
 base (std::shared_ptr< editor_data_state > editordata, QWidget *parent=nullptr, bool owned=false)
Protected Attributes inherited from dbe::widgets::editors::base
std::shared_ptr< editor_data_state > p_data_editor
QString this_defaults
QStringList this_data
bool this_is_owned
bool this_value_changed
bool this_initial_load

Detailed Description

Definition at line 276 of file BuildingBlockEditors.hpp.

Member Typedef Documentation

◆ t_build_block_editor

◆ t_virtue

Constructor & Destructor Documentation

◆ numericattr()

dbe::widgets::editors::numericattr::numericattr ( t_virtue const & attr,
QWidget * parent = nullptr,
bool owned = false,
bool readonly = false )

Definition at line 1103 of file BuildingBlockEditors.cpp.

1104 : base(std::make_shared<t_build_block_editor>(attr), parent, owned)
1105 , this_base_data_editor(std::static_pointer_cast<t_build_block_editor>(p_data_editor))
1106 , m_readonly(readonly)
1107 , this_native_base(-1)
1108{
1109 setupUi(this);
1110 t_virtue const& Virtue = this_base_data_editor->get();
1111
1112 setWindowTitle(QString("Edit Attribute: %1").arg(Virtue.p_name.c_str()));
1113 if (m_readonly) {
1114 LineEdit->setReadOnly(true);
1115 } else {
1116 LineEdit->SetPopupMenu();
1117 }
1118 if (Virtue.p_is_not_null) {
1119 this_base_data_editor->set_valid(false);
1120 LineEdit->setPalette(StyleUtility::WarningStatusBarPallete);
1121 } else {
1122 LineEdit->SetNullCheck(false);
1123 }
1124
1125 if (!(Virtue.p_type == dunedaq::conffwk::float_type || Virtue.p_type == dunedaq::conffwk::double_type)) {
1126 if (Virtue.p_int_format == dunedaq::conffwk::oct_int_format) {
1127 FormatBox->setCurrentIndex(2);
1128 this_base = 8;
1129 this_native_base = 8;
1130 } else if (Virtue.p_int_format == dunedaq::conffwk::dec_int_format) {
1131 FormatBox->setCurrentIndex(0);
1132 this_base = 10;
1133 this_native_base = 10;
1134 } else if (Virtue.p_int_format == dunedaq::conffwk::hex_int_format) {
1135 FormatBox->setCurrentIndex(1);
1136 this_base = 16;
1137 this_native_base = 16;
1138 }
1139
1140 FormatBox->hide();
1141 } else {
1142 FormatBox->hide();
1143 }
1144
1145 SetController();
1146
1147 AttributeName->setText(QString(Virtue.p_name.c_str()) + " : ");
1148 AttributeName->setHidden(true);
1149 buildtooltip();
1150
1151 QString Dummy("Dummy");
1152 UpdateActions(Dummy);
1153}
static QPalette WarningStatusBarPallete
base(std::shared_ptr< editor_data_state > editordata, QWidget *parent=nullptr, bool owned=false)
std::shared_ptr< editor_data_state > p_data_editor
std::shared_ptr< t_build_block_editor > this_base_data_editor
dunedaq::conffwk::attribute_t t_virtue

Member Function Documentation

◆ AddToList

void dbe::widgets::editors::numericattr::AddToList ( )
privateslot

Definition at line 1461 of file BuildingBlockEditors.cpp.

1462{
1463 // No change in data, do nothing
1464 // It avoids some unwanted loops when focus is acquired/lost
1465 if (this_data.contains(LineEdit->text())) {
1466 return;
1467 }
1468
1469 auto convert_to_proper_base = [this](const QString& value) -> QString {
1470 if ((value.isEmpty() == false) && (this_native_base != -1) && (this_native_base != this_base)) {
1471 QString cnvrtd;
1472
1473 t_virtue const& virtue = this_base_data_editor->get();
1474 bool Unsigned = (virtue.p_type == dunedaq::conffwk::u8_type || virtue.p_type == dunedaq::conffwk::u16_type ||
1475 virtue.p_type == dunedaq::conffwk::u32_type || virtue.p_type == dunedaq::conffwk::u64_type);
1476
1477 if (Unsigned == true) {
1478 cnvrtd.setNum(LineEdit->text().toULongLong(0, this_base), this_native_base);
1479 } else {
1480 cnvrtd.setNum(LineEdit->text().toLongLong(0, this_base), this_native_base);
1481 }
1482
1483 // Be careful to set the contextaul menu properly
1484 if (this_native_base == 8) {
1485 if (cnvrtd.startsWith("0") == false) {
1486 cnvrtd.insert(0, "0");
1487 }
1488 LineEdit->EmitOctSlot();
1489 } else if (this_native_base == 10) {
1490 LineEdit->EmitDecSlot();
1491 } else if (this_native_base == 16) {
1492 if (cnvrtd.startsWith("0x", Qt::CaseInsensitive) == false) {
1493 cnvrtd.insert(0, "0x");
1494 }
1495 LineEdit->EmitHexSlot();
1496 }
1497
1498 // The current and native bases are now the same
1500
1501 return cnvrtd;
1502 }
1503
1504 return value;
1505 };
1506
1507 LineEdit->blockSignals(true);
1508
1509 BOOST_SCOPE_EXIT(this_)
1510 {
1511 this_->LineEdit->blockSignals(false);
1512 }
1513 BOOST_SCOPE_EXIT_END
1514
1515 bool isValid = true;
1516
1517 QString input = LineEdit->text();
1518
1519 t_virtue const& virtue = this_base_data_editor->get();
1520 if ((virtue.p_type == dunedaq::conffwk::float_type or virtue.p_type == dunedaq::conffwk::double_type)) {
1521 if (not ValidateFloatValue(input)) {
1522 isValid = false;
1523 }
1524 } else if (not ValidateIntegerValue(input)) {
1525 isValid = false;
1526 }
1527
1528 // ShowWarning("FLOAT", QString::fromStdString(virtue.p_name));
1529
1530 this_data.clear();
1531
1532 // We better save data in the proper format, in order to avoid issues
1533 // with conversions (and having data saved in a bad format)
1534 this_data.append(convert_to_proper_base(input));
1535
1536 this_value_changed = true;
1537
1538 if (isValid == true) {
1539 QString Dummy("Dummy");
1540 UpdateActions(Dummy);
1541 } else {
1542 this_base_data_editor->set_valid(false);
1543 }
1544
1545 if (not this_is_owned) {
1546 // Not owned: multiattr (connected to signal_value_change) and
1547 // CustomDelegate (connected to signal_edit_end and signal_force_close)
1548 if (isValid == true) {
1549 // Do not emit the signal in this case
1550 // The table will try t write data and get back an exception
1551 emit signal_edit_end();
1552 }
1553
1554 emit signal_value_change();
1555 } else {
1556 // Owned: ObjectEditor (connected to signal_value_change)
1557 emit signal_value_change();
1558 }
1559}

◆ buildtooltip()

void dbe::widgets::editors::numericattr::buildtooltip ( )
overrideprivatevirtual

Implements dbe::widgets::editors::base.

Definition at line 1196 of file BuildingBlockEditors.cpp.

1197{
1198 t_virtue const& Virtue = this_base_data_editor->get();
1199
1200 setToolTip(
1201 QString("Attribute Name: %1 \n").arg(Virtue.p_name.c_str()) +
1202 QString(" Type: %1 \n").arg(dunedaq::conffwk::attribute_t::type2str(Virtue.p_type)) +
1203 QString(" Range: %1 \n").arg(Virtue.p_range.c_str()) +
1204 QString(" Format: %1 \n").arg(dunedaq::conffwk::attribute_t::format2str(Virtue.p_int_format)) +
1205 QString(" Not Null: %1 \n").arg(Virtue.p_is_not_null) +
1206 QString(" Is Multi Value: %1 \n").arg(Virtue.p_is_multi_value) +
1207 QString(" Default Value: %1 \n").arg(Virtue.p_default_value.c_str()) +
1208 QString(" Description: %1 \n").arg(Virtue.p_description.c_str()));
1209}
static const char * type2str(type_t type)
static const char * format2str(int_format_t format)

◆ ChangeFormat

void dbe::widgets::editors::numericattr::ChangeFormat ( int i)
privateslot

Definition at line 1562 of file BuildingBlockEditors.cpp.

1563{
1564 QString CurrentString = LineEdit->text();
1565
1566 if (CurrentString.isEmpty()) {
1567 // if(DecButton->isChecked())
1568
1569 if (i == 0) {
1570 this_base = 10;
1571 }
1572
1573 // else if(OctButton->isChecked())
1574 else if (i == 2) {
1575 this_base = 8;
1576 }
1577
1578 // else if(HexButton->isChecked())
1579 else if (i == 1) {
1580 this_base = 16;
1581 }
1582
1583 return;
1584 }
1585
1586 QString ConvertedString;
1587 t_virtue const& Virtue = this_base_data_editor->get();
1588
1589 bool Unsigned = (Virtue.p_type == dunedaq::conffwk::u8_type || Virtue.p_type == dunedaq::conffwk::u16_type ||
1590 Virtue.p_type == dunedaq::conffwk::u32_type || Virtue.p_type == dunedaq::conffwk::u64_type);
1591 bool OkConversion = false;
1592
1593 // if(DecButton->isChecked())
1594
1595 if (i == 0) {
1596 if (Unsigned) {
1597 ConvertedString.setNum(CurrentString.toULongLong(&OkConversion, 0), 10);
1598 } else {
1599 ConvertedString.setNum(CurrentString.toLongLong(&OkConversion, 0), 10);
1600 }
1601
1602 this_base = 10;
1603 }
1604
1605 // else if(OctButton->isChecked())
1606 else if (i == 2) {
1607 if (Unsigned) {
1608 ConvertedString.setNum(CurrentString.toULongLong(&OkConversion, 0), 8);
1609 } else {
1610 ConvertedString.setNum(CurrentString.toLongLong(&OkConversion, 0), 8);
1611 }
1612
1613 ConvertedString.insert(0, "0");
1614 this_base = 8;
1615 }
1616
1617 // else if(HexButton->isChecked())
1618 else if (i == 1) {
1619 if (Unsigned) {
1620 ConvertedString.setNum(CurrentString.toULongLong(&OkConversion, 0), 16);
1621 } else {
1622 ConvertedString.setNum(CurrentString.toLongLong(&OkConversion, 0), 16);
1623 }
1624
1625 ConvertedString.insert(0, "0x");
1626 this_base = 16;
1627 }
1628
1629 if (!OkConversion) {
1630 QString Format;
1631
1632 if (this_native_base == 10) {
1633 Format = "DECIMAL";
1634 } else if (this_native_base == 16) {
1635 Format = "HEX-DECIMAL";
1636 } else if (this_native_base == 8) {
1637 Format = "OCT-DECIMAL";
1638 }
1639
1640 ShowWarning(Format);
1641
1642 return;
1643 }
1644
1645 if (!ConvertedString.isEmpty()) {
1646 LineEdit->clear();
1647 LineEdit->setText(ConvertedString);
1648 }
1649}
void ShowWarning(QString Format="", QString Range="")

◆ ChangeFormatDec

void dbe::widgets::editors::numericattr::ChangeFormatDec ( )
privateslot

Definition at line 1666 of file BuildingBlockEditors.cpp.

◆ ChangeFormatHex

void dbe::widgets::editors::numericattr::ChangeFormatHex ( )
privateslot

Definition at line 1672 of file BuildingBlockEditors.cpp.

1673{
1674 ChangeFormat(1);
1675}

◆ ChangeFormatOct

void dbe::widgets::editors::numericattr::ChangeFormatOct ( )
privateslot

Definition at line 1678 of file BuildingBlockEditors.cpp.

1679{
1680 ChangeFormat(2);
1681}

◆ checkIfDuplicated

void dbe::widgets::editors::numericattr::checkIfDuplicated ( )
privateslot

Definition at line 1447 of file BuildingBlockEditors.cpp.

1448{
1449 // Emit a special signal when the Enter/Return key is pressed
1450 // and the data have not been changed
1451 // That is useful, for instance, for the multi-attribute
1452 // widget in order to add multiple times the same attribute
1453 // (you do not want to add the same value multiple times just
1454 // when the focus is lost)
1455 if (this_data.contains(LineEdit->text())) {
1457 }
1458}

◆ checkRange()

bool dbe::widgets::editors::numericattr::checkRange ( QString const & Value)
private

Definition at line 1355 of file BuildingBlockEditors.cpp.

1356{
1357 t_virtue const& Virtue = this_base_data_editor->get();
1358
1359 QString Range = QString::fromStdString(Virtue.p_range);
1360
1361 if (Range.isEmpty()) {
1362 return true;
1363 }
1364
1365 QStringList ValueList = Range.split(",");
1366
1367 QList<QPair<QString, QString>> RangeList;
1368
1369 for (QString& RangeValue : ValueList) {
1370 if (RangeValue.contains("..")) {
1371 QStringList Ranges = RangeValue.split("..");
1372 RangeList.append(QPair<QString, QString>(Ranges.at(0), Ranges.at(1)));
1373 ValueList.removeOne(RangeValue);
1374 }
1375 }
1376
1377 if (ValueList.contains(Value)) {
1378 return true;
1379 }
1380
1381 for (QPair<QString, QString>& ValuePair : RangeList) {
1382 if (ValuePair.first == "*") {
1383 if (Value.toDouble() <= ValuePair.second.toDouble()) {
1384 return true;
1385 }
1386
1387 ShowWarning("", Range);
1388
1389 return false;
1390 }
1391
1392 else if (ValuePair.second == "*") {
1393 if (Value.toDouble() >= ValuePair.first.toDouble()) {
1394 return true;
1395 }
1396
1397 ShowWarning("", Range);
1398
1399 return false;
1400 }
1401
1402 else {
1403 if ((Value.toDouble() >= ValuePair.first.toDouble()) && (Value.toDouble() <= ValuePair.second.toDouble())) {
1404 return true;
1405 }
1406
1407 ShowWarning("", Range);
1408
1409 return false;
1410 }
1411 }
1412
1413 ShowWarning("", Range);
1414
1415 return false;
1416}

◆ closeEvent()

void dbe::widgets::editors::numericattr::closeEvent ( QCloseEvent * Event)
privatevirtual

Reimplemented from dbe::widgets::editors::base.

Definition at line 1212 of file BuildingBlockEditors.cpp.

1213{
1214 Q_UNUSED(Event)
1215 emit signal_force_close();
1216}

◆ GetLineEdit()

QLineEdit * dbe::widgets::editors::numericattr::GetLineEdit ( ) const

Definition at line 1163 of file BuildingBlockEditors.cpp.

1164{
1165 return LineEdit;
1166}

◆ SetController()

void dbe::widgets::editors::numericattr::SetController ( )
private

Definition at line 1219 of file BuildingBlockEditors.cpp.

1220{
1221 connect(LineEdit, SIGNAL(DecChange()), this, SLOT(ChangeFormatDec()));
1222 connect(LineEdit, SIGNAL(OctChange()), this, SLOT(ChangeFormatOct()));
1223 connect(LineEdit, SIGNAL(HexChange()), this, SLOT(ChangeFormatHex()));
1224
1225 connect(FormatBox, SIGNAL(currentIndexChanged(int)), this, SLOT(ChangeFormat(int)), Qt::UniqueConnection);
1226
1227 connect(LineEdit, SIGNAL(editingFinished()), this, SLOT(AddToList()), Qt::UniqueConnection);
1228 connect(LineEdit, SIGNAL(textChanged(QString)), this, SLOT(UpdateActions(QString)), Qt::UniqueConnection);
1229 connect(LineEdit, SIGNAL(returnPressed()), this, SLOT(checkIfDuplicated()), Qt::UniqueConnection);
1230}

◆ setdefaults()

void dbe::widgets::editors::numericattr::setdefaults ( const QString & ValueDefault)
virtual

Reimplemented from dbe::widgets::editors::base.

Definition at line 1156 of file BuildingBlockEditors.cpp.

1157{
1158 this_defaults = ValueDefault;
1159 LineEdit->SetDefaultValue(this_defaults);
1160}

◆ SetEditor()

void dbe::widgets::editors::numericattr::SetEditor ( )
overridevirtual

change here

Implements dbe::widgets::editors::base.

Definition at line 1169 of file BuildingBlockEditors.cpp.

1170{
1171 if (this_data.isEmpty()) {
1172 return;
1173 }
1174
1175 LineEdit->clear();
1176
1178 if (this_base == 16) {
1179 if (not this_data.value(0).startsWith("0x")) {
1180 LineEdit->setText("0x" + this_data.value(0));
1181 } else {
1182 LineEdit->setText(this_data.value(0));
1183 }
1184 } else if (this_base == 8) {
1185 if (not this_data.value(0).startsWith("0") and this_data.value(0) != 0) {
1186 LineEdit->setText("0" + this_data.value(0));
1187 } else {
1188 LineEdit->setText(this_data.value(0));
1189 }
1190 } else {
1191 LineEdit->setText(this_data.value(0));
1192 }
1193}

◆ ShowWarning()

void dbe::widgets::editors::numericattr::ShowWarning ( QString Format = "",
QString Range = "" )
private

Definition at line 1233 of file BuildingBlockEditors.cpp.

1234{
1235 LineEdit->setPalette(StyleUtility::AlertStatusBarPallete);
1236
1237 t_virtue const& Virtue = this_base_data_editor->get();
1238
1239 QString Message = QString("The value for attribute %1 is in the wrong format").arg(Virtue.p_name.c_str());
1240
1241 if (Range != "") {
1242 QString RangeMex = QString(" - The value should be in the range : %1").arg(Range);
1243 Message.append("\n\n" + RangeMex);
1244 }
1245
1246 if (Format != "") {
1247 Message.append(QString("\n\n - The value should be formatted as a %1.").arg(Format));
1248 }
1249
1250 QMessageBox::warning(this, tr("Wrong value"), Message);
1251 return;
1252}
static QPalette AlertStatusBarPallete

◆ signal_value_duplicated

void dbe::widgets::editors::numericattr::signal_value_duplicated ( )
signal

◆ UpdateActions

void dbe::widgets::editors::numericattr::UpdateActions ( QString Dummy)
privateslot

Definition at line 1652 of file BuildingBlockEditors.cpp.

1653{
1654 Q_UNUSED(Dummy)
1655
1656 if (this_base_data_editor->must_not_be_null() and (LineEdit->text().isEmpty())) {
1657 this_base_data_editor->set_valid(false);
1658 } else if (this_base_data_editor->must_not_be_null() and (this_data.size() == 0)) {
1659 this_base_data_editor->set_valid(false);
1660 } else {
1661 this_base_data_editor->set_valid(true);
1662 }
1663}

◆ ValidateFloatValue()

bool dbe::widgets::editors::numericattr::ValidateFloatValue ( QString const & Value)
private

Definition at line 1419 of file BuildingBlockEditors.cpp.

1420{
1421 bool validValue = true;
1422
1423 t_virtue const& Virtue = this_base_data_editor->get();
1424
1425 if (Virtue.p_type == dunedaq::conffwk::float_type) {
1426 bool ok;
1427 Value.toFloat(&ok);
1428
1429 if (ok == false) {
1430 ShowWarning("FLOAT");
1431 validValue = false;
1432 }
1433 } else {
1434 bool ok;
1435 Value.toDouble(&ok);
1436
1437 if (ok == false) {
1438 ShowWarning("DOUBLE");
1439 validValue = false;
1440 }
1441 }
1442
1443 return (validValue && checkRange(Value));
1444}

◆ ValidateIntegerValue()

bool dbe::widgets::editors::numericattr::ValidateIntegerValue ( QString const & text)
private

Definition at line 1255 of file BuildingBlockEditors.cpp.

1256{
1257 auto checkInteger = [this, text]() {
1258 t_virtue const& input = this_base_data_editor->get();
1259
1260 bool convert_to_defined_base;
1261
1262 qlonglong NewLongLong{ 0 };
1263 qulonglong NewULongLong{ 0 };
1264
1265 auto check_convert = [this, &convert_to_defined_base]() {
1266 // If input cannot be converted to any base then show a warning and invalidate
1267
1268 if (not convert_to_defined_base) {
1269 if (this_native_base == 10) {
1270 ShowWarning("DECIMAL");
1271 } else if (this_native_base == 16) {
1272 ShowWarning("HEX-DECIMAL");
1273 } else if (this_native_base == 8) {
1274 ShowWarning("OCT-DECIMAL");
1275 }
1276
1277 return false;
1278 }
1279
1280 return true;
1281 };
1282
1283 if (input.p_type == dunedaq::conffwk::u8_type or input.p_type == dunedaq::conffwk::u16_type or
1284 input.p_type == dunedaq::conffwk::u32_type or input.p_type == dunedaq::conffwk::u64_type) {
1285 NewULongLong = text.toULongLong(&convert_to_defined_base, this_base);
1286
1287 if (not check_convert()) {
1288 return false;
1289 }
1290
1291 qulonglong min_u;
1292 qulonglong max_u;
1293
1294 if (input.p_type == dunedaq::conffwk::u8_type) {
1295 min_u = 0;
1296 max_u = UCHAR_MAX;
1297 } else if (input.p_type == dunedaq::conffwk::u16_type) {
1298 min_u = 0;
1299 max_u = USHRT_MAX;
1300 } else if (input.p_type == dunedaq::conffwk::u32_type) {
1301 min_u = 0;
1302 max_u = ULONG_MAX;
1303 } else if (input.p_type == dunedaq::conffwk::u64_type) {
1304 min_u = 0;
1305 max_u = ULONG_LONG_MAX;
1306 } else {
1307 return true;
1308 }
1309
1310 if (min_u <= NewULongLong and NewULongLong <= max_u) {
1311 return true;
1312 }
1313
1314 ShowWarning("", QString("[%1 - %2]").arg(min_u).arg(max_u));
1315 } else {
1316 NewLongLong = text.toLongLong(&convert_to_defined_base, this_base);
1317
1318 if (not check_convert()) {
1319 return false;
1320 }
1321
1322 qlonglong min_s;
1323 qlonglong max_s;
1324
1325 if (input.p_type == dunedaq::conffwk::s8_type) {
1326 min_s = SCHAR_MIN;
1327 max_s = SCHAR_MAX;
1328 } else if (input.p_type == dunedaq::conffwk::s16_type) {
1329 min_s = SHRT_MIN;
1330 max_s = SHRT_MAX;
1331 } else if (input.p_type == dunedaq::conffwk::s32_type) {
1332 min_s = LONG_MIN;
1333 max_s = LONG_MAX;
1334 } else if (input.p_type == dunedaq::conffwk::s64_type) {
1335 min_s = -(LONG_LONG_MAX)-1;
1336 max_s = LONG_LONG_MAX;
1337 } else {
1338 return true;
1339 }
1340
1341 if (min_s <= NewLongLong and NewLongLong <= max_s) {
1342 return true;
1343 }
1344
1345 ShowWarning("", QString("[%1 - %2]").arg(min_s).arg(max_s));
1346 }
1347
1348 return false;
1349 };
1350
1351 return (checkInteger() && checkRange(text));
1352}

Member Data Documentation

◆ m_readonly

bool dbe::widgets::editors::numericattr::m_readonly
private

Definition at line 305 of file BuildingBlockEditors.hpp.

◆ this_base

int dbe::widgets::editors::numericattr::this_base
private

Definition at line 306 of file BuildingBlockEditors.hpp.

◆ this_base_data_editor

std::shared_ptr<t_build_block_editor> dbe::widgets::editors::numericattr::this_base_data_editor
private

Definition at line 303 of file BuildingBlockEditors.hpp.

◆ this_native_base

int dbe::widgets::editors::numericattr::this_native_base
private

Definition at line 307 of file BuildingBlockEditors.hpp.


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