]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.h
Dolphin is now a KUniqueApplication. A lot of thanks go to Oscar Blumberg, who submit...
[dolphin.git] / src / dolphincontextmenu.h
index 43e3fca9df4f5af27e2e40eae27b17dd4db330fc..82bc9f24d9ed61ba843793e9d8735482ba5072bb 100644 (file)
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
  ***************************************************************************/
 
 #ifndef DOLPHINCONTEXTMENU_H
 #define DOLPHINCONTEXTMENU_H
 
-#include <qpoint.h>
-#include <qstring.h>
-#include <q3valuelist.h>
-#include <kmountpoint.h>
-#include <q3valuevector.h>
+#include <QString>
+#include <QVector>
+
 #include <kservice.h>
 #include <kpropertiesdialog.h>
 #include <kdedesktopmimetype.h>
 
-class KPopupMenu;
+class KMenu;
 class KFileItem;
 class QPoint;
 class QWidget;
@@ -59,11 +57,9 @@ public:
      * @fileInfo  Pointer to the file item the context menu
      *            is applied. If 0 is passed, the context menu
      *            is above the viewport.
-     * @pos       Position of the upper left edge of the context menu.
      */
     DolphinContextMenu(DolphinView* parent,
-                       KFileItem* fileInfo,
-                       const QPoint& pos);
+                       KFileItem* fileInfo);
 
     virtual ~DolphinContextMenu();
 
@@ -84,8 +80,8 @@ private:
      *                       All succeeding identifiers have an increased value of 1
      *                       to the predecessor.
      */
-    int insertOpenWithItems(KPopupMenu* popup,
-                            Q3ValueVector<KService::Ptr>& openWithVector);
+    QList<QAction*> insertOpenWithItems(KMenu* popup,
+                                        QVector<KService::Ptr>& openWithVector);
 
     /**
      * Inserts the 'Actions...' submenu to \a popup.
@@ -94,26 +90,18 @@ private:
      * @param openWithVector Output parameter which contains all 'Actions...'
      *                       services.
      */
-    void insertActionItems(KPopupMenu* popup,
-                           Q3ValueVector<KDEDesktopMimeType::Service>& actionsVector);
+    QList<QAction*> insertActionItems(KMenu* popup,
+                                      QVector<KDEDesktopMimeType::Service>& actionsVector);
 
     /**
      * Returns true, if 'menu' contains already
      * an entry with the name 'entryName'.
      */
-    bool containsEntry(const KPopupMenu* menu,
+    bool containsEntry(const KMenu* menu,
                        const QString& entryName) const;
 
-    enum {
-        submenuID       =   90,
-        bookmarkID      =   91,
-        openWithIDStart =  100,
-        actionsIDStart  = 1000,
-    };
-
     DolphinView* m_dolphinView;
     KFileItem* m_fileInfo;
-    QPoint m_pos;
 
     struct Entry {
         int type;