[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdeaccessibility/ksayit/src
From:       Robert Vogl <voglrobe () web ! de>
Date:       2005-08-31 21:19:34
Message-ID: 1125523174.689301.16119.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 455565 by voglrobe:

Fixed an update problem after RMB that has been shown the wrong context menu for the \
item under the mouse.

 M  +8 -3      DocTreeView.ui  
 M  +6 -0      DocTreeView.ui.h  
 M  +31 -14    doctreeviewimpl.cpp  
 M  +8 -1      doctreeviewimpl.h  
 M  +1 -1      version.h  


--- branches/KDE/3.5/kdeaccessibility/ksayit/src/DocTreeView.ui #455564:455565
@@ -1,4 +1,4 @@
-<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
 <class>DocTreeView</class>
 <widget class="QWidget">
     <property name="name">
@@ -102,8 +102,6 @@
         </widget>
     </grid>
 </widget>
-<customwidgets>
-</customwidgets>
 <connections>
     <connection>
         <sender>listView</sender>
@@ -111,6 +109,12 @@
         <receiver>DocTreeView</receiver>
         <slot>slotItemClicked(QListViewItem*)</slot>
     </connection>
+    <connection>
+        <sender>listView</sender>
+        <signal>rightButtonPressed(QListViewItem*,const QPoint&amp;,int)</signal>
+        <receiver>DocTreeView</receiver>
+        <slot>slotRightButtonPressed(QListViewItem*,const QPoint&amp;,int)</slot>
+    </connection>
 </connections>
 <includes>
     <include location="local" impldecl="in \
implementation">DocTreeView.ui.h</include> @@ -145,6 +149,7 @@
     <slot access="protected">slotNewSection_3()</slot>
     <slot access="protected">slotNewSection_4()</slot>
     <slot access="protected">slotNewSection_5()</slot>
+    <slot>slotRightButtonPressed( QListViewItem * i, const QPoint &amp;, int \
)</slot>  </slots>
 <layoutdefaults spacing="6" margin="11"/>
 <includehints>
--- branches/KDE/3.5/kdeaccessibility/ksayit/src/DocTreeView.ui.h #455564:455565
@@ -124,3 +124,9 @@
 {
 
 }
+
+
+void DocTreeView::slotRightButtonPressed( QListViewItem *i, const QPoint &, int )
+{
+
+}
--- branches/KDE/3.5/kdeaccessibility/ksayit/src/doctreeviewimpl.cpp #455564:455565
@@ -530,6 +530,22 @@
 }
 
 
+void DocTreeViewImpl::slotRightButtonPressed(QListViewItem *item, const QPoint &pos, \
int) +{
+    kdDebug(100200) << "DocTreeViewImpl::slotRightButtonPressed()" << endl;
+    slotItemClicked( item );
+    
+    if ( !m_currentItem )
+        return;
+
+    m_contextmenu = m_contextmenuhandler->getPopupMenu( m_currentItem );
+    if ( !m_contextmenu )
+        return;
+
+    m_contextmenu->exec( pos );    
+}
+
+
 void DocTreeViewImpl::recursiveBuildItemIdentifier(ListViewInterface* item, \
QTextStream &idstring)  {
     kdDebug(100200) << "DocTreeViewImpl::recursiveBuildItemIdentifier()" << endl;
@@ -687,22 +703,23 @@
     m_changedContent = QString::null;
 }    
 
+/** replaced by slotRightButtonPressed()
+ */
+// void DocTreeViewImpl::contextMenuEvent(QContextMenuEvent *e)
+// {
+//     kdDebug(100200) << "DocTreeViewImpl::contextMenuEvent()" << endl;
+// 
+//     if ( !m_currentItem )
+//         return;
+// 
+//     m_contextmenu = m_contextmenuhandler->getPopupMenu( m_currentItem );
+//     if ( !m_contextmenu )
+//         return;
+// 
+//     m_contextmenu->exec( e->globalPos() );    
+// }
 
-void DocTreeViewImpl::contextMenuEvent(QContextMenuEvent *e)
-{
-    kdDebug(100200) << "DocTreeViewImpl::contextMenuEvent()" << endl;
 
-    if ( !m_currentItem )
-        return;
-
-    m_contextmenu = m_contextmenuhandler->getPopupMenu( m_currentItem );
-    if ( !m_contextmenu )
-        return;
-
-    m_contextmenu->exec( e->globalPos() );
-}
-
-
 /******************************************
  * Context-Menu functions
  ******************************************/
--- branches/KDE/3.5/kdeaccessibility/ksayit/src/doctreeviewimpl.h #455564:455565
@@ -148,9 +148,16 @@
     void slotItemClicked(QListViewItem *item);
     
     /**
+     * Reimplemented from base class.
+     * Called when the right button was pressed.
+     * \param item The new active item of the TreeView.
+     */
+    void slotRightButtonPressed(QListViewItem *item, const QPoint &pos, int);
+    
+    /**
      * Reimplemented from QWidget class.
      */
-    void contextMenuEvent(QContextMenuEvent *e);
+    // void contextMenuEvent(QContextMenuEvent *e);
 
 private: // Methods
     void recursiveTextCollector(ListViewInterface* item, QTextStream &msg, bool \
                header=true);
--- branches/KDE/3.5/kdeaccessibility/ksayit/src/version.h #455564:455565
@@ -18,6 +18,6 @@
 #ifndef VERSION_H
 #define VERSION_H
 
-const char* KSAYIT_VERSION = " 0.8.3";
+const char* KSAYIT_VERSION = " 0.8.4";
 
 #endif // VERSION_H


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic