Debian Codegraph @

avogadro/qtgui/chartdialog.cpp

raw
1 /******************************************************************************
2 This source file is part of the Avogadro project.
3 This source code is released under the 3-Clause BSD License, (see "LICENSE").
4 ******************************************************************************/
5
6 #include "chartdialog.h"
7 #include "chartwidget.h"
8
9 #include <QVBoxLayout>
10
11 namespace Avogadro::QtGui {
12
13 ChartDialog::ChartDialog(QWidget* p)
14 : QDialog(p), m_chartWidget(new ChartWidget(this))
15 {
16 auto* layout = new QVBoxLayout();
17 layout->addWidget(m_chartWidget);
18 layout->setContentsMargins(0, 0, 0, 0);
19 setLayout(layout);
20 }
21
22 ChartDialog::~ChartDialog() = default;
23
24 ChartWidget* ChartDialog::chartWidget()
25 {
26 return m_chartWidget;
27 }
28
29 QSize ChartDialog::sizeHint() const
30 {
31 return QSize(600, 400);
32 }
33
34 QSize ChartDialog::minimumSizeHint() const
35 {
36 return QSize(200, 200);
37 }
38
39 } // namespace Avogadro::QtGui