2 * Copyright (C) 2011, Jamie Thompson
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either
7 * version 3 of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public
15 * License along with this program; If not, see
16 * <http://www.gnu.org/licenses/>.
22 #include "EventTypes/eEventTypes.h"
35 // Options for main mode - importing or exporting content
41 static const int kNumModes = MODE_EXPORT + 1;
43 // Options for targets - sent or recieved
49 static const int kNumTargets = INCOMING + 1;
52 // The current UI mode of the application (Console/GUI)
55 // Have the settings been confirmed by the user?
58 // The current operation mode of the application (Import/Export)
61 // The current targets & event types being processed
62 bool m_ShouldProcess[kNumTargets][EventTypes::kNumEventTypes];
64 // The root directory to import or export from
67 // The ITU code for this country
70 // Is it OK to disable the cellular radio to prevent calls and messages?
71 bool m_DisableCellular;
76 eAppMode const AppMode() const { return m_AppMode; }
77 eAppMode const setAppMode(const eAppMode appMode) { return m_AppMode = appMode; }
79 bool const IsConfirmed() const { return m_Confirmed; }
80 bool const setConfirmed(const bool confirmed) { return m_Confirmed = confirmed; }
82 eMode const Mode() const { return m_Mode; }
83 eMode const setMode(const eMode mode) { return m_Mode = mode; }
85 bool const ShouldProcess(const eDirection target, const EventTypes::eEventTypes eventType) const { return m_ShouldProcess[target][eventType]; }
86 bool const setShouldProcess(const eDirection target, const EventTypes::eEventTypes eventType, const bool shouldProcess = true){ return m_ShouldProcess[target][eventType] = shouldProcess; }
87 bool const anyToProcess()
89 for(int targetIndex = 0; targetIndex < kNumTargets; ++targetIndex)
90 for(int eventTypeIndex = 0; eventTypeIndex < EventTypes::kNumEventTypes; ++eventTypeIndex)
91 if (m_ShouldProcess[targetIndex][eventTypeIndex])
96 QString const Directory() const{ return m_Directory; }
97 QString const setDirectory(const QString& directory){ return m_Directory = directory; }
99 uint const CountryCode() const { return m_CountryCode; }
100 uint const setCountryCode(const uint countryCode) { return m_CountryCode = countryCode; }
102 bool const DisableCellular() const { return m_DisableCellular; }
103 bool const setDisableCellular(const bool disableCellular) { return m_DisableCellular = disableCellular; }