summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscene.h
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-08-26 09:02:33 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-08-26 14:18:45 (GMT)
commitda5033d8b48b24580e3b6faf7b4e2a8fe2cec254 (patch)
tree5870b468e418a29a8269bd462e93e54bb0ee5b7b /src/gui/graphicsview/qgraphicsscene.h
parent7e30c92186878beb300a13093c3668ae8a10f2be (diff)
downloadQt-da5033d8b48b24580e3b6faf7b4e2a8fe2cec254.zip
Qt-da5033d8b48b24580e3b6faf7b4e2a8fe2cec254.tar.gz
Qt-da5033d8b48b24580e3b6faf7b4e2a8fe2cec254.tar.bz2
Introduce QGraphicsItem::ItemIsPanel, light-weight window.
ItemIsPanel allows items that act like windows. They can be activated and deactivated just like windows and focus is handled just like with windows. The main difference is that panels are more light-weight. There's less built-in functionality (e.g., clicking a panel doesn't automatically activate nor raise it). This patch also introduces QGraphicsItem::panel(), QGraphicsItem::isPanel(), and QGraphicsItem::isActive(), as well as QGraphicsScene::activePanel(), QGraphicsScene::setActivePanel(). and QGraphicsScene::isActive(). Regular windows (QGraphicsWidgets with Qt::Window set) are also panels, with added functionality. The ItemIsPanel flag is set automatically for windows. Reviewed-by: brad
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.h')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.h b/src/gui/graphicsview/qgraphicsscene.h
index 26cb1c2..9478879 100644
--- a/src/gui/graphicsview/qgraphicsscene.h
+++ b/src/gui/graphicsview/qgraphicsscene.h
@@ -243,6 +243,9 @@ public:
QPalette palette() const;
void setPalette(const QPalette &palette);
+ bool isActive() const;
+ QGraphicsItem *activePanel() const;
+ void setActivePanel(QGraphicsItem *item);
QGraphicsWidget *activeWindow() const;
void setActiveWindow(QGraphicsWidget *widget);