microsettingsdlg.h

00001 /***************************************************************************
00002  *   Copyright (C) 2003-2005 by David Saxton                               *
00003  *   david@bluehaze.org                                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 
00011 #ifndef MICROSETTINGSDLG_H
00012 #define MICROSETTINGSDLG_H
00013 
00014 #include <kdialogbase.h>
00015 
00016 #include <qmap.h>
00017 #include <qvalidator.h>
00018 #include <qvaluevector.h>
00019 
00020 class KLineEdit;
00021 class MicroSettings;
00022 class MicroSettingsWidget;
00023 class NewPinMappingWidget;
00024 class PinMapping;
00025 
00026 typedef QMap< QString, PinMapping > PinMappingMap;
00027 
00031 class MicroSettingsDlg : public KDialogBase
00032 {
00033         Q_OBJECT
00034         public:
00035                 MicroSettingsDlg( MicroSettings *_microSettings, QWidget *parent = 0, const char *name = 0 );
00036                 ~MicroSettingsDlg();
00037 
00038                 void reject();
00039                 void accept();
00040                 
00048                 QValidator::State validatePinMapName( QString & pinMapName ) const;
00049     
00050         public slots:
00056                 void savePort( int row );
00060                 void saveVariable( int row );
00064                 void checkAddVariableRow();
00068                 void slotCreatePinMap();
00072                 void slotModifyPinMap();
00076                 void slotRenamePinMap();
00080                 void slotRemovePinMap();
00084                 void slotSaveStuff();
00085                 
00086         protected slots:
00087                 void slotCheckNewPinMappingName( const QString & name );
00088                 
00089         protected:
00093                 void updatePinMapButtons();
00094                 
00095                 NewPinMappingWidget * m_pNewPinMappingWidget; // Used for checking that the variable name is ok
00096                 KDialogBase * m_pNewPinMappingDlg;
00097                 MicroSettingsWidget * m_pWidget;
00098                 MicroSettings * m_pMicroSettings;
00099                 PinMappingMap m_pinMappings;
00100                 QValueVector< KLineEdit * > m_portTypeEdit;
00101                 QValueVector< KLineEdit * > m_portStateEdit;
00102                 QStringList m_portNames;
00103 };
00104 
00105 #endif

Generated on Tue May 8 17:05:31 2007 for KTechLab by  doxygen 1.5.1