23 #include <QGridLayout> 25 #include <QDialogButtonBox> 26 #include <QHeaderView> 27 #include <QApplication> 34 setWindowTitle(tr(
"Layer Summary"));
36 QGridLayout *grid =
new QGridLayout;
39 QGroupBox *modelBox =
new QGroupBox;
40 modelBox->setTitle(tr(
"Audio Data Sources"));
41 grid->addWidget(modelBox, 0, 0);
42 grid->setRowStretch(0, 15);
44 QGridLayout *subgrid =
new QGridLayout;
45 modelBox->setLayout(subgrid);
47 subgrid->setSpacing(0);
48 subgrid->setMargin(5);
54 #if (QT_VERSION >= 0x050000) 55 m_modelView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
57 m_modelView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
64 QGroupBox *layerBox =
new QGroupBox;
65 layerBox->setTitle(tr(
"Panes and Layers"));
66 grid->addWidget(layerBox, 1, 0);
67 grid->setRowStretch(1, 20);
69 subgrid =
new QGridLayout;
70 layerBox->setLayout(subgrid);
72 subgrid->setSpacing(0);
73 subgrid->setMargin(5);
76 #if (QT_VERSION >= 0x050000) 77 m_layerView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
79 m_layerView->header()->setResizeMode(QHeaderView::ResizeToContents);
87 QDialogButtonBox *bb =
new QDialogButtonBox(QDialogButtonBox::Close);
88 connect(bb, SIGNAL(rejected()),
this, SLOT(reject()));
89 grid->addWidget(bb, 2, 0);
90 grid->setRowStretch(2, 0);
92 QScreen *screen = QGuiApplication::primaryScreen();
93 QRect available = screen->availableGeometry();
95 int width = available.width() / 2;
96 int height = available.height() / 3;
98 if (available.height() > 500) height = 370;
101 if (available.width() > 650) width = 500;
104 resize(width, height);
ModelMetadataModel * m_modelModel
LayerTreeModel * m_layerModel
LayerTreeDialog(PaneStack *stack, QWidget *parent=0)