2 * Copyright (C) 2014 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 * Authored by: Nick Dedekind <nick.dedekind@canonical.com
19#include "MockCallManager.h"
21MockCallManager::MockCallManager(QObject *parent)
23 , m_foregroundCall(nullptr)
24 , m_backgroundCall(nullptr)
25 , m_callIndicatorVisible(false)
29MockCallManager *MockCallManager::instance()
31 static MockCallManager* manager = new MockCallManager();
35QObject* MockCallManager::foregroundCall() const
37 return m_foregroundCall;
40void MockCallManager::setForegroundCall(QObject* foregroundCall)
42 if(m_foregroundCall != foregroundCall){
43 m_foregroundCall = foregroundCall;
44 Q_EMIT foregroundCallChanged();
45 Q_EMIT hasCallsChanged();
49QObject* MockCallManager::backgroundCall() const
51 return m_backgroundCall;
54void MockCallManager::setBackgroundCall(QObject* backgroundCall)
56 if(m_backgroundCall != backgroundCall){
57 m_backgroundCall = backgroundCall;
58 Q_EMIT backgroundCallChanged();
59 Q_EMIT hasCallsChanged();
63bool MockCallManager::hasCalls() const
65 return m_foregroundCall || m_backgroundCall;
69bool MockCallManager::callIndicatorVisible() const
71 return m_callIndicatorVisible;
74void MockCallManager::setCallIndicatorVisible(bool callIndicatorVisible)
76 if(m_callIndicatorVisible != callIndicatorVisible){
77 m_callIndicatorVisible = callIndicatorVisible;
78 Q_EMIT callIndicatorVisibleChanged();
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list