KDevelop API Documentation

buildtools/autotools/autoprojectwidget.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * Copyright (C) 2001-2002 by Bernd Gehrmann * 00003 * bernd@kdevelop.org * 00004 * * 00005 * Copyright (C) 2002 by Victor Rder * 00006 * victor_roeder@gmx.de * 00007 * * 00008 * This program is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU General Public License as published by * 00010 * the Free Software Foundation; either version 2 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 ***************************************************************************/ 00014 00015 #ifndef _AUTOPROJECTWIDGET_H_ 00016 #define _AUTOPROJECTWIDGET_H_ 00017 00018 #include <qlayout.h> 00019 #include <qdict.h> 00020 #include <qlistview.h> 00021 #include <qmap.h> 00022 #include <qvbox.h> 00023 #include <qhbox.h> 00024 #include <qtoolbutton.h> 00025 #include <kiconloader.h> 00026 #include <klocale.h> 00027 00028 #include "domutil.h" 00029 00030 class AutoProjectPart; 00031 class AutoSubprojectView; 00032 class AutoDetailsView; 00033 class SubprojectItem; 00034 class TargetItem; 00035 class FileItem; 00036 class KAction; 00037 class QDomElement; 00038 class QToolButton; 00039 class QStringList; 00040 00041 00042 class AutoProjectWidget : public QVBox 00043 { 00044 Q_OBJECT 00045 friend class RemoveFileDialog; 00046 friend class TargetOptionsDialog; // to access projectDom() via m_part->projectDom() 00047 public: 00048 AutoProjectWidget(AutoProjectPart *part, bool kde); 00049 ~AutoProjectWidget(); 00050 00051 void openProject(const QString &dirName); 00052 void closeProject(); 00053 00057 QStringList allSubprojects(); 00061 QPtrList <SubprojectItem> allSubprojectItems(); 00065 QStringList allLibraries(); 00069 QStringList allFiles(); 00073 QString projectDirectory() const; 00077 QString subprojectDirectory(); 00081 bool kdeMode() const 00082 { return m_kdeMode; } 00083 00088 void setActiveTarget(const QString &targetPath); 00093 QString activeDirectory(); 00094 00101 void addFiles(const QStringList &list); 00106 void removeFiles(const QStringList &list); 00107 00112 TargetItem *selectedTarget(); 00113 00118 FileItem *selectedFile(); 00119 00124 SubprojectItem* selectedSubproject(); 00125 00129 TargetItem *createTargetItem(const QString &name, 00130 const QString &prefix, const QString &primary, 00131 bool take=true ); 00135 FileItem *createFileItem(const QString &name, SubprojectItem *subproject); 00136 00141 SubprojectItem* activeSubproject (); 00142 void setActiveSubproject( SubprojectItem* spitem ); 00143 00148 TargetItem* activeTarget(); 00149 00155 SubprojectItem* subprojectItemForPath(const QString & path, bool pathIsAbsolute=false); 00156 00160 QString pathForTarget(const TargetItem *item) const; 00161 00165 void addToTarget(const QString & fileName, SubprojectItem* spitem, TargetItem* titem); 00166 00170 void restoreSession ( const QDomElement* el ); 00171 00175 void saveSession ( QDomElement* el ); 00176 00177 AutoSubprojectView* getSubprojectView (); 00178 AutoDetailsView* getDetailsView (); 00179 00180 00181 void emitAddedFile ( const QString& name ); 00182 void emitAddedFiles(const QStringList &fileList); 00183 void emitRemovedFile ( const QString& name ); 00184 void emitRemovedFiles(const QStringList &fileList); 00185 00186 void parse(SubprojectItem *item); 00187 00188 public slots: 00189 void slotOverviewSelectionChanged(QListViewItem *item); 00190 void slotDetailsSelectionChanged(QListViewItem *item); 00191 00192 protected: 00193 void initOverview ( QWidget* parent ); 00194 void initDetailview ( QWidget* parent ); 00195 void initActions (); 00196 00197 private: 00198 00199 QToolButton *subProjectOptionsButton, *addSubprojectButton, *addExistingSubprojectButton; 00200 QToolButton *addTargetButton, *addServiceButton, *addApplicationButton; 00201 QToolButton *buildSubprojectButton, *targetOptionsButton; 00202 QToolButton *addNewFileButton, *addExistingFileButton; 00203 QToolButton *buildTargetButton, *removeButton; 00204 00205 AutoSubprojectView* m_subprojectView; 00206 AutoDetailsView* m_detailView; 00207 00208 bool m_kdeMode; 00209 AutoProjectPart *m_part; 00210 SubprojectItem *m_activeSubproject; 00211 TargetItem *m_activeTarget; 00212 TargetItem *m_choosenTarget; 00213 SubprojectItem *m_shownSubproject; 00214 }; 00215 00216 #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 Wed Oct 6 17:38:53 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003