MNE-CPP  beta 1.0
projectionwindow.cpp
Go to the documentation of this file.
1 //=============================================================================================================
37 //*************************************************************************************************************
38 //=============================================================================================================
39 // INCLUDES
40 //=============================================================================================================
41 
42 #include "projectionwindow.h"
43 
44 
45 //*************************************************************************************************************
46 //=============================================================================================================
47 // USED NAMESPACES
48 //=============================================================================================================
49 
50 using namespace MNEBrowseRawQt;
51 
52 
53 //*************************************************************************************************************
54 //=============================================================================================================
55 // DEFINE MEMBER METHODS
56 //=============================================================================================================
57 
59 : QDockWidget(parent)
60 , ui(new Ui::ProjectionWindow)
61 , m_pProjectionModel(new ProjectionModel(this))
62 {
63  ui->setupUi(this);
64 
65  initTableViewWidgets();
66 }
67 
68 
69 //*************************************************************************************************************
70 
71 ProjectionWindow::ProjectionWindow(QWidget *parent, QFile& qFile)
72 : QDockWidget(parent)
73 , ui(new Ui::ProjectionWindow)
74 , m_pProjectionModel(new ProjectionModel(this, qFile))
75 {
76  ui->setupUi(this);
77 
78  initTableViewWidgets();
79 }
80 
81 
82 //*************************************************************************************************************
83 
84 ProjectionWindow::ProjectionWindow(QWidget *parent, QList<FiffProj>& dataProjs)
85 : QDockWidget(parent)
86 , ui(new Ui::ProjectionWindow)
87 , m_pProjectionModel(new ProjectionModel(this, dataProjs))
88 {
89  ui->setupUi(this);
90 
91  initTableViewWidgets();
92 }
93 
94 
95 //*************************************************************************************************************
96 
97 void ProjectionWindow::initTableViewWidgets()
98 {
99  //Set model
100  ui->m_tableView_availableProjections->setModel(m_pProjectionModel);
101 
102  connect(m_pProjectionModel, &ProjectionModel::dataChanged,
103  ui->m_tableView_availableProjections, &QTableView::resizeColumnsToContents);
104 
105  //Hide data column in view
106  ui->m_tableView_availableProjections->setColumnHidden(3, true);
107 }
108 
109 
110 //*************************************************************************************************************
111 
113 {
114  return m_pProjectionModel;
115 }
Definition: aboutwindow.h:52
The ProjectionWindow class provides a dock window for managing SSP operator projcetions.
Contains the declaration of the ProjectionWindow class.