# SPDX-License-Identifier: GPL-3.0-only
# MuseScore-Studio-CLA-applies
#
# MuseScore Studio
# Music Composition & Notation
#
# Copyright (C) 2025 MuseScore Limited and others
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

muse_create_qml_module(inspector_qml FOR inspector)

qt_add_qml_module(inspector_qml
    URI MuseScore.Inspector
    VERSION 1.0
    SOURCES
        abstractinspectormodel.cpp
        abstractinspectormodel.h
        abstractinspectorproxymodel.cpp
        abstractinspectorproxymodel.h
        emptystaves/emptystavesvisiblitysettingsmodel.cpp
        emptystaves/emptystavesvisiblitysettingsmodel.h
        general/appearance/appearancesettingsmodel.cpp
        general/appearance/appearancesettingsmodel.h
        general/generalsettingsmodel.cpp
        general/generalsettingsmodel.h
        general/playback/internal/arpeggioplaybackmodel.cpp
        general/playback/internal/arpeggioplaybackmodel.h
        general/playback/internal/breathplaybackmodel.cpp
        general/playback/internal/breathplaybackmodel.h
        general/playback/internal/fermataplaybackmodel.cpp
        general/playback/internal/fermataplaybackmodel.h
        general/playback/internal/glissandoplaybackmodel.cpp
        general/playback/internal/glissandoplaybackmodel.h
        general/playback/internal/gradualtempochangeplaybackmodel.cpp
        general/playback/internal/gradualtempochangeplaybackmodel.h
        general/playback/internal/noteplaybackmodel.cpp
        general/playback/internal/noteplaybackmodel.h
        general/playback/playbackproxymodel.cpp
        general/playback/playbackproxymodel.h
        inspectorlistmodel.cpp
        inspectorlistmodel.h
        inspectormodelcreator.cpp
        inspectormodelcreator.h
        inspectormodelwithvoiceandpositionoptions.cpp
        inspectormodelwithvoiceandpositionoptions.h
        inspectorpopupcontrollermodel.cpp
        inspectorpopupcontrollermodel.h
        measures/measuressettingsmodel.cpp
        measures/measuressettingsmodel.h
        notation/accidentals/accidentalsettingsmodel.cpp
        notation/accidentals/accidentalsettingsmodel.h
        notation/ambituses/ambitussettingsmodel.cpp
        notation/ambituses/ambitussettingsmodel.h
        notation/articulations/articulationsettingsmodel.cpp
        notation/articulations/articulationsettingsmodel.h
        notation/barlines/barlinesettingsmodel.cpp
        notation/barlines/barlinesettingsmodel.h
        notation/beams/beammodesmodel.cpp
        notation/beams/beammodesmodel.h
        notation/bends/bendgridcanvas.cpp
        notation/bends/bendgridcanvas.h
        notation/bends/bendsettingsmodel.cpp
        notation/bends/bendsettingsmodel.h
        notation/brackets/bracketsettingsmodel.cpp
        notation/brackets/bracketsettingsmodel.h
        notation/chordsymbols/chordsymbolsettingsmodel.cpp
        notation/chordsymbols/chordsymbolsettingsmodel.h
        notation/clefs/clefsettingsmodel.cpp
        notation/clefs/clefsettingsmodel.h
        notation/dynamics/dynamicsettingsmodel.cpp
        notation/dynamics/dynamicsettingsmodel.h
        notation/expressions/expressionsettingsmodel.cpp
        notation/expressions/expressionsettingsmodel.h
        notation/fermatas/fermatasettingsmodel.cpp
        notation/fermatas/fermatasettingsmodel.h
        notation/frames/fretframe/fretframechorditem.cpp
        notation/frames/fretframe/fretframechorditem.h
        notation/frames/fretframe/fretframechordlistmodel.cpp
        notation/frames/fretframe/fretframechordlistmodel.h
        notation/frames/fretframe/fretframechordssettingsmodel.cpp
        notation/frames/fretframe/fretframechordssettingsmodel.h
        notation/frames/fretframe/fretframesettingsmodel.cpp
        notation/frames/fretframe/fretframesettingsmodel.h
        notation/frames/fretframesettingsproxymodel.cpp
        notation/frames/fretframesettingsproxymodel.h
        notation/frames/horizontalframesettingsmodel.cpp
        notation/frames/horizontalframesettingsmodel.h
        notation/frames/textframesettingsmodel.cpp
        notation/frames/textframesettingsmodel.h
        notation/frames/verticalframesettingsmodel.cpp
        notation/frames/verticalframesettingsmodel.h
        notation/fretdiagrams/fretdiagramsettingsmodel.cpp
        notation/fretdiagrams/fretdiagramsettingsmodel.h
        notation/fretdiagrams/internal/fretcanvas.cpp
        notation/fretdiagrams/internal/fretcanvas.h
        notation/images/imagesettingsmodel.cpp
        notation/images/imagesettingsmodel.h
        notation/instrumentname/instrumentnamesettingsmodel.cpp
        notation/instrumentname/instrumentnamesettingsmodel.h
        notation/jumps/jumpsettingsmodel.cpp
        notation/jumps/jumpsettingsmodel.h
        notation/keysignatures/keysignaturesettingsmodel.cpp
        notation/keysignatures/keysignaturesettingsmodel.h
        notation/lines/glissandosettingsmodel.cpp
        notation/lines/glissandosettingsmodel.h
        notation/lines/gradualtempochangesettingsmodel.cpp
        notation/lines/gradualtempochangesettingsmodel.h
        notation/lines/hairpinlinesettingsmodel.cpp
        notation/lines/hairpinlinesettingsmodel.h
        notation/lines/hairpinsettingsmodel.cpp
        notation/lines/hairpinsettingsmodel.h
        notation/lines/notelinesettingsmodel.cpp
        notation/lines/notelinesettingsmodel.h
        notation/lines/ottavasettingsmodel.cpp
        notation/lines/ottavasettingsmodel.h
        notation/lines/pedalsettingsmodel.cpp
        notation/lines/pedalsettingsmodel.h
        notation/lines/slurandtiesettingsmodel.cpp
        notation/lines/slurandtiesettingsmodel.h
        notation/lines/chordbracketsettingsmodel.cpp
        notation/lines/chordbracketsettingsmodel.h
        notation/lines/textlinesettingsmodel.cpp
        notation/lines/textlinesettingsmodel.h
        notation/lines/vibratosettingsmodel.cpp
        notation/lines/vibratosettingsmodel.h
        notation/lines/voltasettingsmodel.cpp
        notation/lines/voltasettingsmodel.h
        notation/lines/lyricslinesettingsmodel.cpp
        notation/lines/lyricslinesettingsmodel.h
        notation/lyrics/lyricssettingsmodel.cpp
        notation/lyrics/lyricssettingsmodel.h
        notation/markers/markersettingsmodel.cpp
        notation/markers/markersettingsmodel.h
        notation/measurerepeats/measurerepeatsettingsmodel.cpp
        notation/measurerepeats/measurerepeatsettingsmodel.h
        notation/mmrests/mmrestsettingsmodel.cpp
        notation/mmrests/mmrestsettingsmodel.h
        notation/notationsettingsproxymodel.cpp
        notation/notationsettingsproxymodel.h
        notation/notes/beams/beamsettingsmodel.cpp
        notation/notes/beams/beamsettingsmodel.h
        notation/notes/chords/chordsettingsmodel.cpp
        notation/notes/chords/chordsettingsmodel.h
        notation/notes/hooks/hooksettingsmodel.cpp
        notation/notes/hooks/hooksettingsmodel.h
        notation/notes/noteheads/noteheadgroupsmodel.cpp
        notation/notes/noteheads/noteheadgroupsmodel.h
        notation/notes/noteheads/noteheadsettingsmodel.cpp
        notation/notes/noteheads/noteheadsettingsmodel.h
        notation/notes/notesettingsproxymodel.cpp
        notation/notes/notesettingsproxymodel.h
        notation/notes/stems/stemsettingsmodel.cpp
        notation/notes/stems/stemsettingsmodel.h
        notation/ornaments/ornamentsettingsmodel.cpp
        notation/ornaments/ornamentsettingsmodel.h
        notation/playcounttext/playcounttextsettingsmodel.cpp
        notation/playcounttext/playcounttextsettingsmodel.h
        notation/rests/beams/restbeamsettingsmodel.cpp
        notation/rests/beams/restbeamsettingsmodel.h
        notation/rests/restsettingsmodel.cpp
        notation/rests/restsettingsmodel.h
        notation/rests/restsettingsproxymodel.cpp
        notation/rests/restsettingsproxymodel.h
        notation/sectionbreaks/sectionbreaksettingsmodel.cpp
        notation/sectionbreaks/sectionbreaksettingsmodel.h
        notation/spacers/spacersettingsmodel.cpp
        notation/spacers/spacersettingsmodel.h
        notation/stafftype/stafftypesettingsmodel.cpp
        notation/stafftype/stafftypesettingsmodel.h
        notation/stringtunings/stringtuningssettingsmodel.cpp
        notation/stringtunings/stringtuningssettingsmodel.h
        notation/symbols/symbolsettingsmodel.cpp
        notation/symbols/symbolsettingsmodel.h
        notation/tempos/temposettingsmodel.cpp
        notation/tempos/temposettingsmodel.h
        notation/timesignatures/timesignaturesettingsmodel.cpp
        notation/timesignatures/timesignaturesettingsmodel.h
        notation/tremolobars/gridcanvas.cpp
        notation/tremolobars/gridcanvas.h
        notation/tremolobars/tremolobarsettingsmodel.cpp
        notation/tremolobars/tremolobarsettingsmodel.h
        notation/tremolos/tremolosettingsmodel.cpp
        notation/tremolos/tremolosettingsmodel.h
        notation/tuplets/tupletsettingsmodel.cpp
        notation/tuplets/tupletsettingsmodel.h
        parts/partssettingsmodel.cpp
        parts/partssettingsmodel.h
        pointfpropertyitem.cpp
        pointfpropertyitem.h
        propertyitem.cpp
        propertyitem.h
        score/internal/pagetypelistmodel.cpp
        score/internal/pagetypelistmodel.h
        score/scoreappearancesettingsmodel.cpp
        score/scoreappearancesettingsmodel.h
        score/scoredisplaysettingsmodel.cpp
        score/scoredisplaysettingsmodel.h
        text/textsettingsmodel.cpp
        text/textsettingsmodel.h
        text/textstylepopup/textstylepopupmodel.cpp
        text/textstylepopup/textstylepopupmodel.h
        internal/iinspectorpopupcontroller.h
        internal/inspectorpopupcontroller.cpp
        internal/inspectorpopupcontroller.h
        types/accidentaltypes.h
        types/ambitustypes.h
        types/articulationtypes.h
        types/barlinetypes.h
        types/beamtypes.h
        types/bendtypes.h
        types/chordsymboltypes.h
        types/commontypes.h
        types/directiontypes.h
        types/dynamictypes.h
        types/fretdiagramtypes.h
        types/glissandotypes.h
        types/hairpintypes.h
        types/keysignaturetypes.h
        types/linetypes.h
        types/markertypes.h
        types/noteheadtypes.h
        types/ornamenttypes.h
        types/slurtietypes.h
        types/texttypes.h
        types/tremolobartypes.h
        types/tremolotypes.h
        types/voicetypes.h

    QML_FILES
        common/CheckBoxPropertyView.qml
        common/ColorSection.qml
        common/DirectionSection.qml
        common/DropdownPropertyView.qml
        common/FlatRadioButtonGroupPropertyView.qml
        common/FrameSettings.qml
        common/InspectorPropertyView.qml
        common/InspectorSectionView.qml
        common/InspectorTabBar.qml
        common/InspectorTabButton.qml
        common/OffsetSection.qml
        common/PlacementSection.qml
        common/PopupViewButton.qml
        common/PropertyCheckBox.qml
        common/PropertyResetButton.qml
        common/PropertyToggle.qml
        common/SpinBoxPropertyView.qml
        common/TextSection.qml
        common/VoicesAndPositionSection.qml
        emptystaves/EmptyStavesVisibilityInspectorView.qml
        general/appearance/AppearanceSettings.qml
        general/appearance/internal/AppearanceOffsetSection.qml
        general/appearance/internal/ArrangeSection.qml
        general/appearance/internal/HorizontalSpacingSection.qml
        general/appearance/internal/VerticalSpacingSection.qml
        general/GeneralInspectorView.qml
        general/playback/internal/ArpeggioExpandableBlank.qml
        general/playback/internal/BreathExpandableBlank.qml
        general/playback/internal/FermataExpandableBlank.qml
        general/playback/internal/GlissandoExpandableBlank.qml
        general/playback/internal/GradualTempoChangeBlank.qml
        general/playback/internal/NoteExpandableBlank.qml
        general/playback/PlaybackSettings.qml
        InspectorForm.qml
        InspectorSectionDelegate.qml
        measures/InsertMeasuresPopup.qml
        measures/MeasuresInspectorView.qml
        notation/accidentals/AccidentalSettings.qml
        notation/ambituses/AmbitusSettings.qml
        notation/articulations/ArticulationSettings.qml
        notation/barlines/BarlineSettings.qml
        notation/beams/BeamTypeSelector.qml
        notation/bends/BendSettings.qml
        notation/brackets/BracketSettings.qml
        notation/chordsymbols/ChordSymbolSettings.qml
        notation/clefs/ClefSettings.qml
        notation/dynamics/DynamicsSettings.qml
        notation/expressions/ExpressionSettings.qml
        notation/fermatas/FermataSettings.qml
        notation/frames/FretFrameSettings.qml
        notation/frames/HorizontalFrameSettings.qml
        notation/frames/internal/FretFrameAlignmentSection.qml
        notation/frames/internal/FretFrameChordsControlPanel.qml
        notation/frames/internal/FretFrameChordsTab.qml
        notation/frames/internal/FretFrameChordsView.qml
        notation/frames/internal/FretFrameGapsSection.qml
        notation/frames/internal/FretFrameScalesSection.qml
        notation/frames/internal/FretFrameSettingsTab.qml
        notation/frames/internal/HorizontalGapsSection.qml
        notation/frames/internal/HorizontalMarginsSection.qml
        notation/frames/internal/VerticalGapsSection.qml
        notation/frames/internal/VerticalMarginsSection.qml
        notation/frames/TextFrameSettings.qml
        notation/frames/VerticalFrameSettings.qml
        notation/fretdiagrams/FretDiagramSettings.qml
        notation/fretdiagrams/internal/FretAdvancedSettingsTab.qml
        notation/fretdiagrams/internal/FretDiagramTabPanel.qml
        notation/fretdiagrams/internal/FretGeneralSettingsTab.qml
        notation/images/ImageSettings.qml
        notation/instrumentname/InstrumentNameSettings.qml
        notation/jumps/JumpSettings.qml
        notation/keysignatures/KeySignatureSettings.qml
        notation/lines/GlissandoSettings.qml
        notation/lines/GradualTempoChangeSettings.qml
        notation/lines/HairpinLineSettings.qml
        notation/lines/internal/CrescDimLineStyleSettings.qml
        notation/lines/internal/GradualTempoChangePositionSettingsTab.qml
        notation/lines/internal/GradualTempoChangeStyleTab.qml
        notation/lines/internal/HairpinPositionSettingsTab.qml
        notation/lines/internal/HairpinStyleSettings.qml
        notation/lines/internal/HooksSection.qml
        notation/lines/internal/HooksAndArrowsSection.qml
        notation/lines/internal/LineStyleSection.qml
        notation/lines/internal/LineTextSettingsTab.qml
        notation/lines/internal/LineWithHooksCommonStyleSettings.qml
        notation/lines/internal/OttavaStyleSettings.qml
        notation/lines/internal/PedalStyleSettings.qml
        notation/lines/internal/VoltaStyleSettings.qml
        notation/lines/LineSettings.qml
        notation/lines/SlurAndTieSettings.qml
        notation/lines/ChordBracketSettings.qml
        notation/lines/VibratoSettings.qml
        notation/lines/LyricsLineSettings.qml
        notation/lyrics/LyricsSettings.qml
        notation/markers/MarkerSettings.qml
        notation/measurerepeats/MeasureRepeatSettings.qml
        notation/mmrests/MMRestSettings.qml
        notation/NotationInspectorSectionLoader.qml
        notation/NotationMultiElementView.qml
        notation/NotationSingleElementView.qml
        notation/notes/beams/BeamSettings.qml
        notation/notes/internal/NoteheadGroupSelector.qml
        notation/notes/internal/NoteheadTypeSelector.qml
        notation/notes/noteheads/HeadSettings.qml
        notation/notes/NoteSettings.qml
        notation/notes/stems/StemSettings.qml
        notation/ornaments/OrnamentSettings.qml
        notation/playcounttext/PlayCountSettings.qml
        notation/rests/beams/RestBeamSettings.qml
        notation/rests/RestSettings.qml
        notation/sectionbreaks/SectionBreakSettings.qml
        notation/spacers/SpacerSettings.qml
        notation/stafftype/StaffTypeSettings.qml
        notation/stringtunings/StringTuningsSettings.qml
        notation/symbols/SymbolSettings.qml
        notation/tempos/TempoRestorePreviousSettings.qml
        notation/tempos/TempoSettings.qml
        notation/timesignatures/TimeSignatureSettings.qml
        notation/tremolobars/TremoloBarSettings.qml
        notation/tremolos/TremoloSettings.qml
        notation/tuplets/TupletSettings.qml
        parts/PartsSettings.qml
        score/HideEmptyStavesSettings.qml
        score/ScoreAppearanceInspectorView.qml
        score/ScoreDisplayInspectorView.qml
        text/TextInspectorView.qml
        text/TextSettings.qml
        text/textstylepopup/FrameSubPopup.qml
        text/textstylepopup/TextStylePopup.qml
        text/textstylepopup/TextStyleSubPopup.qml

    IMPORTS
        QtQuick
        TARGET muse_ui_qml
        TARGET muse_uicomponents_qml
)

fixup_qml_module_dependencies(inspector_qml)

# Necessary for the auto-generated sources
target_include_directories(inspector_qml PRIVATE
    emptystaves
    general
    general/appearance
    general/playback
    general/playback/internal
    measures
    notation
    notation/accidentals
    notation/ambituses
    notation/articulations
    notation/barlines
    notation/beams
    notation/bends
    notation/brackets
    notation/chordsymbols
    notation/clefs
    notation/dynamics
    notation/expressions
    notation/fermatas
    notation/frames
    notation/frames/fretframe
    notation/fretdiagrams
    notation/fretdiagrams/internal
    notation/images
    notation/instrumentname
    notation/jumps
    notation/keysignatures
    notation/lines
    notation/lyrics
    notation/markers
    notation/measurerepeats
    notation/mmrests
    notation/notes
    notation/notes/beams
    notation/notes/chords
    notation/notes/hooks
    notation/notes/noteheads
    notation/notes/stems
    notation/ornaments
    notation/playcounttext
    notation/rests
    notation/rests/beams
    notation/sectionbreaks
    notation/spacers
    notation/stafftype
    notation/stringtunings
    notation/symbols
    notation/tempos
    notation/timesignatures
    notation/tremolobars
    notation/tremolos
    notation/tuplets
    parts
    score
    score/internal
    text
    text/textstylepopup
    types
)
