| 1 | /* |
| 2 | * midisnoop - MIDI monitor and prober |
| 3 | * Copyright (C) 2012 Devin Anderson |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License as published by the Free |
| 7 | * Software Foundation; either version 2 of the License, or (at your option) |
| 8 | * any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 13 | * more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License along with |
| 16 | * this program; if not, write to the Free Software Foundation, Inc., 675 Mass |
| 17 | * Ave, Cambridge, MA 02139, USA. |
| 18 | */ |
| 19 | |
| 20 | #include "util.h"cxx . . $ `<file>/src/util.h`/ |
| 21 | #include "view.h"cxx . . $ `<file>/src/view.h`/ |
| 22 | |
| 23 | Viewcxx . . $ View#::Viewcxx . . $ View#View(999d990128f944b).(QWidgetcxx . . $ QWidget# *rootWidget, QObjectcxx . . $ QObject# *parent): |
| 24 | QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(parent) |
| 25 | { |
| 26 | connectcxx . . $ QObject#connect(f4332061c7e4ca89).(&closeEventFiltercxx . . $ View#closeEventFilter., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(closeRequest()), |
| 27 | SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(closeRequest())); |
| 28 | rootWidget->installEventFiltercxx . . $ QObject#installEventFilter(749de1b6ae65bddd).(&closeEventFiltercxx . . $ View#closeEventFilter.); |
| 29 | this->rootWidgetcxx . . $ View#rootWidget. = rootWidget; |
| 30 | } |
| 31 | |
| 32 | Viewcxx . . $ View#::~cxx . . $ View#`~View`(ced63f7c635d850d).Viewcxx . . $ View#() |
| 33 | { |
| 34 | delete rootWidgetcxx . . $ View#rootWidget.; |
| 35 | } |
| 36 | |
| 37 | const QWidgetcxx . . $ QWidget# * |
| 38 | Viewcxx . . $ View#::getRootWidgetcxx . . $ View#getRootWidget(1ca17356d9a777f4).() const |
| 39 | { |
| 40 | return rootWidgetcxx . . $ View#rootWidget.; |
| 41 | } |
| 42 | |
| 43 | QWidgetcxx . . $ QWidget# * |
| 44 | Viewcxx . . $ View#::getRootWidgetcxx . . $ View#getRootWidget(9b769eeb00a33a04).() |
| 45 | { |
| 46 | return rootWidgetcxx . . $ View#rootWidget.; |
| 47 | } |
| 48 | |
| 49 | void |
| 50 | Viewcxx . . $ View#::hidecxx . . $ View#hide(49f6e7a06ebc5aa8).() |
| 51 | { |
| 52 | setVisiblecxx . . $ View#setVisible(b45ddcbc8423892c).(false); |
| 53 | } |
| 54 | |
| 55 | bool |
| 56 | Viewcxx . . $ View#::isCloseEnabledcxx . . $ View#isCloseEnabled(50ce9a9e25b4a850).() const |
| 57 | { |
| 58 | return closeEventFiltercxx . . $ View#closeEventFilter..isCloseEnabledcxx . . $ CloseEventFilter#isCloseEnabled(50ce9a9e25b4a850).(); |
| 59 | } |
| 60 | |
| 61 | bool |
| 62 | Viewcxx . . $ View#::isVisiblecxx . . $ View#isVisible(50ce9a9e25b4a850).() const |
| 63 | { |
| 64 | return rootWidgetcxx . . $ View#rootWidget.->isVisiblecxx . . $ QWidget#isVisible(50ce9a9e25b4a850).(); |
| 65 | } |
| 66 | |
| 67 | void |
| 68 | Viewcxx . . $ View#::setCloseEnabledcxx . . $ View#setCloseEnabled(b45ddcbc8423892c).(bool enabled) |
| 69 | { |
| 70 | if (closeEventFiltercxx . . $ View#closeEventFilter..isCloseEnabledcxx . . $ CloseEventFilter#isCloseEnabled(50ce9a9e25b4a850).() != enabled) { |
| 71 | closeEventFiltercxx . . $ View#closeEventFilter..setCloseEnabledcxx . . $ CloseEventFilter#setCloseEnabled(b45ddcbc8423892c).(enabled); |
| 72 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! closeEnabledChangedcxx . . $ View#closeEnabledChanged(b45ddcbc8423892c).(enabled); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | void |
| 77 | Viewcxx . . $ View#::setVisiblecxx . . $ View#setVisible(b45ddcbc8423892c).(bool visible) |
| 78 | { |
| 79 | if (rootWidgetcxx . . $ View#rootWidget.->isVisiblecxx . . $ QWidget#isVisible(50ce9a9e25b4a850).() != visible) { |
| 80 | rootWidgetcxx . . $ View#rootWidget.->setVisiblecxx . . $ QWidget#setVisible(b45ddcbc8423892c).(visible); |
| 81 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! visibilityChangedcxx . . $ View#visibilityChanged(b45ddcbc8423892c).(visible); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | void |
| 86 | Viewcxx . . $ View#::showcxx . . $ View#show(49f6e7a06ebc5aa8).() |
| 87 | { |
| 88 | setVisiblecxx . . $ View#setVisible(b45ddcbc8423892c).(true); |
| 89 | } |