KDevelop API Documentation

subclassingdlg.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2002 by Jakob Simon-Gaarde                              *
00003  *   jsgaarde@tdcspace.dk                                                  *
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 
00012 #ifndef SUBCLASSINGDLG_H
00013 #define SUBCLASSINGDLG_H
00014 
00015 #include <qlistview.h>
00016 
00017 #include "subclassingdlgbase.h"
00018 
00019 class QStringList;
00020 class QDomDocument;
00021 class CppSupportPart;
00022 
00023 class SlotItem : public QCheckListItem
00024 {
00025   public:
00026                   SlotItem(QListView *parent,const QString &text,
00027                            const QString &specifier, const QString &Access,
00028                            const QString &returnType,bool isFunc,
00029                            bool callBaseClass=false);
00030   void            setAllreadyInSubclass();
00031   QString         m_access;
00032   QString         m_methodName;
00033   QString         m_returnType;
00034   QString         m_specifier;
00035   bool            m_isFunc;
00036   bool            m_callBaseClass;
00037   bool            m_alreadyInSubclass;
00038 };
00039 
00040 
00041 class SubclassingDlg : public SubclassingDlgBase
00042 {
00043 public:
00044                         SubclassingDlg(CppSupportPart* cppSupport, const QString &formFile,QStringList &newFileNames,
00045                                        QWidget* parent = 0, const char* name = 0,
00046                                        bool modal = FALSE, WFlags fl = 0 );
00047                         SubclassingDlg(CppSupportPart* cppSupport, const QString &formFile,const QString &filename,QStringList &dummy,
00048                                        QWidget* parent = 0, const char* name = 0,
00049                                        bool modal = FALSE, WFlags fl = 0 );
00050                         ~SubclassingDlg();
00051 
00052 private:
00053   void                  readUiFile();
00054   QString               readBaseClassName();
00055   void                  updateDlg();
00056   bool                  replaceKeywords(QString &buffer, bool canBeModal=true);
00057   void                  replace(QString &string, const QString& search, const QString& replace);
00058   bool                  saveBuffer(QString &buffer, const QString& filename);
00059   bool                  loadBuffer(QString &buffer, const QString& filename);
00060   bool                  alreadyInSubclass(const QString &method);
00061   bool                  m_creatingNewSubclass;
00062 
00063 public slots:
00064   virtual void          accept();
00065   virtual void          onChangedClassName();
00066 
00067 protected:
00068   QStringList           &m_newFileNames;
00069   QString               m_filename;
00070   QString               m_formFile;
00071   QString               m_baseClassName;
00072   QString               m_qtBaseClassName;
00073   QString               m_baseCaption;
00074   QString               m_formName;
00075   QString               m_formPath;
00076   QStringList           m_parsedMethods;
00077   bool                  m_canBeModal;
00078   QValueList<SlotItem*> m_slots;
00079   QValueList<SlotItem*> m_functions;
00080   CppSupportPart* m_cppSupport;
00081 };
00082 
00083 #endif
00084 
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:47 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003