1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2010 Denis Mingulov.
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
16 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights. These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
32 **************************************************************************/
34 #ifndef CLASSVIEWNAVIGATIONWIDGETFACTORY_H
35 #define CLASSVIEWNAVIGATIONWIDGETFACTORY_H
37 #include <coreplugin/inavigationwidgetfactory.h>
39 #include <QtCore/QScopedPointer>
45 \class NavigationWidgetFactory
46 \brief INavigationWidgetFactory implementation for Class View
48 INavigationWidgetFactory implementation for Class View. Singleton instance.
49 Supports \a setState publc slot to add/remove factory to \a ExtensionSystem::PluginManager.
50 Also supports some additional signals, \a widgetIsCreated and \a stateChanged.
53 class NavigationWidgetFactory : public Core::INavigationWidgetFactory
56 Q_DISABLE_COPY(NavigationWidgetFactory)
60 virtual ~NavigationWidgetFactory();
63 static NavigationWidgetFactory *instance();
65 // Core::INavigationWidgetFactory
66 //! \implements Core::INavigationWidgetFactory::displayName
67 QString displayName() const;
69 //! \implements Core::INavigationWidgetFactory::priority
72 //! \implements Core::INavigationWidgetFactory::id
75 //! \implements Core::INavigationWidgetFactory::activationSequence
76 QKeySequence activationSequence() const;
78 //! \implements Core::INavigationWidgetFactory::createWidget
79 Core::NavigationView createWidget();
81 //! \implements Core::INavigationWidgetFactory::saveSettings
82 void saveSettings(int position, QWidget *widget);
84 //! \implements Core::INavigationWidgetFactory::restoreSettings
85 void restoreSettings(int position, QWidget *widget);
91 \brief Signal which informs that the widget factory creates a widget.
93 void widgetIsCreated();
97 NavigationWidgetFactory();
100 \brief Get a settings prefix for the specified position
101 \param position Position
102 \return Settings prefix
104 QString settingsPrefix(int position) const;
107 //! private class data pointer
108 QScopedPointer<struct NavigationWidgetFactoryPrivate> d_ptr;
111 } // namespace Internal
112 } // namespace ClassView
114 #endif // CLASSVIEWNAVIGATIONWIDGETFACTORY_H