QTfrontend/util/DataManager.h
author sheepluva
Sun, 29 Apr 2012 14:00:35 +0200
changeset 6953 4c2dd25630a7
parent 6952 7f70f37bbf08
child 6958 8230a516ba93
permissions -rw-r--r--
* make HatModel update automatically (also renamed class and files) * removed nemo's ghost file :P
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
     1
/*
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
     2
 * Hedgewars, a free turn based strategy game
6952
7f70f37bbf08 license header year range adjustments
sheepluva
parents: 6948
diff changeset
     3
 * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com>
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
     4
 *
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
     8
 *
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    12
 * GNU General Public License for more details.
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    13
 *
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    17
 */
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    18
6168
6f301dac12ff fix an include; fix/add comments
sheepluva
parents: 6167
diff changeset
    19
/**
6170
2b1748161278 fix multiplayer page layout, doc/comment fixes
sheepluva
parents: 6168
diff changeset
    20
 * @file
6930
d187ea93fc4f renaming HWDataManager -> DataManager
sheepluva
parents: 6700
diff changeset
    21
 * @brief DataManager class definition
6168
6f301dac12ff fix an include; fix/add comments
sheepluva
parents: 6167
diff changeset
    22
 */
6f301dac12ff fix an include; fix/add comments
sheepluva
parents: 6167
diff changeset
    23
6930
d187ea93fc4f renaming HWDataManager -> DataManager
sheepluva
parents: 6700
diff changeset
    24
#ifndef HEDGEWARS_DATAMANAGER_H
d187ea93fc4f renaming HWDataManager -> DataManager
sheepluva
parents: 6700
diff changeset
    25
#define HEDGEWARS_DATAMANAGER_H
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    26
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    27
#include <QDir>
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    28
#include <QFile>
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    29
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    30
#include <QStringList>
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    31
6953
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
    32
#include "HatModel.h"
6938
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
    33
#include "MapModel.h"
6937
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
    34
#include "ThemeModel.h"
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
    35
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    36
class QDir;
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    37
class QFile;
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    38
class QStringList;
6953
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
    39
class HatModel;
6938
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
    40
class MapModel;
6937
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
    41
class ThemeModel;
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    42
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    43
/**
6160
863d3edf5690 cleaning up some more, also adding a WIP file. changes: hats in the hat selection are now sorted like this: NoHat, Reserved hats (alphabetically), All other hats (alphabeticall)
sheepluva
parents: 6159
diff changeset
    44
 * @brief Offers access to the data files of hedgewars.
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    45
 *
6160
863d3edf5690 cleaning up some more, also adding a WIP file. changes: hats in the hat selection are now sorted like this: NoHat, Reserved hats (alphabetically), All other hats (alphabeticall)
sheepluva
parents: 6159
diff changeset
    46
 * @see <a href="http://en.wikipedia.org/wiki/Singleton_pattern">singleton pattern</a>
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    47
 *
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    48
 * @author sheepluva
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    49
 * @since 0.9.17
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    50
 */
6931
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
    51
class DataManager: public QObject
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    52
{
6931
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
    53
        Q_OBJECT
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
    54
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    55
    public:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    56
        /**
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    57
         * @brief Returns reference to the <i>singleton</i> instance of this class.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    58
         *
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    59
         * @see <a href="http://en.wikipedia.org/wiki/Singleton_pattern">singleton pattern</a>
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    60
         *
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    61
         * @return reference to the instance.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    62
         */
6930
d187ea93fc4f renaming HWDataManager -> DataManager
sheepluva
parents: 6700
diff changeset
    63
        static DataManager & instance();
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    64
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    65
        /**
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    66
         * @brief Returns a sorted list of data directory entries.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    67
         *
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    68
         * @param subDirectory sub-directory to search.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    69
         * @param filters filters for entry type.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    70
         * @param nameFilters filters by name patterns.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    71
         * @return a sorted list of matches in the subDirectory of data directory.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    72
         */
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    73
        QStringList entryList(const QString & subDirectory,
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    74
                              QDir::Filters filters = QDir::NoFilter,
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    75
                              const QStringList & nameFilters = QStringList("*")
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    76
                             ) const;
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    77
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    78
        /**
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    79
         * @brief Returns the path for the desires data file.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    80
         *
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    81
         * Use this method if you want to read an existing data file.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    82
         *
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    83
         * @param relativeDataFilePath relative path of the data file.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    84
         * @return real path to the file.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    85
         */
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    86
        QString findFileForRead(const QString & relativeDataFilePath) const;
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    87
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    88
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    89
        /**
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    90
         * @brief Returns the path for the data file that is to be written.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    91
         *
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    92
         * Use this method if you want to create or write into a data file.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    93
         *
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    94
         * @param relativeDataFilePath relative path of data file write path.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    95
         * @return destination of path data file.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    96
         */
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
    97
        QString findFileForWrite(const QString & relativeDataFilePath) const;
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
    98
6953
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
    99
6937
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
   100
        /**
6953
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   101
         * @brief Returns pointer to a model of available hats.
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   102
         *
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   103
         * The model is updated automatically on data reload.
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   104
         *
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   105
         * @return hat model pointer.
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   106
         */
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   107
        HatModel * hatModel();
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   108
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   109
        /**
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   110
         * @brief Returns pointer to a model of available maps.
6938
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
   111
         *
6948
7271ce89950f various comment tweaks/fixes
sheepluva
parents: 6938
diff changeset
   112
         * The model is updated automatically on data reload.
6938
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
   113
         *
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
   114
         * @return map model pointer.
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
   115
         */
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
   116
        MapModel * mapModel();
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
   117
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
   118
        /**
6953
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   119
         * @brief Returns pointer to a model of available themes.
6937
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
   120
         *
6948
7271ce89950f various comment tweaks/fixes
sheepluva
parents: 6938
diff changeset
   121
         * The model is updated automatically on data reload.
6937
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
   122
         *
6938
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
   123
         * @return theme model pointer.
6937
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
   124
         */
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
   125
        ThemeModel * themeModel();
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
   126
6931
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
   127
    public slots:
6948
7271ce89950f various comment tweaks/fixes
sheepluva
parents: 6938
diff changeset
   128
        /// Reloads data from storage.
6931
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
   129
        void reload();
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
   130
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
   131
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
   132
    signals:
6948
7271ce89950f various comment tweaks/fixes
sheepluva
parents: 6938
diff changeset
   133
        /// This signal is emitted after the data has been updated.
6931
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
   134
        void updated();
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
   135
86c951cd0f3f make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents: 6930
diff changeset
   136
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
   137
    private:
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
   138
        /**
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
   139
         * @brief Class constructor of the <i>singleton</i>.
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
   140
         *
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
   141
         * Not to be used from outside the class,
6930
d187ea93fc4f renaming HWDataManager -> DataManager
sheepluva
parents: 6700
diff changeset
   142
         * use the static {@link DataManager::instance()} instead.
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
   143
         *
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
   144
         * @see <a href="http://en.wikipedia.org/wiki/Singleton_pattern">singleton pattern</a>
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6215
diff changeset
   145
         */
6930
d187ea93fc4f renaming HWDataManager -> DataManager
sheepluva
parents: 6700
diff changeset
   146
        DataManager();
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
   147
6937
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
   148
        QDir * m_defaultData; ///< directory of the installed data
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
   149
        QDir * m_userData;    ///< directory of custom data in the user's directory
7f77fa908a4e messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents: 6931
diff changeset
   150
6953
4c2dd25630a7 * make HatModel update automatically (also renamed class and files)
sheepluva
parents: 6952
diff changeset
   151
        HatModel * m_hatModel; ///< hat model instance
6938
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
   152
        MapModel * m_mapModel; ///< map model instance
217ed62e872c MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents: 6937
diff changeset
   153
        ThemeModel * m_themeModel; ///< theme model instance
6159
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
   154
};
c780b8cf4d75 introduce HWDataManager util for transparent access to [user-]data files
sheepluva
parents:
diff changeset
   155
6930
d187ea93fc4f renaming HWDataManager -> DataManager
sheepluva
parents: 6700
diff changeset
   156
#endif // HEDGEWARS_DATAMANAGER_H