messagewidgetcontroller.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) 2006 * 00009 * Umbrello UML Modeller Authors <uml-devel@uml.sf.net> * 00010 ***************************************************************************/ 00011 00012 #ifndef MESSAGEWIDGETCONTROLLER_H 00013 #define MESSAGEWIDGETCONTROLLER_H 00014 00015 #include "umlwidgetcontroller.h" 00016 00017 class MessageWidget; 00018 00047 class MessageWidgetController : public UMLWidgetController { 00048 public: 00049 00055 MessageWidgetController(MessageWidget* messageWidget); 00056 00060 ~MessageWidgetController(); 00061 00062 protected: 00063 00071 virtual void saveWidgetValues(QMouseEvent *me); 00072 00080 virtual QCursor getResizeCursor(); 00081 00090 virtual void resizeWidget(int newW, int newH); 00091 00107 virtual void moveWidgetBy(int diffX, int diffY); 00108 00118 virtual void constrainMovementForAllWidgets(int &diffX, int &diffY); 00119 00127 virtual void doMouseDoubleClick(QMouseEvent *me); 00128 00129 private: 00130 00140 int constrainPositionY(int diffY); 00141 00145 MessageWidget *m_messageWidget; 00146 00150 int m_unconstrainedPositionY; 00151 00152 }; 00153 00154 #endif
