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/>.
33 // Options for main mode - importing or exporting content
39 static const int kNumModes = MODE_EXPORT + 1;
41 // Options for targets - sent or recieved
47 static const int kNumTargets = TYPE_RECIEVED + 1;
49 // Options for supported event types
56 static const int kNumEventTypes = EVENTTYPE_CHAT + 1;
59 // The current UI mode of the application (Console/GUI)
62 // Have the settings been confirmed by the user?
65 // The current operation mode of the application (Import/Export)
68 // The current targets & event types being processed
69 bool m_ShouldProcess[kNumTargets][kNumEventTypes];
71 // The root directory to import or export from
74 // The ITU code for this country
77 // Is it OK to disable the cellular radio to prevent calls and messages?
78 bool m_DisableCellular;
83 eAppMode const AppMode() const { return m_AppMode; }
84 eAppMode const setAppMode(const eAppMode appMode) { return m_AppMode = appMode; }
86 bool const IsConfirmed() const { return m_Confirmed; }
87 bool const setConfirmed(const bool confirmed) { return m_Confirmed = confirmed; }
89 eMode const Mode() const { return m_Mode; }
90 eMode const setMode(const eMode mode) { return m_Mode = mode; }
92 bool const ShouldProcess(const eTargets target, const eEventTypes eventType) const { return m_ShouldProcess[target][eventType]; }
93 bool const setShouldProcess(const eTargets target, const eEventTypes eventType, const bool shouldProcess = true){ return m_ShouldProcess[target][eventType] = shouldProcess; }
94 bool const anyToProcess()
96 for(int targetIndex = 0; targetIndex < kNumTargets; ++targetIndex)
97 for(int eventTypeIndex = 0; eventTypeIndex < kNumEventTypes; ++eventTypeIndex)
98 if (m_ShouldProcess[targetIndex][eventTypeIndex])
103 QString const Directory() const{ return m_Directory; }
104 QString const setDirectory(const QString& directory){ return m_Directory = directory; }
106 uint const CountryCode() const { return m_CountryCode; }
107 uint const setCountryCode(const uint countryCode) { return m_CountryCode = countryCode; }
109 bool const DisableCellular() const { return m_DisableCellular; }
110 bool const setDisableCellular(const bool disableCellular) { return m_DisableCellular = disableCellular; }