File indexing completed on 2024-05-12 16:39:50
0001 /* This file is part of the KDE libraries 0002 Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org> 0003 Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr> 0004 Copyright (C) 2009 Jarosław Staniek <staniek@kde.org> 0005 0006 This library is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU Library General Public 0008 License version 2 as published by the Free Software Foundation. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef KFE_RESIZEHANDLER_H 0022 #define KFE_RESIZEHANDLER_H 0023 0024 #include "kformdesigner_export.h" 0025 0026 #include <QHash> 0027 #include <QWidget> 0028 0029 namespace KFormDesigner 0030 { 0031 0032 class Form; 0033 class ResizeHandleSet; 0034 0035 /** 0036 * A set of resize handles (for resizing widgets) 0037 */ 0038 class KFORMDESIGNER_EXPORT ResizeHandleSet: public QObject 0039 { 0040 Q_OBJECT 0041 0042 public: 0043 typedef QHash<QString, ResizeHandleSet*> Hash; 0044 0045 ResizeHandleSet(QWidget *modify, Form *form); 0046 0047 ~ResizeHandleSet(); 0048 0049 QWidget *widget() const; 0050 0051 void setWidget(QWidget *modify); 0052 0053 void raise(); 0054 0055 void setEditingMode(bool editing); 0056 0057 Form *form() const; 0058 0059 Q_SIGNALS: 0060 void geometryChangeStarted(); 0061 void geometryChanged(const QRect &newGeometry); 0062 0063 protected: 0064 void resizeStarted(); 0065 void resizeFinished(); 0066 private: 0067 class Private; 0068 0069 Private* const d; 0070 friend class ResizeHandle; 0071 }; 0072 0073 } 0074 0075 #endif