KDevelop API Documentation

parts/classview/classviewpart.h

Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2003 Roberto Raggi (roberto@kdevelop.org) 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2 of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; see the file COPYING.LIB. If not, write to 00016 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 * Boston, MA 02111-1307, USA. 00018 * 00019 */ 00020 00021 #ifndef __KDEVPART_CLASSVIEW_H__ 00022 #define __KDEVPART_CLASSVIEW_H__ 00023 00024 #include "kdevlanguagesupport.h" 00025 #include "viewcombos.h" 00026 00027 #include <qguardedptr.h> 00028 #include <qmap.h> 00029 00030 #include <kdevplugin.h> 00031 00032 #include <codemodel.h> 00033 00034 namespace KParts { class Part; } 00035 namespace KTextEditor 00036 { 00037 class Document; 00038 class View; 00039 class EditInterface; 00040 class SelectionInterface; 00041 class ViewCursorInterface; 00042 } 00043 00044 00045 class ClassViewWidget; 00046 class KListViewAction; 00047 class QListViewItem; 00048 class KToolBarPopupAction; 00049 class NamespaceItem; 00050 00051 class ClassViewPart : public KDevPlugin 00052 { 00053 Q_OBJECT 00054 public: 00055 ClassViewPart(QObject *parent, const char *name, const QStringList &); 00056 virtual ~ClassViewPart(); 00057 00058 bool langHasFeature(KDevLanguageSupport::Features feature); 00059 00060 QMap<QString, NamespaceItem*> nsmap; 00061 QMap<ClassDom, ClassItem*> clmap; 00062 QMap<FunctionDom, FunctionItem*> fnmap; 00063 00064 KListViewAction *m_namespaces; 00065 KListViewAction *m_classes; 00066 KListViewAction *m_functions; 00067 00068 NamespaceItem *global_item; 00069 00070 void updateClassesForAdd(NamespaceDom nsdom); 00071 void updateFunctionsForAdd(ClassDom cldom); 00072 00073 private slots: 00074 void selectNamespace(QListViewItem*); 00075 void selectClass(QListViewItem*); 00076 void selectFunction(QListViewItem*); 00077 void slotProjectOpened(); 00078 void slotProjectClosed(); 00079 void refresh(); 00080 void removeFile(const QString& fileName); 00081 void addFile(const QString& fileName); 00082 void removeNamespace(const QString &name); 00083 void switchedViewPopup(); 00084 void graphicalClassView(); 00085 00086 void goToFunctionDeclaration(); 00087 void goToFunctionDefinition(); 00088 void goToClassDeclaration(); 00089 void goToNamespaceDeclaration(); 00090 void selectedAddClass(); 00091 void selectedAddMethod(); 00092 void selectedAddAttribute(); 00093 00094 void focusNamespaces(); 00095 void focusClasses(); 00096 void focusFunctions(); 00097 void unfocusNamespaces(); 00098 void unfocusClasses(); 00099 void unfocusFunctions(); 00100 00101 void syncCombos(); 00102 void activePartChanged(KParts::Part*); 00103 00104 private: 00105 void setupActions(); 00106 00107 NamespaceDom syncNamespaces(const FileDom &dom); 00108 ClassDom syncClasses(const NamespaceDom &dom); 00109 FunctionDom syncFunctions(const ClassDom &dom); 00110 00111 QGuardedPtr<ClassViewWidget> m_widget; 00112 00113 bool sync; 00114 00115 KAction *m_followCode; 00116 KToolBarPopupAction *m_popupAction; 00117 00118 QString m_activeFileName; 00119 KTextEditor::Document* m_activeDocument; 00120 KTextEditor::View* m_activeView; 00121 KTextEditor::SelectionInterface* m_activeSelection; 00122 KTextEditor::EditInterface* m_activeEditor; 00123 KTextEditor::ViewCursorInterface* m_activeViewCursor; 00124 00125 friend class NamespaceItem; 00126 friend class ClassItem; 00127 friend class FunctionItem; 00128 }; 00129 00130 00131 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:50 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003