KNewStuff

kmoretoolsmenufactory.h
1 /*
2  SPDX-FileCopyrightText: 2015 Gregor Mi <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6 
7 #ifndef KMORETOOLSMENUFACTORY_H
8 #define KMORETOOLSMENUFACTORY_H
9 
10 #include <QMenu>
11 #include <QUrl>
12 #include <QString>
13 
14 #include "knewstuff_export.h"
15 
16 class KMoreTools;
17 class KMoreToolsService;
18 class KMoreToolsMenuFactoryPrivate;
19 
28 class KNEWSTUFF_EXPORT KMoreToolsMenuFactory
29 {
30 public:
37  KMoreToolsMenuFactory(const QString& uniqueId);
38 
40 
42  KMoreToolsMenuFactory& operator=(const KMoreToolsMenuFactory &) = delete;
43 
76  QMenu* createMenuFromGroupingNames(const QStringList& groupingNames,
77  const QUrl& url = QUrl());
78 
92  void fillMenuFromGroupingNames(QMenu* menu, const QStringList& groupingNames,
93  const QUrl& url = QUrl());
94 
95 
102  void setParentWidget(QWidget* widget);
103 
104 private:
105  /*
106  * TODO KF6: Not used, remove in the KF6 transition.
107  * Preserves object size to counteract BIC introduced with
108  * 3ecc3701f7e1aa83104b06fa90ea07eeca47f93d.
109  */
110  KMoreTools* m_off = nullptr;
111 
112  KMoreToolsMenuFactoryPrivate* d;
113 };
114 
115 #endif
A service described in a .desktop file (kmt-desktopfile) which will be called "registered service"...
Definition: kmoretools.h:361
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:161
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 18 2021 22:43:50 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.