On Tuesday 09 June 2009, Emdek wrote:
> OK, right.

new draft of the ToolTipManager API is attached ...

> I'm not sure if click position is really needed, I can imagine only that
> it could be used for positioning window menu for preview or something like
> that.

i think that if we offer a context menu, that it should be standardized and 
live inside the window preview class; unfortunately that menu right now comes 
out of libtaskmanger in kdebase/workspace/ which would cause some issues 
there.. hmm...

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software

Index: tooltipmanager.h
===================================================================
--- tooltipmanager.h	(revision 980060)
+++ tooltipmanager.h	(working copy)
@@ -22,7 +22,8 @@
 #ifndef PLASMA_TOOLTIP_MANAGER_H
 #define PLASMA_TOOLTIP_MANAGER_H
 
-//plasma
+#include <kurl.h>
+
 #include <plasma/plasma.h>
 #include <plasma/plasma_export.h>
 #include <plasma/tooltipcontent.h>
@@ -164,6 +165,25 @@
      */
     ToolTipManager::State state() const;
 
+signals:
+    /**
+     * This signal is emitted when a window preview in the tooltip is clicked.
+     * @arg window the id of the window that was clicked
+     * @arg buttons the mouse buttons involved in the activation
+     * @arg modifiers the keyboard modifiers involved in the activation, if any
+     * @since 4.3
+     */
+    void windowPreviewActivated(WId window, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
+
+    /**
+     * This signal is emitted when a link in the tooltip is clicked.
+     * @arg url the url that was clicked on
+     * @arg buttons the mouse buttons involved in the activation
+     * @arg modifiers the keyboard modifiers involved in the activation, if any
+     * @since 4.3
+     */
+    void linkActivated(const KUrl &url, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
+
 private:
     /**
      * Default constructor.
@@ -188,6 +208,7 @@
     Q_PRIVATE_SLOT(d, void showToolTip())
     Q_PRIVATE_SLOT(d, void resetShownState())
     Q_PRIVATE_SLOT(d, void onWidgetDestroyed(QObject*))
+    Q_PRIVATE_SLOT(d, void activateWindowByWId(WId wid, Qt::MouseButtons, Qt::KeyboardModifiers))
 };
 
 } // namespace Plasma

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to