src/propertiesdialog.h

00001 /***************************************************************************
00002                           propertiesdialog.h  -  description
00003                              -------------------
00004     begin                : Sun Feb 29 2004
00005     copyright            : (C) 2004 by Lynn Hazan
00006     email                : lynn.hazan.myrealbox.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef PROPERTIESDIALOG_H
00019 #define PROPERTIESDIALOG_H
00020 
00021 // include files for QT
00022 #include <qwidget.h>
00023 
00024 //includes files for KDE
00025 #include <kdialogbase.h>
00026 
00027 //include files for the application
00028 #include "properties.h"  
00029 #include "positionproperties.h"
00030 #include "clusterproperties.h"
00031 
00032 
00037 class Properties;
00038   
00039 class PropertiesDialog : public KDialogBase  {
00040    Q_OBJECT
00041 public:
00042   //Constructor
00043      PropertiesDialog(QWidget *parent,const char *name=0, WFlags f=0);
00044      ~PropertiesDialog();
00045 
00066   void updateDialog(int channelNb,double SR, int resolution,int offset,float screenGain,int voltageRange,int amplification,
00067                     int nbSamples,int peakIndex,double videoSamplingRate, int width, int height, QString backgroundImage,
00068                     int rotation,int flip,double acquisitionSystemSamplingRate,bool positionsBackground,QString traceBackgroundImage);
00069 
00072   inline float getScreenGain() const{
00073    return properties->getScreenGain();
00074   };
00075 
00078   inline int getVoltageRange() const{
00079    return properties->getVoltageRange();
00080   };
00081 
00084   inline int getAmplification() const{
00085    return properties->getAmplification();
00086   };
00087 
00089   inline int getNbChannels() const{return properties->getNbChannels();};
00090 
00092   inline double getSamplingRate() const{return properties->getSamplingRate();};
00093 
00095   inline double getAcquisitionSystemSamplingRate(){return properties->getAcquisitionSystemSamplingRate();};
00096   
00098   inline int getOffset() const{return properties->getOffset();};
00099 
00101   inline int getResolution()const{return properties->getResolution();};
00102 
00104   inline QString getTraceBackgroundImage()const{return properties->getTraceBackgroundImage();};
00105 
00107   inline bool isModified()const{return modified;};
00108 
00109   inline void openState(bool init){atStartUp = init;};
00110 
00112   inline int getNbSamples()const{return clusterProperties->getNbSamples();};
00113 
00115   inline int getPeakIndex()const{return clusterProperties->getPeakIndex();};
00116 
00118   inline double getVideoSamplingRate()const{return positionProperties->getSamplingRate();};
00119 
00121   inline int getWidth()const{return positionProperties->getWidth();};
00122 
00124   inline int getHeight()const{return positionProperties->getHeight();};
00125 
00127   inline QString getBackgroundImage()const{return positionProperties->getBackgroundImage();};
00128 
00133   inline bool getPositionsBackground()const{return positionProperties->getPositionsBackground();};
00134   
00136   inline int getRotation()const{return positionProperties->getRotation();};
00137 
00141   inline int getFlip()const{return positionProperties->getFlip();};
00142   
00146   inline void setEnabledCluster(bool state){clusterProperties->setEnabled(state);};
00147   
00151   inline void setEnabledPosition(bool state){positionProperties->setEnabled(state);};
00152 
00156   inline void setEnabledCurrentSamplingRate(bool state){properties->setCurrentSamplingRateEnabled(state);};
00157 
00159   inline void showPositionPage(){showPage(positionPageIndex);};
00160   
00161 public slots:
00163   inline void propertyModified(){modified = true;};
00164 
00166   void slotVerify();
00167 
00168 protected:
00169   virtual inline void accept(){
00170      if(oops){
00171      oops = false;  
00172     }
00173     else QDialog::accept();
00174   };
00175 
00176 private slots:
00178   inline  void channelNbModified(){nbChannelsModified = true;};
00179            
00180 private:
00181   Properties* properties;
00182   PositionProperties* positionProperties;
00183   ClusterProperties* clusterProperties;
00184   bool modified;
00185   bool nbChannelsModified;
00186   int nbChannels;
00187   bool oops;
00188   bool atStartUp;
00189   int positionPageIndex;
00190 };
00191 
00192 #endif

Generated on Mon Sep 17 20:47:31 2007 for NeuroScope by  doxygen 1.5.1