51 #include <QMouseEvent>
53 #include <QGridLayout>
74 , m_bShowClustModel(false)
82 NewBrainView::NewBrainView(
const QString &subject_id, qint32 hemi,
const QString &surf,
const QString &subjects_dir, QWidget * parent, Qt::WindowFlags f)
84 , m_SurfaceSet(subject_id, hemi, surf, subjects_dir)
85 , m_bShowClustModel(false)
93 NewBrainView::NewBrainView(
const QString &subject_id, qint32 hemi,
const QString &surf,
const QString &atlas,
const QString &subjects_dir, QWidget * parent, Qt::WindowFlags f)
95 , m_SurfaceSet(subject_id, hemi, surf, subjects_dir)
96 , m_AnnotationSet(subject_id, hemi, atlas, subjects_dir)
97 , m_bShowClustModel(false)
99 init(m_AnnotationSet, m_SurfaceSet);
107 , m_bShowClustModel(false)
110 m_SurfaceSet.
insert(t_Surf);
128 m_pClustStcModel->init(annotationSet, surfSet);
129 m_pClustStcModel->setLoop(
true);
131 m_bShowClustModel =
true;
137 void NewBrainView::showDebugTable()
139 if(m_bShowClustModel)
146 m_pWidgetTable = QSharedPointer<QWidget>(
new QWidget);
147 QGridLayout *mainLayoutTable =
new QGridLayout;
149 QTableView* pTableView =
new QTableView;
150 if(m_pClustStcTableDelegate.isNull())
152 pTableView->setModel(m_pClustStcModel.data());
153 pTableView->setItemDelegate(m_pClustStcTableDelegate.data());
154 pTableView->setColumnHidden(0,
true);
156 QLabel * pLabelNorm =
new QLabel(
"Norm");
157 QSlider* pSliderNorm =
new QSlider(Qt::Vertical);
158 QObject::connect(pSliderNorm, &QSlider::valueChanged, m_pClustStcModel.data(), &ClustStcModel::setNormalization);
159 pSliderNorm->setMinimum(1);
160 pSliderNorm->setMaximum(100);
161 pSliderNorm->setValue(60);
163 QLabel * pLabelAverage =
new QLabel(
"Average");
164 QSlider* pSliderAverage =
new QSlider(Qt::Horizontal);
165 QObject::connect(pSliderAverage, &QSlider::valueChanged, m_pClustStcModel.data(), &ClustStcModel::setAverage);
166 pSliderAverage->setMinimum(1);
167 pSliderAverage->setMaximum(500);
168 pSliderAverage->setValue(100);
170 mainLayoutTable->addWidget(pTableView,0,0,2,2);
171 mainLayoutTable->addWidget(pLabelNorm,0,3);
172 mainLayoutTable->addWidget(pSliderNorm,1,3);
173 mainLayoutTable->addWidget(pLabelAverage,3,0);
174 mainLayoutTable->addWidget(pSliderAverage,3,1);
176 m_pWidgetTable->setLayout(mainLayoutTable);
177 m_pWidgetTable->setWindowTitle(
"Stc Table View");
179 m_pWidgetTable->show();
180 m_pWidgetTable->resize(800,600);
Table model which prepares source estimate information.
ClustStcModel class declaration.
NewBrainView class declaration.
void insert(const Surface &p_Surface)
ClustStcTableDelegate class declaration.
NewBrainView(QWidget *parent=0, Qt::WindowFlags f=0)
QSharedPointer< ClustStcModel > SPtr
A hemisphere set of surfaces.