[Kst] branches/work/kst/portto4/kst/src/libkstapp

Adam Treat treat at kde.org
Thu Mar 1 23:32:08 CET 2007


SVN commit 638422 by treat:

* KPopupMenu is no longer


 M  +2 -2      kst.cpp  
 M  +10 -10    kst2dplot.cpp  
 M  +2 -2      kst2dplot.h  
 M  +4 -4      kstplotgroup.cpp  
 M  +2 -2      kstplotgroup.h  
 M  +7 -7      ksttoplevelview.cpp  
 M  +2 -2      ksttoplevelview.h  
 M  +1 -1      kstviewlabel.cpp  
 M  +1 -1      kstviewlabel.h  
 M  +1 -1      kstviewlegend.cpp  
 M  +1 -1      kstviewlegend.h  
 M  +4 -4      kstviewobject.cpp  
 M  +3 -3      kstviewobject.h  
 M  +1 -1      kstviewwidget.cpp  
 M  +1 -1      kstviewwidget.h  


--- branches/work/kst/portto4/kst/src/libkstapp/kst.cpp #638421:638422
@@ -2615,7 +2615,7 @@
 
 
 void KstApp::showContextMenu(QWidget *w, const QPoint& pos) {
-  KPopupMenu *pm = new KPopupMenu(this);
+  KMenu *pm = new KMenu(this);
   KstViewWindow *vw = dynamic_cast<KstViewWindow*>(w);
   if (vw) {
     pm->insertTitle(vw->caption());
@@ -2640,7 +2640,7 @@
 
 
 void KstApp::showContextMenu(const QPoint& pos) {
-  KPopupMenu *pm = new KPopupMenu(this);
+  KMenu *pm = new KMenu(this);
   pm->insertItem(i18n("&New..."), this, SLOT(slotFileNewWindow()));
   pm->exec(pos);
   delete pm;
--- branches/work/kst/portto4/kst/src/libkstapp/kst2dplot.cpp #638421:638422
@@ -3433,7 +3433,7 @@
 }
 
 
-bool Kst2DPlot::popupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent) {
+bool Kst2DPlot::popupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent) {
   bool hasEntry = false;
   KstMouseModeType mode;
 
@@ -3443,8 +3443,8 @@
   _menuView = tlv ? tlv->widget() : 0L;
   KstViewObject::popupMenu(menu, pos, topLevelParent);
 
-  KPopupMenu *submenu = new KPopupMenu(menu);
-  KPopupMenu *submenu2 = new KPopupMenu(menu);
+  KMenu *submenu = new KMenu(menu);
+  KMenu *submenu2 = new KMenu(menu);
   Kst2DPlotList pl = globalPlotList();
   int i = 0;
   _plotMap.clear();
@@ -3466,7 +3466,7 @@
   menu->setItemEnabled(id, hasEntry);
   hasEntry = false;
 
-  submenu = new KPopupMenu(menu);
+  submenu = new KMenu(menu);
   menu->insertItem(i18n("Z&oom"), submenu);
   submenu->insertItem(i18n("Zoom &Maximum"), this, SLOT(menuZoomMax()), Qt::Key_M);
   submenu->insertItem(i18n("Zoom Max &Spike Insensitive"),
@@ -3501,7 +3501,7 @@
   submenu->insertItem(i18n("Next &Image Color Scale"),
                       this, SLOT(menuNextImageColorScale()), Qt::Key_I);
   
-  submenu = new KPopupMenu(menu);
+  submenu = new KMenu(menu);
   menu->insertItem(i18n("&Scroll"), submenu);
   submenu->insertItem(i18n("Left"), this, SLOT(menuMoveLeft()), Qt::Key_Left);
   submenu->insertItem(i18n("Right"), this, SLOT(menuMoveRight()), Qt::Key_Right);
@@ -3538,13 +3538,13 @@
   _curveRemoveMap.clear();
 
   // Edit menu
-  submenu = new KPopupMenu(menu);
+  submenu = new KMenu(menu);
   // Fit menu
-  KPopupMenu *submenu4 = new KPopupMenu(menu);
+  KMenu *submenu4 = new KMenu(menu);
   // Filter menu
-  submenu2 = new KPopupMenu(menu);
+  submenu2 = new KMenu(menu);
   // Remove menu
-  KPopupMenu *submenu3 = new KPopupMenu(menu);
+  KMenu *submenu3 = new KMenu(menu);
   hasEntry = false;
   for (i = 0; i < n_curves; i++) {
     KstBaseCurvePtr c = Curves[i];
@@ -3614,7 +3614,7 @@
 }
 
 
-bool Kst2DPlot::layoutPopupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent) {
+bool Kst2DPlot::layoutPopupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent) {
   KstTopLevelViewPtr tlv = kst_cast<KstTopLevelView>(topLevelParent);
   _layoutMenuView = tlv ? tlv->widget() : 0L;
   KstViewObject::layoutPopupMenu(menu, pos, topLevelParent);
--- branches/work/kst/portto4/kst/src/libkstapp/kst2dplot.h #638421:638422
@@ -118,8 +118,8 @@
   virtual void save(QTextStream& ts, const QString& indent = QString::null);
   virtual void saveAttributes(QTextStream& ts, const QString& indent = QString::null);
   
-  virtual bool popupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent);
-  virtual bool layoutPopupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent);
+  virtual bool popupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent);
+  virtual bool layoutPopupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent);
 
   void drawGraphicSelectionAt(QPainter& p, const QPoint& pos);
   void drawDotAt(QPainter& p, double x, double y);
--- branches/work/kst/portto4/kst/src/libkstapp/kstplotgroup.cpp #638421:638422
@@ -165,11 +165,11 @@
 }
 
 
-bool KstPlotGroup::popupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topParent) {
+bool KstPlotGroup::popupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topParent) {
   KstMetaPlot::popupMenu(menu, pos, topParent);
   KstViewObjectPtr c = findChild(pos + position());
   if (c) {
-    KPopupMenu *s = new KPopupMenu(menu);
+    KMenu *s = new KMenu(menu);
     if (c->popupMenu(s, pos - c->position(), topParent)) {
       menu->insertItem(c->tagName(), s);
     } else {
@@ -180,12 +180,12 @@
 }
 
 
-bool KstPlotGroup::layoutPopupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topParent) {
+bool KstPlotGroup::layoutPopupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topParent) {
   KstMetaPlot::layoutPopupMenu(menu, pos, topParent);
   menu->insertItem(i18n("&Ungroup"), this, SLOT(flatten()));
   KstViewObjectPtr c = findChild(pos + position());
   if (c) {
-    KPopupMenu *s = new KPopupMenu(menu);
+    KMenu *s = new KMenu(menu);
     if (c->layoutPopupMenu(s, pos - c->position(), topParent)) {
       menu->insertItem(c->tagName(), s);
     } else {
--- branches/work/kst/portto4/kst/src/libkstapp/kstplotgroup.h #638421:638422
@@ -32,8 +32,8 @@
     void save(QTextStream& ts, const QString& indent = QString::null);
 
     bool removeChild(KstViewObjectPtr obj, bool recursive = false);
-    bool popupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent);
-    bool layoutPopupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topParent);
+    bool popupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent);
+    bool layoutPopupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topParent);
 
     void setTransparent(bool transparent);
     bool transparent() const;
--- branches/work/kst/portto4/kst/src/libkstapp/ksttoplevelview.cpp #638421:638422
@@ -1054,7 +1054,7 @@
 }
 
 
-bool KstTopLevelView::popupMenu(KPopupMenu *menu, const QPoint& pos) {
+bool KstTopLevelView::popupMenu(KMenu *menu, const QPoint& pos) {
   bool rc = false;
   // Want to clear focus without repaint
   _pressTarget = findDeepestChild(pos, false);
@@ -1092,7 +1092,7 @@
         menu->insertSeparator();
       }
 
-      KPopupMenu *subMenu;
+      KMenu *subMenu;
       int         numPlots = 0;
       int         id;
       
@@ -1104,7 +1104,7 @@
           }
         }
       }
-      subMenu = new KPopupMenu(menu);
+      subMenu = new KMenu(menu);
       subMenu->insertItem(i18n("X-axis"), this, SLOT(condenseXAxis()));
       subMenu->insertItem(i18n("Y-axis"), this, SLOT(condenseYAxis()));
       id = menu->insertItem(i18n("Condense selected"), subMenu);
@@ -1112,20 +1112,20 @@
         menu->setItemEnabled(id, false);
       }
       
-      subMenu = new KPopupMenu(menu);
+      subMenu = new KMenu(menu);
       subMenu->insertItem(i18n("Width"), this, SLOT(makeSameWidth()));
       subMenu->insertItem(i18n("Height"), this, SLOT(makeSameHeight()));
       subMenu->insertItem(i18n("Size"), this, SLOT(makeSameSize()));
       menu->insertItem(i18n("Make Same"), subMenu);
 
-      subMenu = new KPopupMenu(menu);
+      subMenu = new KMenu(menu);
       subMenu->insertItem(i18n("Left"), this, SLOT(alignLeft()));
       subMenu->insertItem(i18n("Right"), this, SLOT(alignRight()));
       subMenu->insertItem(i18n("Top"), this, SLOT(alignTop()));
       subMenu->insertItem(i18n("Bottom"), this, SLOT(alignBottom()));
       menu->insertItem(i18n("Align"), subMenu);
 
-      subMenu = new KPopupMenu(menu);
+      subMenu = new KMenu(menu);
       subMenu->insertItem(i18n("Horizontally"), this, SLOT(packHorizontally()));
       subMenu->insertItem(i18n("Vertically"), this, SLOT(packVertically()));
       menu->insertItem(i18n("Pack"), subMenu);
@@ -1139,7 +1139,7 @@
   if (rc) {
     menu->insertSeparator();
   }
-  KPopupMenu *subMenu = new KPopupMenu(menu);
+  KMenu *subMenu = new KMenu(menu);
   subMenu->insertItem(i18n("Default Tile"), this, SLOT(cleanupDefault()));
   subMenu->insertItem(i18n("Custom..."), this, SLOT(cleanupCustom()));
   menu->insertItem(i18n("Cleanup Layout"), subMenu);
--- branches/work/kst/portto4/kst/src/libkstapp/ksttoplevelview.h #638421:638422
@@ -25,7 +25,7 @@
 
 #include "kstviewobject.h"
 
-class KPopupMenu;
+class KMenu;
 class KstGfxMouseHandler;
 class KstViewWidget;
 
@@ -125,7 +125,7 @@
     void releasePressLayoutModeCenteredResize(const QPoint& pos, bool shift = false);
 
     void setCursorFor(const QPoint& pos, KstViewObjectPtr p);
-    bool popupMenu(KPopupMenu *menu, const QPoint& pos);
+    bool popupMenu(KMenu *menu, const QPoint& pos);
     void correctPosition(KstViewObjectPtr pObject, QPoint point);
     QRect newSize(const QRect& originalSize, const QRect& bounds, int direction, const QPoint& pos, bool maintainAspect = false);
     QRect newSizeCentered(const QRect& oldSize, const QRect& bounds, const QPoint& pos, bool maintainAspect);
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewlabel.cpp #638421:638422
@@ -533,7 +533,7 @@
 }
 
 
-bool KstViewLabel::layoutPopupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent) {
+bool KstViewLabel::layoutPopupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent) {
   KstViewObject::layoutPopupMenu(menu, pos, topLevelParent);
   return true;
 }
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewlabel.h #638421:638422
@@ -107,7 +107,7 @@
 
   protected:
     KstViewObjectFactoryMethod factory() const;
-    bool layoutPopupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent);
+    bool layoutPopupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent);
     void readBinary(QDataStream& str);
     void writeBinary(QDataStream& str);
 
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewlegend.cpp #638421:638422
@@ -504,7 +504,7 @@
   setDirty();
 }
 
-bool KstViewLegend::layoutPopupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent) {
+bool KstViewLegend::layoutPopupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent) {
   return KstViewObject::layoutPopupMenu(menu, pos, topLevelParent);
 }
 
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewlegend.h #638421:638422
@@ -104,7 +104,7 @@
 
   protected:
     KstViewObjectFactoryMethod factory() const;
-    bool layoutPopupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent);
+    bool layoutPopupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topLevelParent);
     void readBinary(QDataStream& str);
     void writeBinary(QDataStream& str);
 
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewobject.cpp #638421:638422
@@ -1097,7 +1097,7 @@
 }
 
 
-bool KstViewObject::popupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topParent) {
+bool KstViewObject::popupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topParent) {
   Q_UNUSED(pos)
   bool rc = false;
   int id;
@@ -1152,7 +1152,7 @@
 }
 
 
-bool KstViewObject::layoutPopupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topParent) {
+bool KstViewObject::layoutPopupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topParent) {
   Q_UNUSED(pos)
 
   _topObjectForMenu = topParent;
@@ -1223,7 +1223,7 @@
     int i = 0;
     bool hasEntry = false;
 
-    KPopupMenu *submenu = new KPopupMenu(menu);
+    KMenu *submenu = new KMenu(menu);
 
     id = menu->insertItem(i18n("&Move To"), submenu);
 
@@ -1252,7 +1252,7 @@
     int i = 0;
     bool hasEntry = false;
 
-    KPopupMenu *submenu = new KPopupMenu(menu);
+    KMenu *submenu = new KMenu(menu);
 
     id = menu->insertItem(i18n("&Copy To"), submenu);
 
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewobject.h #638421:638422
@@ -39,7 +39,7 @@
 #include "kstpainter.h"
 #include "kst_export.h"
 
-class KPopupMenu;
+class KMenu;
 class KstGfxMouseHandler;
 class KstViewObject;
 class KstViewWidget;
@@ -175,8 +175,8 @@
     // note also: self=false
     template<class U> void forEachChild2(void (U::*)());
 
-    virtual bool popupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topParent);
-    virtual bool layoutPopupMenu(KPopupMenu *menu, const QPoint& pos, KstViewObjectPtr topParent);
+    virtual bool popupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topParent);
+    virtual bool layoutPopupMenu(KMenu *menu, const QPoint& pos, KstViewObjectPtr topParent);
 
     // FIXME: split into layout and non-layout?
     enum StandardActions { Delete =          0x1,
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewwidget.cpp #638421:638422
@@ -341,7 +341,7 @@
     e->ignore();
     return;
   }
-  _menu = new KPopupMenu(this);
+  _menu = new KMenu(this);
   //qDebug() << "Querying for the popup" << endl;
   bool rc = _view->popupMenu(_menu, e->pos());
   if (rc && _menu->count() > 0) {
--- branches/work/kst/portto4/kst/src/libkstapp/kstviewwidget.h #638421:638422
@@ -85,7 +85,7 @@
     QPointer<KstViewObject> _vo_datamode;
     bool _dropEnabled : 1;
     bool _dragEnabled : 1;
-    QPointer<KPopupMenu> _menu;
+    QPointer<KMenu> _menu;
     Q3DragObject *_drag;
 };
 


More information about the Kst mailing list