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;
73 // RtcomEventLogger path
75 void DBPath(QString dbPath) { m_DBPath = dbPath; }
80 eAppMode const AppMode() const { return m_AppMode; }
81 eAppMode const setAppMode(const eAppMode appMode) { return m_AppMode = appMode; }
83 bool const IsConfirmed() const { return m_Confirmed; }
84 bool const setConfirmed(const bool confirmed) { return m_Confirmed = confirmed; }
86 eMode const Mode() const { return m_Mode; }
87 eMode const setMode(const eMode mode) { return m_Mode = mode; }
89 bool const ShouldProcess(const eDirection target, const EventTypes::eEventTypes eventType) const { return m_ShouldProcess[target][eventType]; }
90 bool const setShouldProcess(const eDirection target, const EventTypes::eEventTypes eventType, const bool shouldProcess = true){ return m_ShouldProcess[target][eventType] = shouldProcess; }
91 bool const anyToProcess()
93 for(int targetIndex = 0; targetIndex < kNumTargets; ++targetIndex)
94 for(int eventTypeIndex = 0; eventTypeIndex < EventTypes::kNumEventTypes; ++eventTypeIndex)
95 if (m_ShouldProcess[targetIndex][eventTypeIndex])
100 QString const Directory() const{ return m_Directory; }
101 QString const setDirectory(const QString& directory){ return m_Directory = directory; }
103 uint const CountryCode() const { return m_CountryCode; }
104 uint const setCountryCode(const uint countryCode) { return m_CountryCode = countryCode; }
106 bool const DisableCellular() const { return m_DisableCellular; }
107 bool const setDisableCellular(const bool disableCellular) { return m_DisableCellular = disableCellular; }
109 const QString &DBPath() const { return m_DBPath; }