LCOV - code coverage report
Current view: top level - src/notation - inotationselectionrange.h Coverage Total Hit
Test: filtered_coverage.info Lines: 100.0 % 1 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 <vector>
      26              : 
      27              : #include "engraving/types/types.h"
      28              : 
      29              : namespace mu::engraving {
      30              : class EngravingItem;
      31              : class MeasureBase;
      32              : class Part;
      33              : class Segment;
      34              : class Box;
      35              : }
      36              : 
      37              : namespace mu::notation {
      38              : class INotationSelectionRange
      39              : {
      40              : public:
      41           12 :     virtual ~INotationSelectionRange() = default;
      42              : 
      43              :     virtual engraving::staff_idx_t startStaffIndex() const = 0;
      44              :     virtual engraving::Segment* rangeStartSegment() const = 0;
      45              :     virtual engraving::Fraction startTick() const = 0;
      46              :     virtual engraving::Box* rangeStartBox() const = 0;
      47              : 
      48              :     virtual engraving::staff_idx_t endStaffIndex() const = 0;
      49              :     virtual engraving::Segment* rangeEndSegment() const = 0;
      50              :     virtual engraving::Fraction endTick() const = 0;
      51              :     virtual engraving::Box* rangeEndBox() const = 0;
      52              : 
      53              :     struct MeasureBaseRange {
      54              :         engraving::MeasureBase* startMeasureBase = nullptr;
      55              :         engraving::MeasureBase* endMeasureBase = nullptr;
      56              :     };
      57              : 
      58              :     virtual MeasureBaseRange measureBaseRange() const = 0;
      59              : 
      60              :     virtual std::vector<const engraving::Part*> selectedParts() const = 0;
      61              : 
      62              :     virtual std::vector<muse::RectF> boundingArea() const = 0;
      63              :     virtual bool containsPoint(const muse::PointF& point) const = 0;
      64              :     virtual bool containsItem(const engraving::EngravingItem* item, engraving::staff_idx_t staffIdx = muse::nidx) const = 0;
      65              : 
      66              :     virtual bool containsMultiNoteChords() const = 0;
      67              : };
      68              : 
      69              : using INotationSelectionRangePtr = std::shared_ptr<INotationSelectionRange>;
      70              : }
        

Generated by: LCOV version 2.0-1