Debian Codegraph @

src/lomiriappmenu/theme.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2016-2017 Canonical, Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License version 3, as published by
6 * the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17 #include "theme.h"cxx . . $ `<file>/src/lomiriappmenu/theme.h`/
18 #include "gmenumodelplatformmenu.h"cxx . . $ `<file>/src/lomiriappmenu/gmenumodelplatformmenu.h`/
19 #include "logging.h"cxx . . $ `<file>/src/lomiriappmenu/logging.h`/
20
21 #include <QtCore/QVariant>
22 #include <QDebug>
23
24 Q_LOGGING_CATEGORYcxx . . $ `<external>/13903568758641964362/qloggingcategory.h:114:9`!(lomiriappmenu, "lomiriappmenu", QtWarningMsg)
25 const char *LomiriAppMenuThemecxx . . $ LomiriAppMenuTheme#::namecxx . . $ LomiriAppMenuTheme#name. = "lomiriappmenu";
26
27 namespacecxx . . $ `$anonymous_namespace_src/lomiriappmenu/theme.cpp`/ {
28
29 bool useLocalMenucxx . . $ `$anonymous_namespace_src/lomiriappmenu/theme.cpp`/useLocalMenu(c9857a73d68e59ba).() {
30 QByteArraycxx . . $ QByteArray# menuProxy = qgetenvcxx . . $ QByteArray#QByteArray(3203d9f8f38841a4).("UBUNTU_MENUPROXY");
31 bool menuProxyIsZero = !menuProxy.isEmptycxx . . $ QByteArray#isEmpty(50ce9a9e25b4a850).() && menuProxy.atcxx . . $ QByteArray#at(ed855a77b1899856).(0) == '0';
32 return menuProxyIsZero;
33 }
34
35 }
36
37 LomiriAppMenuThemecxx . . $ LomiriAppMenuTheme#::LomiriAppMenuThemecxx . . $ LomiriAppMenuTheme#LomiriAppMenuTheme(49f6e7a06ebc5aa8).():
38 LomiriThemecxx . . $ LomiriTheme#()
39 {
40 qCDebugcxx . . $ `<external>/13903568758641964362/qloggingcategory.h:122:11`!(lomiriappmenu, "LomiriAppMenuTheme::LomiriAppMenuTheme() - useLocalMenu=%s", useLocalMenu() ? "true" : "false");
41 }
42
43 QPlatformMenuItemcxx . . $ QPlatformMenuItem# *LomiriAppMenuThemecxx . . $ LomiriAppMenuTheme#::createPlatformMenuItemcxx . . $ LomiriAppMenuTheme#createPlatformMenuItem(23060c72e954fe3c).() const
44 {
45 if (useLocalMenucxx . . $ `$anonymous_namespace_src/lomiriappmenu/theme.cpp`/useLocalMenu(c9857a73d68e59ba).()) return QGenericUnixThemecxx . . $ QGenericUnixTheme#::createPlatformMenuItemcxx . . $ QPlatformTheme#createPlatformMenuItem(23060c72e954fe3c).();
46 return new LomiriPlatformMenuItemcxx . . $ LomiriPlatformMenuItem#();
47 }
48
49 QPlatformMenucxx . . $ QPlatformMenu# *LomiriAppMenuThemecxx . . $ LomiriAppMenuTheme#::createPlatformMenucxx . . $ LomiriAppMenuTheme#createPlatformMenu(15223643a8dbaac4).() const
50 {
51 if (useLocalMenucxx . . $ `$anonymous_namespace_src/lomiriappmenu/theme.cpp`/useLocalMenu(c9857a73d68e59ba).()) return QGenericUnixThemecxx . . $ QGenericUnixTheme#::createPlatformMenucxx . . $ QPlatformTheme#createPlatformMenu(15223643a8dbaac4).();
52 return new LomiriPlatformMenucxx . . $ LomiriPlatformMenu#();
53 }
54
55 QPlatformMenuBarcxx . . $ QPlatformMenuBar# *LomiriAppMenuThemecxx . . $ LomiriAppMenuTheme#::createPlatformMenuBarcxx . . $ LomiriAppMenuTheme#createPlatformMenuBar(989f83f405a7065c).() const
56 {
57 if (useLocalMenucxx . . $ `$anonymous_namespace_src/lomiriappmenu/theme.cpp`/useLocalMenu(c9857a73d68e59ba).()) return QGenericUnixThemecxx . . $ QGenericUnixTheme#::createPlatformMenuBarcxx . . $ QGenericUnixTheme#createPlatformMenuBar(989f83f405a7065c).();
58 return new LomiriPlatformMenuBarcxx . . $ LomiriPlatformMenuBar#();
59 }
60
61 QPlatformSystemTrayIconcxx . . $ QPlatformSystemTrayIcon# *LomiriAppMenuThemecxx . . $ LomiriAppMenuTheme#::createPlatformSystemTrayIconcxx . . $ LomiriAppMenuTheme#createPlatformSystemTrayIcon(f30020d174b1021c).() const
62 {
63 // We can't use QGenericUnixTheme implementation since it needs the platformMenu to
64 // be a subclass of QDBusPlatformMenu and ours isn't
65 // TODO Investigate if we're fine with not supporting system trays or we should fix it
66 return nullptr;
67 }