Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

PatternDialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   SpikeStream Application                                               *
00003  *   Copyright (C) 2007 by David Gamez                                     *
00004  *   david@davidgamez.eu                                                   *
00005  *   Version 0.1                                                           *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 
00023 #ifndef PATTERNDIALOG_H
00024 #define PATTERNDIALOG_H
00025 
00026 //SpikeStream includes
00027 #include "DBInterface.h"
00028 #include "PatternManager.h"
00029 
00030 //Qt includes
00031 #include <qtable.h>
00032 #include <qdialog.h>
00033 
00034 
00035 //---------------------------- Pattern Dialog ------------------------------
00036 /*! Enables the user to add and delete patterns in the pattern database. */
00037 //--------------------------------------------------------------------------
00038 
00039 class PatternDialog : public QDialog{
00040         Q_OBJECT
00041         
00042         public:
00043         PatternDialog(QWidget* parent, DBInterface* pattDBInter);
00044         ~PatternDialog();
00045 
00046 
00047         private slots:
00048                 void addPattern();
00049                 void deletePattern();
00050                 void tableHeaderClicked(int colNumber);
00051 
00052 
00053         private:
00054                 //============================== VARIABLES ====================================
00055                 DBInterface* patternDBInterface;
00056                 QTable* patternTable;
00057 
00058                 /*! Column containing the pattern ID.*/
00059                 int patternIDCol;
00060 
00061                 /*! Column containing the check boxes for selecting patterns.*/
00062                 int selectionCol;
00063 
00064                 /*! Column containing description of pattern.*/
00065                 int descriptionCol;
00066 
00067                 /*! Manager that loads and deletes patterns in the database.*/
00068                 PatternManager* patternManager;
00069 
00070 
00071                 //============================= METHODS =======================================
00072                 /*! Declare copy constructor private so it cannot be used inadvertently.*/
00073                 PatternDialog (const PatternDialog&);
00074 
00075                 /*! Declare assignment private so it cannot be used inadvertently.*/
00076                 PatternDialog operator = (const PatternDialog&);
00077 
00078                 void loadPatternTable();
00079                 void removePatternFromTable(unsigned int patternID);
00080 
00081 };
00082 
00083 
00084 #endif //PATTERNDIALOG_H

Generated on Mon Sep 3 22:29:04 2007 for SpikeStream Application by  doxygen 1.4.4