LCOV - code coverage report
Current view: top level - muse/framework/global - iapplication.h Coverage Total Hit
Test: filtered_coverage.info Lines: 66.7 % 3 2
Test Date: 2026-11-05 04:07:02

            Line data    Source code
       1              : /*
       2              :  * SPDX-License-Identifier: GPL-3.0-only
       3              :  * MuseScore-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              : #ifndef MUSE_GLOBAL_IAPPLICATION_H
      23              : #define MUSE_GLOBAL_IAPPLICATION_H
      24              : 
      25              : #include "modularity/imoduleinterface.h"
      26              : 
      27              : #include "types/string.h"
      28              : #include "types/version.h"
      29              : #include "modularity/ioc.h"
      30              : 
      31              : #ifndef NO_QT_SUPPORT
      32              : class QObject;
      33              : class QEvent;
      34              : class QWindow;
      35              : #endif
      36              : 
      37              : namespace muse {
      38              : class IApplication : MODULE_GLOBAL_INTERFACE
      39              : {
      40         3980 :     INTERFACE_ID(IApplication)
      41              : public:
      42          199 :     virtual ~IApplication() = default;
      43              : 
      44              :     enum class RunMode {
      45              :         GuiApp,
      46              :         ConsoleApp,
      47              :         AudioPluginRegistration,
      48              :     };
      49              : 
      50              :     enum FinishMode {
      51              :         Default,
      52              :         Restart
      53              :     };
      54              : 
      55              :     virtual String name() const = 0;
      56              :     virtual String title() const = 0;
      57              : 
      58              :     virtual bool unstable() const = 0;
      59              :     virtual Version version() const = 0;
      60              :     virtual Version fullVersion() const = 0; // with suffix
      61              :     virtual String build() const = 0;
      62              :     virtual String revision() const = 0;
      63              : 
      64              :     virtual RunMode runMode() const = 0;
      65              :     virtual bool noGui() const = 0;
      66              : 
      67            0 :     virtual void showSplash() {}
      68              :     virtual void setup() = 0;
      69              :     virtual void finish() = 0;
      70              :     virtual void restart() = 0;
      71              : 
      72              :     virtual modularity::ContextPtr setupNewContext(const StringList& args = {}) = 0;
      73              :     virtual void destroyContext(const modularity::ContextPtr& ctx) = 0;
      74              :     virtual size_t contextCount() const = 0;
      75              :     virtual std::vector<modularity::ContextPtr> contexts() const = 0;
      76              : 
      77              :     virtual void processEvents() = 0;
      78              : 
      79              : #ifndef NO_QT_SUPPORT
      80              :     virtual QWindow* focusWindow() const = 0;
      81              :     virtual bool notify(QObject* object, QEvent* event) = 0;
      82              : 
      83              :     virtual Qt::KeyboardModifiers keyboardModifiers() const = 0;
      84              : #endif
      85              : };
      86              : }
      87              : 
      88              : #endif // MUSE_GLOBAL_IAPPLICATION_H
        

Generated by: LCOV version 2.0-1