LCOV - code coverage report
Current view: top level - src/engraving/dom - rootitem.h Coverage Total Hit
Test: filtered_coverage.info Lines: 20.0 % 5 1
Test Date: 2026-11-05 04:07:02

            Line data    Source code
       1              : /*
       2              :  * SPDX-License-Identifier: GPL-3.0-only
       3              :  * MuseScore-Studio-CLA-applies
       4              :  *
       5              :  * MuseScore Studio
       6              :  * Music Composition & Notation
       7              :  *
       8              :  * Copyright (C) 2021 MuseScore Limited and others
       9              :  *
      10              :  * This program is free software: you can redistribute it and/or modify
      11              :  * it under the terms of the GNU General Public License version 3 as
      12              :  * published by the Free Software Foundation.
      13              :  *
      14              :  * This program is distributed in the hope that it will be useful,
      15              :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16              :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17              :  * GNU General Public License for more details.
      18              :  *
      19              :  * You should have received a copy of the GNU General Public License
      20              :  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
      21              :  */
      22              : 
      23              : #pragma once
      24              : 
      25              : #include "engravingitem.h"
      26              : 
      27              : namespace mu::engraving {
      28              : class Score;
      29              : 
      30              : //! Sits above the pages, which are the top of the visual hierarchy. It takes no part in
      31              : //! that hierarchy - nothing is laid out inside it - and exists only to head an
      32              : //! accessibility tree; see EngravingItem::accessibleChildren().
      33              : class RootItem : public EngravingItem
      34              : {
      35         8858 :     OBJECT_ALLOCATOR(engraving, RootItem)
      36              : public:
      37              :     //! Which tree this one heads: the score's own, or the one formed by the objects
      38              :     //! parked on the dummy, which are not part of the score.
      39              :     enum class Kind {
      40              :         Score,
      41              :         Dummy
      42              :     };
      43              : 
      44              :     RootItem(Score* score, Kind kind);
      45              : 
      46              :     void init();
      47              : 
      48              :     //! The top of a tree has no parent within it.
      49            0 :     EngravingItem* accessibleParentItem() const override { return nullptr; }
      50              :     EngravingItemList accessibleChildren() const override;
      51              : 
      52            0 :     EngravingItem* clone() const override { return nullptr; }
      53            0 :     PropertyValue getProperty(Pid) const override { return PropertyValue(); }
      54            0 :     bool setProperty(Pid, const PropertyValue&) override { return false; }
      55              : 
      56              : private:
      57              : 
      58              : #ifndef ENGRAVING_NO_ACCESSIBILITY
      59              :     AccessibleItemPtr createAccessible() override;
      60              : #endif
      61              : 
      62              :     Kind m_kind = Kind::Score;
      63              : };
      64              : }
        

Generated by: LCOV version 2.0-1