MCPcopy Create free account
hub / github.com/KDE/labplot / MatrixView

Method MatrixView

src/frontend/matrix/MatrixView.cpp:55–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53#include <gsl/gsl_const_cgs.h>
54
55MatrixView::MatrixView(Matrix* matrix)
56 : QWidget()
57 , m_stackedWidget(new QStackedWidget(this))
58 , m_tableView(new QTableView(this))
59 , m_imageLabel(new QLabel(this))
60 , m_matrix(matrix)
61 , m_model(new MatrixModel(matrix)) {
62 init();
63
64 // resize the view to show a 10x10 region of the matrix.
65 // no need to resize the view when the project is being opened,
66 // all views will be resized to the stored values at the end
67 if (!m_matrix->isLoading()) {
68 int w = m_tableView->horizontalHeader()->sectionSize(0) * 10 + m_tableView->verticalHeader()->width();
69 int h = m_tableView->verticalHeader()->sectionSize(0) * 10 + m_tableView->horizontalHeader()->height();
70 resize(w + 50, h + 50);
71 }
72}
73
74MatrixView::~MatrixView() {
75 delete m_model;

Callers

nothing calls this directly

Calls 3

isLoadingMethod · 0.80
heightMethod · 0.80
widthMethod · 0.45

Tested by

no test coverage detected