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

PlasmaExtraComponents

  • sources
  • kde-4.14
  • kde-runtime
  • plasma
  • declarativeimports
  • plasmaextracomponents
fallbackcomponent.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011 Marco Martin <mart@kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Library General Public License as
6  * published by the Free Software Foundation; either version 2, or
7  * (at your option) any later version.
8  *
9  * This program 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
12  * GNU Library General Public License for more details
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef FALLBACKCOMPONENT_H
21 #define FALLBACKCOMPONENT_H
22 
23 
24 #include <QObject>
25 #include <QCache>
26 #include <QStringList>
27 
28 class FallbackComponent : public QObject
29 {
30  Q_OBJECT
31 
38 Q_PROPERTY(QString basePath READ basePath WRITE setBasePath NOTIFY basePathChanged)
39 
40 
45 Q_PROPERTY(QStringList candidates READ candidates WRITE setCandidates NOTIFY candidatesChanged)
46 
47 public:
48  FallbackComponent(QObject *parent = 0);
49 
58  Q_INVOKABLE QString filePath(const QString& key = QString());
59 
60  QString basePath() const;
61  void setBasePath(const QString &basePath);
62 
63 
64  QStringList candidates() const;
65  void setCandidates(const QStringList &candidates);
66 
67 
68 Q_SIGNALS:
69  void basePathChanged();
70  void candidatesChanged();
71 
72 private:
73  QCache<QString, QString> m_possiblePaths;
74  QString m_basePath;
75  QStringList m_candidates;
76 };
77 
78 #endif
FallbackComponent::candidates
QStringList candidates() const
FallbackComponent
Definition: fallbackcomponent.h:28
FallbackComponent::candidatesChanged
void candidatesChanged()
QObject
QString
QStringList
QCache
FallbackComponent::basePath
QString basePath() const
FallbackComponent::setCandidates
void setCandidates(const QStringList &candidates)
Definition: fallbackcomponent.cpp:52
FallbackComponent::setBasePath
void setBasePath(const QString &basePath)
Definition: fallbackcomponent.cpp:39
FallbackComponent::filePath
Q_INVOKABLE QString filePath(const QString &key=QString())
This method must be called after the the basePath and the candidates property This method resolves a ...
Definition: fallbackcomponent.cpp:58
QObject::parent
QObject * parent() const
FallbackComponent::basePathChanged
void basePathChanged()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:08:46 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

PlasmaExtraComponents

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

kde-runtime API Reference

Skip menu "kde-runtime API Reference"
  • KCMShell
  • KNotify
  • Plasma Runtime
  •     PlasmaCore
  •     DragAndDrop
  •     PlasmaComponents
  •     PlasmaExtraComponents
  •     QtExtraComponents

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