File indexing completed on 2024-04-28 05:50:07
0001 /* 0002 * SPDX-License-Identifier: GPL-3.0-or-later 0003 * SPDX-FileCopyrightText: 2021 Johan Ouwerkerk <jm.ouwerkerk@gmail.com> 0004 */ 0005 0006 #include "state_p.h" 0007 0008 namespace app 0009 { 0010 0011 OverviewState::OverviewState(QObject *parent) : 0012 QObject(parent), m_actionsEnabled(false) 0013 { 0014 } 0015 0016 bool OverviewState::actionsEnabled(void) const 0017 { 0018 return m_actionsEnabled; 0019 } 0020 0021 void OverviewState::setActionsEnabled(bool enabled) 0022 { 0023 if (m_actionsEnabled != enabled) { 0024 m_actionsEnabled = enabled; 0025 Q_EMIT actionsEnabledChanged(); 0026 } 0027 } 0028 0029 FlowState::FlowState(QObject *parent) : 0030 QObject(parent), m_flowRunning(false), m_initialFlowDone(false) 0031 { 0032 } 0033 0034 bool FlowState::flowRunning(void) const 0035 { 0036 return m_flowRunning; 0037 } 0038 0039 void FlowState::setFlowRunning(bool running) 0040 { 0041 if (m_flowRunning != running) { 0042 m_flowRunning = running; 0043 Q_EMIT flowRunningChanged(); 0044 } 0045 } 0046 0047 bool FlowState::initialFlowDone(void) const 0048 { 0049 return m_initialFlowDone; 0050 } 0051 0052 void FlowState::setInitialFlowDone(bool done) 0053 { 0054 if (m_initialFlowDone != done) { 0055 m_initialFlowDone = done; 0056 Q_EMIT initialFlowDoneChanged(); 0057 } 0058 } 0059 }