umbrello API Documentation

forkjoinwidget.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) 2005-2006                                               *
00009  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00010  ***************************************************************************/
00011 
00012 #ifndef FORKJOINWIDGET_H
00013 #define FORKJOINWIDGET_H
00014 //qt includes
00015 #include <qpainter.h>
00016 //app includes
00017 #include "boxwidget.h"
00018 
00019 // fwd decl.
00020 class UMLView;
00021 
00028 class ForkJoinWidget : public BoxWidget {
00029 public:
00030 
00038     explicit ForkJoinWidget(UMLView * view, bool drawVertical = false, Uml::IDType id = Uml::id_None);
00039 
00043     virtual ~ForkJoinWidget();
00044 
00048     void setDrawVertical(bool to);
00052     bool getDrawVertical() const;
00053 
00059     void slotMenuSelection(int sel);
00060 
00064     void draw(QPainter & p, int offsetX, int offsetY);
00065 
00069     void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
00070 
00074     bool loadFromXMI(QDomElement & qElement);
00075 
00076 protected:
00082     void drawSelected(QPainter * p, int offsetX, int offsetY);
00083 
00087     QSize calculateSize();
00088 
00092     void constrain(int& width, int& height);
00093 
00094 private:
00098     void init();
00099 
00100     bool m_drawVertical;   
00101 };
00102 
00103 #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:57 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003