KNewStuff

kmoretoolsmenufactory.h
1 /*
2  Copyright 2015 by Gregor Mi <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef KMORETOOLSMENUFACTORY_H
19 #define KMORETOOLSMENUFACTORY_H
20 
21 #include <QMenu>
22 #include <QUrl>
23 #include <QString>
24 
25 #include "knewstuff_export.h"
26 
27 class KMoreTools;
28 class KMoreToolsService;
29 class KMoreToolsMenuFactoryPrivate;
30 
39 class KNEWSTUFF_EXPORT KMoreToolsMenuFactory
40 {
41 public:
48  KMoreToolsMenuFactory(const QString& uniqueId);
49 
51 
53  KMoreToolsMenuFactory& operator=(const KMoreToolsMenuFactory &) = delete;
54 
87  QMenu* createMenuFromGroupingNames(const QStringList& groupingNames,
88  const QUrl& url = QUrl());
89 
103  void fillMenuFromGroupingNames(QMenu* menu, const QStringList& groupingNames,
104  const QUrl& url = QUrl());
105 
106 
113  void setParentWidget(QWidget* widget);
114 
115 private:
116  /*
117  * TODO KF6: Not used, remove in the KF6 transition.
118  * Preserves object size to counteract BIC introduced with
119  * 3ecc3701f7e1aa83104b06fa90ea07eeca47f93d.
120  */
121  KMoreTools* m_off = nullptr;
122 
123  KMoreToolsMenuFactoryPrivate* d;
124 };
125 
126 #endif
A service described in a .desktop file (kmt-desktopfile) which will be called "registered service"...
Definition: kmoretools.h:372
This is the class with the highest abstraction in KMoreTools.
Helps to create user-configurable menus with tools which are potentially not yet installed.
Definition: kmoretools.h:172
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Aug 9 2020 22:43:40 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.