KDevelop API Documentation

autolistviewitems.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 Röder                                    *
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 AUTOLISTVIEWITEMS_H
00016 #define AUTOLISTVIEWITEMS_H
00017 
00018 #include <qptrlist.h>
00019 
00020 #include <qlistview.h>
00021 
00022 class TargetItem;
00023 class FileItem;
00024 class AutoProjectPart;
00025 
00029 class ProjectItem : public QListViewItem
00030 {
00031 public:
00032     enum Type { Subproject, Target, File };
00033 
00034     ProjectItem(Type type, QListView *parent, const QString &text);
00035     ProjectItem(Type type, ProjectItem *parent, const QString &text);
00036 
00037     void paintCell(QPainter *p, const QColorGroup &cg,
00038                 int column, int width, int alignment);
00039     void setBold(bool b)
00040     { bld = b; }
00041     bool isBold() const
00042     { return bld; }
00043     Type type()
00044     { return typ; }
00045 
00046 private:
00047     Type typ;
00048     bool bld;
00049     
00050 };
00051 
00052 
00056 class SubprojectItem : public ProjectItem
00057 {
00058 public:
00059     SubprojectItem(QListView *parent, const QString &text);
00060     SubprojectItem(SubprojectItem *parent, const QString &text);
00061     
00063     QString subdir;
00065     QString path;
00067     QMap<QString, QString> prefixes;
00069     QMap<QString, QString> variables;
00071     QPtrList<TargetItem> targets;
00072 
00073     QString relativePath();
00074 
00075 private:
00076     void init();
00077 };
00078 
00079 
00091 class TargetItem : public ProjectItem
00092 {
00093 public:
00094     //    enum TargetKind { Program, Library, DataGroup, IconGroup, DocGroup };
00095 
00096     TargetItem(QListView *lv, bool group, const QString &text);
00097 
00101     QString name;
00105     QString primary;
00107     QString prefix;
00109     QPtrList<FileItem> sources;
00111     QString ldflags;
00113     QString ldadd;
00115     QString libadd;
00117     QString dependencies;
00118 };
00119 
00120 
00121 // Not sure if this complexity is really necessary...
00122 class FileItem : public ProjectItem
00123 {
00124 
00125 public:
00126     FileItem(QListView *lv, const QString &text, bool set_is_subst = false );
00127     void changeSubstitution();
00128     void changeMakefileEntry(const QString&);
00129 
00130     QString name;
00131     QString uiFileLink;
00132     const bool is_subst;
00133 };
00134 
00135 #endif
00136 
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:39 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003