VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.cpp@ 35740

Last change on this file since 35740 was 28800, checked in by vboxsync, 14 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.9 KB
Line 
1/* $Id: QITreeView.cpp 28800 2010-04-27 08:22:32Z vboxsync $ */
2/** @file
3 *
4 * VBox frontends: Qt GUI ("VirtualBox"):
5 * VirtualBox Qt extensions: QITreeView class implementation
6 */
7
8/*
9 * Copyright (C) 2009 Oracle Corporation
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.virtualbox.org. This file is free software;
13 * you can redistribute it and/or modify it under the terms of the GNU
14 * General Public License (GPL) as published by the Free Software
15 * Foundation, in version 2 as it comes in the "COPYING" file of the
16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 */
19
20/* Global includes */
21#include <QMouseEvent>
22#include <QPainter>
23
24/* Local includes */
25#include "QITreeView.h"
26
27QITreeView::QITreeView (QWidget *aParent)
28 : QTreeView (aParent)
29{
30 setHeaderHidden (true);
31 setRootIsDecorated (false);
32}
33
34void QITreeView::currentChanged (const QModelIndex &aCurrent, const QModelIndex &aPrevious)
35{
36 emit currentItemChanged (aCurrent, aPrevious);
37 QTreeView::currentChanged (aCurrent, aPrevious);
38}
39
40void QITreeView::drawBranches (QPainter *aPainter, const QRect &aRect, const QModelIndex &aIndex) const
41{
42 emit drawItemBranches (aPainter, aRect, aIndex);
43 QTreeView::drawBranches (aPainter, aRect, aIndex);
44}
45
46void QITreeView::mouseMoveEvent (QMouseEvent *aEvent)
47{
48 aEvent->setAccepted (false);
49 emit mouseMoved (aEvent);
50 if (!aEvent->isAccepted())
51 QTreeView::mouseMoveEvent (aEvent);
52}
53
54void QITreeView::mousePressEvent (QMouseEvent *aEvent)
55{
56 aEvent->setAccepted (false);
57 emit mousePressed (aEvent);
58 if (!aEvent->isAccepted())
59 QTreeView::mousePressEvent (aEvent);
60}
61
62void QITreeView::mouseDoubleClickEvent (QMouseEvent *aEvent)
63{
64 aEvent->setAccepted (false);
65 emit mouseDoubleClicked (aEvent);
66 if (!aEvent->isAccepted())
67 QTreeView::mouseDoubleClickEvent (aEvent);
68}
69
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use