Plasma
Go to the documentation of this file.
23 #include <QGraphicsScene>
24 #include <QGraphicsView>
95 if (!item || !item->scene()) {
101 if (view->sceneRect().intersects(item->sceneBoundingRect()) ||
102 view->sceneRect().contains(item->scenePos())) {
103 if (!found || view->isActiveWindow()) {
117 foreach (QAction *action, menu->actions()) {
118 if (QMenu *submenu = action->menu()) {
121 }
else if (!action->isSeparator() && action->isEnabled()) {
122 QString text = action->text();
123 if (action->isCheckable()) {
124 if (action->isChecked()) {
125 text = QString(
"(%1) %2").arg(QChar(0x2613)).arg(text);
127 text = QString(
"( ) %1").arg(text);
131 if (!prefix.isEmpty()) {
132 text = QString(
"%1: %2").arg(prefix).arg(text);
134 text = text.replace(QRegExp(
"&([\\S])"),
"\\1");
136 QAction *a =
new QAction(action->icon(), text, parent);
138 QObject::connect(a, SIGNAL(triggered(
bool)), action, SIGNAL(triggered(
bool)));
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 11:44:58 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.