KXmlGui

kxmlguiwindow.cpp
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2000 Reginald Stadlbauer <[email protected]>
4  SPDX-FileCopyrightText: 1997 Stephan Kulow <[email protected]>
5  SPDX-FileCopyrightText: 1997-2000 Sven Radej <[email protected]>
6  SPDX-FileCopyrightText: 1997-2000 Matthias Ettrich <[email protected]>
7  SPDX-FileCopyrightText: 1999 Chris Schlaeger <[email protected]>
8  SPDX-FileCopyrightText: 2002 Joseph Wenninger <[email protected]>
9  SPDX-FileCopyrightText: 2005-2006 Hamish Rodda <[email protected]>
10 
11  SPDX-License-Identifier: LGPL-2.0-only
12 */
13 
14 #include "kxmlguiwindow.h"
15 #include "debug.h"
16 
17 #include "kactioncollection.h"
18 #include "kmainwindow_p.h"
19 #include <KMessageBox>
20 #ifdef QT_DBUS_LIB
21 #include "kmainwindowiface_p.h"
22 #endif
23 #include "kedittoolbar.h"
24 #include "khelpmenu.h"
25 #include "ktoolbar.h"
26 #include "ktoolbarhandler_p.h"
27 #include "kxmlguifactory.h"
28 
29 #ifdef QT_DBUS_LIB
30 #include <QDBusConnection>
31 #endif
32 #include <QDomDocument>
33 #include <QEvent>
34 #include <QList>
35 #include <QMenuBar>
36 #include <QStatusBar>
37 #include <QWidget>
38 
39 #include <KAboutData>
40 #include <KCommandBar>
41 #include <KConfig>
42 #include <KConfigGroup>
43 #include <KLocalizedString>
44 #include <KSharedConfig>
45 #include <KStandardAction>
46 #include <KToggleAction>
47 
48 #include <cctype>
49 #include <cstdlib>
50 
51 /**
52  * A helper function that takes a list of KActionCollection* and converts it
53  * to KCommandBar::ActionGroup
54  */
55 static QVector<KCommandBar::ActionGroup> actionCollectionToActionGroup(const std::vector<KActionCollection *> &actionCollections)
56 {
57  using ActionGroup = KCommandBar::ActionGroup;
58 
59  QVector<ActionGroup> actionList;
60  actionList.reserve(actionCollections.size());
61 
62  for (const auto collection : actionCollections) {
63  const QList<QAction *> collectionActions = collection->actions();
64  const QString componentName = collection->componentDisplayName();
65 
66  ActionGroup ag;
67  ag.name = componentName;
68  ag.actions.reserve(collection->count());
69  for (const auto action : collectionActions) {
70  /**
71  * If this action is a menu, fetch all its child actions
72  * and skip the menu action itself
73  */
74  if (QMenu *menu = action->menu()) {
75  const QList<QAction *> menuActions = menu->actions();
76 
77  ActionGroup menuActionGroup;
78  menuActionGroup.name = KLocalizedString::removeAcceleratorMarker(action->text());
79  menuActionGroup.actions.reserve(menuActions.size());
80  for (const auto mAct : menuActions) {
81  if (mAct) {
82  menuActionGroup.actions.append(mAct);
83  }
84  }
85 
86  /**
87  * If there were no actions in the menu, we
88  * add the menu to the list instead because it could
89  * be that the actions are created on demand i.e., aboutToShow()
90  */
91  if (!menuActions.isEmpty()) {
92  actionList.append(menuActionGroup);
93  continue;
94  }
95  }
96 
97  if (action && !action->text().isEmpty()) {
98  ag.actions.append(action);
99  }
100  }
101  actionList.append(ag);
102  }
103  return actionList;
104 }
105 
106 static void getActionCollections(KXMLGUIClient *client, std::vector<KActionCollection *> &actionCollections)
107 {
108  if (!client) {
109  return;
110  }
111 
112  auto actionCollection = client->actionCollection();
113  if (actionCollection && !actionCollection->isEmpty()) {
114  actionCollections.push_back(client->actionCollection());
115  }
116 
117  const QList<KXMLGUIClient *> childClients = client->childClients();
118  for (auto child : childClients) {
119  getActionCollections(child, actionCollections);
120  }
121 }
122 
123 class KXmlGuiWindowPrivate : public KMainWindowPrivate
124 {
125 public:
126  void slotFactoryMakingChanges(bool b)
127  {
128  // While the GUI factory is adding/removing clients,
129  // don't let KMainWindow think those are changes made by the user
130  // #105525
131  letDirtySettings = !b;
132  }
133 
134  bool commandBarEnabled = true;
135  // Last executed actions in command bar
136  QVector<QString> lastExecutedActions;
137 
138  bool showHelpMenu : 1;
140 
141  KDEPrivate::ToolBarHandler *toolBarHandler;
142  KToggleAction *showStatusBarAction;
143  QPointer<KEditToolBar> toolBarEditor;
144  KXMLGUIFactory *factory;
145 };
146 
148  : KMainWindow(*new KXmlGuiWindowPrivate, parent, f)
149  , KXMLGUIBuilder(this)
150 {
152  d->showHelpMenu = true;
153  d->toolBarHandler = nullptr;
154  d->showStatusBarAction = nullptr;
155  d->factory = nullptr;
156 #ifdef QT_DBUS_LIB
157  new KMainWindowInterface(this);
158 #endif
159 
160  /**
161  * Set up KCommandBar launcher action
162  */
163  auto a = actionCollection()->addAction(QStringLiteral("open_kcommand_bar"), this, [this] {
164  /**
165  * Do nothing when command bar is disabled
166  */
167  if (!isCommandBarEnabled()) {
168  return;
169  }
170 
171  auto ac = actionCollection();
172  if (!ac) {
173  return;
174  }
175 
176  KCommandBar kc(this);
177  std::vector<KActionCollection *> actionCollections;
178  const auto clients = guiFactory()->clients();
179  actionCollections.reserve(clients.size());
180 
181  // Grab action collections recursively
182  for (const auto &client : clients) {
183  getActionCollections(client, actionCollections);
184  }
185 
186  kc.setActions(actionCollectionToActionGroup(actionCollections));
187  kc.exec();
188  });
189  a->setIcon(QIcon::fromTheme(QStringLiteral("search")));
190  a->setText(i18n("Find Action…"));
192 }
193 
195 {
197  if (!d->toolBarHandler) {
198  return nullptr;
199  }
200 
201  return d->toolBarHandler->toolBarMenuAction();
202 }
203 
205 {
207  if (d->toolBarHandler) {
208  d->toolBarHandler->setupActions();
209  }
210 }
211 
213 {
215  delete d->factory;
216 }
217 
219 {
220  bool ret = KMainWindow::event(ev);
221  if (ev->type() == QEvent::Polish) {
222 #ifdef QT_DBUS_LIB
223  /* clang-format off */
224  constexpr auto opts = QDBusConnection::ExportScriptableSlots
229  /* clang-format on */
231 #endif
232  }
233  return ret;
234 }
235 
236 void KXmlGuiWindow::setHelpMenuEnabled(bool showHelpMenu)
237 {
239  d->showHelpMenu = showHelpMenu;
240 }
241 
243 {
244  Q_D(const KXmlGuiWindow);
245  return d->showHelpMenu;
246 }
247 
248 KXMLGUIFactory *KXmlGuiWindow::guiFactory()
249 {
251  if (!d->factory) {
252  d->factory = new KXMLGUIFactory(this, this);
253  connect(d->factory, &KXMLGUIFactory::makingChanges, this, [d](bool state) {
254  d->slotFactoryMakingChanges(state);
255  });
256  }
257  return d->factory;
258 }
259 
261 {
265  if (!d->toolBarEditor) {
266  d->toolBarEditor = new KEditToolBar(guiFactory(), this);
267  d->toolBarEditor->setAttribute(Qt::WA_DeleteOnClose);
269  }
270  d->toolBarEditor->show();
271 }
272 
274 {
275  // createGUI(xmlFile()); // this loses any plugged-in guiclients, so we use remove+add instead.
276 
277  guiFactory()->removeClient(this);
278  guiFactory()->addClient(this);
279 
282 }
283 
285 {
286  setupGUI(QSize(), options, xmlfile);
287 }
288 
289 void KXmlGuiWindow::setupGUI(const QSize &defaultSize, StandardWindowOptions options, const QString &xmlfile)
290 {
292 
293  if (options & Keys) {
295  }
296 
297  if ((options & StatusBar) && statusBar()) {
299  }
300 
301  if (options & ToolBar) {
304  }
305 
306  d->defaultSize = defaultSize;
307 
308  if (options & Create) {
309  createGUI(xmlfile);
310  }
311 
312  if (d->defaultSize.isValid()) {
313  resize(d->defaultSize);
314  } else if (isHidden()) {
315  adjustSize();
316  }
317 
318  if (options & Save) {
319  const KConfigGroup cg(autoSaveConfigGroup());
320  if (cg.isValid()) {
322  } else {
324  }
325  }
326 }
327 void KXmlGuiWindow::createGUI(const QString &xmlfile)
328 {
330  // disabling the updates prevents unnecessary redraws
331  // setUpdatesEnabled( false );
332 
333  // just in case we are rebuilding, let's remove our old client
334  guiFactory()->removeClient(this);
335 
336  // make sure to have an empty GUI
337  QMenuBar *mb = menuBar();
338  if (mb) {
339  mb->clear();
340  }
341 
342  qDeleteAll(toolBars()); // delete all toolbars
343 
344  // don't build a help menu unless the user ask for it
345  if (d->showHelpMenu) {
346  delete d->helpMenu;
347  // we always want a help menu
348  d->helpMenu = new KHelpMenu(this, KAboutData::applicationData(), true);
349 
351  QAction *helpContentsAction = d->helpMenu->action(KHelpMenu::menuHelpContents);
352  QAction *whatsThisAction = d->helpMenu->action(KHelpMenu::menuWhatsThis);
353  QAction *reportBugAction = d->helpMenu->action(KHelpMenu::menuReportBug);
354  QAction *switchLanguageAction = d->helpMenu->action(KHelpMenu::menuSwitchLanguage);
355  QAction *aboutAppAction = d->helpMenu->action(KHelpMenu::menuAboutApp);
356  QAction *aboutKdeAction = d->helpMenu->action(KHelpMenu::menuAboutKDE);
357  QAction *donateAction = d->helpMenu->action(KHelpMenu::menuDonate);
358 
359  if (helpContentsAction) {
360  actions->addAction(helpContentsAction->objectName(), helpContentsAction);
361  }
362  if (whatsThisAction) {
363  actions->addAction(whatsThisAction->objectName(), whatsThisAction);
364  }
365  if (reportBugAction) {
366  actions->addAction(reportBugAction->objectName(), reportBugAction);
367  }
368  if (switchLanguageAction) {
369  actions->addAction(switchLanguageAction->objectName(), switchLanguageAction);
370  }
371  if (aboutAppAction) {
372  actions->addAction(aboutAppAction->objectName(), aboutAppAction);
373  }
374  if (aboutKdeAction) {
375  actions->addAction(aboutKdeAction->objectName(), aboutKdeAction);
376  }
377  if (donateAction) {
378  actions->addAction(donateAction->objectName(), donateAction);
379  }
380  }
381 
382  const QString windowXmlFile = xmlfile.isNull() ? componentName() + QLatin1String("ui.rc") : xmlfile;
383 
384  // Help beginners who call setXMLFile and then setupGUI...
385  if (!xmlFile().isEmpty() && xmlFile() != windowXmlFile) {
386  qCWarning(DEBUG_KXMLGUI) << "You called setXMLFile(" << xmlFile() << ") and then createGUI or setupGUI,"
387  << "which also calls setXMLFile and will overwrite the file you have previously set.\n"
388  << "You should call createGUI(" << xmlFile() << ") or setupGUI(<options>," << xmlFile() << ") instead.";
389  }
390 
391  // we always want to load in our global standards file
393 
394  // now, merge in our local xml file.
395  setXMLFile(windowXmlFile, true);
396 
397  // make sure we don't have any state saved already
399 
400  // do the actual GUI building
401  guiFactory()->reset();
402  guiFactory()->addClient(this);
403 
405 
406  // setUpdatesEnabled( true );
407 }
408 
410 {
411  stateChanged(newstate, KXMLGUIClient::StateNoReverse);
412 }
413 
414 void KXmlGuiWindow::slotStateChanged(const QString &newstate, bool reverse)
415 {
416  stateChanged(newstate, reverse ? KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse);
417 }
418 
420 {
422  if (enable) {
423  if (d->toolBarHandler) {
424  return;
425  }
426 
427  d->toolBarHandler = new KDEPrivate::ToolBarHandler(this);
428 
429  if (factory()) {
430  factory()->addClient(d->toolBarHandler);
431  }
432  } else {
433  if (!d->toolBarHandler) {
434  return;
435  }
436 
437  if (factory()) {
438  factory()->removeClient(d->toolBarHandler);
439  }
440 
441  delete d->toolBarHandler;
442  d->toolBarHandler = nullptr;
443  }
444 }
445 
447 {
448  Q_D(const KXmlGuiWindow);
449  return (d->toolBarHandler);
450 }
451 
453 {
455  if (!d->showStatusBarAction) {
457  QStatusBar *sb = statusBar(); // Creates statusbar if it doesn't exist already.
458  connect(d->showStatusBarAction, &QAction::toggled, sb, &QWidget::setVisible);
459  d->showStatusBarAction->setChecked(sb->isHidden());
460  } else {
461  // If the language has changed, we'll need to grab the new text and whatsThis
462  QAction *tmpStatusBar = KStandardAction::showStatusbar(nullptr, nullptr, nullptr);
463  d->showStatusBarAction->setText(tmpStatusBar->text());
464  d->showStatusBarAction->setWhatsThis(tmpStatusBar->whatsThis());
465  delete tmpStatusBar;
466  }
467 }
468 
469 void KXmlGuiWindow::finalizeGUI(bool /*force*/)
470 {
471  // FIXME: this really needs to be removed with a code more like the one we had on KDE3.
472  // what we need to do here is to position correctly toolbars so they don't overlap.
473  // Also, take in count plugins could provide their own toolbars and those also need to
474  // be restored.
475  if (autoSaveSettings() && autoSaveConfigGroup().isValid()) {
477  }
478 }
479 
481 {
484  QStatusBar *sb = findChild<QStatusBar *>();
485  if (sb && d->showStatusBarAction) {
486  d->showStatusBarAction->setChecked(!sb->isHidden());
487  }
488 }
489 
490 // TODO KF6: change it to "using KXMLGUIBuilder::finalizeGUI;" in the header
491 // and remove the reimplementation
492 void KXmlGuiWindow::finalizeGUI(KXMLGUIClient *client)
493 {
494  KXMLGUIBuilder::finalizeGUI(client);
495 }
496 
498 {
499  QMap<QString, QAction *> shortcuts;
500  QAction *editCutAction = actionCollection()->action(QStringLiteral("edit_cut"));
501  QAction *deleteFileAction = actionCollection()->action(QStringLiteral("deletefile"));
502  const auto actions = actionCollection()->actions();
503  for (QAction *action : actions) {
504  if (action->isEnabled()) {
505  const auto actionShortcuts = action->shortcuts();
506  for (const QKeySequence &shortcut : actionShortcuts) {
507  if (shortcut.isEmpty()) {
508  continue;
509  }
510  const QString portableShortcutText = shortcut.toString();
511  const QAction *existingShortcutAction = shortcuts.value(portableShortcutText);
512  if (existingShortcutAction) {
513  // If the shortcut is already in use we give a warning, so that hopefully the developer will find it
514  // There is one exception, if the conflicting shortcut is a non primary shortcut of "edit_cut"
515  // and "deleteFileAction" is the other action since Shift+Delete is used for both in our default code
516  bool showWarning = true;
517  if ((action == editCutAction && existingShortcutAction == deleteFileAction)
518  || (action == deleteFileAction && existingShortcutAction == editCutAction)) {
519  QList<QKeySequence> editCutActionShortcuts = editCutAction->shortcuts();
520  if (editCutActionShortcuts.indexOf(shortcut) > 0) // alternate shortcut
521  {
522  editCutActionShortcuts.removeAll(shortcut);
523  editCutAction->setShortcuts(editCutActionShortcuts);
524 
525  showWarning = false;
526  }
527  }
528 
529  if (showWarning) {
531  const QString existingShortcutActionName = KLocalizedString::removeAcceleratorMarker(existingShortcutAction->text());
532  QString dontShowAgainString = existingShortcutActionName + actionName + shortcut.toString();
533  dontShowAgainString.remove(QLatin1Char('\\'));
535  i18n("There are two actions (%1, %2) that want to use the same shortcut (%3). This is most probably a bug. "
536  "Please report it in <a href='https://bugs.kde.org'>bugs.kde.org</a>",
537  existingShortcutActionName,
538  actionName,
539  shortcut.toString(QKeySequence::NativeText)),
540  i18n("Ambiguous Shortcuts"),
541  dontShowAgainString,
543  }
544  } else {
545  shortcuts.insert(portableShortcutText, action);
546  }
547  }
548  }
549  }
550 }
551 
553 {
554  /**
555  * Unset the shortcut
556  */
557  auto cmdBarAction = actionCollection()->action(QStringLiteral("open_kcommand_bar"));
558  if (enable) {
560  } else {
561  actionCollection()->setDefaultShortcut(cmdBarAction, {});
562  }
563 
565  d->commandBarEnabled = enable;
566 }
567 
569 {
570  Q_D(const KXmlGuiWindow);
571  return d->commandBarEnabled;
572 }
573 
574 #include "moc_kxmlguiwindow.cpp"
void adjustSize()
void clear()
void setSettingsDirty()
Tell the main window that it should save its settings when being closed.
bool isNull() const const
QList< QAction * > actions() const
Returns the list of QActions which belong to this action collection.
QAction * configureToolbars(const QObject *recvr, const char *slot, QObject *parent)
void setXMLGUIBuildDocument(const QDomDocument &doc)
@ Keys
Adds an action to open the configure keyboard shortcuts dialog.
bool event(QEvent *event) override
Reimplemented to catch QEvent::Polish in order to adjust the object name if needed,...
QList< KXMLGUIClient * > clients() const
Returns a list of all clients currently added to this factory.
@ menuDonate
Definition: khelpmenu.h:168
QList< QAction * > actions() const const
void removeClient(KXMLGUIClient *client)
Removes the GUI described by the client, by unplugging all provided actions and removing all owned co...
@ Save
Auto-saves (and loads) the toolbar/menubar/statusbar settings and window size using the default name.
void showConfigureShortcutsDialog()
Shows a dialog (KShortcutsDialog) that lists every action in this factory, and which can be used to c...
int removeAll(const T &value)
void setShortcuts(const QList< QKeySequence > &shortcuts)
const T value(const Key &key, const T &defaultValue) const const
QString dbusName() const
Returns the path under which this window's D-Bus object is exported.
void setupToolbarMenuActions()
void setDefaultShortcut(QAction *action, const QKeySequence &shortcut)
Set the default shortcut for the given action.
bool isStandardToolBarMenuEnabled() const
Returns true if the toolbar menu is enabled, false otherwise.
void append(const T &value)
void loadStandardsXmlFile()
Load the ui_standards.rc file.
QIcon fromTheme(const QString &name)
bool event(QEvent *event) override
Reimplemented to catch QEvent::Polish in order to adjust the object name if needed,...
bool isValid() const
void createStandardStatusBarAction()
Sets whether KMainWindow should provide a menu that allows showing/hiding of the statusbar (using KSt...
~KXmlGuiWindow() override
Destructor.
QList< KToolBar * > toolBars() const
void applyMainWindowSettings(const KConfigGroup &config) override
Read settings for statusbar, menubar and toolbar from their respective groups in the config file and ...
bool registerObject(const QString &path, QObject *object, QDBusConnection::RegisterOptions options)
void reserve(int size)
Standard KDE help menu with dialog boxes.
Definition: khelpmenu.h:108
QAction * toolBarMenuAction()
Returns a pointer to the mainwindows action responsible for the toolbars menu.
KToggleAction * showStatusbar(const QObject *recvr, const char *slot, QObject *parent)
void checkAmbiguousShortcuts()
Checks if there are actions using the same shortcut.
Q_INVOKABLE QAction * addAction(const QString &name, QAction *action)
Add an action under the given name to the collection.
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
static KSharedConfig::Ptr openConfig(const QString &fileName=QString(), OpenFlags mode=FullConfig, QStandardPaths::StandardLocation type=QStandardPaths::GenericConfigLocation)
QAction * keyBindings(const QObject *recvr, const char *slot, QObject *parent)
void createGUI(const QString &xmlfile=QString())
Creates a GUI based on a local XML file.
KConfigGroup autoSaveConfigGroup() const
A container for a set of QAction objects.
@ StatusBar
Adds action to show/hide the statusbar.
void reserve(int alloc)
bool isCommandBarEnabled() const
QMap::iterator insert(const Key &key, const T &value)
virtual void setVisible(bool visible)
typedef WindowFlags
void reset()
Use this method to free all memory allocated by the KXMLGUIFactory.
void setHelpMenuEnabled(bool showHelpMenu=true)
Enables the build of a standard help menu when calling createGUI() or setupGUI().
int size() const const
void setIcon(const QIcon &icon)
QString i18n(const char *text, const TYPE &arg...)
QDBusConnection sessionBus()
virtual QString xmlFile() const
This will return the name of the XML file as set by setXMLFile().
void toggled(bool checked)
virtual void saveNewToolbarConfig()
Rebuilds the GUI after KEditToolBar changed the toolbar layout.
int indexOf(const T &value, int from) const const
virtual void setXMLFile(const QString &file, bool merge=false, bool setXMLDoc=true)
Sets the name of the rc file containing the XML for the part.
KREPORT_EXPORT QPageSize::PageSizeId defaultSize()
KXMLGUIFactory * factory() const
Retrieves a pointer to the KXMLGUIFactory this client is associated with (will return nullptr if the ...
void newToolBarConfig()
Signal emitted when 'apply' or 'ok' is clicked or toolbars were reset.
QAction * action(int index) const
Return the QAction* at position index in the action collection.
bool isEmpty() const const
@ Create
calls createGUI() once ToolBar, Keys and Statusbar have been taken care of.
static KAboutData applicationData()
QMenuBar * menuBar() const const
virtual void slotStateChanged(const QString &newstate)
Apply a state change.
void reserve(int size)
void addClient(KXMLGUIClient *client)
Creates the GUI described by the QDomDocument of the client, using the client's actions,...
QString & remove(int position, int n)
QStatusBar * statusBar() const const
void setStandardToolBarMenuEnabled(bool enable)
Sets whether KMainWindow should provide a menu that allows showing/hiding the available toolbars (usi...
Top level main window with predefined action layout.
Definition: kxmlguiwindow.h:49
A dialog used to customize or configure toolbars.
Definition: kedittoolbar.h:62
void resize(int w, int h)
QAction * action(const char *name) const
Retrieves an action of the client by name.
KXmlGuiWindow(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Construct a main window.
virtual KActionCollection * actionCollection() const
Retrieves the entire action collection for the GUI client.
void setupGUI(StandardWindowOptions options=Default, const QString &xmlfile=QString())
Configures the current window and its actions in the typical KDE fashion.
bool isEnabled() const const
virtual void configureToolbars()
Show a standard configure toolbar dialog.
Top level main window.
Definition: kmainwindow.h:96
void setActions(const QVector< ActionGroup > &actions)
QEvent::Type type() const const
QList< QKeySequence > shortcuts() const const
static QString removeAcceleratorMarker(const QString &label)
void saveMainWindowSettings(KConfigGroup &config)
Save settings for statusbar, menubar and toolbar to their respective groups in the config group confi...
virtual void applyMainWindowSettings(const KConfigGroup &config)
Read settings for statusbar, menubar and toolbar from their respective groups in the config file and ...
void setAutoSaveSettings(const QString &groupName=QStringLiteral("MainWindow"), bool saveWindowSize=true)
Call this to enable "auto-save" of toolbar/menubar/statusbar settings (and optionally window size).
void information(QWidget *parent, const QString &text, const QString &title=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
bool isHelpMenuEnabled() const
Returns true if the help menu is enabled, false otherwise.
bool isHidden() const const
virtual void stateChanged(const QString &newstate, ReverseStateChange reverse=StateNoReverse)
Actions can collectively be assigned a "State".
void makingChanges(bool)
Emitted when the factory is currently making changes to the GUI, i.e.
WA_DeleteOnClose
QList< KXMLGUIClient * > childClients()
Retrieves a list of all child clients.
QAction * exec()
Q_D(Todo)
void setCommandBarEnabled(bool enable)
Enable a hud style menu which allows listing and executing actions.
virtual QString componentName() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:11:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.