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

PlasmaCore

  • sources
  • kde-4.14
  • kde-runtime
  • plasma
  • declarativeimports
  • core
tooltip.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011 Marco Martin <mart@kde.org>
3  * Copyright 2011 Artur Duque de Souza <asouza@kde.org>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU Library General Public License as
7  * published by the Free Software Foundation; either version 2, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef TOOLTIP_PROXY_P
22 #define TOOLTIP_PROXY_P
23 
24 #include <QObject>
25 #include <QWeakPointer>
26 #include <QtCore/QVariant>
27 
28 class QGraphicsObject;
29 class QGraphicsWidget;
30 class DeclarativeItemContainer;
31 
37 class ToolTipProxy : public QObject
38 {
39  Q_OBJECT
40 
44  Q_PROPERTY(QGraphicsObject *target READ target WRITE setTarget NOTIFY targetChanged)
45 
46 
49  Q_PROPERTY(QString mainText READ mainText WRITE setMainText NOTIFY mainTextChanged)
50 
54  Q_PROPERTY(QString subText READ subText WRITE setSubText NOTIFY subTextChanged)
55 
59  Q_PROPERTY(QVariant image READ image WRITE setImage NOTIFY imageChanged)
60 
61 public:
62  ToolTipProxy(QObject *parent = 0);
63  ~ToolTipProxy();
64 
65  QGraphicsObject *target() const;
66  void setTarget(QGraphicsObject *target);
67 
68  QString mainText() const;
69  void setMainText(const QString &text);
70 
71  QString subText() const;
72  void setSubText(const QString &text);
73 
74  QVariant image() const;
75  void setImage(QVariant name);
76 
77 Q_SIGNALS:
78  void targetChanged();
79  void mainTextChanged();
80  void subTextChanged();
81  void imageChanged();
82 
83 protected Q_SLOTS:
84  void syncTarget();
85  void updateToolTip();
86 
87 private:
88  QString m_mainText;
89  QString m_subText;
90  QVariant m_image;
91  QGraphicsWidget *m_widget;
92  QWeakPointer<DeclarativeItemContainer> m_declarativeItemContainer;
93  QWeakPointer<QGraphicsObject> m_target;
94 };
95 
96 #endif
DeclarativeItemContainer
Definition: declarativeitemcontainer_p.h:29
ToolTipProxy::subText
QString subText() const
ToolTipProxy::subTextChanged
void subTextChanged()
ToolTipProxy::syncTarget
void syncTarget()
Definition: tooltip.cpp:71
ToolTipProxy::mainText
QString mainText() const
QObject::name
const char * name() const
ToolTipProxy::target
QGraphicsObject * target() const
QObject
ToolTipProxy
QML wrapper for kdelibs Plasma::ToolTip.
Definition: tooltip.h:37
QGraphicsWidget
ToolTipProxy::imageChanged
void imageChanged()
QString
ToolTipProxy::setMainText
void setMainText(const QString &text)
Definition: tooltip.cpp:116
ToolTipProxy::setTarget
void setTarget(QGraphicsObject *target)
Definition: tooltip.cpp:55
QGraphicsObject
ToolTipProxy::setSubText
void setSubText(const QString &text)
Definition: tooltip.cpp:131
QWeakPointer
ToolTipProxy::updateToolTip
void updateToolTip()
Definition: tooltip.cpp:156
ToolTipProxy::targetChanged
void targetChanged()
ToolTipProxy::image
QVariant image() const
ToolTipProxy::setImage
void setImage(QVariant name)
Definition: tooltip.cpp:146
ToolTipProxy::mainTextChanged
void mainTextChanged()
QObject::parent
QObject * parent() const
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:08:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

PlasmaCore

Skip menu "PlasmaCore"
  • 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