Warning, file /office/calligra/libs/widgets/KoToolDocker.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * 0003 * Copyright (c) 2005-2006 Boudewijn Rempt <boud@valdyas.org> 0004 * Copyright (c) 2006 Thomas Zander <zander@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 as published by the Free Software Foundation; either 0009 * version 2 of the License, or (at your option) any later version. 0010 * 0011 * This library is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 * Library General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU Library General Public License 0017 * along with this library; see the file COPYING.LIB. If not, write to 0018 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 * Boston, MA 02110-1301, USA. 0020 */ 0021 #ifndef KO_TOOL_DOCKER_H 0022 #define KO_TOOL_DOCKER_H 0023 0024 #include <QDockWidget> 0025 #include <QPointer> 0026 0027 class QWidget; 0028 0029 #include <kowidgets_export.h> 0030 #include <KoCanvasObserverBase.h> 0031 /** 0032 * The tool docker shows the tool option widget associated with the 0033 * current tool and the current canvas. 0034 */ 0035 class KOWIDGETS_EXPORT KoToolDocker : public QDockWidget, public KoCanvasObserverBase 0036 { 0037 Q_OBJECT 0038 public: 0039 explicit KoToolDocker(QWidget *parent = nullptr); 0040 ~KoToolDocker() override; 0041 0042 void resetWidgets(); 0043 0044 /// reimplemented 0045 void setCanvas(KoCanvasBase *canvas) override; 0046 void unsetCanvas() override; 0047 0048 0049 protected: 0050 void resizeEvent(QResizeEvent* event) override; ///< reimplemented from QWidget 0051 public Q_SLOTS: 0052 /** 0053 * Update the option widgets to the argument one, removing the currently set widget. 0054 */ 0055 void setOptionWidgets(const QList<QPointer<QWidget> > &optionWidgetList); 0056 0057 /** 0058 * Returns whether the docker has an optionwidget attached 0059 */ 0060 bool hasOptionWidget(); 0061 0062 /** 0063 * set the tab option 0064 */ 0065 void setTabEnabled(bool enabled); 0066 0067 private: 0068 Q_PRIVATE_SLOT(d, void toggleTab()) 0069 Q_PRIVATE_SLOT(d, void locationChanged(Qt::DockWidgetArea area)) 0070 0071 class Private; 0072 Private * const d; 0073 }; 0074 0075 #endif