BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
PropertyFlatViewTest Class Reference

Tests of PropertyFlatView class. More...

Inheritance diagram for PropertyFlatViewTest:
[legend]
Collaboration diagram for PropertyFlatViewTest:
[legend]

Public Member Functions

 ~PropertyFlatViewTest ()
 
std::vector< int > enable_status (PropertyFlatView &flat_view)
 Returns vector representing enable status of widgets in layout. More...
 

Detailed Description

Tests of PropertyFlatView class.

Definition at line 27 of file propertyflatview.test.cpp.

Constructor & Destructor Documentation

◆ ~PropertyFlatViewTest()

PropertyFlatViewTest::~PropertyFlatViewTest ( )
default

Member Function Documentation

◆ enable_status()

std::vector<int> PropertyFlatViewTest::enable_status ( PropertyFlatView flat_view)
inline

Returns vector representing enable status of widgets in layout.

Definition at line 33 of file propertyflatview.test.cpp.

34  {
35  std::vector<int> result;
36  auto layout = flat_view.findChild<QGridLayout*>();
37  for (int row = 0; row < layout->rowCount(); ++row)
38  for (int col = 0; col < layout->columnCount(); ++col)
39  result.push_back(
40  static_cast<int>(layout->itemAtPosition(row, col)->widget()->isEnabled()));
41  return result;
42  }

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