• 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
resourceinstance.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 published by *
6  * the Free Software Foundation; either version 2 of the License, 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 License *
15  * 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 #ifndef RESOURCEINSTANCE_H
20 #define RESOURCEINSTANCE_H
21 
22 #include <QDeclarativeItem>
23 #include <QUrl>
24 
25 namespace KActivities {
26  class ResourceInstance;
27 }
28 
29 class QTimer;
30 class QGraphicsView;
31 
32 class ResourceInstance : public QDeclarativeItem
33 {
34  Q_OBJECT
35 
36  Q_PROPERTY(QUrl uri READ uri WRITE setUri NOTIFY uriChanged)
37  Q_PROPERTY(QString mimetype READ mimetype WRITE setMimetype NOTIFY mimetypeChanged)
38  Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
39  //Q_PROPERTY(OpenReason openReason READ openReason)
40 
41 public:
42  ResourceInstance(QDeclarativeItem *parent = 0);
43  ~ResourceInstance();
44 
45  QUrl uri() const;
46  void setUri(const QUrl &uri);
47 
48  QString mimetype() const;
49  void setMimetype(const QString &mimetype);
50 
51  QString title() const;
52  void setTitle(const QString &title);
53 
54 protected:
55  QGraphicsView *view() const;
56 
57 protected Q_SLOTS:
58  void syncWid();
59 
60 Q_SIGNALS:
61  void uriChanged();
62  void mimetypeChanged();
63  void titleChanged();
64 
65 public Q_SLOTS:
70  void notifyModified();
71 
77  void notifyFocusedIn();
78 
84  void notifyFocusedOut();
85 
86 private:
87  KActivities::ResourceInstance *m_resourceInstance;
88  QUrl m_uri;
89  QString m_mimetype;
90  QString m_title;
91  QTimer *m_syncTimer;
92 };
93 
94 #endif
ResourceInstance
Definition: resourceinstance.h:32
ResourceInstance::uriChanged
void uriChanged()
ResourceInstance::syncWid
void syncWid()
Definition: resourceinstance.cpp:73
ResourceInstance::view
QGraphicsView * view() const
Definition: resourceinstance.cpp:44
ResourceInstance::notifyFocusedIn
void notifyFocusedIn()
Call this method to notify the system that the resource has the focus in your application.
Definition: resourceinstance.cpp:155
QTimer
ResourceInstance::uri
QUrl uri() const
ResourceInstance::setMimetype
void setMimetype(const QString &mimetype)
Definition: resourceinstance.cpp:125
QString
ResourceInstance::notifyModified
void notifyModified()
Call this method to notify the system that you modified (the contents of) the resource.
Definition: resourceinstance.cpp:148
QUrl
ResourceInstance::titleChanged
void titleChanged()
ResourceInstance::mimetypeChanged
void mimetypeChanged()
ResourceInstance::setTitle
void setTitle(const QString &title)
Definition: resourceinstance.cpp:139
ResourceInstance::mimetype
QString mimetype() const
ResourceInstance::notifyFocusedOut
void notifyFocusedOut()
Call this method to notify the system that the resource lost the focus in your application.
Definition: resourceinstance.cpp:163
QDeclarativeItem
ResourceInstance::setUri
void setUri(const QUrl &uri)
Definition: resourceinstance.cpp:110
QObject::parent
QObject * parent() const
QGraphicsView
ResourceInstance::title
QString title() const
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