42 double getTestValue(
size_t bin,
double factor);
59 auto layout =
new QHBoxLayout();
61 layout->setSpacing(0);
71 QVBoxLayout* layout =
new QVBoxLayout;
73 layout->setSpacing(0);
74 layout->addWidget(materialEditor);
81 QVBoxLayout* layout =
new QVBoxLayout;
83 layout->setSpacing(0);
84 layout->addWidget(widget);
97 QVBoxLayout* layout =
new QVBoxLayout;
98 layout->addWidget(myAccordion);
102 int firstPaneIndex = myAccordion->
addContentPane(
"My first content pane");
104 if (firstPaneIndex != -1) {
108 contentFrame->setLayout(
new QVBoxLayout());
110 contentFrame->layout()->addWidget(
new QLabel(
"Hello Cute World!!!"));
114 int secondPaneIndex = myAccordion->
addContentPane(
"Basic settings");
116 if (secondPaneIndex != -1) {
120 contentFrame->setLayout(
new QVBoxLayout());
122 QLineEdit* led =
new QLineEdit();
123 QLineEdit* led2 =
new QLineEdit();
124 contentFrame->layout()->addWidget(
new QLabel(
"Name:"));
125 contentFrame->layout()->addWidget(led);
126 contentFrame->layout()->addWidget(
new QLabel(
"Living place:"));
127 contentFrame->layout()->addWidget(led2);
137 contentFrame->setMaximumHeight(500);
139 contentFrame->setLayout(
new QVBoxLayout());
141 QCheckBox* cb =
new QCheckBox();
142 cb->setText(
"Option 1");
143 QCheckBox* cb2 =
new QCheckBox();
144 cb2->setText(
"Option 2");
145 QCheckBox* cb3 =
new QCheckBox();
146 cb3->setText(
"Option 3");
147 QCheckBox* cb4 =
new QCheckBox();
148 cb4->setText(
"Option 4");
149 QCheckBox* cb5 =
new QCheckBox();
150 cb5->setText(
"Option 5");
151 QCheckBox* cb6 =
new QCheckBox();
152 cb6->setText(
"Option 6");
153 QCheckBox* cb7 =
new QCheckBox();
154 cb7->setText(
"Option 7");
155 contentFrame->layout()->addWidget(cb);
156 contentFrame->layout()->addWidget(cb2);
157 contentFrame->layout()->addWidget(cb3);
158 contentFrame->layout()->addWidget(cb4);
159 contentFrame->layout()->addWidget(cb5);
160 contentFrame->layout()->addWidget(cb6);
161 contentFrame->layout()->addWidget(cb7);
170 QVBoxLayout* layout =
new QVBoxLayout;
171 layout->setMargin(0);
172 layout->setSpacing(0);
174 layout->addWidget(widget);
188 fillTestItem(data_item, 1.0);
195 fillTestItem(data_item, 2.0);
202 container->
addItem(job_item->realDataItem()->dataItem());
203 container->addItem(job_item->dataItem());
205 QVBoxLayout* layout =
new QVBoxLayout;
206 layout->setMargin(0);
207 layout->setSpacing(0);
209 widget->setItem(job_item->dataItemView());
210 layout->addWidget(widget);
215 double getTestValue(
size_t bin,
double factor)
217 const double angle_factor =
M_PI / (180.0 * 100.0);
218 const double angle = bin * angle_factor;
219 return (std::cos(angle * 1000.0) + 1.5) * std::exp(-(bin * factor / 100.0));
226 auto outputData = std::make_unique<OutputData<double>>();
227 outputData->addAxis(
FixedBinAxis(
"Angle [deg]", 1000, 0.0, 10.0));
228 for (
size_t i = 0; i < 1000; ++i)
229 outputData->operator[](i) = getTestValue(i, factor);
Defines class holding all application models.
#define ASSERT(condition)
Defines ContentPane class.
Defines class Data1DViewItem.
Defines class DataPropertyContainer.
Defines class MainWindow.
Defines class MaskEditor.
Defines class MaterialEditor.
Defines MinimizerItem class.
Defines class Plot1DCanvas.
Defines class RealDataItem.
Defines class SampleModel.
Defines class SpecularDataItem.
Defines class TestComponentView.
QFrame * getContentFrame()
Get the content frame of the content pane.
void setMaximumHeight(int maxHeight)
Set the maximum height of the content pane container.
View model for 1D DataItem.
static const QString T_DATA_PROPERTIES
void addItem(DataItem *data_item)
Axis with fixed bin size.
static const QString T_DATAVIEW
static const QString T_OUTPUT
static const QString T_REALDATA
SampleModel * sampleModel()
MaterialModel * materialModel()
Main widget of MaterialEditor.
The MinimizerContainerItem class holds collection of minimizers.
The Plot1DCanvas class contains SpecularPlotWithDataView for specular data presentation,...
The RealDataItem class represents intensity data imported from file and intended for fitting.
static const QString T_INTENSITY_DATA
T * insertItem(SessionItem *parent=nullptr, int row=-1, QString tag="")
void setOutputData(OutputData< double > *data) override
The given pointer becomes owned by this class!!
View to tests QListView working with ComponentProxyModel.
void test_MaterialEditor()
void test_MinimizerSettings()
TestView(MainWindow *mainWindow=nullptr)
void test_AccordionWidget()
void test_ComponentProxyModel()
MainWindow * m_mainWindow
void test_specular_data_widget()