showMenu(int,int) becomes open(int,int)
This commit is contained in:
parent
64781a6c3a
commit
dbc758db7a
@ -158,7 +158,7 @@ void QMenuProxy::itemTriggered(QAction *action)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMenuProxy::showMenu(int x, int y)
|
void QMenuProxy::open(int x, int y)
|
||||||
{
|
{
|
||||||
m_menu->clear();
|
m_menu->clear();
|
||||||
foreach(QMenuItem* item, m_items) {
|
foreach(QMenuItem* item, m_items) {
|
||||||
@ -188,14 +188,14 @@ void QMenuProxy::open()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!parentItem || !parentItem->scene()) {
|
if (!parentItem || !parentItem->scene()) {
|
||||||
showMenu(0, 0);
|
open(0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QGraphicsView*> views = parentItem->scene()->views();
|
QList<QGraphicsView*> views = parentItem->scene()->views();
|
||||||
|
|
||||||
if (views.size() < 1) {
|
if (views.size() < 1) {
|
||||||
showMenu(0, 0);
|
open(0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,7 +219,7 @@ void QMenuProxy::open()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!view) {
|
if (!view) {
|
||||||
showMenu(0, 0);
|
open(0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
QObject *visualParent() const;
|
QObject *visualParent() const;
|
||||||
void setVisualParent(QObject *parent);
|
void setVisualParent(QObject *parent);
|
||||||
|
|
||||||
Q_INVOKABLE void showMenu(int x, int y);
|
Q_INVOKABLE void open(int x, int y);
|
||||||
Q_INVOKABLE void open();
|
Q_INVOKABLE void open();
|
||||||
Q_INVOKABLE void close();
|
Q_INVOKABLE void close();
|
||||||
Q_INVOKABLE void clearMenuItems();
|
Q_INVOKABLE void clearMenuItems();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user