SpikeStream Application Library  0.2
ViewParametersDialog.cpp
Go to the documentation of this file.
00001 //SpikeStream includes
00002 #include "ViewParametersDialog.h"
00003 using namespace spikestream;
00004 
00005 //Qt includes
00006 #include <QLabel>
00007 #include <QLayout>
00008 #include <QPushButton>
00009 
00011 ViewParametersDialog::ViewParametersDialog(QHash<QString, double> parameterMap, QWidget *parent) : QDialog(parent){
00012         QGridLayout* gridLayout = new QGridLayout(this);
00013 
00014         //Add parameters
00015         int cntr = 0;
00016         for(QHash<QString, double>::iterator iter = parameterMap.begin(); iter != parameterMap.end(); ++iter){
00017                 gridLayout->addWidget( new QLabel( iter.key() ), cntr, 0 );
00018                 gridLayout->addWidget( new QLabel( QString::number( iter.value() ) ), cntr, 1 );
00019                 ++cntr;
00020         }
00021 
00022         //Add buttons
00023         QPushButton* cancelButton = new QPushButton("Cancel");
00024         connect (cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
00025         gridLayout->addWidget(cancelButton, cntr, 0);
00026         QPushButton* okButton = new QPushButton("Ok");
00027         connect (okButton, SIGNAL(clicked()), this, SLOT(accept()));
00028         gridLayout->addWidget(okButton, cntr, 1);
00029 }
00030 
00031 
00033 ViewParametersDialog::~ViewParametersDialog(){
00034 }
00035 
 All Classes Files Functions Variables Typedefs Friends Defines