Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 12, 2010, 12:47:30 AM (14 years ago)
Author:
rgrieder
Message:

Basic stuff up and running for the Qt sandbox.
No GUI support yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox_qt/src/libraries/core/PathConfig.h

    r7401 r7421  
    3939#include <string>
    4040#include <vector>
     41#include <QDir>
    4142#include "util/Singleton.h"
    4243
    43 //tolua_begin
    4444namespace orxonox
    4545{
    46 //tolua_end
    4746    /**
    4847    @brief
    4948        The PathConfig class is a singleton used to configure different paths.
    5049    @details
    51         The class provides information about the data, config, log, executable,
    52         root and module path.
     50        The class provides information about the data, config, log, executable
     51        and root path.
    5352        It determines those by the use of platform specific functions.
    5453    @remarks
    5554        Not all paths are always available:
    5655        - root only when installed copyable
    57         - externalData only for development builds in the build tree
    5856    */
    59     class _CoreExport PathConfig //tolua_export
    60         : public Singleton<PathConfig>
    61     { //tolua_export
     57    class _CoreExport PathConfig : public Singleton<PathConfig>
     58    {
    6259        friend class Singleton<PathConfig>;
    6360        friend class Core;
     
    6663            /**
    6764            @brief
    68                 Retrievs the executable path and sets all hard coded fixed paths (currently only the module path)
     65                Retrieves the executable path and sets all hard coded fixed paths (currently only the module path)
    6966                Also checks for "orxonox_dev_build.keep_me" in the executable diretory.
    7067                If found it means that this is not an installed run, hence we
     
    7673            ~PathConfig();
    7774
    78             //! Returns the path to the root folder as boost::filesystem::path
    79             static const boost::filesystem::path& getRootPath()
     75            //! Returns the path to the root folder as QDir
     76            static const QDir& getRootPath()
    8077                { return getInstance().rootPath_; }
    81             //! Returns the path to the executable folder as boost::filesystem::path
    82             static const boost::filesystem::path& getExecutablePath()
     78            //! Returns the path to the executable folder as QDir
     79            static const QDir& getExecutablePath()
    8380                { return getInstance().executablePath_; }
    84             //! Returns the path to the data files as boost::filesystem::path
    85             static const boost::filesystem::path& getDataPath()
     81            //! Returns the path to the data files as QDir
     82            static const QDir& getDataPath()
    8683                { return getInstance().dataPath_; }
    87             //! Returns the path to the external data files as boost::filesystem::path
    88             static const boost::filesystem::path& getExternalDataPath()
    89                 { return getInstance().externalDataPath_; }
    90             //! Returns the path to the config files as boost::filesystem::path
    91             static const boost::filesystem::path& getConfigPath()
     84            //! Returns the path to the config files as QDir
     85            static const QDir& getConfigPath()
    9286                { return getInstance().configPath_; }
    93             //! Returns the path to the log files as boost::filesystem::path
    94             static const boost::filesystem::path& getLogPath()
     87            //! Returns the path to the log files as QDir
     88            static const QDir& getLogPath()
    9589                { return getInstance().logPath_; }
    96             //! Returns the path to the modules as boost::filesystem::path
    97             static const boost::filesystem::path& getModulePath()
    98                 { return getInstance().modulePath_; }
    9990
    10091            //! Returns the path to the root folder as std::string
     
    10495            //! Returns the path to the data files as std::string
    10596            static std::string getDataPathString();
    106             //! Returns the path to the external data files as std::string
    107             static std::string getExternalDataPathString();
    10897            //! Returns the path to the config files as std::string
    10998            static std::string getConfigPathString(); //tolua_export
    11099            //! Returns the path to the log files as std::string
    111100            static std::string getLogPathString();
    112             //! Returns the path to the modules as std::string
    113             static std::string getModulePathString();
    114101
    115102            //! Return trrue for runs in the build directory (not installed)
     
    126113            */
    127114            void setConfigurablePaths();
    128             //! Returns a list with all modules declared by a *.module file in the module folder.
    129             std::vector<std::string> getModulePaths();
    130115
    131116            //! Path to the parent directory of the ones above if program was installed with relativ paths
    132             boost::filesystem::path& rootPath_;
    133             boost::filesystem::path& executablePath_;        //!< Path to the executable
    134             boost::filesystem::path& modulePath_;            //!< Path to the modules
    135             boost::filesystem::path& dataPath_;              //!< Path to the data files folder
    136             boost::filesystem::path& externalDataPath_;      //!< Path to the external data files folder
    137             boost::filesystem::path& configPath_;            //!< Path to the config files folder
    138             boost::filesystem::path& logPath_;               //!< Path to the log files folder
     117            QDir               rootPath_;
     118            QDir               executablePath_;        //!< Path to the executable
     119            QDir               dataPath_;              //!< Path to the data files folder
     120            QDir               configPath_;            //!< Path to the config files folder
     121            QDir               logPath_;               //!< Path to the log files folder
    139122
    140             bool                     bDevRun_;               //!< True for runs in the build directory (not installed)
     123            bool               bDevRun_;               //!< True for runs in the build directory (not installed)
    141124            static PathConfig* singletonPtr_s;
    142125    }; //tolua_export
Note: See TracChangeset for help on using the changeset viewer.