umbrello API Documentation

artifactwidget.h

00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *   copyright (C) 2003-2006                                               *
00009  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00010  ***************************************************************************/
00011 
00012 #ifndef ARTIFACTWIDGET_H
00013 #define ARTIFACTWIDGET_H
00014 
00015 
00016 #include "umlwidget.h"
00017 
00018 class UMLView;
00019 class UMLArtifact;
00020 
00021 #define ARTIFACT_MARGIN 5
00022 
00032 class ArtifactWidget : public UMLWidget {
00033 public:
00034 
00041     ArtifactWidget(UMLView *view, UMLArtifact *a);
00042 
00046     virtual ~ArtifactWidget();
00047 
00051     void draw(QPainter& p, int offsetX, int offsetY);
00052 
00057     void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
00058 
00059 protected:
00063     QSize calculateSize();
00064 
00065 private:
00069     void init();
00070 
00074     QSize calculateIconSize();
00075 
00079     QSize calculateNormalSize();
00080 
00084     void drawAsFile(QPainter& p, int offsetX, int offsetY);
00085 
00089     void drawAsLibrary(QPainter& p, int offsetX, int offsetY);
00090 
00094     void drawAsTable(QPainter& p, int offsetX, int offsetY);
00095 
00099     void drawAsNormal(QPainter& p, int offsetX, int offsetY);
00100 
00104     ListPopupMenu* m_pMenu;
00105 };
00106 
00107 #endif
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:07:54 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003