Warning, /multimedia/elisa/src/qml/ApplicationMenu.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2016 (c) Matthieu Gallien <matthieu_gallien@yahoo.fr> 0003 SPDX-FileCopyrightText: 2018 (c) Alexander Stippich <a.stippich@gmx.net> 0004 0005 SPDX-License-Identifier: LGPL-3.0-or-later 0006 */ 0007 0008 import QtQuick 2.7 0009 import QtQuick.Window 2.7 0010 import QtQuick.Controls 2.3 0011 import QtQuick.Layouts 1.0 0012 import org.kde.elisa 1.0 0013 import org.kde.kirigami 2.5 as Kirigami 0014 0015 Menu { 0016 id: applicationMenu 0017 title: i18nc("@title:menu", "Application Menu") 0018 0019 property var helpAction: ElisaApplication.action("help_contents") 0020 property var reportBugAction: ElisaApplication.action("help_report_bug") 0021 property var aboutAppAction: ElisaApplication.action("help_about_app") 0022 property var configureShortcutsAction: ElisaApplication.action("options_configure_keybinding") 0023 property var configureAction: ElisaApplication.action("options_configure") 0024 property var quitAction: ElisaApplication.action("file_quit") 0025 0026 Action { 0027 text: mainWindow.visibility == Window.FullScreen ? i18nc("@action:inmenu", "Exit Full Screen") : i18nc("@action:inmenu", "Enter Full Screen") 0028 icon.name: mainWindow.visibility == Window.FullScreen ? "view-restore" : "view-fullscreen" 0029 onTriggered: mainWindow.visibility == Window.FullScreen ? mainWindow.restorePreviousStateBeforeFullScreen() : mainWindow.goFullScreen() 0030 } 0031 0032 MenuSeparator {} 0033 0034 Action { 0035 text: i18nc("@action:inmenu", "Scan for New Music") 0036 icon.name: "view-refresh" 0037 onTriggered: { 0038 applicationMenu.close() 0039 ElisaApplication.musicManager.scanCollection(MusicListenersManager.Soft) 0040 } 0041 } 0042 0043 Action { 0044 text: i18nc("@action:inmenu", "Reset Database and Re-Scan Everything") 0045 icon.name: "edit-clear-all" 0046 onTriggered: { 0047 applicationMenu.close() 0048 ElisaApplication.musicManager.scanCollection(MusicListenersManager.Hard) 0049 } 0050 } 0051 0052 MenuSeparator {} 0053 0054 Menu { 0055 title: i18nc("@action:inmenu this has child menu items", "Color Scheme") 0056 Repeater { 0057 model: ElisaApplication.colorSchemesModel 0058 delegate: MenuItem { 0059 icon.name: "image://colorScheme/" + model.display 0060 text: model.display 0061 checkable: true 0062 checked: model.display === ElisaConfigurationDialog.colorScheme 0063 autoExclusive: true 0064 onTriggered: { 0065 ElisaApplication.activateColorScheme(model.display) 0066 ElisaConfigurationDialog.setColorScheme(model.display) 0067 ElisaConfigurationDialog.save() 0068 applicationMenu.close() 0069 } 0070 } 0071 } 0072 } 0073 0074 Action { 0075 text: configureAction.text 0076 shortcut: ElisaApplication.actionShortcut(configureAction) 0077 icon.name: ElisaApplication.iconName(configureAction.icon) 0078 onTriggered: { 0079 applicationMenu.close() 0080 configureAction.trigger() 0081 } 0082 } 0083 0084 Action { 0085 text: configureShortcutsAction.text 0086 shortcut: ElisaApplication.actionShortcut(configureShortcutsAction) 0087 icon.name: ElisaApplication.iconName(configureShortcutsAction.icon) 0088 onTriggered: { 0089 applicationMenu.close() 0090 configureShortcutsAction.trigger() 0091 } 0092 } 0093 0094 MenuSeparator {} 0095 0096 Action { 0097 text: helpAction.text 0098 shortcut: ElisaApplication.actionShortcut(helpAction) 0099 icon.name: ElisaApplication.iconName(helpAction.icon) 0100 onTriggered: { 0101 applicationMenu.close() 0102 helpAction.trigger() 0103 } 0104 } 0105 0106 Action { 0107 text: aboutAppAction.text 0108 shortcut: ElisaApplication.actionShortcut(aboutAppAction) 0109 icon.name: ElisaApplication.iconName(aboutAppAction.icon) 0110 onTriggered: { 0111 applicationMenu.close() 0112 aboutAppAction.trigger() 0113 } 0114 } 0115 0116 Action { 0117 text: reportBugAction.text 0118 shortcut: ElisaApplication.actionShortcut(reportBugAction) 0119 icon.name: ElisaApplication.iconName(reportBugAction.icon) 0120 onTriggered: { 0121 applicationMenu.close() 0122 reportBugAction.trigger() 0123 } 0124 } 0125 0126 MenuSeparator { 0127 visible: ElisaApplication.showSystemTrayIcon 0128 } 0129 0130 MenuItem { 0131 action: Action { 0132 text: quitAction.text 0133 shortcut: ElisaApplication.actionShortcut(quitAction) 0134 icon.name: ElisaApplication.iconName(quitAction.icon) 0135 onTriggered: { 0136 applicationMenu.close() 0137 quitAction.trigger() 0138 } 0139 } 0140 visible: ElisaApplication.showSystemTrayIcon 0141 } 0142 }