remove maincomponent and target properties from tooltipproxy

This commit is contained in:
Sebastian Kügler 2013-04-09 03:50:43 +02:00
parent 50a4abac6d
commit 3bd1d939e8
2 changed files with 4 additions and 41 deletions

View File

@ -37,29 +37,6 @@ ToolTip::~ToolTip()
{ {
} }
QQuickItem *ToolTip::target() const
{
return m_target.data();
}
void ToolTip::setTarget(QQuickItem *target)
{
if (m_target.data() != target) {
m_target = target;
emit targetChanged();
}
}
QQmlComponent* ToolTip::mainComponent() const
{
return m_mainComponent.data();
}
void ToolTip::setMainComponent(QQmlComponent* mainComponent)
{
m_mainComponent = mainComponent;
}
QQuickItem *ToolTip::mainItem() const QQuickItem *ToolTip::mainItem() const
{ {
return m_mainItem.data(); return m_mainItem.data();

View File

@ -32,23 +32,19 @@ class QQuickItem;
class QGraphicsWidget; class QGraphicsWidget;
/** /**
* Exposed as `ToolTipProxy` in QML. * Exposed as `ToolTipProxy` in QML. This is used only internally for WIndow handling
*
* DO NOT USE THIS API, PlasmaCore.ToolTip is what you should use.
*/ */
class ToolTip : public QObject class ToolTip : public QObject
{ {
Q_OBJECT Q_OBJECT
/** /**
* The item that will display this tooltip on mouse over * The item shown inside the tooltip.
*/
Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged)
/**
* T
*/ */
Q_PROPERTY(QQuickItem *mainItem READ mainItem WRITE setMainItem NOTIFY mainItemChanged) Q_PROPERTY(QQuickItem *mainItem READ mainItem WRITE setMainItem NOTIFY mainItemChanged)
/** /**
* The main QML item that will be displayed in the Dialog * The main QML item that will be displayed in the Dialog
*/ */
@ -64,12 +60,6 @@ public:
ToolTip(QObject *parent = 0); ToolTip(QObject *parent = 0);
~ToolTip(); ~ToolTip();
QQuickItem *target() const;
void setTarget(QQuickItem *target);
QQmlComponent* mainComponent() const;
void setMainComponent(QQmlComponent *mainComponent);
QQuickItem *mainItem() const; QQuickItem *mainItem() const;
void setMainItem(QQuickItem *mainItem); void setMainItem(QQuickItem *mainItem);
@ -83,18 +73,14 @@ public:
Q_SIGNALS: Q_SIGNALS:
void targetChanged(); void targetChanged();
void mainComponentChanged();
void mainItemChanged(); void mainItemChanged();
void visualParentChanged(); void visualParentChanged();
void visibleChanged(); void visibleChanged();
private: private:
QTimer *m_syncTimer; QTimer *m_syncTimer;
QWeakPointer<QQmlComponent> m_mainComponent;
QWeakPointer<QQuickItem> m_mainItem; QWeakPointer<QQuickItem> m_mainItem;
QWeakPointer<QQuickItem> m_visualParent; QWeakPointer<QQuickItem> m_visualParent;
QWeakPointer<QQuickItem> m_declarativeItemContainer;
QWeakPointer<QQuickItem> m_target;
}; };
#endif #endif