• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Applets

applicationmodel.h

Go to the documentation of this file.
00001 /*
00002     Copyright 2007 Pino Toscano <pino@kde.org>
00003     Copyright 2007 Robert Knight <robertknight@gmail.com>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef APPLICATIONMODEL_H
00022 #define APPLICATIONMODEL_H
00023 
00024 #include "core/kickoff_export.h"
00025 #include "core/kickoffabstractmodel.h"
00026 
00027 namespace Kickoff
00028 {
00029 
00030 class ApplicationModelPrivate;
00031 
00036 class KICKOFF_EXPORT ApplicationModel : public KickoffAbstractModel
00037 {
00038     Q_OBJECT
00039 
00040 public:
00041     ApplicationModel(QObject *parent = 0);
00042     virtual ~ApplicationModel();
00043 
00049     enum DuplicatePolicy {
00051         ShowDuplicatesPolicy,
00063         ShowLatestOnlyPolicy
00064     };
00065 
00071     enum SystemApplicationPolicy {
00073         ShowApplicationAndSystemPolicy,
00075         ShowSystemOnlyPolicy
00076     };
00077 
00078     enum PrimaryNamePolicy {
00079         AppNamePrimary,
00080         GenericNamePrimary
00081     };
00082 
00087     void setDuplicatePolicy(DuplicatePolicy policy);
00089     DuplicatePolicy duplicatePolicy() const;
00090 
00095     void setSystemApplicationPolicy(SystemApplicationPolicy policy);
00097     SystemApplicationPolicy systemApplicationPolicy() const;
00098 
00099     void setPrimaryNamePolicy(PrimaryNamePolicy policy);
00100     PrimaryNamePolicy primaryNamePolicy() const;
00101 
00102     // reimplemented from QAbstractItemModel
00103     virtual bool canFetchMore(const QModelIndex &parent) const;
00104     virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
00105     virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
00106     virtual void fetchMore(const QModelIndex &parent);
00107     virtual bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
00108     virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
00109     virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
00110     virtual QModelIndex parent(const QModelIndex &index) const;
00111     virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
00112 
00113 public slots:
00114     void reloadMenu();
00115     void checkSycocaChange();
00116 
00117 private:
00118     friend class ApplicationModelPrivate;
00119     ApplicationModelPrivate *const d;
00120 
00121     Q_DISABLE_COPY(ApplicationModel)
00122 };
00123 
00124 }
00125 
00126 #endif

Applets

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal