SpikeStream Application Library  0.2
AbstractConnectionWidget.h
Go to the documentation of this file.
00001 #ifndef ABSTRACTCONNECTIONWIDGET_H
00002 #define ABSTRACTCONNECTIONWIDGET_H
00003 
00004 //SpikeStream includes
00005 #include "AbstractConnectionBuilder.h"
00006 #include "ConnectionGroupInfo.h"
00007 
00008 //Qt includes
00009 #include <QComboBox>
00010 #include <QLayout>
00011 #include <QLineEdit>
00012 #include <QProgressDialog>
00013 #include <QWidget>
00014 
00015 namespace spikestream{
00016 
00018         class AbstractConnectionWidget : public QWidget {
00019                 Q_OBJECT
00020 
00021                 public:
00022                         AbstractConnectionWidget(QWidget* parent = 0);
00023                         virtual ~AbstractConnectionWidget();
00024 
00025 
00026                 protected:
00027                         //====================  VARIABLES  ===================
00029                         AbstractConnectionBuilder* connectionBuilder;
00030 
00031 
00032                         //====================  METHODS  =====================
00033                         void addNeuronGroups(QComboBox* combo);
00034                         void addSynapseTypes(QComboBox* combo);
00035 
00037                         virtual bool checkInputs() = 0;
00038 
00039                         void checkInput(QComboBox* combo, const QString& errorMessage);
00040                         void checkInput(QLineEdit* inputEdit, const QString& errorMessage);
00041 
00043                         virtual ConnectionGroupInfo getConnectionGroupInfo() = 0;
00044 
00047                         unsigned int getNeuronGroupID(const QString& comboText);
00048                         unsigned int getSynapseTypeID(const QString& comboText);
00049 
00050 
00051                 private slots:
00052                         virtual void addButtonClicked();
00053                         virtual void builderThreadFinished();
00054                         virtual void updateProgress(int stepsCompleted, int totalSteps, QString message);
00055 
00056                 private:
00057                         //====================  VARIABLES  ======================
00059                         QProgressDialog* progressDialog;
00060 
00062                         bool updatingProgress;
00063 
00064         };
00065 }
00066 
00067 #endif//ABSTRACTCONNECTIONWIDGET_H
 All Classes Files Functions Variables Typedefs Friends Defines