parameterpage.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Lynn Hazan                                      *
00003  *   lynn.hazan@myrealbox.com                                              *
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  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef PARAMETERPAGE_H
00021 #define PARAMETERPAGE_H
00022 
00023 //include files for the application
00024 #include <parameterlayout.h>
00025 
00026 // include files for QT
00027 #include <qstringlist.h> 
00028 #include <qlineedit.h> 
00029 #include <qtable.h> 
00030 
00031 // include files for KDE
00032 #include <klocale.h>        // for i18n()
00033 
00034 //General C++ include files
00035 #include <iostream>
00036 using namespace std;
00037 
00038 
00042 class ParameterPage : public ParameterLayout
00043 {
00044 Q_OBJECT
00045 public:
00051   ParameterPage(bool expertMode, QWidget *parent = 0, const char *name = 0);
00052   ~ParameterPage();
00053   
00057   inline void setProgramName(QString name){nameLineEdit->setText(name);};
00058   
00060   inline QString getProgramName() const{return nameLineEdit->text();};
00061   
00064   inline void programNameChanged(){descriptionModified = true;};
00065   
00066   
00071  void setParameterInformation(QMap<int, QValueList<QString> >& parameters);
00072  
00076  QMap<int, QValueList<QString> > getParameterInformation();
00077  
00079  inline bool isDescriptionModified()const{return descriptionModified;};
00080    
00082  inline bool isValueModified()const{return valueModified;};
00083 
00084 signals:
00085  void nameChanged(const QString& extension);
00086  
00087 public slots:
00089  inline void changeCaption(){ 
00090   QString name = nameLineEdit->text();  
00091   if(name == "" && !name.contains("New Script-")) emit nameChanged(i18n("Unknown"));
00092   else emit nameChanged(name);
00093  };
00094  
00096  void addParameter();
00098  void removeParameter(); 
00099   
00101  void propertyModified(int row, int column);
00102  
00104  inline void resetModificationStatus(){
00105   valueModified = false;
00106   descriptionModified = false;
00107  };
00108   
00109  
00110 protected:
00115  bool eventFilter(QObject* object,QEvent* event);
00116  
00117  
00118 private:
00119  QStringList status; 
00121  QValueList<int> ddList;
00122  bool valueModified;
00123  bool descriptionModified;
00124 };
00125 
00126 #endif

Generated on Sat Sep 15 16:04:45 2007 for ndmanager.kdevelop by  doxygen 1.5.1