4 #include <QGuiApplication>
16 QVBoxLayout* layout =
new QVBoxLayout();
17 this->setLayout(layout);
19 QSplitter*
splitter =
new QSplitter(Qt::Orientation::Vertical);
22 this->setTitle(
"Memory");
24 this->layout()->setContentsMargins(margin, margin, margin, margin);
30 _memoryTabWidget =
new QTabWidget();
31 _memoryTabGroup =
new QGroupBox(
"Queries, Predictions and Commits");
32 _memoryTabGroup->setLayout(
new QVBoxLayout());
35 _memoryTabGroup->setContentsMargins(margin, margin, margin, margin);
36 _memoryTabGroup->setSizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Maximum);
40 _queryWidget->setSizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Maximum);
42 _memoryTabWidget->addTab(_queryWidget, QString(
"Query Settings"));
46 _snapshotSelectorWidget->setSizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Maximum);
48 _memoryTabWidget->addTab(_snapshotSelectorWidget, QString(
"Snapshot Selection"));
52 _predictionWidget->setSizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Maximum);
54 _memoryTabWidget->addTab(_predictionWidget, QString(
"Prediction"));
58 _commitWidget->setSizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Maximum);
60 _memoryTabWidget->addTab(_commitWidget, QString(
"Commit"));
63 _memoryTabGroup->layout()->addWidget(_memoryTabWidget);
66 splitter->addWidget(_memoryTabGroup);
68 const int largeHeight = QGuiApplication::primaryScreen()->size().height();
69 splitter->setSizes({largeHeight, 1});
79 return _memoryTabGroup;
84 return _snapshotSelectorWidget;
89 return _predictionWidget;