21 #include <QScrollArea> 
   22 #include <QVBoxLayout> 
   25 const int max_recent_project_count = 10;
 
   26 const double section_label_scale = 1.25;
 
   34     auto layout = 
new QVBoxLayout(
this);
 
   35     layout->setContentsMargins(20, 0, 10, 0);
 
   38     layout->addStretch(1);
 
   63         if (widget_index < projects.size())
 
   64             widget->setCurrentProject(projects.at(widget_index), 
false);
 
   74     auto result = 
new QVBoxLayout;
 
   75     auto label = 
new QLabel(
"Current Project");
 
   77     result->addWidget(label);
 
   84     auto result = 
new QVBoxLayout;
 
   85     auto label = 
new QLabel(
"Recent Projects");
 
   87     result->addWidget(label);
 
   89     for (
int i = 0; i < max_recent_project_count; ++i) {
 
   94         result->addWidget(widget);
 
  103     auto content = 
new QWidget;
 
  104     auto layout = 
new QVBoxLayout;
 
  108     content->setLayout(layout);
 
MVVM_VIEW_EXPORT QSize SizeOfLetterM()
Returns size corresponding to actual size of letter M basing on current font metrics.
 
MVVM_VIEW_EXPORT void ScaleLabelFont(QLabel *label, double scale)
Set label's font size to system font size scaled by given factor.
 
DAREFLCORE_EXPORT QSize DockMinimumSizeHint()
Hint on minimum size of docks on main reflectometry window.
 
DAREFLCORE_EXPORT QSize DockSizeHint()
Hint on size of docks on main reflectometry window.
 
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.