1 /* This file is part of the KDE libraries 2 Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org> 3 Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr> 4 Copyright (C) 2009 Jarosław Staniek <staniek@kde.org> 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Library General Public 8 License version 2 as published by the Free Software Foundation. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Library General Public License for more details. 14 15 You should have received a copy of the GNU Library General Public License 16 along with this library; see the file COPYING.LIB. If not, write to 17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef KFE_RESIZEHANDLER_H 22 #define KFE_RESIZEHANDLER_H 23 24 #include "kformdesigner_export.h" 25 26 #include <QHash> 27 #include <QWidget> 28 29 namespace KFormDesigner 30 { 31 32 class Form; 33 class ResizeHandleSet; 34 35 /** 36 * A set of resize handles (for resizing widgets) 37 */ 38 class KFORMDESIGNER_EXPORT ResizeHandleSet: public QObject 39 { 40 Q_OBJECT 41 42 public: 43 typedef QHash<QString, ResizeHandleSet*> Hash; 44 45 ResizeHandleSet(QWidget *modify, Form *form); 46 47 ~ResizeHandleSet(); 48 49 QWidget *widget() const; 50 51 void setWidget(QWidget *modify); 52 53 void raise(); 54 55 void setEditingMode(bool editing); 56 57 Form *form() const; 58 59 Q_SIGNALS: 60 void geometryChangeStarted(); 61 void geometryChanged(const QRect &newGeometry); 62 63 protected: 64 void resizeStarted(); 65 void resizeFinished(); 66 private: 67 class Private; 68 69 Private* const d; 70 friend class ResizeHandle; 71 }; 72 73 } 74 75 #endif 76