diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch) | |
tree | acaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/cpp/subclassingdlg.h | |
download | tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/subclassingdlg.h')
-rw-r--r-- | languages/cpp/subclassingdlg.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/languages/cpp/subclassingdlg.h b/languages/cpp/subclassingdlg.h new file mode 100644 index 00000000..2f645f09 --- /dev/null +++ b/languages/cpp/subclassingdlg.h @@ -0,0 +1,85 @@ +/*************************************************************************** +* Copyright (C) 2002 by Jakob Simon-Gaarde * +* jsgaarde@tdcspace.dk * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +***************************************************************************/ + +#ifndef SUBCLASSINGDLG_H +#define SUBCLASSINGDLG_H + +#include <qlistview.h> + +#include "subclassingdlgbase.h" + +class QStringList; +class QDomDocument; +class CppSupportPart; + +class SlotItem : public QCheckListItem +{ +public: + SlotItem( QListView *parent, const QString &text, + const QString &specifier, const QString &Access, + const QString &returnType, bool isFunc, + bool callBaseClass = false ); + void setAllreadyInSubclass(); + QString m_access; + QString m_methodName; + QString m_returnType; + QString m_specifier; + bool m_isFunc; + bool m_callBaseClass; + bool m_alreadyInSubclass; +}; + + +class SubclassingDlg : public SubclassingDlgBase +{ +public: + SubclassingDlg( CppSupportPart* cppSupport, const QString &formFile, QStringList &newFileNames, + QWidget* parent = 0, const char* name = 0, + bool modal = FALSE, WFlags fl = 0 ); + SubclassingDlg( CppSupportPart* cppSupport, const QString &formFile, const QString &filename, QStringList &dummy, + QWidget* parent = 0, const char* name = 0, + bool modal = FALSE, WFlags fl = 0 ); + ~SubclassingDlg(); + +private: + void readUiFile(); + QString readBaseClassName(); + void updateDlg(); + bool replaceKeywords( QString &buffer, bool canBeModal = true ); + void replace( QString &string, const QString& search, const QString& replace ); + bool saveBuffer( QString &buffer, const QString& filename ); + bool loadBuffer( QString &buffer, const QString& filename ); + bool alreadyInSubclass( const QString &method ); + bool m_creatingNewSubclass; + +public slots: + virtual void accept(); + virtual void onChangedClassName(); + +protected: + QStringList &m_newFileNames; + QString m_filename; + QString m_formFile; + QString m_baseClassName; + QString m_qtBaseClassName; + QString m_baseCaption; + QString m_formName; + QString m_formPath; + QStringList m_parsedMethods; + bool m_canBeModal; + QValueList<SlotItem*> m_slots; + QValueList<SlotItem*> m_functions; + CppSupportPart* m_cppSupport; +}; + +#endif +// kate: indent-mode csands; tab-width 4; + |