ginebra2/ContentToolbarSnippet.h
changeset 6 1c3b8676e58c
parent 5 0f2326c2a325
--- a/ginebra2/ContentToolbarSnippet.h	Wed Jun 23 17:59:43 2010 +0300
+++ b/ginebra2/ContentToolbarSnippet.h	Tue Jul 06 14:03:49 2010 +0300
@@ -23,6 +23,7 @@
 
 #include <QtGui>
 #include "ActionButtonSnippet.h"
+#include "Toolbar.h"
 #include "ToolbarSnippet.h"
 #include "WebChromeContainerSnippet.h"
 
@@ -35,10 +36,13 @@
   {
     Q_OBJECT
   public:
-    ContentToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QRectF& ownerArea, const QWebElement & element, QGraphicsWidget * widget);
+    ContentToolbarSnippet(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     virtual ~ContentToolbarSnippet();
 
+    static ContentToolbarSnippet * instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element);
     WebChromeContainerSnippet * middleSnippet() { return m_middleSnippet;}
+    void handleToolbarStateChange(ContentToolbarState);
+
   Q_SIGNALS:
     void menuButtonSelected();
     void menuButtonCanceled();
@@ -52,12 +56,18 @@
     void childAdded(ChromeSnippet* child);
     void updateOwnerArea();
     void updateSize(QSize );
+
+    /// Slot that sets the state of the action button to active. Handles mouseEvent signal of toolbar
+    /// action buttons and any sub-chrome children action buttons
     void onMouseEvent( QEvent::Type type); 
+
+    /// Slot that resets the timer that controls the sub-chrome. Handles mouseEvent signal of the sub-chrome
+    /// as well as those of the sub-chrome chidlren's
     void onSnippetMouseEvent( QEvent::Type type); 
     void onHidden();
     void onShown();
     void onInactivityTimer();
-    void onExternalMouse(int type, const QString & name, const QString & description);
+    void onExternalMouse(QEvent * ev, const QString & name, const QString & description);
     void onAspectChanged( ); 
 
 
@@ -76,7 +86,8 @@
     void setWidth(int);
     void resetTimer(bool start=true);
     void hideOtherPopups(QString); 
-
+    void manageLink(ChromeItem * item) ;
+    ChromeSnippet* getLinkedButton(ChromeSnippet * snippet );
 
 
     WebChromeContainerSnippet* m_middleSnippet;