linkwidget.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) 2004-2006 * 00009 * Umbrello UML Modeller Authors <uml-devel@uml.sf.net> * 00010 ***************************************************************************/ 00011 00012 #ifndef LINKWIDGET_H 00013 #define LINKWIDGET_H 00014 00015 #include <qfont.h> 00016 00017 #include "umlnamespace.h" 00018 00019 // forward declarations 00020 class UMLClassifier; 00021 class UMLOperation; 00022 class FloatingTextWidget; 00023 class UMLView; 00024 00036 class LinkWidget { 00037 public: 00038 LinkWidget(); 00039 virtual ~LinkWidget(); 00040 00048 virtual void lwSetFont(QFont font) = 0; 00049 00053 virtual UMLClassifier *getOperationOwner(); 00054 00058 virtual UMLOperation *getOperation() = 0; 00059 00063 virtual void setOperation(UMLOperation *op) = 0; 00064 00068 virtual QString getCustomOpText() = 0; 00069 00073 virtual void setCustomOpText(const QString &opText) = 0; 00074 00078 QString getOperationText(UMLView *view = NULL); 00079 00084 virtual void resetTextPositions(); 00085 00089 virtual void setMessageText(FloatingTextWidget *ft) = 0; 00090 00094 virtual void setText(FloatingTextWidget *ft, const QString &newText) = 0; 00095 00100 virtual bool showDialog(); 00101 00105 virtual UMLClassifier *getSeqNumAndOp(QString& seqNum, QString& op) = 0; 00106 00110 virtual void setSeqNumAndOp(const QString &seqNum, const QString &op) = 0; 00111 00116 virtual void constrainTextPos(int &textX, int &textY, 00117 int textWidth, int textHeight, 00118 Uml::Text_Role tr) = 0; 00119 00124 virtual void calculateNameTextSegment(); 00125 00126 }; 00127 00128 #endif
