• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-workspace API Reference
  • KDE Home
  • Contact Us
 

SystemSettingsView

  • kde-4.x
  • kde-workspace
  • systemsettings
  • core
MenuItem.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This file is part of the KDE project *
3  * Copyright 2007 Will Stephenson <[email protected]> *
4  * Copyright (C) 2009 Ben Cooksley <[email protected]> *
5  * *
6  * This program is free software; you can redistribute it and/or modify *
7  * it under the terms of the GNU General Public License as published by *
8  * the Free Software Foundation; either version 2 of the License, or *
9  * (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with this program; if not, write to the *
18  * Free Software Foundation, Inc., *
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
20  ***************************************************************************/
21 
22 #ifndef MENUITEM_H
23 #define MENUITEM_H
24 
25 #include "systemsettingsview_export.h"
26 
27 #include <KService>
28 
29 class QString;
30 class KCModuleInfo;
31 template<typename T> class QList;
32 
50 class SYSTEMSETTINGSVIEW_EXPORT MenuItem
51 {
52 public:
60  MenuItem( bool isMenu, MenuItem * parent );
61 
67  ~MenuItem();
68 
73  void sortChildrenByWeight();
74 
81  MenuItem * child( int index );
82 
89  QStringList keywords();
90 
96  MenuItem *parent() const;
97 
103  QList<MenuItem*>& children() const;
104 
110  KService::Ptr& service() const;
111 
118  KCModuleInfo& item() const;
119 
125  QString& name() const;
126 
132  QString& category() const;
133 
140  int weight();
141 
148  bool menu() const;
149 
156  void setService( const KService::Ptr& service );
157 
158 private:
159  class Private;
160  Private *const d;
161 };
162 
163 Q_DECLARE_METATYPE( MenuItem * )
164 
165 #endif
MenuItem
Provides a specific item in the list of modules or categories.
Definition: MenuItem.h:50
QString
QList
Definition: BaseMode.h:35
QStringList
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Dec 6 2019 03:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

SystemSettingsView

Skip menu "SystemSettingsView"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kde-workspace API Reference

Skip menu "kde-workspace API Reference"
  • KWin
  •   KWin Decoration Library
  •   KWin Effects Library
  • Plasma
  • Plasma
  •   Applets
  •   Engines
  •   libkworkspace
  •   libtaskmanager
  • System Settings
  •   SystemSettingsView

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal