Warning, file /office/calligra/libs/flake/KoDockFactoryBase.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 Copyright (C) 2006 Peter Simonsson <peter.simonsson@gmail.com> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This library is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this library; see the file COPYING.LIB. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef KODOCKFACTORY_H 0021 #define KODOCKFACTORY_H 0022 0023 #include "flake_export.h" 0024 0025 class QDockWidget; 0026 class QString; 0027 0028 /** 0029 * Base class for factories used to create new dock widgets. 0030 * @see KoDockRegistry 0031 * @see KoCanvasObserverBase 0032 */ 0033 class FLAKE_EXPORT KoDockFactoryBase 0034 { 0035 public: 0036 enum DockPosition { 0037 DockTornOff, ///< Floating as its own top level window 0038 DockTop, ///< Above the central widget 0039 DockBottom, ///< Below the central widget 0040 DockRight, ///< Right of the centra widget 0041 DockLeft, ///< Left of the centra widget 0042 DockMinimized ///< Not docked, but reachable via the menu 0043 }; 0044 0045 KoDockFactoryBase(); 0046 virtual ~KoDockFactoryBase(); 0047 0048 /// @return the id of the dock widget 0049 virtual QString id() const = 0; 0050 0051 /// @return the dock widget area the widget should appear in by default 0052 virtual DockPosition defaultDockPosition() const = 0; 0053 0054 /// @return the dockers default visibility 0055 /// Default is true. 0056 virtual bool defaultVisible() const { 0057 return true; 0058 } 0059 /// Returns true if the dock widget should get a collapsable header. 0060 virtual bool isCollapsable() const { 0061 return true; 0062 } 0063 0064 /** 0065 * In case the docker is collapsable, returns true if the dock widget 0066 * will start collapsed by default. 0067 */ 0068 virtual bool defaultCollapsed() const { 0069 return false; 0070 } 0071 0072 /// Creates the dock widget 0073 /// @return the created dock widget 0074 virtual QDockWidget* createDockWidget() = 0; 0075 }; 0076 0077 #endif