mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Add OpenMW commits up to 1 Nov 2020
# Conflicts: # CMakeLists.txt # apps/openmw/main.cpp # apps/openmw/mwclass/container.hpp # apps/openmw/mwclass/creature.hpp # apps/openmw/mwclass/npc.hpp # apps/openmw/mwdialogue/dialoguemanagerimp.hpp # apps/openmw/mwdialogue/journalimp.hpp # apps/openmw/mwgui/container.cpp # apps/openmw/mwgui/dialogue.hpp # apps/openmw/mwgui/mainmenu.cpp # apps/openmw/mwgui/windowmanagerimp.hpp # apps/openmw/mwmechanics/aiactivate.hpp # apps/openmw/mwmechanics/mechanicsmanagerimp.hpp # apps/openmw/mwscript/containerextensions.cpp # apps/openmw/mwscript/interpretercontext.hpp # components/CMakeLists.txt
This commit is contained in:
commit
7f435ceeac
644 changed files with 5646 additions and 5036 deletions
|
@ -13,7 +13,7 @@ stages:
|
||||||
before_script:
|
before_script:
|
||||||
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
|
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
|
||||||
- apt-get update -yq
|
- apt-get update -yq
|
||||||
- apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake build-essential libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-iostreams-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libsdl2-dev libqt5opengl5-dev libopenal-dev libopenscenegraph-dev libunshield-dev libtinyxml-dev libmygui-dev libbullet-dev ccache git clang
|
- apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake build-essential libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-iostreams-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libsdl2-dev libqt5opengl5-dev libopenal-dev libopenscenegraph-dev libunshield-dev libtinyxml-dev libmygui-dev libbullet-dev liblz4-dev ccache git clang
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- export CCACHE_BASEDIR="`pwd`"
|
- export CCACHE_BASEDIR="`pwd`"
|
||||||
|
@ -71,8 +71,11 @@ MacOS:
|
||||||
tags:
|
tags:
|
||||||
- macos
|
- macos
|
||||||
stage: build
|
stage: build
|
||||||
|
only:
|
||||||
|
variables:
|
||||||
|
- $CI_PROJECT_ID == "7107382"
|
||||||
script:
|
script:
|
||||||
- rm -fr build/* # remove anything in the build directory
|
- rm -fr build/* # remove anything in the build directory
|
||||||
- CI/before_install.osx.sh
|
- CI/before_install.osx.sh
|
||||||
- CI/before_script.osx.sh
|
- CI/before_script.osx.sh
|
||||||
- cd build; make -j2 package
|
- cd build; make -j2 package
|
||||||
|
@ -93,7 +96,7 @@ variables: &cs-targets
|
||||||
- windows
|
- windows
|
||||||
before_script:
|
before_script:
|
||||||
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||||
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolately/" --priority=1
|
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolatey/" --priority=1
|
||||||
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
||||||
- choco install 7zip -y
|
- choco install 7zip -y
|
||||||
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||||
|
@ -117,6 +120,8 @@ variables: &cs-targets
|
||||||
Get-ChildItem -Recurse *.pdb | Remove-Item
|
Get-ChildItem -Recurse *.pdb | Remove-Item
|
||||||
}
|
}
|
||||||
- 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*'
|
- 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*'
|
||||||
|
after_script:
|
||||||
|
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
|
||||||
cache:
|
cache:
|
||||||
key: ninja-v2
|
key: ninja-v2
|
||||||
paths:
|
paths:
|
||||||
|
@ -183,7 +188,7 @@ Windows_Ninja_CS_RelWithDebInfo:
|
||||||
- windows
|
- windows
|
||||||
before_script:
|
before_script:
|
||||||
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||||
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolately/" --priority=1
|
- choco source add -n=openmw-proxy -s="https://repo.openmw.org/repository/Chocolatey/" --priority=1
|
||||||
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
- choco install git --force --params "/GitAndUnixToolsOnPath" -y
|
||||||
- choco install 7zip -y
|
- choco install 7zip -y
|
||||||
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
- choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||||
|
@ -205,6 +210,8 @@ Windows_Ninja_CS_RelWithDebInfo:
|
||||||
Get-ChildItem -Recurse *.pdb | Remove-Item
|
Get-ChildItem -Recurse *.pdb | Remove-Item
|
||||||
}
|
}
|
||||||
- 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*'
|
- 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*'
|
||||||
|
after_script:
|
||||||
|
- Copy-Item C:\ProgramData\chocolatey\logs\chocolatey.log
|
||||||
cache:
|
cache:
|
||||||
key: msbuild-v2
|
key: msbuild-v2
|
||||||
paths:
|
paths:
|
||||||
|
@ -265,3 +272,35 @@ Windows_MSBuild_CS_RelWithDebInfo:
|
||||||
variables:
|
variables:
|
||||||
<<: *cs-targets
|
<<: *cs-targets
|
||||||
config: "RelWithDebInfo"
|
config: "RelWithDebInfo"
|
||||||
|
|
||||||
|
Debian_AndroidNDK_arm64-v8a:
|
||||||
|
tags:
|
||||||
|
- linux
|
||||||
|
image: debian:bullseye
|
||||||
|
variables:
|
||||||
|
CCACHE_SIZE: 3G
|
||||||
|
cache:
|
||||||
|
key: Debian_AndroidNDK_arm64-v8a.v2
|
||||||
|
paths:
|
||||||
|
- apt-cache/
|
||||||
|
- ccache/
|
||||||
|
before_script:
|
||||||
|
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
|
||||||
|
- echo "deb http://deb.debian.org/debian unstable main contrib" > /etc/apt/sources.list
|
||||||
|
- echo "google-android-ndk-installer google-android-installers/mirror select https://dl.google.com" | debconf-set-selections
|
||||||
|
- apt-get update -yq
|
||||||
|
- apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake ccache curl unzip git build-essential google-android-ndk-installer
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- export CCACHE_BASEDIR="`pwd`"
|
||||||
|
- export CCACHE_DIR="`pwd`/ccache" && mkdir -pv "$CCACHE_DIR"
|
||||||
|
- ccache -z -M "${CCACHE_SIZE}"
|
||||||
|
- CI/before_install.android.sh
|
||||||
|
- CI/before_script.android.sh
|
||||||
|
- cd build
|
||||||
|
- cmake --build . -- -j $(nproc)
|
||||||
|
- cmake --install .
|
||||||
|
- ccache -s
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- build/install/
|
||||||
|
|
|
@ -24,7 +24,7 @@ addons:
|
||||||
# FFmpeg
|
# FFmpeg
|
||||||
libavcodec-dev, libavformat-dev, libavutil-dev, libswresample-dev, libswscale-dev,
|
libavcodec-dev, libavformat-dev, libavutil-dev, libswresample-dev, libswscale-dev,
|
||||||
# Audio, Video and Misc. deps
|
# Audio, Video and Misc. deps
|
||||||
libsdl2-dev, libqt5opengl5-dev, libopenal-dev, libunshield-dev, libtinyxml-dev,
|
libsdl2-dev, libqt5opengl5-dev, libopenal-dev, libunshield-dev, libtinyxml-dev, liblz4-dev
|
||||||
# The other ones from OpenMW ppa
|
# The other ones from OpenMW ppa
|
||||||
libbullet-dev, libopenscenegraph-3.4-dev, libmygui-dev,
|
libbullet-dev, libopenscenegraph-3.4-dev, libmygui-dev,
|
||||||
# tes3mp stuff
|
# tes3mp stuff
|
||||||
|
|
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -6,6 +6,8 @@
|
||||||
Bug #2069: Fireflies in Fireflies invade Morrowind look wrong
|
Bug #2069: Fireflies in Fireflies invade Morrowind look wrong
|
||||||
Bug #2311: Targeted scripts are not properly supported on non-unique RefIDs
|
Bug #2311: Targeted scripts are not properly supported on non-unique RefIDs
|
||||||
Bug #2473: Unable to overstock merchants
|
Bug #2473: Unable to overstock merchants
|
||||||
|
Bug #2798: Mutable ESM records
|
||||||
|
Bug #2976 [reopened]: Issues combining settings from the command line and both config files
|
||||||
Bug #3676: NiParticleColorModifier isn't applied properly
|
Bug #3676: NiParticleColorModifier isn't applied properly
|
||||||
Bug #3714: Savegame fails to load due to conflict between SpellState and MagicEffects
|
Bug #3714: Savegame fails to load due to conflict between SpellState and MagicEffects
|
||||||
Bug #3862: Random container contents behave differently than vanilla
|
Bug #3862: Random container contents behave differently than vanilla
|
||||||
|
@ -32,6 +34,7 @@
|
||||||
Bug #5403: Enchantment effect doesn't show on an enemy during death animation
|
Bug #5403: Enchantment effect doesn't show on an enemy during death animation
|
||||||
Bug #5415: Environment maps in ebony cuirass and HiRez Armors Indoril cuirass don't work
|
Bug #5415: Environment maps in ebony cuirass and HiRez Armors Indoril cuirass don't work
|
||||||
Bug #5416: Junk non-node records before the root node are not handled gracefully
|
Bug #5416: Junk non-node records before the root node are not handled gracefully
|
||||||
|
Bug #5422: The player loses all spells when resurrected
|
||||||
Bug #5424: Creatures do not headtrack player
|
Bug #5424: Creatures do not headtrack player
|
||||||
Bug #5425: Poison effect only appears for one frame
|
Bug #5425: Poison effect only appears for one frame
|
||||||
Bug #5427: GetDistance unknown ID error is misleading
|
Bug #5427: GetDistance unknown ID error is misleading
|
||||||
|
@ -55,9 +58,16 @@
|
||||||
Bug #5603: Setting constant effect cast style doesn't correct effects view
|
Bug #5603: Setting constant effect cast style doesn't correct effects view
|
||||||
Bug #5611: Usable items with "0 Uses" should be used only once
|
Bug #5611: Usable items with "0 Uses" should be used only once
|
||||||
Bug #5622: Can't properly interact with the console when in pause menu
|
Bug #5622: Can't properly interact with the console when in pause menu
|
||||||
|
Bug #5633: Damage Spells in effect before god mode is enabled continue to hurt the player character and can kill them
|
||||||
|
Bug #5639: Tooltips cover Messageboxes
|
||||||
|
Bug #5644: Summon effects running on the player during game initialization cause crashes
|
||||||
|
Bug #5656: Sneaking characters block hits while standing
|
||||||
|
Bug #5661: Region sounds don't play at the right interval
|
||||||
Feature #390: 3rd person look "over the shoulder"
|
Feature #390: 3rd person look "over the shoulder"
|
||||||
Feature #2386: Distant Statics in the form of Object Paging
|
Feature #2386: Distant Statics in the form of Object Paging
|
||||||
|
Feature #2404: Levelled List can not be placed into a container
|
||||||
Feature #4894: Consider actors as obstacles for pathfinding
|
Feature #4894: Consider actors as obstacles for pathfinding
|
||||||
|
Feature #5043: Head Bobbing
|
||||||
Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher
|
Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher
|
||||||
Feature #5362: Show the soul gems' trapped soul in count dialog
|
Feature #5362: Show the soul gems' trapped soul in count dialog
|
||||||
Feature #5445: Handle NiLines
|
Feature #5445: Handle NiLines
|
||||||
|
@ -69,8 +79,11 @@
|
||||||
Feature #5545: Option to allow stealing from an unconscious NPC during combat
|
Feature #5545: Option to allow stealing from an unconscious NPC during combat
|
||||||
Feature #5563: Run physics update in background thread
|
Feature #5563: Run physics update in background thread
|
||||||
Feature #5579: MCP SetAngle enhancement
|
Feature #5579: MCP SetAngle enhancement
|
||||||
|
Feature #5580: Service refusal filtering
|
||||||
Feature #5610: Actors movement should be smoother
|
Feature #5610: Actors movement should be smoother
|
||||||
Feature #5642: Ability to attach arrows to actor skeleton instead of bow mesh
|
Feature #5642: Ability to attach arrows to actor skeleton instead of bow mesh
|
||||||
|
Feature #5649: Skyrim SE compressed BSA format support
|
||||||
|
Feature #5672: Make stretch menu background configuration more accessible
|
||||||
Task #5480: Drop Qt4 support
|
Task #5480: Drop Qt4 support
|
||||||
Task #5520: Improve cell name autocompleter implementation
|
Task #5520: Improve cell name autocompleter implementation
|
||||||
|
|
||||||
|
|
4
CI/before_install.android.sh
Executable file
4
CI/before_install.android.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/android/openmw-android-deps-20201018.zip -o ~/openmw-android-deps.zip
|
||||||
|
unzip -o ~/openmw-android-deps -d /usr/lib/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr > /dev/null
|
|
@ -5,5 +5,8 @@ command -v ccache >/dev/null 2>&1 || brew install ccache
|
||||||
command -v cmake >/dev/null 2>&1 || brew install cmake
|
command -v cmake >/dev/null 2>&1 || brew install cmake
|
||||||
command -v qmake >/dev/null 2>&1 || brew install qt
|
command -v qmake >/dev/null 2>&1 || brew install qt
|
||||||
|
|
||||||
|
brew link --overwrite lz4 # overwrite system lz4; use brew
|
||||||
|
brew reinstall lz4
|
||||||
|
|
||||||
curl -fSL -R -J https://downloads.openmw.org/osx/dependencies/openmw-deps-ef2462c.zip -o ~/openmw-deps.zip
|
curl -fSL -R -J https://downloads.openmw.org/osx/dependencies/openmw-deps-ef2462c.zip -o ~/openmw-deps.zip
|
||||||
unzip -o ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null
|
unzip -o ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null
|
||||||
|
|
25
CI/before_script.android.sh
Executable file
25
CI/before_script.android.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
# hack to work around: FFmpeg version is too old, 3.2 is required
|
||||||
|
sed -i s/"NOT FFVER_OK"/"FALSE"/ CMakeLists.txt
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=/usr/lib/android-sdk/ndk-bundle/build/cmake/android.toolchain.cmake \
|
||||||
|
-DANDROID_ABI=arm64-v8a \
|
||||||
|
-DANDROID_PLATFORM=android-21 \
|
||||||
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=install \
|
||||||
|
-DBUILD_BSATOOL=0 \
|
||||||
|
-DBUILD_NIFTEST=0 \
|
||||||
|
-DBUILD_ESMTOOL=0 \
|
||||||
|
-DBUILD_LAUNCHER=0 \
|
||||||
|
-DBUILD_MWINIIMPORTER=0 \
|
||||||
|
-DBUILD_ESSIMPORTER=0 \
|
||||||
|
-DBUILD_OPENCS=0 \
|
||||||
|
-DBUILD_WIZARD=0 \
|
||||||
|
-DMyGUI_LIBRARY="/usr/lib/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/libMyGUIEngineStatic.a" \
|
||||||
|
..
|
|
@ -571,6 +571,11 @@ if [ -z $SKIP_DOWNLOAD ]; then
|
||||||
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/SDL2-2.0.12.zip" \
|
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/SDL2-2.0.12.zip" \
|
||||||
"SDL2-2.0.12.zip"
|
"SDL2-2.0.12.zip"
|
||||||
|
|
||||||
|
# LZ4
|
||||||
|
download "LZ4 1.9.2" \
|
||||||
|
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/lz4_win${BITS}_v1_9_2.7z" \
|
||||||
|
"lz4_win${BITS}_v1_9_2.7z"
|
||||||
|
|
||||||
# Google test and mock
|
# Google test and mock
|
||||||
if [ ! -z $TEST_FRAMEWORK ]; then
|
if [ ! -z $TEST_FRAMEWORK ]; then
|
||||||
echo "Google test 1.10.0..."
|
echo "Google test 1.10.0..."
|
||||||
|
@ -901,6 +906,31 @@ printf "SDL 2.0.12... "
|
||||||
}
|
}
|
||||||
cd $DEPS
|
cd $DEPS
|
||||||
echo
|
echo
|
||||||
|
# LZ4
|
||||||
|
printf "LZ4 1.9.2... "
|
||||||
|
{
|
||||||
|
if [ -d LZ4_1.9.2 ]; then
|
||||||
|
printf "Exists. "
|
||||||
|
elif [ -z $SKIP_EXTRACT ]; then
|
||||||
|
rm -rf LZ4_1.9.2
|
||||||
|
eval 7z x -y lz4_win${BITS}_v1_9_2.7z -o./LZ4_1.9.2 $STRIP
|
||||||
|
fi
|
||||||
|
export LZ4DIR="$(real_pwd)/LZ4_1.9.2"
|
||||||
|
add_cmake_opts -DLZ4_INCLUDE_DIR="${LZ4DIR}/include" \
|
||||||
|
-DLZ4_LIBRARY="${LZ4DIR}/lib/liblz4.lib"
|
||||||
|
for CONFIGURATION in ${CONFIGURATIONS[@]}; do
|
||||||
|
if [ $CONFIGURATION == "Debug" ]; then
|
||||||
|
LZ4_CONFIGURATION="Debug"
|
||||||
|
else
|
||||||
|
SUFFIX=""
|
||||||
|
LZ4_CONFIGURATION="Release"
|
||||||
|
fi
|
||||||
|
add_runtime_dlls $CONFIGURATION "$(pwd)/LZ4_1.9.2/bin/${LZ4_CONFIGURATION}/liblz4.dll"
|
||||||
|
done
|
||||||
|
echo Done.
|
||||||
|
}
|
||||||
|
cd $DEPS
|
||||||
|
echo
|
||||||
# Google Test and Google Mock
|
# Google Test and Google Mock
|
||||||
if [ ! -z $TEST_FRAMEWORK ]; then
|
if [ ! -z $TEST_FRAMEWORK ]; then
|
||||||
printf "Google test 1.10.0 ..."
|
printf "Google test 1.10.0 ..."
|
||||||
|
|
|
@ -13,7 +13,7 @@ cmake \
|
||||||
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
|
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
|
||||||
-D CMAKE_C_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE" \
|
-D CMAKE_C_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE" \
|
||||||
-D CMAKE_CXX_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE" \
|
-D CMAKE_CXX_COMPILER_LAUNCHER="$CCACHE_EXECUTABLE" \
|
||||||
-D CMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" \
|
-D CMAKE_CXX_FLAGS="-stdlib=libc++" \
|
||||||
-D CMAKE_C_FLAGS_RELEASE="-g -O0" \
|
-D CMAKE_C_FLAGS_RELEASE="-g -O0" \
|
||||||
-D CMAKE_CXX_FLAGS_RELEASE="-g -O0" \
|
-D CMAKE_CXX_FLAGS_RELEASE="-g -O0" \
|
||||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.12" \
|
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.12" \
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
project(OpenMW)
|
project(OpenMW)
|
||||||
cmake_minimum_required(VERSION 3.1.0)
|
cmake_minimum_required(VERSION 3.1.0)
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
# for link time optimization, remove if cmake version is >= 3.9
|
# for link time optimization, remove if cmake version is >= 3.9
|
||||||
if(POLICY CMP0069)
|
if(POLICY CMP0069)
|
||||||
|
@ -158,6 +160,8 @@ include_directories(${RakNet_INCLUDES})
|
||||||
# Dependencies
|
# Dependencies
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
|
find_package(LZ4 REQUIRED)
|
||||||
|
|
||||||
if (USE_QT)
|
if (USE_QT)
|
||||||
find_package(Qt5Core 5.9 REQUIRED) # Temporary adjustment for TES3MP CI
|
find_package(Qt5Core 5.9 REQUIRED) # Temporary adjustment for TES3MP CI
|
||||||
find_package(Qt5Widgets REQUIRED)
|
find_package(Qt5Widgets REQUIRED)
|
||||||
|
@ -323,7 +327,7 @@ endif()
|
||||||
|
|
||||||
set(Boost_NO_BOOST_CMAKE ON)
|
set(Boost_NO_BOOST_CMAKE ON)
|
||||||
|
|
||||||
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
find_package(Boost 1.6.2 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||||
|
|
||||||
include_directories("."
|
include_directories("."
|
||||||
SYSTEM
|
SYSTEM
|
||||||
|
@ -414,9 +418,6 @@ if (NOT WIN32 AND NOT APPLE)
|
||||||
"${OpenMW_BINARY_DIR}/org.openmw.cs.desktop")
|
"${OpenMW_BINARY_DIR}/org.openmw.cs.desktop")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# CXX Compiler settings
|
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
|
||||||
|
|
||||||
if(OPENMW_LTO_BUILD)
|
if(OPENMW_LTO_BUILD)
|
||||||
if(NOT CMAKE_VERSION VERSION_LESS 3.9)
|
if(NOT CMAKE_VERSION VERSION_LESS 3.9)
|
||||||
include(CheckIPOSupported)
|
include(CheckIPOSupported)
|
||||||
|
@ -437,7 +438,7 @@ endif()
|
||||||
|
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++14 -pedantic -Wno-long-long")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -pedantic -Wno-long-long")
|
||||||
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON )
|
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON )
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
@ -454,6 +455,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.6)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.6)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-parameter")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-parameter")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.0)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override")
|
||||||
|
endif()
|
||||||
elseif (MSVC)
|
elseif (MSVC)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE")
|
||||||
endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||||
|
@ -625,6 +630,10 @@ if (WIN32)
|
||||||
if (BUILD_OPENMW)
|
if (BUILD_OPENMW)
|
||||||
set_target_properties(osg-ffmpeg-videoplayer PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
set_target_properties(osg-ffmpeg-videoplayer PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (MSVC_VERSION GREATER_EQUAL 1915 AND MSVC_VERSION LESS 1920)
|
||||||
|
target_compile_definitions(components INTERFACE _ENABLE_EXTENDED_ALIGNED_STORAGE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (BUILD_BSATOOL)
|
if (BUILD_BSATOOL)
|
||||||
set_target_properties(bsatool PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
set_target_properties(bsatool PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}")
|
||||||
|
@ -883,9 +892,15 @@ elseif(NOT APPLE)
|
||||||
|
|
||||||
# Install binaries
|
# Install binaries
|
||||||
IF(BUILD_OPENMW)
|
IF(BUILD_OPENMW)
|
||||||
# Start of tes3mp change (major)
|
IF(ANDROID)
|
||||||
INSTALL(PROGRAMS "${INSTALL_SOURCE}/tes3mp" DESTINATION "${BINDIR}" )
|
# Start of tes3mp change (major)
|
||||||
# End of tes3mp change (major)
|
INSTALL(PROGRAMS "${INSTALL_SOURCE}/libtes3mp.so" DESTINATION "${BINDIR}" )
|
||||||
|
# End of tes3mp change (major)
|
||||||
|
ELSE(ANDROID)
|
||||||
|
# Start of tes3mp change (major)
|
||||||
|
INSTALL(PROGRAMS "${INSTALL_SOURCE}/tes3mp" DESTINATION "${BINDIR}" )
|
||||||
|
# End of tes3mp change (major)
|
||||||
|
ENDIF(ANDROID)
|
||||||
ENDIF(BUILD_OPENMW)
|
ENDIF(BUILD_OPENMW)
|
||||||
# Start of tes3mp addition
|
# Start of tes3mp addition
|
||||||
IF(BUILD_OPENMW_MP)
|
IF(BUILD_OPENMW_MP)
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <boost/filesystem/fstream.hpp>
|
#include <boost/filesystem/fstream.hpp>
|
||||||
|
|
||||||
#include <components/bsa/bsa_file.hpp>
|
#include <components/bsa/compressedbsafile.hpp>
|
||||||
|
#include <components/misc/stringops.hpp>
|
||||||
|
|
||||||
#define BSATOOL_VERSION 1.1
|
#define BSATOOL_VERSION 1.1
|
||||||
|
|
||||||
|
@ -25,16 +26,6 @@ struct Arguments
|
||||||
bool fullpath;
|
bool fullpath;
|
||||||
};
|
};
|
||||||
|
|
||||||
void replaceAll(std::string& str, const std::string& needle, const std::string& substitute)
|
|
||||||
{
|
|
||||||
size_t pos = str.find(needle);
|
|
||||||
while(pos != std::string::npos)
|
|
||||||
{
|
|
||||||
str.replace(pos, needle.size(), substitute);
|
|
||||||
pos = str.find(needle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool parseOptions (int argc, char** argv, Arguments &info)
|
bool parseOptions (int argc, char** argv, Arguments &info)
|
||||||
{
|
{
|
||||||
bpo::options_description desc("Inspect and extract files from Bethesda BSA archives\n\n"
|
bpo::options_description desc("Inspect and extract files from Bethesda BSA archives\n\n"
|
||||||
|
@ -144,9 +135,9 @@ bool parseOptions (int argc, char** argv, Arguments &info)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int list(Bsa::BSAFile& bsa, Arguments& info);
|
int list(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info);
|
||||||
int extract(Bsa::BSAFile& bsa, Arguments& info);
|
int extract(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info);
|
||||||
int extractAll(Bsa::BSAFile& bsa, Arguments& info);
|
int extractAll(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info);
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
@ -157,8 +148,16 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// Open file
|
// Open file
|
||||||
Bsa::BSAFile bsa;
|
std::unique_ptr<Bsa::BSAFile> bsa;
|
||||||
bsa.open(info.filename);
|
|
||||||
|
Bsa::BsaVersion bsaVersion = Bsa::CompressedBSAFile::detectVersion(info.filename);
|
||||||
|
|
||||||
|
if (bsaVersion == Bsa::BSAVER_COMPRESSED)
|
||||||
|
bsa = std::make_unique<Bsa::CompressedBSAFile>(Bsa::CompressedBSAFile());
|
||||||
|
else
|
||||||
|
bsa = std::make_unique<Bsa::BSAFile>(Bsa::BSAFile());
|
||||||
|
|
||||||
|
bsa->open(info.filename);
|
||||||
|
|
||||||
if (info.mode == "list")
|
if (info.mode == "list")
|
||||||
return list(bsa, info);
|
return list(bsa, info);
|
||||||
|
@ -179,10 +178,10 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int list(Bsa::BSAFile& bsa, Arguments& info)
|
int list(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info)
|
||||||
{
|
{
|
||||||
// List all files
|
// List all files
|
||||||
const Bsa::BSAFile::FileList &files = bsa.getList();
|
const Bsa::BSAFile::FileList &files = bsa->getList();
|
||||||
for (const auto& file : files)
|
for (const auto& file : files)
|
||||||
{
|
{
|
||||||
if(info.longformat)
|
if(info.longformat)
|
||||||
|
@ -201,15 +200,15 @@ int list(Bsa::BSAFile& bsa, Arguments& info)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int extract(Bsa::BSAFile& bsa, Arguments& info)
|
int extract(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info)
|
||||||
{
|
{
|
||||||
std::string archivePath = info.extractfile;
|
std::string archivePath = info.extractfile;
|
||||||
replaceAll(archivePath, "/", "\\");
|
Misc::StringUtils::replaceAll(archivePath, "/", "\\");
|
||||||
|
|
||||||
std::string extractPath = info.extractfile;
|
std::string extractPath = info.extractfile;
|
||||||
replaceAll(extractPath, "\\", "/");
|
Misc::StringUtils::replaceAll(extractPath, "\\", "/");
|
||||||
|
|
||||||
if (!bsa.exists(archivePath.c_str()))
|
if (!bsa->exists(archivePath.c_str()))
|
||||||
{
|
{
|
||||||
std::cout << "ERROR: file '" << archivePath << "' not found\n";
|
std::cout << "ERROR: file '" << archivePath << "' not found\n";
|
||||||
std::cout << "In archive: " << info.filename << std::endl;
|
std::cout << "In archive: " << info.filename << std::endl;
|
||||||
|
@ -237,7 +236,7 @@ int extract(Bsa::BSAFile& bsa, Arguments& info)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a stream for the file to extract
|
// Get a stream for the file to extract
|
||||||
Files::IStreamPtr stream = bsa.getFile(archivePath.c_str());
|
Files::IStreamPtr stream = bsa->getFile(archivePath.c_str());
|
||||||
|
|
||||||
bfs::ofstream out(target, std::ios::binary);
|
bfs::ofstream out(target, std::ios::binary);
|
||||||
|
|
||||||
|
@ -250,12 +249,12 @@ int extract(Bsa::BSAFile& bsa, Arguments& info)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int extractAll(Bsa::BSAFile& bsa, Arguments& info)
|
int extractAll(std::unique_ptr<Bsa::BSAFile>& bsa, Arguments& info)
|
||||||
{
|
{
|
||||||
for (const auto &file : bsa.getList())
|
for (const auto &file : bsa->getList())
|
||||||
{
|
{
|
||||||
std::string extractPath(file.name);
|
std::string extractPath(file.name);
|
||||||
replaceAll(extractPath, "\\", "/");
|
Misc::StringUtils::replaceAll(extractPath, "\\", "/");
|
||||||
|
|
||||||
// Get the target path (the path the file will be extracted to)
|
// Get the target path (the path the file will be extracted to)
|
||||||
bfs::path target (info.outdir);
|
bfs::path target (info.outdir);
|
||||||
|
@ -273,7 +272,7 @@ int extractAll(Bsa::BSAFile& bsa, Arguments& info)
|
||||||
|
|
||||||
// Get a stream for the file to extract
|
// Get a stream for the file to extract
|
||||||
// (inefficient because getFile iter on the list again)
|
// (inefficient because getFile iter on the list again)
|
||||||
Files::IStreamPtr data = bsa.getFile(file.name);
|
Files::IStreamPtr data = bsa->getFile(file.name);
|
||||||
bfs::ofstream out(target, std::ios::binary);
|
bfs::ofstream out(target, std::ios::binary);
|
||||||
|
|
||||||
// Write the file to disk
|
// Write the file to disk
|
||||||
|
|
|
@ -136,6 +136,7 @@ bool Launcher::AdvancedPage::loadSettings()
|
||||||
loadSettingBool(autoSwitchShoulderCheckBox, "auto switch shoulder", "Camera");
|
loadSettingBool(autoSwitchShoulderCheckBox, "auto switch shoulder", "Camera");
|
||||||
loadSettingBool(previewIfStandStillCheckBox, "preview if stand still", "Camera");
|
loadSettingBool(previewIfStandStillCheckBox, "preview if stand still", "Camera");
|
||||||
loadSettingBool(deferredPreviewRotationCheckBox, "deferred preview rotation", "Camera");
|
loadSettingBool(deferredPreviewRotationCheckBox, "deferred preview rotation", "Camera");
|
||||||
|
loadSettingBool(headBobbingCheckBox, "head bobbing", "Camera");
|
||||||
defaultShoulderComboBox->setCurrentIndex(
|
defaultShoulderComboBox->setCurrentIndex(
|
||||||
mEngineSettings.getVector2("view over shoulder offset", "Camera").x() >= 0 ? 0 : 1);
|
mEngineSettings.getVector2("view over shoulder offset", "Camera").x() >= 0 ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
@ -151,6 +152,7 @@ bool Launcher::AdvancedPage::loadSettings()
|
||||||
// Match the index with the option (only 0, 1, 2, or 3 are valid). Will default to 0 if invalid.
|
// Match the index with the option (only 0, 1, 2, or 3 are valid). Will default to 0 if invalid.
|
||||||
if (showOwnedIndex >= 0 && showOwnedIndex <= 3)
|
if (showOwnedIndex >= 0 && showOwnedIndex <= 3)
|
||||||
showOwnedComboBox->setCurrentIndex(showOwnedIndex);
|
showOwnedComboBox->setCurrentIndex(showOwnedIndex);
|
||||||
|
loadSettingBool(stretchBackgroundCheckBox, "stretch menu background", "GUI");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bug fixes
|
// Bug fixes
|
||||||
|
@ -253,6 +255,7 @@ void Launcher::AdvancedPage::saveSettings()
|
||||||
saveSettingBool(autoSwitchShoulderCheckBox, "auto switch shoulder", "Camera");
|
saveSettingBool(autoSwitchShoulderCheckBox, "auto switch shoulder", "Camera");
|
||||||
saveSettingBool(previewIfStandStillCheckBox, "preview if stand still", "Camera");
|
saveSettingBool(previewIfStandStillCheckBox, "preview if stand still", "Camera");
|
||||||
saveSettingBool(deferredPreviewRotationCheckBox, "deferred preview rotation", "Camera");
|
saveSettingBool(deferredPreviewRotationCheckBox, "deferred preview rotation", "Camera");
|
||||||
|
saveSettingBool(headBobbingCheckBox, "head bobbing", "Camera");
|
||||||
|
|
||||||
osg::Vec2f shoulderOffset = mEngineSettings.getVector2("view over shoulder offset", "Camera");
|
osg::Vec2f shoulderOffset = mEngineSettings.getVector2("view over shoulder offset", "Camera");
|
||||||
if (defaultShoulderComboBox->currentIndex() != (shoulderOffset.x() >= 0 ? 0 : 1))
|
if (defaultShoulderComboBox->currentIndex() != (shoulderOffset.x() >= 0 ? 0 : 1))
|
||||||
|
@ -275,6 +278,7 @@ void Launcher::AdvancedPage::saveSettings()
|
||||||
int showOwnedCurrentIndex = showOwnedComboBox->currentIndex();
|
int showOwnedCurrentIndex = showOwnedComboBox->currentIndex();
|
||||||
if (showOwnedCurrentIndex != mEngineSettings.getInt("show owned", "Game"))
|
if (showOwnedCurrentIndex != mEngineSettings.getInt("show owned", "Game"))
|
||||||
mEngineSettings.setInt("show owned", "Game", showOwnedCurrentIndex);
|
mEngineSettings.setInt("show owned", "Game", showOwnedCurrentIndex);
|
||||||
|
saveSettingBool(stretchBackgroundCheckBox, "stretch menu background", "GUI");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bug fixes
|
// Bug fixes
|
||||||
|
|
|
@ -13,12 +13,13 @@
|
||||||
|
|
||||||
#include <SDL_video.h>
|
#include <SDL_video.h>
|
||||||
|
|
||||||
|
#include <numeric>
|
||||||
|
|
||||||
#include <components/files/configurationmanager.hpp>
|
#include <components/files/configurationmanager.hpp>
|
||||||
#include <components/misc/gcd.hpp>
|
|
||||||
|
|
||||||
QString getAspect(int x, int y)
|
QString getAspect(int x, int y)
|
||||||
{
|
{
|
||||||
int gcd = Misc::gcd (x, y);
|
int gcd = std::gcd (x, y);
|
||||||
int xaspect = x / gcd;
|
int xaspect = x / gcd;
|
||||||
int yaspect = y / gcd;
|
int yaspect = y / gcd;
|
||||||
// special case: 8 : 5 is usually referred to as 16:10
|
// special case: 8 : 5 is usually referred to as 16:10
|
||||||
|
|
|
@ -211,10 +211,10 @@ void Launcher::MainDialog::setVersionLabel()
|
||||||
versionLabel->setText(tr("OpenMW development (%1)").arg(revision.left(10)));
|
versionLabel->setText(tr("OpenMW development (%1)").arg(revision.left(10)));
|
||||||
|
|
||||||
// Add the compile date and time
|
// Add the compile date and time
|
||||||
versionLabel->setToolTip(tr("Compiled on %1 %2").arg(QLocale(QLocale::C).toDate(QString(__DATE__).simplified(),
|
auto compileDate = QLocale(QLocale::C).toDate(QString(__DATE__).simplified(), QLatin1String("MMM d yyyy"));
|
||||||
QLatin1String("MMM d yyyy")).toString(Qt::SystemLocaleLongDate),
|
auto compileTime = QLocale(QLocale::C).toTime(QString(__TIME__).simplified(), QLatin1String("hh:mm:ss"));
|
||||||
QLocale(QLocale::C).toTime(QString(__TIME__).simplified(),
|
versionLabel->setToolTip(tr("Compiled on %1 %2").arg(QLocale::system().toString(compileDate, QLocale::LongFormat),
|
||||||
QLatin1String("hh:mm:ss")).toString(Qt::SystemLocaleShortDate)));
|
QLocale::system().toString(compileTime, QLocale::ShortFormat)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Launcher::MainDialog::setup()
|
bool Launcher::MainDialog::setup()
|
||||||
|
|
|
@ -84,7 +84,7 @@ namespace Launcher
|
||||||
inline bool startProgram(const QString &name, bool detached = false) { return startProgram(name, QStringList(), detached); }
|
inline bool startProgram(const QString &name, bool detached = false) { return startProgram(name, QStringList(), detached); }
|
||||||
bool startProgram(const QString &name, const QStringList &arguments, bool detached = false);
|
bool startProgram(const QString &name, const QStringList &arguments, bool detached = false);
|
||||||
|
|
||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event) override;
|
||||||
|
|
||||||
PlayPage *mPlayPage;
|
PlayPage *mPlayPage;
|
||||||
GraphicsPage *mGraphicsPage;
|
GraphicsPage *mGraphicsPage;
|
||||||
|
|
|
@ -27,7 +27,7 @@ public:
|
||||||
LineEdit(QWidget *parent = 0);
|
LineEdit(QWidget *parent = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *);
|
void resizeEvent(QResizeEvent *) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateClearButton(const QString &text);
|
void updateClearButton(const QString &text);
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace Launcher
|
||||||
inline LineEdit *lineEdit() { return mLineEdit; }
|
inline LineEdit *lineEdit() { return mLineEdit; }
|
||||||
void setOkButtonEnabled(bool enabled);
|
void setOkButtonEnabled(bool enabled);
|
||||||
|
|
||||||
int exec();
|
int exec() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -645,7 +645,7 @@ MwIniImporter::MwIniImporter()
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=0; fallback[i]; i++) {
|
for(int i=0; fallback[i]; i++) {
|
||||||
mMergeFallback.push_back(fallback[i]);
|
mMergeFallback.emplace_back(fallback[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -910,7 +910,7 @@ void MwIniImporter::importGameFiles(multistrmap &cfg, const multistrmap &ini, co
|
||||||
std::time_t time = lastWriteTime(path, defaultTime);
|
std::time_t time = lastWriteTime(path, defaultTime);
|
||||||
if (time != defaultTime)
|
if (time != defaultTime)
|
||||||
{
|
{
|
||||||
contentFiles.push_back({time, path});
|
contentFiles.emplace_back(time, std::move(path));
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -985,14 +985,7 @@ std::time_t MwIniImporter::lastWriteTime(const boost::filesystem::path& filename
|
||||||
std::time_t writeTime(defaultTime);
|
std::time_t writeTime(defaultTime);
|
||||||
if (boost::filesystem::exists(filename))
|
if (boost::filesystem::exists(filename))
|
||||||
{
|
{
|
||||||
// FixMe: remove #if when Boost dependency for Linux builds updated
|
|
||||||
// This allows Linux to build until then
|
|
||||||
#if (BOOST_VERSION >= 104800)
|
|
||||||
// need to resolve any symlinks so that we get time of file, not symlink
|
|
||||||
boost::filesystem::path resolved = boost::filesystem::canonical(filename);
|
boost::filesystem::path resolved = boost::filesystem::canonical(filename);
|
||||||
#else
|
|
||||||
boost::filesystem::path resolved = filename;
|
|
||||||
#endif
|
|
||||||
writeTime = boost::filesystem::last_write_time(resolved);
|
writeTime = boost::filesystem::last_write_time(resolved);
|
||||||
|
|
||||||
// print timestamp
|
// print timestamp
|
||||||
|
|
|
@ -89,10 +89,10 @@ std::pair<Files::PathContainer, std::vector<std::string> > CS::Editor::readConfi
|
||||||
|
|
||||||
desc.add_options()
|
desc.add_options()
|
||||||
("data", boost::program_options::value<Files::EscapePathContainer>()->default_value(Files::EscapePathContainer(), "data")->multitoken()->composing())
|
("data", boost::program_options::value<Files::EscapePathContainer>()->default_value(Files::EscapePathContainer(), "data")->multitoken()->composing())
|
||||||
("data-local", boost::program_options::value<Files::EscapeHashString>()->default_value(""))
|
("data-local", boost::program_options::value<Files::EscapePath>()->default_value(Files::EscapePath(), ""))
|
||||||
("fs-strict", boost::program_options::value<bool>()->implicit_value(true)->default_value(false))
|
("fs-strict", boost::program_options::value<bool>()->implicit_value(true)->default_value(false))
|
||||||
("encoding", boost::program_options::value<Files::EscapeHashString>()->default_value("win1252"))
|
("encoding", boost::program_options::value<Files::EscapeHashString>()->default_value("win1252"))
|
||||||
("resources", boost::program_options::value<Files::EscapeHashString>()->default_value("resources"))
|
("resources", boost::program_options::value<Files::EscapePath>()->default_value(Files::EscapePath(), "resources"))
|
||||||
("fallback-archive", boost::program_options::value<Files::EscapeStringVector>()->
|
("fallback-archive", boost::program_options::value<Files::EscapeStringVector>()->
|
||||||
default_value(Files::EscapeStringVector(), "fallback-archive")->multitoken())
|
default_value(Files::EscapeStringVector(), "fallback-archive")->multitoken())
|
||||||
("fallback", boost::program_options::value<FallbackMap>()->default_value(FallbackMap(), "")
|
("fallback", boost::program_options::value<FallbackMap>()->default_value(FallbackMap(), "")
|
||||||
|
@ -112,7 +112,7 @@ std::pair<Files::PathContainer, std::vector<std::string> > CS::Editor::readConfi
|
||||||
mDocumentManager.setEncoding(ToUTF8::calculateEncoding(mEncodingName));
|
mDocumentManager.setEncoding(ToUTF8::calculateEncoding(mEncodingName));
|
||||||
mFileDialog.setEncoding (QString::fromUtf8(mEncodingName.c_str()));
|
mFileDialog.setEncoding (QString::fromUtf8(mEncodingName.c_str()));
|
||||||
|
|
||||||
mDocumentManager.setResourceDir (mResources = variables["resources"].as<Files::EscapeHashString>().toStdString());
|
mDocumentManager.setResourceDir (mResources = variables["resources"].as<Files::EscapePath>().mPath);
|
||||||
|
|
||||||
if (variables["script-blacklist-use"].as<bool>())
|
if (variables["script-blacklist-use"].as<bool>())
|
||||||
mDocumentManager.setBlacklistedScripts (
|
mDocumentManager.setBlacklistedScripts (
|
||||||
|
@ -125,14 +125,9 @@ std::pair<Files::PathContainer, std::vector<std::string> > CS::Editor::readConfi
|
||||||
dataDirs = Files::PathContainer(Files::EscapePath::toPathContainer(variables["data"].as<Files::EscapePathContainer>()));
|
dataDirs = Files::PathContainer(Files::EscapePath::toPathContainer(variables["data"].as<Files::EscapePathContainer>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string local = variables["data-local"].as<Files::EscapeHashString>().toStdString();
|
Files::PathContainer::value_type local(variables["data-local"].as<Files::EscapePath>().mPath);
|
||||||
if (!local.empty())
|
if (!local.empty())
|
||||||
{
|
dataLocal.push_back(local);
|
||||||
if (local.front() == '\"')
|
|
||||||
local = local.substr(1, local.length() - 2);
|
|
||||||
|
|
||||||
dataLocal.push_back(Files::PathContainer::value_type(local));
|
|
||||||
}
|
|
||||||
|
|
||||||
mCfgMgr.processPaths (dataDirs);
|
mCfgMgr.processPaths (dataDirs);
|
||||||
mCfgMgr.processPaths (dataLocal, true);
|
mCfgMgr.processPaths (dataLocal, true);
|
||||||
|
@ -229,7 +224,7 @@ void CS::Editor::openFiles (const boost::filesystem::path &savePath, const std::
|
||||||
if(discoveredFiles.empty())
|
if(discoveredFiles.empty())
|
||||||
{
|
{
|
||||||
for (const QString &path : mFileDialog.selectedFilePaths())
|
for (const QString &path : mFileDialog.selectedFilePaths())
|
||||||
files.push_back(path.toUtf8().constData());
|
files.emplace_back(path.toUtf8().constData());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -246,7 +241,7 @@ void CS::Editor::createNewFile (const boost::filesystem::path &savePath)
|
||||||
std::vector<boost::filesystem::path> files;
|
std::vector<boost::filesystem::path> files;
|
||||||
|
|
||||||
for (const QString &path : mFileDialog.selectedFilePaths()) {
|
for (const QString &path : mFileDialog.selectedFilePaths()) {
|
||||||
files.push_back(path.toUtf8().constData());
|
files.emplace_back(path.toUtf8().constData());
|
||||||
}
|
}
|
||||||
|
|
||||||
files.push_back (savePath);
|
files.push_back (savePath);
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Application : public QApplication
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool notify (QObject *receiver, QEvent *event)
|
bool notify (QObject *receiver, QEvent *event) override
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -47,9 +47,6 @@ int runApplication(int argc, char *argv[])
|
||||||
setenv("OSG_GL_TEXTURE_STORAGE", "OFF", 0);
|
setenv("OSG_GL_TEXTURE_STORAGE", "OFF", 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// To allow background thread drawing in OSG
|
|
||||||
QApplication::setAttribute(Qt::AA_X11InitThreads, true);
|
|
||||||
|
|
||||||
Q_INIT_RESOURCE (resources);
|
Q_INIT_RESOURCE (resources);
|
||||||
|
|
||||||
qRegisterMetaType<std::string> ("std::string");
|
qRegisterMetaType<std::string> ("std::string");
|
||||||
|
|
|
@ -127,7 +127,7 @@ void CSMDoc::Loader::load()
|
||||||
|
|
||||||
void CSMDoc::Loader::loadDocument (CSMDoc::Document *document)
|
void CSMDoc::Loader::loadDocument (CSMDoc::Document *document)
|
||||||
{
|
{
|
||||||
mDocuments.push_back (std::make_pair (document, Stage()));
|
mDocuments.emplace_back (document, Stage());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMDoc::Loader::abortLoading (CSMDoc::Document *document)
|
void CSMDoc::Loader::abortLoading (CSMDoc::Document *document)
|
||||||
|
|
|
@ -57,7 +57,7 @@ void CSMDoc::Operation::run()
|
||||||
|
|
||||||
void CSMDoc::Operation::appendStage (Stage *stage)
|
void CSMDoc::Operation::appendStage (Stage *stage)
|
||||||
{
|
{
|
||||||
mStages.push_back (std::make_pair (stage, 0));
|
mStages.emplace_back (stage, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMDoc::Operation::setDefaultSeverity (Message::Severity severity)
|
void CSMDoc::Operation::setDefaultSeverity (Message::Severity severity)
|
||||||
|
|
|
@ -37,10 +37,10 @@ namespace CSMDoc
|
||||||
OpenSaveStage (Document& document, SavingState& state, bool projectFile);
|
OpenSaveStage (Document& document, SavingState& state, bool projectFile);
|
||||||
///< \param projectFile Saving the project file instead of the content file.
|
///< \param projectFile Saving the project file instead of the content file.
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,10 +55,10 @@ namespace CSMDoc
|
||||||
WriteHeaderStage (Document& document, SavingState& state, bool simple);
|
WriteHeaderStage (Document& document, SavingState& state, bool simple);
|
||||||
///< \param simple Simplified header (used for project files).
|
///< \param simple Simplified header (used for project files).
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,10 +75,10 @@ namespace CSMDoc
|
||||||
WriteCollectionStage (const CollectionT& collection, SavingState& state,
|
WriteCollectionStage (const CollectionT& collection, SavingState& state,
|
||||||
CSMWorld::Scope scope = CSMWorld::Scope_Content);
|
CSMWorld::Scope scope = CSMWorld::Scope_Content);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,10 +125,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WriteDialogueCollectionStage (Document& document, SavingState& state, bool journal);
|
WriteDialogueCollectionStage (Document& document, SavingState& state, bool journal);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -142,10 +142,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WriteRefIdCollectionStage (Document& document, SavingState& state);
|
WriteRefIdCollectionStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -159,10 +159,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
CollectionReferencesStage (Document& document, SavingState& state);
|
CollectionReferencesStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -175,10 +175,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WriteCellCollectionStage (Document& document, SavingState& state);
|
WriteCellCollectionStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -192,10 +192,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WritePathgridCollectionStage (Document& document, SavingState& state);
|
WritePathgridCollectionStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -209,10 +209,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WriteLandCollectionStage (Document& document, SavingState& state);
|
WriteLandCollectionStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -226,10 +226,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
WriteLandTextureCollectionStage (Document& document, SavingState& state);
|
WriteLandTextureCollectionStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -241,10 +241,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
CloseSaveStage (SavingState& state);
|
CloseSaveStage (SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -257,10 +257,10 @@ namespace CSMDoc
|
||||||
|
|
||||||
FinalSavingStage (Document& document, SavingState& state);
|
FinalSavingStage (Document& document, SavingState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, Messages& messages);
|
void perform (int stage, Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,8 @@ namespace CSMFilter
|
||||||
|
|
||||||
AndNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
AndNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \param columns column ID to column index mapping
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,12 +13,12 @@ namespace CSMFilter
|
||||||
|
|
||||||
BooleanNode (bool true_);
|
BooleanNode (bool true_);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \param columns column ID to column index mapping
|
||||||
|
|
||||||
virtual std::string toString (bool numericColumns) const;
|
std::string toString (bool numericColumns) const override;
|
||||||
///< Return a string that represents this node.
|
///< Return a string that represents this node.
|
||||||
///
|
///
|
||||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace CSMFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual std::vector<int> getReferencedColumns() const;
|
std::vector<int> getReferencedColumns() const override;
|
||||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||||
/// passed into test as columns must contain all columns listed here.
|
/// passed into test as columns must contain all columns listed here.
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,11 +21,11 @@ namespace CSMFilter
|
||||||
|
|
||||||
const Node& operator[] (int index) const;
|
const Node& operator[] (int index) const;
|
||||||
|
|
||||||
virtual std::vector<int> getReferencedColumns() const;
|
std::vector<int> getReferencedColumns() const override;
|
||||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||||
/// passed into test as columns must contain all columns listed here.
|
/// passed into test as columns must contain all columns listed here.
|
||||||
|
|
||||||
virtual std::string toString (bool numericColumns) const;
|
std::string toString (bool numericColumns) const override;
|
||||||
///< Return a string that represents this node.
|
///< Return a string that represents this node.
|
||||||
///
|
///
|
||||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||||
|
|
|
@ -11,8 +11,8 @@ namespace CSMFilter
|
||||||
|
|
||||||
NotNode (std::shared_ptr<Node> child);
|
NotNode (std::shared_ptr<Node> child);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \param columns column ID to column index mapping
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,8 +11,8 @@ namespace CSMFilter
|
||||||
|
|
||||||
OrNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
OrNode (const std::vector<std::shared_ptr<Node> >& nodes);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \param columns column ID to column index mapping
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,16 +14,16 @@ namespace CSMFilter
|
||||||
|
|
||||||
TextNode (int columnId, const std::string& text);
|
TextNode (int columnId, const std::string& text);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \param columns column ID to column index mapping
|
||||||
|
|
||||||
virtual std::vector<int> getReferencedColumns() const;
|
std::vector<int> getReferencedColumns() const override;
|
||||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||||
/// passed into test as columns must contain all columns listed here.
|
/// passed into test as columns must contain all columns listed here.
|
||||||
|
|
||||||
virtual std::string toString (bool numericColumns) const;
|
std::string toString (bool numericColumns) const override;
|
||||||
///< Return a string that represents this node.
|
///< Return a string that represents this node.
|
||||||
///
|
///
|
||||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||||
|
|
|
@ -18,11 +18,11 @@ namespace CSMFilter
|
||||||
|
|
||||||
Node& getChild();
|
Node& getChild();
|
||||||
|
|
||||||
virtual std::vector<int> getReferencedColumns() const;
|
std::vector<int> getReferencedColumns() const override;
|
||||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||||
/// passed into test as columns must contain all columns listed here.
|
/// passed into test as columns must contain all columns listed here.
|
||||||
|
|
||||||
virtual std::string toString (bool numericColumns) const;
|
std::string toString (bool numericColumns) const override;
|
||||||
///< Return a string that represents this node.
|
///< Return a string that represents this node.
|
||||||
///
|
///
|
||||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||||
|
|
|
@ -27,16 +27,16 @@ namespace CSMFilter
|
||||||
|
|
||||||
ValueNode (int columnId, Type lowerType, Type upperType, double lower, double upper);
|
ValueNode (int columnId, Type lowerType, Type upperType, double lower, double upper);
|
||||||
|
|
||||||
virtual bool test (const CSMWorld::IdTableBase& table, int row,
|
bool test (const CSMWorld::IdTableBase& table, int row,
|
||||||
const std::map<int, int>& columns) const;
|
const std::map<int, int>& columns) const override;
|
||||||
///< \return Can the specified table row pass through to filter?
|
///< \return Can the specified table row pass through to filter?
|
||||||
/// \param columns column ID to column index mapping
|
/// \param columns column ID to column index mapping
|
||||||
|
|
||||||
virtual std::vector<int> getReferencedColumns() const;
|
std::vector<int> getReferencedColumns() const override;
|
||||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||||
/// passed into test as columns must contain all columns listed here.
|
/// passed into test as columns must contain all columns listed here.
|
||||||
|
|
||||||
virtual std::string toString (bool numericColumns) const;
|
std::string toString (bool numericColumns) const override;
|
||||||
///< Return a string that represents this node.
|
///< Return a string that represents this node.
|
||||||
///
|
///
|
||||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||||
|
|
|
@ -23,9 +23,9 @@ namespace CSMPrefs
|
||||||
BoolSetting& setTooltip (const std::string& tooltip);
|
BoolSetting& setTooltip (const std::string& tooltip);
|
||||||
|
|
||||||
/// Return label, input widget.
|
/// Return label, input widget.
|
||||||
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
|
std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) override;
|
||||||
|
|
||||||
virtual void updateWidget();
|
void updateWidget() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,9 @@ namespace CSMPrefs
|
||||||
ColourSetting& setTooltip (const std::string& tooltip);
|
ColourSetting& setTooltip (const std::string& tooltip);
|
||||||
|
|
||||||
/// Return label, input widget.
|
/// Return label, input widget.
|
||||||
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
|
std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) override;
|
||||||
|
|
||||||
virtual void updateWidget();
|
void updateWidget() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,9 @@ namespace CSMPrefs
|
||||||
DoubleSetting& setTooltip (const std::string& tooltip);
|
DoubleSetting& setTooltip (const std::string& tooltip);
|
||||||
|
|
||||||
/// Return label, input widget.
|
/// Return label, input widget.
|
||||||
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
|
std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) override;
|
||||||
|
|
||||||
virtual void updateWidget();
|
void updateWidget() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ CSMPrefs::EnumValues& CSMPrefs::EnumValues::add (const EnumValue& value)
|
||||||
|
|
||||||
CSMPrefs::EnumValues& CSMPrefs::EnumValues::add (const std::string& value, const std::string& tooltip)
|
CSMPrefs::EnumValues& CSMPrefs::EnumValues::add (const std::string& value, const std::string& tooltip)
|
||||||
{
|
{
|
||||||
mValues.push_back (EnumValue (value, tooltip));
|
mValues.emplace_back(value, tooltip);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ namespace CSMPrefs
|
||||||
EnumSetting& addValue (const std::string& value, const std::string& tooltip);
|
EnumSetting& addValue (const std::string& value, const std::string& tooltip);
|
||||||
|
|
||||||
/// Return label, input widget.
|
/// Return label, input widget.
|
||||||
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
|
std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) override;
|
||||||
|
|
||||||
virtual void updateWidget();
|
void updateWidget() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,9 @@ namespace CSMPrefs
|
||||||
IntSetting& setTooltip (const std::string& tooltip);
|
IntSetting& setTooltip (const std::string& tooltip);
|
||||||
|
|
||||||
/// Return label, input widget.
|
/// Return label, input widget.
|
||||||
virtual std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent);
|
std::pair<QWidget *, QWidget *> makeWidgets (QWidget *parent) override;
|
||||||
|
|
||||||
virtual void updateWidget();
|
void updateWidget() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -19,13 +19,13 @@ namespace CSMPrefs
|
||||||
ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
ModifierSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
||||||
const std::string& label);
|
const std::string& label);
|
||||||
|
|
||||||
virtual std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent);
|
std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent) override;
|
||||||
|
|
||||||
virtual void updateWidget();
|
void updateWidget() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
bool eventFilter(QObject* target, QEvent* event);
|
bool eventFilter(QObject* target, QEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@ namespace CSMPrefs
|
||||||
}
|
}
|
||||||
else if (pos == lastPos)
|
else if (pos == lastPos)
|
||||||
{
|
{
|
||||||
potentials.push_back(std::make_pair(result, shortcut));
|
potentials.emplace_back(result, shortcut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace CSMPrefs
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
bool eventFilter(QObject* watched, QEvent* event);
|
bool eventFilter(QObject* watched, QEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -19,13 +19,13 @@ namespace CSMPrefs
|
||||||
ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
ShortcutSetting(Category* parent, Settings::Manager* values, QMutex* mutex, const std::string& key,
|
||||||
const std::string& label);
|
const std::string& label);
|
||||||
|
|
||||||
virtual std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent);
|
std::pair<QWidget*, QWidget*> makeWidgets(QWidget* parent) override;
|
||||||
|
|
||||||
virtual void updateWidget();
|
void updateWidget() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
bool eventFilter(QObject* target, QEvent* event);
|
bool eventFilter(QObject* target, QEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,10 @@ namespace CSMTools
|
||||||
BirthsignCheckStage (const CSMWorld::IdCollection<ESM::BirthSign> &birthsigns,
|
BirthsignCheckStage (const CSMWorld::IdCollection<ESM::BirthSign> &birthsigns,
|
||||||
const CSMWorld::Resources &textures);
|
const CSMWorld::Resources &textures);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,10 @@ namespace CSMTools
|
||||||
const CSMWorld::Resources &meshes,
|
const CSMWorld::Resources &meshes,
|
||||||
const CSMWorld::IdCollection<ESM::Race> &races );
|
const CSMWorld::IdCollection<ESM::Race> &races );
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform( int stage, CSMDoc::Messages &messages );
|
void perform(int stage, CSMDoc::Messages &messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
ClassCheckStage (const CSMWorld::IdCollection<ESM::Class>& classes);
|
ClassCheckStage (const CSMWorld::IdCollection<ESM::Class>& classes);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
EnchantmentCheckStage (const CSMWorld::IdCollection<ESM::Enchantment>& enchantments);
|
EnchantmentCheckStage (const CSMWorld::IdCollection<ESM::Enchantment>& enchantments);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
FactionCheckStage (const CSMWorld::IdCollection<ESM::Faction>& factions);
|
FactionCheckStage (const CSMWorld::IdCollection<ESM::Faction>& factions);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,10 +16,10 @@ namespace CSMTools
|
||||||
|
|
||||||
GmstCheckStage(const CSMWorld::IdCollection<ESM::GameSetting>& gameSettings);
|
GmstCheckStage(const CSMWorld::IdCollection<ESM::GameSetting>& gameSettings);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages
|
///< Messages resulting from this stage will be appended to \a messages
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -18,10 +18,10 @@ namespace CSMTools
|
||||||
JournalCheckStage(const CSMWorld::IdCollection<ESM::Dialogue>& journals,
|
JournalCheckStage(const CSMWorld::IdCollection<ESM::Dialogue>& journals,
|
||||||
const CSMWorld::InfoCollection& journalInfos);
|
const CSMWorld::InfoCollection& journalInfos);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages
|
///< Messages resulting from this stage will be appended to \a messages
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -32,9 +32,9 @@ namespace CSMTools
|
||||||
const CSMWorld::Resources &icons,
|
const CSMWorld::Resources &icons,
|
||||||
const CSMWorld::Resources &textures);
|
const CSMWorld::Resources &textures);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
virtual void perform (int stage, CSMDoc::Messages &messages);
|
void perform (int stage, CSMDoc::Messages &messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,10 @@ namespace CSMTools
|
||||||
MandatoryIdStage (const CSMWorld::CollectionBase& idCollection, const CSMWorld::UniversalId& collectionId,
|
MandatoryIdStage (const CSMWorld::CollectionBase& idCollection, const CSMWorld::UniversalId& collectionId,
|
||||||
const std::vector<std::string>& ids);
|
const std::vector<std::string>& ids);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace CSMTools
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
|
|
||||||
virtual void operationDone();
|
void operationDone() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,10 @@ namespace CSMTools
|
||||||
|
|
||||||
StartMergeStage (MergeState& state);
|
StartMergeStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,10 +38,10 @@ namespace CSMTools
|
||||||
|
|
||||||
FinishMergedDocumentStage (MergeState& state, ToUTF8::FromType encoding);
|
FinishMergedDocumentStage (MergeState& state, ToUTF8::FromType encoding);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,10 +55,10 @@ namespace CSMTools
|
||||||
|
|
||||||
MergeIdCollectionStage (MergeState& state, Collection& (CSMWorld::Data::*accessor)());
|
MergeIdCollectionStage (MergeState& state, Collection& (CSMWorld::Data::*accessor)());
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -93,10 +93,10 @@ namespace CSMTools
|
||||||
|
|
||||||
MergeRefIdsStage (MergeState& state);
|
MergeRefIdsStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,10 +109,10 @@ namespace CSMTools
|
||||||
|
|
||||||
MergeReferencesStage (MergeState& state);
|
MergeReferencesStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,10 +125,10 @@ namespace CSMTools
|
||||||
|
|
||||||
PopulateLandTexturesMergeStage (MergeState& state);
|
PopulateLandTexturesMergeStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -140,10 +140,10 @@ namespace CSMTools
|
||||||
|
|
||||||
MergeLandStage (MergeState& state);
|
MergeLandStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -157,10 +157,10 @@ namespace CSMTools
|
||||||
|
|
||||||
FixLandsAndLandTexturesMergeStage (MergeState& state);
|
FixLandsAndLandTexturesMergeStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -174,10 +174,10 @@ namespace CSMTools
|
||||||
|
|
||||||
CleanupLandTexturesMergeStage (MergeState& state);
|
CleanupLandTexturesMergeStage (MergeState& state);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,9 +32,9 @@ namespace CSMTools
|
||||||
PathgridCheckStage (const CSMWorld::SubCellCollection<CSMWorld::Pathgrid,
|
PathgridCheckStage (const CSMWorld::SubCellCollection<CSMWorld::Pathgrid,
|
||||||
CSMWorld::IdAccessor<CSMWorld::Pathgrid> >& pathgrids);
|
CSMWorld::IdAccessor<CSMWorld::Pathgrid> >& pathgrids);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,10 @@ namespace CSMTools
|
||||||
|
|
||||||
RaceCheckStage (const CSMWorld::IdCollection<ESM::Race>& races);
|
RaceCheckStage (const CSMWorld::IdCollection<ESM::Race>& races);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ namespace CSMTools
|
||||||
const CSMWorld::Resources& icons,
|
const CSMWorld::Resources& icons,
|
||||||
const CSMWorld::IdCollection<ESM::BodyPart>& bodyparts);
|
const CSMWorld::IdCollection<ESM::BodyPart>& bodyparts);
|
||||||
|
|
||||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//CONCRETE CHECKS
|
//CONCRETE CHECKS
|
||||||
|
|
|
@ -14,8 +14,8 @@ namespace CSMTools
|
||||||
const CSMWorld::IdCollection<CSMWorld::Cell>& cells,
|
const CSMWorld::IdCollection<CSMWorld::Cell>& cells,
|
||||||
const CSMWorld::IdCollection<ESM::Faction>& factions);
|
const CSMWorld::IdCollection<ESM::Faction>& factions);
|
||||||
|
|
||||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const CSMWorld::RefCollection& mReferences;
|
const CSMWorld::RefCollection& mReferences;
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
RegionCheckStage (const CSMWorld::IdCollection<ESM::Region>& regions);
|
RegionCheckStage (const CSMWorld::IdCollection<ESM::Region>& regions);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,15 +33,15 @@ namespace CSMTools
|
||||||
|
|
||||||
ReportModel (bool fieldColumn = false, bool severityColumn = true);
|
ReportModel (bool fieldColumn = false, bool severityColumn = true);
|
||||||
|
|
||||||
virtual int rowCount (const QModelIndex & parent = QModelIndex()) const;
|
int rowCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual int columnCount (const QModelIndex & parent = QModelIndex()) const;
|
int columnCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const;
|
QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
virtual QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
virtual bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex());
|
bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||||
|
|
||||||
void add (const CSMDoc::Message& message);
|
void add (const CSMDoc::Message& message);
|
||||||
|
|
||||||
|
|
|
@ -36,20 +36,20 @@ namespace CSMTools
|
||||||
|
|
||||||
CSMDoc::Message::Severity getSeverity (Type type);
|
CSMDoc::Message::Severity getSeverity (Type type);
|
||||||
|
|
||||||
virtual void report (const std::string& message, const Compiler::TokenLoc& loc, Type type);
|
void report (const std::string& message, const Compiler::TokenLoc& loc, Type type) override;
|
||||||
///< Report error to the user.
|
///< Report error to the user.
|
||||||
|
|
||||||
virtual void report (const std::string& message, Type type);
|
void report (const std::string& message, Type type) override;
|
||||||
///< Report a file related error
|
///< Report a file related error
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ScriptCheckStage (const CSMDoc::Document& document);
|
ScriptCheckStage (const CSMDoc::Document& document);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,10 +24,10 @@ namespace CSMTools
|
||||||
|
|
||||||
SearchStage (const CSMWorld::IdTableBase *model);
|
SearchStage (const CSMWorld::IdTableBase *model);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
|
|
||||||
void setOperation (const SearchOperation *operation);
|
void setOperation (const SearchOperation *operation);
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
SkillCheckStage (const CSMWorld::IdCollection<ESM::Skill>& skills);
|
SkillCheckStage (const CSMWorld::IdCollection<ESM::Skill>& skills);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,10 @@ namespace CSMTools
|
||||||
SoundCheckStage (const CSMWorld::IdCollection<ESM::Sound>& sounds,
|
SoundCheckStage (const CSMWorld::IdCollection<ESM::Sound>& sounds,
|
||||||
const CSMWorld::Resources &soundfiles);
|
const CSMWorld::Resources &soundfiles);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,10 +20,10 @@ namespace CSMTools
|
||||||
const CSMWorld::IdCollection<ESM::Sound> &sounds,
|
const CSMWorld::IdCollection<ESM::Sound> &sounds,
|
||||||
const CSMWorld::RefIdCollection &objects);
|
const CSMWorld::RefIdCollection &objects);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform(int stage, CSMDoc::Messages &messages);
|
void perform(int stage, CSMDoc::Messages &messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages.
|
///< Messages resulting from this stage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,10 @@ namespace CSMTools
|
||||||
|
|
||||||
SpellCheckStage (const CSMWorld::IdCollection<ESM::Spell>& spells);
|
SpellCheckStage (const CSMWorld::IdCollection<ESM::Spell>& spells);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform (int stage, CSMDoc::Messages& messages);
|
void perform (int stage, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this tage will be appended to \a messages.
|
///< Messages resulting from this tage will be appended to \a messages.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,8 @@ namespace CSMTools
|
||||||
StartScriptCheckStage (const CSMWorld::IdCollection<ESM::StartScript>& startScripts,
|
StartScriptCheckStage (const CSMWorld::IdCollection<ESM::StartScript>& startScripts,
|
||||||
const CSMWorld::IdCollection<ESM::Script>& scripts);
|
const CSMWorld::IdCollection<ESM::Script>& scripts);
|
||||||
|
|
||||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
void perform(int stage, CSMDoc::Messages& messages) override;
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,10 @@ namespace CSMTools
|
||||||
const CSMWorld::RefIdData& referencables,
|
const CSMWorld::RefIdData& referencables,
|
||||||
const CSMWorld::Resources& soundFiles);
|
const CSMWorld::Resources& soundFiles);
|
||||||
|
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
///< \return number of steps
|
///< \return number of steps
|
||||||
|
|
||||||
virtual void perform(int step, CSMDoc::Messages& messages);
|
void perform(int step, CSMDoc::Messages& messages) override;
|
||||||
///< Messages resulting from this stage will be appended to \a messages
|
///< Messages resulting from this stage will be appended to \a messages
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -120,19 +120,19 @@ namespace CSMWorld
|
||||||
void add (const ESXRecordT& record);
|
void add (const ESXRecordT& record);
|
||||||
///< Add a new record (modified)
|
///< Add a new record (modified)
|
||||||
|
|
||||||
virtual int getSize() const;
|
int getSize() const override;
|
||||||
|
|
||||||
virtual std::string getId (int index) const;
|
std::string getId (int index) const override;
|
||||||
|
|
||||||
virtual int getIndex (const std::string& id) const;
|
int getIndex (const std::string& id) const override;
|
||||||
|
|
||||||
virtual int getColumns() const;
|
int getColumns() const override;
|
||||||
|
|
||||||
virtual QVariant getData (int index, int column) const;
|
QVariant getData (int index, int column) const override;
|
||||||
|
|
||||||
virtual void setData (int index, int column, const QVariant& data);
|
void setData (int index, int column, const QVariant& data) override;
|
||||||
|
|
||||||
virtual const ColumnBase& getColumn (int column) const;
|
const ColumnBase& getColumn (int column) const override;
|
||||||
|
|
||||||
virtual void merge();
|
virtual void merge();
|
||||||
///< Merge modified into base.
|
///< Merge modified into base.
|
||||||
|
@ -140,43 +140,43 @@ namespace CSMWorld
|
||||||
virtual void purge();
|
virtual void purge();
|
||||||
///< Remove records that are flagged as erased.
|
///< Remove records that are flagged as erased.
|
||||||
|
|
||||||
virtual void removeRows (int index, int count) ;
|
void removeRows (int index, int count) override;
|
||||||
|
|
||||||
virtual void appendBlankRecord (const std::string& id,
|
void appendBlankRecord (const std::string& id,
|
||||||
UniversalId::Type type = UniversalId::Type_None);
|
UniversalId::Type type = UniversalId::Type_None) override;
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||||
|
|
||||||
virtual void cloneRecord(const std::string& origin,
|
void cloneRecord(const std::string& origin,
|
||||||
const std::string& destination,
|
const std::string& destination,
|
||||||
const UniversalId::Type type);
|
const UniversalId::Type type) override;
|
||||||
|
|
||||||
virtual bool touchRecord(const std::string& id);
|
bool touchRecord(const std::string& id) override;
|
||||||
///< Change the state of a record from base to modified, if it is not already.
|
///< Change the state of a record from base to modified, if it is not already.
|
||||||
/// \return True if the record was changed.
|
/// \return True if the record was changed.
|
||||||
|
|
||||||
virtual int searchId (const std::string& id) const;
|
int searchId (const std::string& id) const override;
|
||||||
////< Search record with \a id.
|
////< Search record with \a id.
|
||||||
/// \return index of record (if found) or -1 (not found)
|
/// \return index of record (if found) or -1 (not found)
|
||||||
|
|
||||||
virtual void replace (int index, const RecordBase& record);
|
void replace (int index, const RecordBase& record) override;
|
||||||
///< If the record type does not match, an exception is thrown.
|
///< If the record type does not match, an exception is thrown.
|
||||||
///
|
///
|
||||||
/// \attention \a record must not change the ID.
|
/// \attention \a record must not change the ID.
|
||||||
|
|
||||||
virtual void appendRecord (const RecordBase& record,
|
void appendRecord (const RecordBase& record,
|
||||||
UniversalId::Type type = UniversalId::Type_None);
|
UniversalId::Type type = UniversalId::Type_None) override;
|
||||||
///< If the record type does not match, an exception is thrown.
|
///< If the record type does not match, an exception is thrown.
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||||
|
|
||||||
virtual const Record<ESXRecordT>& getRecord (const std::string& id) const;
|
const Record<ESXRecordT>& getRecord (const std::string& id) const override;
|
||||||
|
|
||||||
virtual const Record<ESXRecordT>& getRecord (int index) const;
|
const Record<ESXRecordT>& getRecord (int index) const override;
|
||||||
|
|
||||||
virtual int getAppendIndex (const std::string& id,
|
int getAppendIndex (const std::string& id,
|
||||||
UniversalId::Type type = UniversalId::Type_None) const;
|
UniversalId::Type type = UniversalId::Type_None) const override;
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||||
|
|
||||||
virtual std::vector<std::string> getIds (bool listDeleted = true) const;
|
std::vector<std::string> getIds (bool listDeleted = true) const override;
|
||||||
///< Return a sorted collection of all IDs
|
///< Return a sorted collection of all IDs
|
||||||
///
|
///
|
||||||
/// \param listDeleted include deleted record in the list
|
/// \param listDeleted include deleted record in the list
|
||||||
|
@ -190,7 +190,7 @@ namespace CSMWorld
|
||||||
/// If the index is invalid either generally (by being out of range) or for the particular
|
/// If the index is invalid either generally (by being out of range) or for the particular
|
||||||
/// record, an exception is thrown.
|
/// record, an exception is thrown.
|
||||||
|
|
||||||
virtual bool reorderRows (int baseIndex, const std::vector<int>& newOrder);
|
bool reorderRows (int baseIndex, const std::vector<int>& newOrder) override;
|
||||||
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
||||||
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
||||||
///
|
///
|
||||||
|
|
|
@ -211,13 +211,13 @@ namespace CSMWorld
|
||||||
: Column<ESXRecordT> (id, ColumnBase::Display_NestedHeader, flags), mFixedRows(fixedRows)
|
: Column<ESXRecordT> (id, ColumnBase::Display_NestedHeader, flags), mFixedRows(fixedRows)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual void set (Record<ESXRecordT>& record, const QVariant& data)
|
void set (Record<ESXRecordT>& record, const QVariant& data) override
|
||||||
{
|
{
|
||||||
// There is nothing to do here.
|
// There is nothing to do here.
|
||||||
// This prevents exceptions from parent's implementation
|
// This prevents exceptions from parent's implementation
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual QVariant get (const Record<ESXRecordT>& record) const
|
QVariant get (const Record<ESXRecordT>& record) const override
|
||||||
{
|
{
|
||||||
// by default editable; also see IdTree::hasChildren()
|
// by default editable; also see IdTree::hasChildren()
|
||||||
if (mFixedRows)
|
if (mFixedRows)
|
||||||
|
@ -226,7 +226,7 @@ namespace CSMWorld
|
||||||
return QVariant::fromValue(ColumnBase::TableEdit_Full);
|
return QVariant::fromValue(ColumnBase::TableEdit_Full);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool isEditable() const
|
bool isEditable() const override
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ namespace CSMWorld
|
||||||
NestedChildColumn (int id,
|
NestedChildColumn (int id,
|
||||||
Display display, int flags = ColumnBase::Flag_Dialogue, bool isEditable = true);
|
Display display, int flags = ColumnBase::Flag_Dialogue, bool isEditable = true);
|
||||||
|
|
||||||
virtual bool isEditable() const;
|
bool isEditable() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool mIsEditable;
|
bool mIsEditable;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -127,7 +127,7 @@ std::vector<CSMWorld::UniversalId> CSMWorld::CommandDispatcher::getExtendedTypes
|
||||||
if (mId==UniversalId::Type_Cells)
|
if (mId==UniversalId::Type_Cells)
|
||||||
{
|
{
|
||||||
tables.push_back (mId);
|
tables.push_back (mId);
|
||||||
tables.push_back (UniversalId::Type_References);
|
tables.emplace_back(UniversalId::Type_References);
|
||||||
/// \todo add other cell-specific types
|
/// \todo add other cell-specific types
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,9 +142,9 @@ namespace CSMWorld
|
||||||
ModifyCommand (QAbstractItemModel& model, const QModelIndex& index, const QVariant& new_,
|
ModifyCommand (QAbstractItemModel& model, const QModelIndex& index, const QVariant& new_,
|
||||||
QUndoCommand *parent = 0);
|
QUndoCommand *parent = 0);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CreateCommand : public QUndoCommand
|
class CreateCommand : public QUndoCommand
|
||||||
|
@ -175,9 +175,9 @@ namespace CSMWorld
|
||||||
|
|
||||||
void addNestedValue(int parentColumn, int nestedColumn, const QVariant &value);
|
void addNestedValue(int parentColumn, int nestedColumn, const QVariant &value);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CloneCommand : public CreateCommand
|
class CloneCommand : public CreateCommand
|
||||||
|
@ -191,9 +191,9 @@ namespace CSMWorld
|
||||||
const UniversalId::Type type,
|
const UniversalId::Type type,
|
||||||
QUndoCommand* parent = 0);
|
QUndoCommand* parent = 0);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RevertCommand : public QUndoCommand
|
class RevertCommand : public QUndoCommand
|
||||||
|
@ -212,9 +212,9 @@ namespace CSMWorld
|
||||||
|
|
||||||
virtual ~RevertCommand();
|
virtual ~RevertCommand();
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DeleteCommand : public QUndoCommand
|
class DeleteCommand : public QUndoCommand
|
||||||
|
@ -235,9 +235,9 @@ namespace CSMWorld
|
||||||
|
|
||||||
virtual ~DeleteCommand();
|
virtual ~DeleteCommand();
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ReorderRowsCommand : public QUndoCommand
|
class ReorderRowsCommand : public QUndoCommand
|
||||||
|
@ -250,9 +250,9 @@ namespace CSMWorld
|
||||||
|
|
||||||
ReorderRowsCommand (IdTable& model, int baseIndex, const std::vector<int>& newOrder);
|
ReorderRowsCommand (IdTable& model, int baseIndex, const std::vector<int>& newOrder);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CreatePathgridCommand : public CreateCommand
|
class CreatePathgridCommand : public CreateCommand
|
||||||
|
@ -261,7 +261,7 @@ namespace CSMWorld
|
||||||
|
|
||||||
CreatePathgridCommand(IdTable& model, const std::string& id, QUndoCommand *parent = 0);
|
CreatePathgridCommand(IdTable& model, const std::string& id, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Update cell ID according to x/y-coordinates
|
/// \brief Update cell ID according to x/y-coordinates
|
||||||
|
@ -281,9 +281,9 @@ namespace CSMWorld
|
||||||
|
|
||||||
UpdateCellCommand (IdTable& model, int row, QUndoCommand *parent = 0);
|
UpdateCellCommand (IdTable& model, int row, QUndoCommand *parent = 0);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -318,9 +318,9 @@ namespace CSMWorld
|
||||||
|
|
||||||
DeleteNestedCommand (IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = 0);
|
DeleteNestedCommand (IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = 0);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AddNestedCommand : public QUndoCommand, private NestedTableStoring
|
class AddNestedCommand : public QUndoCommand, private NestedTableStoring
|
||||||
|
@ -340,9 +340,9 @@ namespace CSMWorld
|
||||||
|
|
||||||
AddNestedCommand(IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = 0);
|
AddNestedCommand(IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent = 0);
|
||||||
|
|
||||||
virtual void redo();
|
void redo() override;
|
||||||
|
|
||||||
virtual void undo();
|
void undo() override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -355,7 +355,7 @@ CSMWorld::LandTextureIdTable::ImportResults CSMWorld::LandTextureIdTable::import
|
||||||
// If it does not exist or it is in the current plugin, it can be skipped.
|
// If it does not exist or it is in the current plugin, it can be skipped.
|
||||||
if (oldRow < 0 || plugin == 0)
|
if (oldRow < 0 || plugin == 0)
|
||||||
{
|
{
|
||||||
results.recordMapping.push_back(std::make_pair(id, id));
|
results.recordMapping.emplace_back(id, id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ CSMWorld::LandTextureIdTable::ImportResults CSMWorld::LandTextureIdTable::import
|
||||||
auto searchIt = reverseLookupMap.find(texture);
|
auto searchIt = reverseLookupMap.find(texture);
|
||||||
if (searchIt != reverseLookupMap.end())
|
if (searchIt != reverseLookupMap.end())
|
||||||
{
|
{
|
||||||
results.recordMapping.push_back(std::make_pair(id, searchIt->second));
|
results.recordMapping.emplace_back(id, searchIt->second);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ CSMWorld::LandTextureIdTable::ImportResults CSMWorld::LandTextureIdTable::import
|
||||||
// Id not taken, clone it
|
// Id not taken, clone it
|
||||||
cloneRecord(id, newId, UniversalId::Type_LandTexture);
|
cloneRecord(id, newId, UniversalId::Type_LandTexture);
|
||||||
results.createdRecords.push_back(newId);
|
results.createdRecords.push_back(newId);
|
||||||
results.recordMapping.push_back(std::make_pair(id, newId));
|
results.recordMapping.emplace_back(id, newId);
|
||||||
reverseLookupMap.emplace(texture, newId);
|
reverseLookupMap.emplace(texture, newId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,24 +31,23 @@ namespace CSMWorld
|
||||||
|
|
||||||
virtual ~IdTable();
|
virtual ~IdTable();
|
||||||
|
|
||||||
virtual int rowCount (const QModelIndex & parent = QModelIndex()) const;
|
int rowCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual int columnCount (const QModelIndex & parent = QModelIndex()) const;
|
int columnCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const;
|
QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
virtual QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
virtual bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||||
|
|
||||||
virtual Qt::ItemFlags flags (const QModelIndex & index) const;
|
Qt::ItemFlags flags (const QModelIndex & index) const override;
|
||||||
|
|
||||||
virtual bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex());
|
bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||||
|
|
||||||
virtual QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex())
|
QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
||||||
const;
|
|
||||||
|
|
||||||
virtual QModelIndex parent (const QModelIndex& index) const;
|
QModelIndex parent (const QModelIndex& index) const override;
|
||||||
|
|
||||||
void addRecord (const std::string& id, UniversalId::Type type = UniversalId::Type_None);
|
void addRecord (const std::string& id, UniversalId::Type type = UniversalId::Type_None);
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||||
|
@ -66,7 +65,7 @@ namespace CSMWorld
|
||||||
|
|
||||||
std::string getId(int row) const;
|
std::string getId(int row) const;
|
||||||
|
|
||||||
virtual QModelIndex getModelIndex (const std::string& id, int column) const;
|
QModelIndex getModelIndex (const std::string& id, int column) const override;
|
||||||
|
|
||||||
void setRecord (const std::string& id, const RecordBase& record,
|
void setRecord (const std::string& id, const RecordBase& record,
|
||||||
UniversalId::Type type = UniversalId::Type_None);
|
UniversalId::Type type = UniversalId::Type_None);
|
||||||
|
@ -74,10 +73,10 @@ namespace CSMWorld
|
||||||
|
|
||||||
const RecordBase& getRecord (const std::string& id) const;
|
const RecordBase& getRecord (const std::string& id) const;
|
||||||
|
|
||||||
virtual int searchColumnIndex (Columns::ColumnId id) const;
|
int searchColumnIndex (Columns::ColumnId id) const override;
|
||||||
///< Return index of column with the given \a id. If no such column exists, -1 is returned.
|
///< Return index of column with the given \a id. If no such column exists, -1 is returned.
|
||||||
|
|
||||||
virtual int findColumnIndex (Columns::ColumnId id) const;
|
int findColumnIndex (Columns::ColumnId id) const override;
|
||||||
///< Return index of column with the given \a id. If no such column exists, an exception is
|
///< Return index of column with the given \a id. If no such column exists, an exception is
|
||||||
/// thrown.
|
/// thrown.
|
||||||
|
|
||||||
|
@ -85,14 +84,14 @@ namespace CSMWorld
|
||||||
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
||||||
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
||||||
|
|
||||||
virtual std::pair<UniversalId, std::string> view (int row) const;
|
std::pair<UniversalId, std::string> view (int row) const override;
|
||||||
///< Return the UniversalId and the hint for viewing \a row. If viewing is not
|
///< Return the UniversalId and the hint for viewing \a row. If viewing is not
|
||||||
/// supported by this table, return (UniversalId::Type_None, "").
|
/// supported by this table, return (UniversalId::Type_None, "").
|
||||||
|
|
||||||
/// Is \a id flagged as deleted?
|
/// Is \a id flagged as deleted?
|
||||||
virtual bool isDeleted (const std::string& id) const;
|
bool isDeleted (const std::string& id) const override;
|
||||||
|
|
||||||
virtual int getColumnId(int column) const;
|
int getColumnId(int column) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace CSMWorld
|
||||||
|
|
||||||
virtual QModelIndex getModelIndex (const std::string& id, int column) const;
|
virtual QModelIndex getModelIndex (const std::string& id, int column) const;
|
||||||
|
|
||||||
virtual void setSourceModel(QAbstractItemModel *model);
|
void setSourceModel(QAbstractItemModel *model) override;
|
||||||
|
|
||||||
void setFilter (const std::shared_ptr<CSMFilter::Node>& filter);
|
void setFilter (const std::shared_ptr<CSMFilter::Node>& filter);
|
||||||
|
|
||||||
|
@ -47,9 +47,9 @@ namespace CSMWorld
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
||||||
|
|
||||||
virtual bool filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent) const;
|
bool filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent) const override;
|
||||||
|
|
||||||
QString getRecordId(int sourceRow) const;
|
QString getRecordId(int sourceRow) const;
|
||||||
|
|
||||||
|
|
|
@ -44,22 +44,21 @@ namespace CSMWorld
|
||||||
|
|
||||||
virtual ~IdTree();
|
virtual ~IdTree();
|
||||||
|
|
||||||
virtual int rowCount (const QModelIndex & parent = QModelIndex()) const;
|
int rowCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual int columnCount (const QModelIndex & parent = QModelIndex()) const;
|
int columnCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const;
|
QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
virtual bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||||
|
|
||||||
virtual Qt::ItemFlags flags (const QModelIndex & index) const;
|
Qt::ItemFlags flags (const QModelIndex & index) const override;
|
||||||
|
|
||||||
virtual bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex());
|
bool removeRows (int row, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||||
|
|
||||||
virtual QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex())
|
QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
||||||
const;
|
|
||||||
|
|
||||||
virtual QModelIndex parent (const QModelIndex& index) const;
|
QModelIndex parent (const QModelIndex& index) const override;
|
||||||
|
|
||||||
QModelIndex getNestedModelIndex (const std::string& id, int column) const;
|
QModelIndex getNestedModelIndex (const std::string& id, int column) const;
|
||||||
|
|
||||||
|
@ -71,7 +70,7 @@ namespace CSMWorld
|
||||||
|
|
||||||
void addNestedRow (const QModelIndex& parent, int position);
|
void addNestedRow (const QModelIndex& parent, int position);
|
||||||
|
|
||||||
virtual bool hasChildren (const QModelIndex& index) const;
|
bool hasChildren (const QModelIndex& index) const override;
|
||||||
|
|
||||||
virtual int searchNestedColumnIndex(int parentColumn, Columns::ColumnId id);
|
virtual int searchNestedColumnIndex(int parentColumn, Columns::ColumnId id);
|
||||||
///< \return the column index or -1 if the requested column wasn't found.
|
///< \return the column index or -1 if the requested column wasn't found.
|
||||||
|
|
|
@ -29,11 +29,11 @@ namespace CSMWorld
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual int getAppendIndex (const std::string& id,
|
int getAppendIndex (const std::string& id,
|
||||||
UniversalId::Type type = UniversalId::Type_None) const;
|
UniversalId::Type type = UniversalId::Type_None) const override;
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||||
|
|
||||||
virtual bool reorderRows (int baseIndex, const std::vector<int>& newOrder);
|
bool reorderRows (int baseIndex, const std::vector<int>& newOrder) override;
|
||||||
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
||||||
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
||||||
///
|
///
|
||||||
|
|
|
@ -30,15 +30,15 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
InfoTableProxyModel(UniversalId::Type type, QObject *parent = 0);
|
InfoTableProxyModel(UniversalId::Type type, QObject *parent = 0);
|
||||||
|
|
||||||
virtual void setSourceModel(QAbstractItemModel *sourceModel);
|
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
virtual void sourceRowsInserted(const QModelIndex &parent, int start, int end);
|
void sourceRowsInserted(const QModelIndex &parent, int start, int end) override;
|
||||||
virtual void sourceRowsRemoved(const QModelIndex &parent, int start, int end);
|
void sourceRowsRemoved(const QModelIndex &parent, int start, int end) override;
|
||||||
virtual void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,24 +30,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
PathgridPointListAdapter ();
|
PathgridPointListAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<Pathgrid>& record, int position) const;
|
void addRow(Record<Pathgrid>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<Pathgrid>& record, int rowToRemove) const;
|
void removeRow(Record<Pathgrid>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<Pathgrid>& record,
|
void setTable(Record<Pathgrid>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<Pathgrid>& record) const;
|
NestedTableWrapperBase* table(const Record<Pathgrid>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<Pathgrid>& record,
|
QVariant getData(const Record<Pathgrid>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<Pathgrid>& record,
|
void setData(Record<Pathgrid>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<Pathgrid>& record) const;
|
int getColumnsCount(const Record<Pathgrid>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<Pathgrid>& record) const;
|
int getRowsCount(const Record<Pathgrid>& record) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PathgridEdgeListAdapter : public NestedColumnAdapter<Pathgrid>
|
class PathgridEdgeListAdapter : public NestedColumnAdapter<Pathgrid>
|
||||||
|
@ -55,24 +55,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
PathgridEdgeListAdapter ();
|
PathgridEdgeListAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<Pathgrid>& record, int position) const;
|
void addRow(Record<Pathgrid>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<Pathgrid>& record, int rowToRemove) const;
|
void removeRow(Record<Pathgrid>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<Pathgrid>& record,
|
void setTable(Record<Pathgrid>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<Pathgrid>& record) const;
|
NestedTableWrapperBase* table(const Record<Pathgrid>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<Pathgrid>& record,
|
QVariant getData(const Record<Pathgrid>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<Pathgrid>& record,
|
void setData(Record<Pathgrid>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<Pathgrid>& record) const;
|
int getColumnsCount(const Record<Pathgrid>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<Pathgrid>& record) const;
|
int getRowsCount(const Record<Pathgrid>& record) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FactionReactionsAdapter : public NestedColumnAdapter<ESM::Faction>
|
class FactionReactionsAdapter : public NestedColumnAdapter<ESM::Faction>
|
||||||
|
@ -80,24 +80,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
FactionReactionsAdapter ();
|
FactionReactionsAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<ESM::Faction>& record, int position) const;
|
void addRow(Record<ESM::Faction>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<ESM::Faction>& record, int rowToRemove) const;
|
void removeRow(Record<ESM::Faction>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<ESM::Faction>& record,
|
void setTable(Record<ESM::Faction>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<ESM::Faction>& record) const;
|
NestedTableWrapperBase* table(const Record<ESM::Faction>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<ESM::Faction>& record,
|
QVariant getData(const Record<ESM::Faction>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<ESM::Faction>& record,
|
void setData(Record<ESM::Faction>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<ESM::Faction>& record) const;
|
int getColumnsCount(const Record<ESM::Faction>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<ESM::Faction>& record) const;
|
int getRowsCount(const Record<ESM::Faction>& record) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FactionRanksAdapter : public NestedColumnAdapter<ESM::Faction>
|
class FactionRanksAdapter : public NestedColumnAdapter<ESM::Faction>
|
||||||
|
@ -105,24 +105,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
FactionRanksAdapter ();
|
FactionRanksAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<ESM::Faction>& record, int position) const;
|
void addRow(Record<ESM::Faction>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<ESM::Faction>& record, int rowToRemove) const;
|
void removeRow(Record<ESM::Faction>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<ESM::Faction>& record,
|
void setTable(Record<ESM::Faction>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<ESM::Faction>& record) const;
|
NestedTableWrapperBase* table(const Record<ESM::Faction>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<ESM::Faction>& record,
|
QVariant getData(const Record<ESM::Faction>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<ESM::Faction>& record,
|
void setData(Record<ESM::Faction>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<ESM::Faction>& record) const;
|
int getColumnsCount(const Record<ESM::Faction>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<ESM::Faction>& record) const;
|
int getRowsCount(const Record<ESM::Faction>& record) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RegionSoundListAdapter : public NestedColumnAdapter<ESM::Region>
|
class RegionSoundListAdapter : public NestedColumnAdapter<ESM::Region>
|
||||||
|
@ -130,24 +130,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
RegionSoundListAdapter ();
|
RegionSoundListAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<ESM::Region>& record, int position) const;
|
void addRow(Record<ESM::Region>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<ESM::Region>& record, int rowToRemove) const;
|
void removeRow(Record<ESM::Region>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<ESM::Region>& record,
|
void setTable(Record<ESM::Region>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<ESM::Region>& record) const;
|
NestedTableWrapperBase* table(const Record<ESM::Region>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<ESM::Region>& record,
|
QVariant getData(const Record<ESM::Region>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<ESM::Region>& record,
|
void setData(Record<ESM::Region>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<ESM::Region>& record) const;
|
int getColumnsCount(const Record<ESM::Region>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<ESM::Region>& record) const;
|
int getRowsCount(const Record<ESM::Region>& record) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename ESXRecordT>
|
template<typename ESXRecordT>
|
||||||
|
@ -156,7 +156,7 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
SpellListAdapter () {}
|
SpellListAdapter () {}
|
||||||
|
|
||||||
virtual void addRow(Record<ESXRecordT>& record, int position) const
|
void addRow(Record<ESXRecordT>& record, int position) const override
|
||||||
{
|
{
|
||||||
ESXRecordT raceOrBthSgn = record.get();
|
ESXRecordT raceOrBthSgn = record.get();
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ namespace CSMWorld
|
||||||
record.setModified (raceOrBthSgn);
|
record.setModified (raceOrBthSgn);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void removeRow(Record<ESXRecordT>& record, int rowToRemove) const
|
void removeRow(Record<ESXRecordT>& record, int rowToRemove) const override
|
||||||
{
|
{
|
||||||
ESXRecordT raceOrBthSgn = record.get();
|
ESXRecordT raceOrBthSgn = record.get();
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ namespace CSMWorld
|
||||||
record.setModified (raceOrBthSgn);
|
record.setModified (raceOrBthSgn);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const
|
void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const override
|
||||||
{
|
{
|
||||||
ESXRecordT raceOrBthSgn = record.get();
|
ESXRecordT raceOrBthSgn = record.get();
|
||||||
|
|
||||||
|
@ -194,13 +194,13 @@ namespace CSMWorld
|
||||||
record.setModified (raceOrBthSgn);
|
record.setModified (raceOrBthSgn);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const
|
NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const override
|
||||||
{
|
{
|
||||||
// deleted by dtor of NestedTableStoring
|
// deleted by dtor of NestedTableStoring
|
||||||
return new NestedTableWrapper<std::vector<std::string> >(record.get().mPowers.mList);
|
return new NestedTableWrapper<std::vector<std::string> >(record.get().mPowers.mList);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const
|
QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const override
|
||||||
{
|
{
|
||||||
ESXRecordT raceOrBthSgn = record.get();
|
ESXRecordT raceOrBthSgn = record.get();
|
||||||
|
|
||||||
|
@ -217,8 +217,8 @@ namespace CSMWorld
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setData(Record<ESXRecordT>& record, const QVariant& value,
|
void setData(Record<ESXRecordT>& record, const QVariant& value,
|
||||||
int subRowIndex, int subColIndex) const
|
int subRowIndex, int subColIndex) const override
|
||||||
{
|
{
|
||||||
ESXRecordT raceOrBthSgn = record.get();
|
ESXRecordT raceOrBthSgn = record.get();
|
||||||
|
|
||||||
|
@ -239,12 +239,12 @@ namespace CSMWorld
|
||||||
record.setModified (raceOrBthSgn);
|
record.setModified (raceOrBthSgn);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<ESXRecordT>& record) const
|
int getColumnsCount(const Record<ESXRecordT>& record) const override
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<ESXRecordT>& record) const
|
int getRowsCount(const Record<ESXRecordT>& record) const override
|
||||||
{
|
{
|
||||||
return static_cast<int>(record.get().mPowers.mList.size());
|
return static_cast<int>(record.get().mPowers.mList.size());
|
||||||
}
|
}
|
||||||
|
@ -256,7 +256,7 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
EffectsListAdapter () {}
|
EffectsListAdapter () {}
|
||||||
|
|
||||||
virtual void addRow(Record<ESXRecordT>& record, int position) const
|
void addRow(Record<ESXRecordT>& record, int position) const override
|
||||||
{
|
{
|
||||||
ESXRecordT magic = record.get();
|
ESXRecordT magic = record.get();
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ namespace CSMWorld
|
||||||
record.setModified (magic);
|
record.setModified (magic);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void removeRow(Record<ESXRecordT>& record, int rowToRemove) const
|
void removeRow(Record<ESXRecordT>& record, int rowToRemove) const override
|
||||||
{
|
{
|
||||||
ESXRecordT magic = record.get();
|
ESXRecordT magic = record.get();
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ namespace CSMWorld
|
||||||
record.setModified (magic);
|
record.setModified (magic);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const
|
void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const override
|
||||||
{
|
{
|
||||||
ESXRecordT magic = record.get();
|
ESXRecordT magic = record.get();
|
||||||
|
|
||||||
|
@ -302,13 +302,13 @@ namespace CSMWorld
|
||||||
record.setModified (magic);
|
record.setModified (magic);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const
|
NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const override
|
||||||
{
|
{
|
||||||
// deleted by dtor of NestedTableStoring
|
// deleted by dtor of NestedTableStoring
|
||||||
return new NestedTableWrapper<std::vector<ESM::ENAMstruct> >(record.get().mEffects.mList);
|
return new NestedTableWrapper<std::vector<ESM::ENAMstruct> >(record.get().mEffects.mList);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const
|
QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const override
|
||||||
{
|
{
|
||||||
ESXRecordT magic = record.get();
|
ESXRecordT magic = record.get();
|
||||||
|
|
||||||
|
@ -370,8 +370,8 @@ namespace CSMWorld
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setData(Record<ESXRecordT>& record, const QVariant& value,
|
void setData(Record<ESXRecordT>& record, const QVariant& value,
|
||||||
int subRowIndex, int subColIndex) const
|
int subRowIndex, int subColIndex) const override
|
||||||
{
|
{
|
||||||
ESXRecordT magic = record.get();
|
ESXRecordT magic = record.get();
|
||||||
|
|
||||||
|
@ -415,12 +415,12 @@ namespace CSMWorld
|
||||||
record.setModified (magic);
|
record.setModified (magic);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<ESXRecordT>& record) const
|
int getColumnsCount(const Record<ESXRecordT>& record) const override
|
||||||
{
|
{
|
||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<ESXRecordT>& record) const
|
int getRowsCount(const Record<ESXRecordT>& record) const override
|
||||||
{
|
{
|
||||||
return static_cast<int>(record.get().mEffects.mList.size());
|
return static_cast<int>(record.get().mEffects.mList.size());
|
||||||
}
|
}
|
||||||
|
@ -431,24 +431,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
InfoListAdapter ();
|
InfoListAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<Info>& record, int position) const;
|
void addRow(Record<Info>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<Info>& record, int rowToRemove) const;
|
void removeRow(Record<Info>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<Info>& record,
|
void setTable(Record<Info>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<Info>& record) const;
|
NestedTableWrapperBase* table(const Record<Info>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<Info>& record,
|
QVariant getData(const Record<Info>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<Info>& record,
|
void setData(Record<Info>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<Info>& record) const;
|
int getColumnsCount(const Record<Info>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<Info>& record) const;
|
int getRowsCount(const Record<Info>& record) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class InfoConditionAdapter : public NestedColumnAdapter<Info>
|
class InfoConditionAdapter : public NestedColumnAdapter<Info>
|
||||||
|
@ -456,24 +456,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
InfoConditionAdapter ();
|
InfoConditionAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<Info>& record, int position) const;
|
void addRow(Record<Info>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<Info>& record, int rowToRemove) const;
|
void removeRow(Record<Info>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<Info>& record,
|
void setTable(Record<Info>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<Info>& record) const;
|
NestedTableWrapperBase* table(const Record<Info>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<Info>& record,
|
QVariant getData(const Record<Info>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<Info>& record,
|
void setData(Record<Info>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<Info>& record) const;
|
int getColumnsCount(const Record<Info>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<Info>& record) const;
|
int getRowsCount(const Record<Info>& record) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RaceAttributeAdapter : public NestedColumnAdapter<ESM::Race>
|
class RaceAttributeAdapter : public NestedColumnAdapter<ESM::Race>
|
||||||
|
@ -481,24 +481,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
RaceAttributeAdapter ();
|
RaceAttributeAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<ESM::Race>& record, int position) const;
|
void addRow(Record<ESM::Race>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<ESM::Race>& record, int rowToRemove) const;
|
void removeRow(Record<ESM::Race>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<ESM::Race>& record,
|
void setTable(Record<ESM::Race>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<ESM::Race>& record) const;
|
NestedTableWrapperBase* table(const Record<ESM::Race>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<ESM::Race>& record,
|
QVariant getData(const Record<ESM::Race>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<ESM::Race>& record,
|
void setData(Record<ESM::Race>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<ESM::Race>& record) const;
|
int getColumnsCount(const Record<ESM::Race>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<ESM::Race>& record) const;
|
int getRowsCount(const Record<ESM::Race>& record) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RaceSkillsBonusAdapter : public NestedColumnAdapter<ESM::Race>
|
class RaceSkillsBonusAdapter : public NestedColumnAdapter<ESM::Race>
|
||||||
|
@ -506,24 +506,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
RaceSkillsBonusAdapter ();
|
RaceSkillsBonusAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<ESM::Race>& record, int position) const;
|
void addRow(Record<ESM::Race>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<ESM::Race>& record, int rowToRemove) const;
|
void removeRow(Record<ESM::Race>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<ESM::Race>& record,
|
void setTable(Record<ESM::Race>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<ESM::Race>& record) const;
|
NestedTableWrapperBase* table(const Record<ESM::Race>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<ESM::Race>& record,
|
QVariant getData(const Record<ESM::Race>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<ESM::Race>& record,
|
void setData(Record<ESM::Race>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<ESM::Race>& record) const;
|
int getColumnsCount(const Record<ESM::Race>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<ESM::Race>& record) const;
|
int getRowsCount(const Record<ESM::Race>& record) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CellListAdapter : public NestedColumnAdapter<CSMWorld::Cell>
|
class CellListAdapter : public NestedColumnAdapter<CSMWorld::Cell>
|
||||||
|
@ -531,24 +531,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
CellListAdapter ();
|
CellListAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<CSMWorld::Cell>& record, int position) const;
|
void addRow(Record<CSMWorld::Cell>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<CSMWorld::Cell>& record, int rowToRemove) const;
|
void removeRow(Record<CSMWorld::Cell>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<CSMWorld::Cell>& record,
|
void setTable(Record<CSMWorld::Cell>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<CSMWorld::Cell>& record) const;
|
NestedTableWrapperBase* table(const Record<CSMWorld::Cell>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<CSMWorld::Cell>& record,
|
QVariant getData(const Record<CSMWorld::Cell>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<CSMWorld::Cell>& record,
|
void setData(Record<CSMWorld::Cell>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<CSMWorld::Cell>& record) const;
|
int getColumnsCount(const Record<CSMWorld::Cell>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<CSMWorld::Cell>& record) const;
|
int getRowsCount(const Record<CSMWorld::Cell>& record) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RegionWeatherAdapter : public NestedColumnAdapter<ESM::Region>
|
class RegionWeatherAdapter : public NestedColumnAdapter<ESM::Region>
|
||||||
|
@ -556,24 +556,24 @@ namespace CSMWorld
|
||||||
public:
|
public:
|
||||||
RegionWeatherAdapter ();
|
RegionWeatherAdapter ();
|
||||||
|
|
||||||
virtual void addRow(Record<ESM::Region>& record, int position) const;
|
void addRow(Record<ESM::Region>& record, int position) const override;
|
||||||
|
|
||||||
virtual void removeRow(Record<ESM::Region>& record, int rowToRemove) const;
|
void removeRow(Record<ESM::Region>& record, int rowToRemove) const override;
|
||||||
|
|
||||||
virtual void setTable(Record<ESM::Region>& record,
|
void setTable(Record<ESM::Region>& record,
|
||||||
const NestedTableWrapperBase& nestedTable) const;
|
const NestedTableWrapperBase& nestedTable) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* table(const Record<ESM::Region>& record) const;
|
NestedTableWrapperBase* table(const Record<ESM::Region>& record) const override;
|
||||||
|
|
||||||
virtual QVariant getData(const Record<ESM::Region>& record,
|
QVariant getData(const Record<ESM::Region>& record,
|
||||||
int subRowIndex, int subColIndex) const;
|
int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual void setData(Record<ESM::Region>& record,
|
void setData(Record<ESM::Region>& record,
|
||||||
const QVariant& value, int subRowIndex, int subColIndex) const;
|
const QVariant& value, int subRowIndex, int subColIndex) const override;
|
||||||
|
|
||||||
virtual int getColumnsCount(const Record<ESM::Region>& record) const;
|
int getColumnsCount(const Record<ESM::Region>& record) const override;
|
||||||
|
|
||||||
virtual int getRowsCount(const Record<ESM::Region>& record) const;
|
int getRowsCount(const Record<ESM::Region>& record) const override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,24 +32,24 @@ namespace CSMWorld
|
||||||
NestedIdCollection ();
|
NestedIdCollection ();
|
||||||
~NestedIdCollection();
|
~NestedIdCollection();
|
||||||
|
|
||||||
virtual void addNestedRow(int row, int column, int position);
|
void addNestedRow(int row, int column, int position) override;
|
||||||
|
|
||||||
virtual void removeNestedRows(int row, int column, int subRow);
|
void removeNestedRows(int row, int column, int subRow) override;
|
||||||
|
|
||||||
virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const;
|
QVariant getNestedData(int row, int column, int subRow, int subColumn) const override;
|
||||||
|
|
||||||
virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn);
|
void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* nestedTable(int row, int column) const;
|
NestedTableWrapperBase* nestedTable(int row, int column) const override;
|
||||||
|
|
||||||
virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable);
|
void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable) override;
|
||||||
|
|
||||||
virtual int getNestedRowsCount(int row, int column) const;
|
int getNestedRowsCount(int row, int column) const override;
|
||||||
|
|
||||||
virtual int getNestedColumnsCount(int row, int column) const;
|
int getNestedColumnsCount(int row, int column) const override;
|
||||||
|
|
||||||
// this method is inherited from NestedCollection, not from Collection<ESXRecordT>
|
// this method is inherited from NestedCollection, not from Collection<ESXRecordT>
|
||||||
virtual NestableColumn *getNestableColumn(int column);
|
NestableColumn *getNestableColumn(int column) override;
|
||||||
|
|
||||||
void addAdapter(std::pair<const ColumnBase*, NestedColumnAdapter<ESXRecordT>* > adapter);
|
void addAdapter(std::pair<const ColumnBase*, NestedColumnAdapter<ESXRecordT>* > adapter);
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,24 +24,24 @@ namespace CSMWorld
|
||||||
NestedInfoCollection ();
|
NestedInfoCollection ();
|
||||||
~NestedInfoCollection();
|
~NestedInfoCollection();
|
||||||
|
|
||||||
virtual void addNestedRow(int row, int column, int position);
|
void addNestedRow(int row, int column, int position) override;
|
||||||
|
|
||||||
virtual void removeNestedRows(int row, int column, int subRow);
|
void removeNestedRows(int row, int column, int subRow) override;
|
||||||
|
|
||||||
virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const;
|
QVariant getNestedData(int row, int column, int subRow, int subColumn) const override;
|
||||||
|
|
||||||
virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn);
|
void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* nestedTable(int row, int column) const;
|
NestedTableWrapperBase* nestedTable(int row, int column) const override;
|
||||||
|
|
||||||
virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable);
|
void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable) override;
|
||||||
|
|
||||||
virtual int getNestedRowsCount(int row, int column) const;
|
int getNestedRowsCount(int row, int column) const override;
|
||||||
|
|
||||||
virtual int getNestedColumnsCount(int row, int column) const;
|
int getNestedColumnsCount(int row, int column) const override;
|
||||||
|
|
||||||
// this method is inherited from NestedCollection, not from Collection<Info, IdAccessor<Info> >
|
// this method is inherited from NestedCollection, not from Collection<Info, IdAccessor<Info> >
|
||||||
virtual NestableColumn *getNestableColumn(int column);
|
NestableColumn *getNestableColumn(int column) override;
|
||||||
|
|
||||||
void addAdapter(std::pair<const ColumnBase*, NestedColumnAdapter<Info>* > adapter);
|
void addAdapter(std::pair<const ColumnBase*, NestedColumnAdapter<Info>* > adapter);
|
||||||
};
|
};
|
||||||
|
|
|
@ -39,25 +39,25 @@ namespace CSMWorld
|
||||||
|
|
||||||
CSMWorld::IdTree* model() const;
|
CSMWorld::IdTree* model() const;
|
||||||
|
|
||||||
virtual QModelIndex mapFromSource(const QModelIndex& sourceIndex) const;
|
QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override;
|
||||||
|
|
||||||
virtual QModelIndex mapToSource(const QModelIndex& proxyIndex) const;
|
QModelIndex mapToSource(const QModelIndex& proxyIndex) const override;
|
||||||
|
|
||||||
virtual int rowCount(const QModelIndex& parent) const;
|
int rowCount(const QModelIndex& parent) const override;
|
||||||
|
|
||||||
virtual int columnCount(const QModelIndex& parent) const;
|
int columnCount(const QModelIndex& parent) const override;
|
||||||
|
|
||||||
virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
|
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual QModelIndex parent(const QModelIndex& index) const;
|
QModelIndex parent(const QModelIndex& index) const override;
|
||||||
|
|
||||||
virtual QVariant headerData (int section, Qt::Orientation orientation, int role) const;
|
QVariant headerData (int section, Qt::Orientation orientation, int role) const override;
|
||||||
|
|
||||||
virtual QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
|
QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
virtual bool setData (const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
|
bool setData (const QModelIndex & index, const QVariant & value, int role = Qt::EditRole) override;
|
||||||
|
|
||||||
virtual Qt::ItemFlags flags(const QModelIndex& index) const;
|
Qt::ItemFlags flags(const QModelIndex& index) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupHeaderVectors(ColumnBase::Display columnId);
|
void setupHeaderVectors(ColumnBase::Display columnId);
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace CSMWorld
|
||||||
|
|
||||||
virtual ~NestedTableWrapper() {}
|
virtual ~NestedTableWrapper() {}
|
||||||
|
|
||||||
virtual int size() const
|
int size() const override
|
||||||
{
|
{
|
||||||
return mNestedTable.size(); //i hope that this will be enough
|
return mNestedTable.size(); //i hope that this will be enough
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,11 +45,11 @@ namespace CSMWorld
|
||||||
Record(State state,
|
Record(State state,
|
||||||
const ESXRecordT *base = 0, const ESXRecordT *modified = 0);
|
const ESXRecordT *base = 0, const ESXRecordT *modified = 0);
|
||||||
|
|
||||||
virtual RecordBase *clone() const;
|
RecordBase *clone() const override;
|
||||||
|
|
||||||
virtual RecordBase *modifiedCopy() const;
|
RecordBase *modifiedCopy() const override;
|
||||||
|
|
||||||
virtual void assign (const RecordBase& record);
|
void assign (const RecordBase& record) override;
|
||||||
|
|
||||||
const ESXRecordT& get() const;
|
const ESXRecordT& get() const;
|
||||||
///< Throws an exception, if the record is deleted.
|
///< Throws an exception, if the record is deleted.
|
||||||
|
|
|
@ -64,6 +64,7 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
|
||||||
|
|
||||||
// ignore content file number
|
// ignore content file number
|
||||||
std::map<ESM::RefNum, std::string>::iterator iter = cache.begin();
|
std::map<ESM::RefNum, std::string>::iterator iter = cache.begin();
|
||||||
|
ref.mRefNum.mIndex = ref.mRefNum.mIndex & 0x00ffffff;
|
||||||
for (; iter != cache.end(); ++iter)
|
for (; iter != cache.end(); ++iter)
|
||||||
{
|
{
|
||||||
if (ref.mRefNum.mIndex == iter->first.mIndex)
|
if (ref.mRefNum.mIndex == iter->first.mIndex)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -40,45 +40,45 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
{
|
{
|
||||||
BaseColumns baseColumns;
|
BaseColumns baseColumns;
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Id, ColumnBase::Display_Id,
|
mColumns.emplace_back(Columns::ColumnId_Id, ColumnBase::Display_Id,
|
||||||
ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue, false, false));
|
ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue, false, false);
|
||||||
baseColumns.mId = &mColumns.back();
|
baseColumns.mId = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Modification, ColumnBase::Display_RecordState,
|
mColumns.emplace_back(Columns::ColumnId_Modification, ColumnBase::Display_RecordState,
|
||||||
ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue, true, false));
|
ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue, true, false);
|
||||||
baseColumns.mModified = &mColumns.back();
|
baseColumns.mModified = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_RecordType, ColumnBase::Display_RefRecordType,
|
mColumns.emplace_back(Columns::ColumnId_RecordType, ColumnBase::Display_RefRecordType,
|
||||||
ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue, false, false));
|
ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue, false, false);
|
||||||
baseColumns.mType = &mColumns.back();
|
baseColumns.mType = &mColumns.back();
|
||||||
|
|
||||||
ModelColumns modelColumns (baseColumns);
|
ModelColumns modelColumns (baseColumns);
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Model, ColumnBase::Display_Mesh));
|
mColumns.emplace_back(Columns::ColumnId_Model, ColumnBase::Display_Mesh);
|
||||||
modelColumns.mModel = &mColumns.back();
|
modelColumns.mModel = &mColumns.back();
|
||||||
|
|
||||||
NameColumns nameColumns (modelColumns);
|
NameColumns nameColumns (modelColumns);
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Name, ColumnBase::Display_String));
|
mColumns.emplace_back(Columns::ColumnId_Name, ColumnBase::Display_String);
|
||||||
nameColumns.mName = &mColumns.back();
|
nameColumns.mName = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Script, ColumnBase::Display_Script));
|
mColumns.emplace_back(Columns::ColumnId_Script, ColumnBase::Display_Script);
|
||||||
nameColumns.mScript = &mColumns.back();
|
nameColumns.mScript = &mColumns.back();
|
||||||
|
|
||||||
InventoryColumns inventoryColumns (nameColumns);
|
InventoryColumns inventoryColumns (nameColumns);
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Icon, ColumnBase::Display_Icon));
|
mColumns.emplace_back(Columns::ColumnId_Icon, ColumnBase::Display_Icon);
|
||||||
inventoryColumns.mIcon = &mColumns.back();
|
inventoryColumns.mIcon = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Weight, ColumnBase::Display_Float));
|
mColumns.emplace_back(Columns::ColumnId_Weight, ColumnBase::Display_Float);
|
||||||
inventoryColumns.mWeight = &mColumns.back();
|
inventoryColumns.mWeight = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_CoinValue, ColumnBase::Display_Integer));
|
mColumns.emplace_back(Columns::ColumnId_CoinValue, ColumnBase::Display_Integer);
|
||||||
inventoryColumns.mValue = &mColumns.back();
|
inventoryColumns.mValue = &mColumns.back();
|
||||||
|
|
||||||
IngredientColumns ingredientColumns (inventoryColumns);
|
IngredientColumns ingredientColumns (inventoryColumns);
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_EffectList,
|
mColumns.emplace_back(Columns::ColumnId_EffectList,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
ingredientColumns.mEffects = &mColumns.back();
|
ingredientColumns.mEffects = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> ingredientEffectsMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> ingredientEffectsMap;
|
||||||
ingredientEffectsMap.insert(std::make_pair(UniversalId::Type_Ingredient,
|
ingredientEffectsMap.insert(std::make_pair(UniversalId::Type_Ingredient,
|
||||||
new IngredEffectRefIdAdapter ()));
|
new IngredEffectRefIdAdapter ()));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), ingredientEffectsMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), ingredientEffectsMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_IngredEffectId));
|
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_IngredEffectId));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
|
@ -88,13 +88,13 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
|
|
||||||
// nested table
|
// nested table
|
||||||
PotionColumns potionColumns (inventoryColumns);
|
PotionColumns potionColumns (inventoryColumns);
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_EffectList,
|
mColumns.emplace_back(Columns::ColumnId_EffectList,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
potionColumns.mEffects = &mColumns.back(); // see refidadapterimp.hpp
|
potionColumns.mEffects = &mColumns.back(); // see refidadapterimp.hpp
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> effectsMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> effectsMap;
|
||||||
effectsMap.insert(std::make_pair(UniversalId::Type_Potion,
|
effectsMap.insert(std::make_pair(UniversalId::Type_Potion,
|
||||||
new EffectsRefIdAdapter<ESM::Potion> (UniversalId::Type_Potion)));
|
new EffectsRefIdAdapter<ESM::Potion> (UniversalId::Type_Potion)));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), effectsMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), effectsMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_EffectId));
|
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_EffectId));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
|
@ -114,67 +114,67 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
|
|
||||||
EnchantableColumns enchantableColumns (inventoryColumns);
|
EnchantableColumns enchantableColumns (inventoryColumns);
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Enchantment, ColumnBase::Display_Enchantment));
|
mColumns.emplace_back(Columns::ColumnId_Enchantment, ColumnBase::Display_Enchantment);
|
||||||
enchantableColumns.mEnchantment = &mColumns.back();
|
enchantableColumns.mEnchantment = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_EnchantmentPoints, ColumnBase::Display_Integer));
|
mColumns.emplace_back(Columns::ColumnId_EnchantmentPoints, ColumnBase::Display_Integer);
|
||||||
enchantableColumns.mEnchantmentPoints = &mColumns.back();
|
enchantableColumns.mEnchantmentPoints = &mColumns.back();
|
||||||
|
|
||||||
ToolColumns toolsColumns (inventoryColumns);
|
ToolColumns toolsColumns (inventoryColumns);
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Quality, ColumnBase::Display_Float));
|
mColumns.emplace_back(Columns::ColumnId_Quality, ColumnBase::Display_Float);
|
||||||
toolsColumns.mQuality = &mColumns.back();
|
toolsColumns.mQuality = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Charges, ColumnBase::Display_Integer));
|
mColumns.emplace_back(Columns::ColumnId_Charges, ColumnBase::Display_Integer);
|
||||||
toolsColumns.mUses = &mColumns.back();
|
toolsColumns.mUses = &mColumns.back();
|
||||||
|
|
||||||
ActorColumns actorsColumns (nameColumns);
|
ActorColumns actorsColumns (nameColumns);
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_AiHello, ColumnBase::Display_UnsignedInteger16));
|
mColumns.emplace_back(Columns::ColumnId_AiHello, ColumnBase::Display_UnsignedInteger16);
|
||||||
actorsColumns.mHello = &mColumns.back();
|
actorsColumns.mHello = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_AiFlee, ColumnBase::Display_UnsignedInteger8));
|
mColumns.emplace_back(Columns::ColumnId_AiFlee, ColumnBase::Display_UnsignedInteger8);
|
||||||
actorsColumns.mFlee = &mColumns.back();
|
actorsColumns.mFlee = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_AiFight, ColumnBase::Display_UnsignedInteger8));
|
mColumns.emplace_back(Columns::ColumnId_AiFight, ColumnBase::Display_UnsignedInteger8);
|
||||||
actorsColumns.mFight = &mColumns.back();
|
actorsColumns.mFight = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_AiAlarm, ColumnBase::Display_UnsignedInteger8));
|
mColumns.emplace_back(Columns::ColumnId_AiAlarm, ColumnBase::Display_UnsignedInteger8);
|
||||||
actorsColumns.mAlarm = &mColumns.back();
|
actorsColumns.mAlarm = &mColumns.back();
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_ActorInventory,
|
mColumns.emplace_back(Columns::ColumnId_ActorInventory,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
actorsColumns.mInventory = &mColumns.back();
|
actorsColumns.mInventory = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> inventoryMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> inventoryMap;
|
||||||
inventoryMap.insert(std::make_pair(UniversalId::Type_Npc,
|
inventoryMap.insert(std::make_pair(UniversalId::Type_Npc,
|
||||||
new NestedInventoryRefIdAdapter<ESM::NPC> (UniversalId::Type_Npc)));
|
new NestedInventoryRefIdAdapter<ESM::NPC> (UniversalId::Type_Npc)));
|
||||||
inventoryMap.insert(std::make_pair(UniversalId::Type_Creature,
|
inventoryMap.insert(std::make_pair(UniversalId::Type_Creature,
|
||||||
new NestedInventoryRefIdAdapter<ESM::Creature> (UniversalId::Type_Creature)));
|
new NestedInventoryRefIdAdapter<ESM::Creature> (UniversalId::Type_Creature)));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), inventoryMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), inventoryMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_InventoryItemId, CSMWorld::ColumnBase::Display_Referenceable));
|
new RefIdColumn (Columns::ColumnId_InventoryItemId, CSMWorld::ColumnBase::Display_Referenceable));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_ItemCount, CSMWorld::ColumnBase::Display_Integer));
|
new RefIdColumn (Columns::ColumnId_ItemCount, CSMWorld::ColumnBase::Display_Integer));
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_SpellList,
|
mColumns.emplace_back(Columns::ColumnId_SpellList,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
actorsColumns.mSpells = &mColumns.back();
|
actorsColumns.mSpells = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> spellsMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> spellsMap;
|
||||||
spellsMap.insert(std::make_pair(UniversalId::Type_Npc,
|
spellsMap.insert(std::make_pair(UniversalId::Type_Npc,
|
||||||
new NestedSpellRefIdAdapter<ESM::NPC> (UniversalId::Type_Npc)));
|
new NestedSpellRefIdAdapter<ESM::NPC> (UniversalId::Type_Npc)));
|
||||||
spellsMap.insert(std::make_pair(UniversalId::Type_Creature,
|
spellsMap.insert(std::make_pair(UniversalId::Type_Creature,
|
||||||
new NestedSpellRefIdAdapter<ESM::Creature> (UniversalId::Type_Creature)));
|
new NestedSpellRefIdAdapter<ESM::Creature> (UniversalId::Type_Creature)));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), spellsMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), spellsMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_SpellId, CSMWorld::ColumnBase::Display_Spell));
|
new RefIdColumn (Columns::ColumnId_SpellId, CSMWorld::ColumnBase::Display_Spell));
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_NpcDestinations,
|
mColumns.emplace_back(Columns::ColumnId_NpcDestinations,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
actorsColumns.mDestinations = &mColumns.back();
|
actorsColumns.mDestinations = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> destMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> destMap;
|
||||||
destMap.insert(std::make_pair(UniversalId::Type_Npc,
|
destMap.insert(std::make_pair(UniversalId::Type_Npc,
|
||||||
new NestedTravelRefIdAdapter<ESM::NPC> (UniversalId::Type_Npc)));
|
new NestedTravelRefIdAdapter<ESM::NPC> (UniversalId::Type_Npc)));
|
||||||
destMap.insert(std::make_pair(UniversalId::Type_Creature,
|
destMap.insert(std::make_pair(UniversalId::Type_Creature,
|
||||||
new NestedTravelRefIdAdapter<ESM::Creature> (UniversalId::Type_Creature)));
|
new NestedTravelRefIdAdapter<ESM::Creature> (UniversalId::Type_Creature)));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), destMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), destMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_DestinationCell, CSMWorld::ColumnBase::Display_Cell));
|
new RefIdColumn (Columns::ColumnId_DestinationCell, CSMWorld::ColumnBase::Display_Cell));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
|
@ -191,15 +191,15 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
new RefIdColumn (Columns::ColumnId_RotZ, CSMWorld::ColumnBase::Display_Double));
|
new RefIdColumn (Columns::ColumnId_RotZ, CSMWorld::ColumnBase::Display_Double));
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_AiPackageList,
|
mColumns.emplace_back(Columns::ColumnId_AiPackageList,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
actorsColumns.mAiPackages = &mColumns.back();
|
actorsColumns.mAiPackages = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> aiMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> aiMap;
|
||||||
aiMap.insert(std::make_pair(UniversalId::Type_Npc,
|
aiMap.insert(std::make_pair(UniversalId::Type_Npc,
|
||||||
new ActorAiRefIdAdapter<ESM::NPC> (UniversalId::Type_Npc)));
|
new ActorAiRefIdAdapter<ESM::NPC> (UniversalId::Type_Npc)));
|
||||||
aiMap.insert(std::make_pair(UniversalId::Type_Creature,
|
aiMap.insert(std::make_pair(UniversalId::Type_Creature,
|
||||||
new ActorAiRefIdAdapter<ESM::Creature> (UniversalId::Type_Creature)));
|
new ActorAiRefIdAdapter<ESM::Creature> (UniversalId::Type_Creature)));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), aiMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), aiMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_AiPackageType, CSMWorld::ColumnBase::Display_AiPackageType));
|
new RefIdColumn (Columns::ColumnId_AiPackageType, CSMWorld::ColumnBase::Display_AiPackageType));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
|
@ -270,56 +270,56 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
|
|
||||||
for (int i=0; sServiceTable[i].mName!=-1; ++i)
|
for (int i=0; sServiceTable[i].mName!=-1; ++i)
|
||||||
{
|
{
|
||||||
mColumns.push_back (RefIdColumn (sServiceTable[i].mName, ColumnBase::Display_Boolean));
|
mColumns.emplace_back(sServiceTable[i].mName, ColumnBase::Display_Boolean);
|
||||||
actorsColumns.mServices.insert (std::make_pair (&mColumns.back(), sServiceTable[i].mFlag));
|
actorsColumns.mServices.insert (std::make_pair (&mColumns.back(), sServiceTable[i].mFlag));
|
||||||
}
|
}
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_AutoCalc, ColumnBase::Display_Boolean,
|
mColumns.emplace_back(Columns::ColumnId_AutoCalc, ColumnBase::Display_Boolean,
|
||||||
ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_Refresh));
|
ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_Refresh);
|
||||||
const RefIdColumn *autoCalc = &mColumns.back();
|
const RefIdColumn *autoCalc = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_ApparatusType,
|
mColumns.emplace_back(Columns::ColumnId_ApparatusType,
|
||||||
ColumnBase::Display_ApparatusType));
|
ColumnBase::Display_ApparatusType);
|
||||||
const RefIdColumn *apparatusType = &mColumns.back();
|
const RefIdColumn *apparatusType = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_ArmorType, ColumnBase::Display_ArmorType));
|
mColumns.emplace_back(Columns::ColumnId_ArmorType, ColumnBase::Display_ArmorType);
|
||||||
const RefIdColumn *armorType = &mColumns.back();
|
const RefIdColumn *armorType = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Health, ColumnBase::Display_Integer));
|
mColumns.emplace_back(Columns::ColumnId_Health, ColumnBase::Display_Integer);
|
||||||
const RefIdColumn *health = &mColumns.back();
|
const RefIdColumn *health = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_ArmorValue, ColumnBase::Display_Integer));
|
mColumns.emplace_back(Columns::ColumnId_ArmorValue, ColumnBase::Display_Integer);
|
||||||
const RefIdColumn *armor = &mColumns.back();
|
const RefIdColumn *armor = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_BookType, ColumnBase::Display_BookType));
|
mColumns.emplace_back(Columns::ColumnId_BookType, ColumnBase::Display_BookType);
|
||||||
const RefIdColumn *bookType = &mColumns.back();
|
const RefIdColumn *bookType = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Skill, ColumnBase::Display_SkillId));
|
mColumns.emplace_back(Columns::ColumnId_Skill, ColumnBase::Display_SkillId);
|
||||||
const RefIdColumn *skill = &mColumns.back();
|
const RefIdColumn *skill = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Text, ColumnBase::Display_LongString));
|
mColumns.emplace_back(Columns::ColumnId_Text, ColumnBase::Display_LongString);
|
||||||
const RefIdColumn *text = &mColumns.back();
|
const RefIdColumn *text = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_ClothingType, ColumnBase::Display_ClothingType));
|
mColumns.emplace_back(Columns::ColumnId_ClothingType, ColumnBase::Display_ClothingType);
|
||||||
const RefIdColumn *clothingType = &mColumns.back();
|
const RefIdColumn *clothingType = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_WeightCapacity, ColumnBase::Display_Float));
|
mColumns.emplace_back(Columns::ColumnId_WeightCapacity, ColumnBase::Display_Float);
|
||||||
const RefIdColumn *weightCapacity = &mColumns.back();
|
const RefIdColumn *weightCapacity = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_OrganicContainer, ColumnBase::Display_Boolean));
|
mColumns.emplace_back(Columns::ColumnId_OrganicContainer, ColumnBase::Display_Boolean);
|
||||||
const RefIdColumn *organic = &mColumns.back();
|
const RefIdColumn *organic = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Respawn, ColumnBase::Display_Boolean));
|
mColumns.emplace_back(Columns::ColumnId_Respawn, ColumnBase::Display_Boolean);
|
||||||
const RefIdColumn *respawn = &mColumns.back();
|
const RefIdColumn *respawn = &mColumns.back();
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_ContainerContent,
|
mColumns.emplace_back(Columns::ColumnId_ContainerContent,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
const RefIdColumn *content = &mColumns.back();
|
const RefIdColumn *content = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> contMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> contMap;
|
||||||
contMap.insert(std::make_pair(UniversalId::Type_Container,
|
contMap.insert(std::make_pair(UniversalId::Type_Container,
|
||||||
new NestedInventoryRefIdAdapter<ESM::Container> (UniversalId::Type_Container)));
|
new NestedInventoryRefIdAdapter<ESM::Container> (UniversalId::Type_Container)));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), contMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), contMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_InventoryItemId, CSMWorld::ColumnBase::Display_Referenceable));
|
new RefIdColumn (Columns::ColumnId_InventoryItemId, CSMWorld::ColumnBase::Display_Referenceable));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
|
@ -327,11 +327,11 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
|
|
||||||
CreatureColumns creatureColumns (actorsColumns);
|
CreatureColumns creatureColumns (actorsColumns);
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_CreatureType, ColumnBase::Display_CreatureType));
|
mColumns.emplace_back(Columns::ColumnId_CreatureType, ColumnBase::Display_CreatureType);
|
||||||
creatureColumns.mType = &mColumns.back();
|
creatureColumns.mType = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Scale, ColumnBase::Display_Float));
|
mColumns.emplace_back(Columns::ColumnId_Scale, ColumnBase::Display_Float);
|
||||||
creatureColumns.mScale = &mColumns.back();
|
creatureColumns.mScale = &mColumns.back();
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_ParentCreature, ColumnBase::Display_Creature));
|
mColumns.emplace_back(Columns::ColumnId_ParentCreature, ColumnBase::Display_Creature);
|
||||||
creatureColumns.mOriginal = &mColumns.back();
|
creatureColumns.mOriginal = &mColumns.back();
|
||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
|
@ -354,7 +354,7 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
|
|
||||||
for (int i=0; sCreatureFlagTable[i].mName!=-1; ++i)
|
for (int i=0; sCreatureFlagTable[i].mName!=-1; ++i)
|
||||||
{
|
{
|
||||||
mColumns.push_back (RefIdColumn (sCreatureFlagTable[i].mName, ColumnBase::Display_Boolean));
|
mColumns.emplace_back(sCreatureFlagTable[i].mName, ColumnBase::Display_Boolean);
|
||||||
creatureColumns.mFlags.insert (std::make_pair (&mColumns.back(), sCreatureFlagTable[i].mFlag));
|
creatureColumns.mFlags.insert (std::make_pair (&mColumns.back(), sCreatureFlagTable[i].mFlag));
|
||||||
|
|
||||||
switch (sCreatureFlagTable[i].mFlag)
|
switch (sCreatureFlagTable[i].mFlag)
|
||||||
|
@ -363,7 +363,7 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mColumns.push_back(RefIdColumn(Columns::ColumnId_BloodType, ColumnBase::Display_BloodType));
|
mColumns.emplace_back(Columns::ColumnId_BloodType, ColumnBase::Display_BloodType);
|
||||||
// For re-use in NPC records.
|
// For re-use in NPC records.
|
||||||
const RefIdColumn *bloodType = &mColumns.back();
|
const RefIdColumn *bloodType = &mColumns.back();
|
||||||
creatureColumns.mBloodType = bloodType;
|
creatureColumns.mBloodType = bloodType;
|
||||||
|
@ -371,24 +371,24 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
creatureColumns.mFlags.insert (std::make_pair (respawn, ESM::Creature::Respawn));
|
creatureColumns.mFlags.insert (std::make_pair (respawn, ESM::Creature::Respawn));
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_CreatureAttributes,
|
mColumns.emplace_back(Columns::ColumnId_CreatureAttributes,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
creatureColumns.mAttributes = &mColumns.back();
|
creatureColumns.mAttributes = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> creaAttrMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> creaAttrMap;
|
||||||
creaAttrMap.insert(std::make_pair(UniversalId::Type_Creature, new CreatureAttributesRefIdAdapter()));
|
creaAttrMap.insert(std::make_pair(UniversalId::Type_Creature, new CreatureAttributesRefIdAdapter()));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), creaAttrMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), creaAttrMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_Attribute, CSMWorld::ColumnBase::Display_Attribute, false, false));
|
new RefIdColumn (Columns::ColumnId_Attribute, CSMWorld::ColumnBase::Display_Attribute, false, false));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_AttributeValue, CSMWorld::ColumnBase::Display_Integer));
|
new RefIdColumn (Columns::ColumnId_AttributeValue, CSMWorld::ColumnBase::Display_Integer));
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_CreatureAttack,
|
mColumns.emplace_back(Columns::ColumnId_CreatureAttack,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
creatureColumns.mAttacks = &mColumns.back();
|
creatureColumns.mAttacks = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> attackMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> attackMap;
|
||||||
attackMap.insert(std::make_pair(UniversalId::Type_Creature, new CreatureAttackRefIdAdapter()));
|
attackMap.insert(std::make_pair(UniversalId::Type_Creature, new CreatureAttackRefIdAdapter()));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), attackMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), attackMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_CreatureAttack, CSMWorld::ColumnBase::Display_Integer, false, false));
|
new RefIdColumn (Columns::ColumnId_CreatureAttack, CSMWorld::ColumnBase::Display_Integer, false, false));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
|
@ -397,12 +397,12 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
new RefIdColumn (Columns::ColumnId_MaxAttack, CSMWorld::ColumnBase::Display_Integer));
|
new RefIdColumn (Columns::ColumnId_MaxAttack, CSMWorld::ColumnBase::Display_Integer));
|
||||||
|
|
||||||
// Nested list
|
// Nested list
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_CreatureMisc,
|
mColumns.emplace_back(Columns::ColumnId_CreatureMisc,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_List));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_List);
|
||||||
creatureColumns.mMisc = &mColumns.back();
|
creatureColumns.mMisc = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> creaMiscMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> creaMiscMap;
|
||||||
creaMiscMap.insert(std::make_pair(UniversalId::Type_Creature, new CreatureMiscRefIdAdapter()));
|
creaMiscMap.insert(std::make_pair(UniversalId::Type_Creature, new CreatureMiscRefIdAdapter()));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), creaMiscMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), creaMiscMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_Level, CSMWorld::ColumnBase::Display_Integer,
|
new RefIdColumn (Columns::ColumnId_Level, CSMWorld::ColumnBase::Display_Integer,
|
||||||
ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_Refresh));
|
ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_Refresh));
|
||||||
|
@ -423,27 +423,27 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_Gold, CSMWorld::ColumnBase::Display_Integer));
|
new RefIdColumn (Columns::ColumnId_Gold, CSMWorld::ColumnBase::Display_Integer));
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_OpenSound, ColumnBase::Display_Sound));
|
mColumns.emplace_back(Columns::ColumnId_OpenSound, ColumnBase::Display_Sound);
|
||||||
const RefIdColumn *openSound = &mColumns.back();
|
const RefIdColumn *openSound = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_CloseSound, ColumnBase::Display_Sound));
|
mColumns.emplace_back(Columns::ColumnId_CloseSound, ColumnBase::Display_Sound);
|
||||||
const RefIdColumn *closeSound = &mColumns.back();
|
const RefIdColumn *closeSound = &mColumns.back();
|
||||||
|
|
||||||
LightColumns lightColumns (inventoryColumns);
|
LightColumns lightColumns (inventoryColumns);
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Duration, ColumnBase::Display_Integer));
|
mColumns.emplace_back(Columns::ColumnId_Duration, ColumnBase::Display_Integer);
|
||||||
lightColumns.mTime = &mColumns.back();
|
lightColumns.mTime = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Radius, ColumnBase::Display_Integer));
|
mColumns.emplace_back(Columns::ColumnId_Radius, ColumnBase::Display_Integer);
|
||||||
lightColumns.mRadius = &mColumns.back();
|
lightColumns.mRadius = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Colour, ColumnBase::Display_Colour));
|
mColumns.emplace_back(Columns::ColumnId_Colour, ColumnBase::Display_Colour);
|
||||||
lightColumns.mColor = &mColumns.back();
|
lightColumns.mColor = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Sound, ColumnBase::Display_Sound));
|
mColumns.emplace_back(Columns::ColumnId_Sound, ColumnBase::Display_Sound);
|
||||||
lightColumns.mSound = &mColumns.back();
|
lightColumns.mSound = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back(RefIdColumn(Columns::ColumnId_EmitterType, ColumnBase::Display_EmitterType));
|
mColumns.emplace_back(Columns::ColumnId_EmitterType, ColumnBase::Display_EmitterType);
|
||||||
lightColumns.mEmitterType = &mColumns.back();
|
lightColumns.mEmitterType = &mColumns.back();
|
||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
|
@ -462,31 +462,31 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
|
|
||||||
for (int i=0; sLightFlagTable[i].mName!=-1; ++i)
|
for (int i=0; sLightFlagTable[i].mName!=-1; ++i)
|
||||||
{
|
{
|
||||||
mColumns.push_back (RefIdColumn (sLightFlagTable[i].mName, ColumnBase::Display_Boolean));
|
mColumns.emplace_back(sLightFlagTable[i].mName, ColumnBase::Display_Boolean);
|
||||||
lightColumns.mFlags.insert (std::make_pair (&mColumns.back(), sLightFlagTable[i].mFlag));
|
lightColumns.mFlags.insert (std::make_pair (&mColumns.back(), sLightFlagTable[i].mFlag));
|
||||||
}
|
}
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_IsKey, ColumnBase::Display_Boolean));
|
mColumns.emplace_back(Columns::ColumnId_IsKey, ColumnBase::Display_Boolean);
|
||||||
const RefIdColumn *key = &mColumns.back();
|
const RefIdColumn *key = &mColumns.back();
|
||||||
|
|
||||||
NpcColumns npcColumns (actorsColumns);
|
NpcColumns npcColumns (actorsColumns);
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Race, ColumnBase::Display_Race));
|
mColumns.emplace_back(Columns::ColumnId_Race, ColumnBase::Display_Race);
|
||||||
npcColumns.mRace = &mColumns.back();
|
npcColumns.mRace = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Class, ColumnBase::Display_Class));
|
mColumns.emplace_back(Columns::ColumnId_Class, ColumnBase::Display_Class);
|
||||||
npcColumns.mClass = &mColumns.back();
|
npcColumns.mClass = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Faction, ColumnBase::Display_Faction));
|
mColumns.emplace_back(Columns::ColumnId_Faction, ColumnBase::Display_Faction);
|
||||||
npcColumns.mFaction = &mColumns.back();
|
npcColumns.mFaction = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::Columnid_Hair, ColumnBase::Display_BodyPart));
|
mColumns.emplace_back(Columns::Columnid_Hair, ColumnBase::Display_BodyPart);
|
||||||
npcColumns.mHair = &mColumns.back();
|
npcColumns.mHair = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Head, ColumnBase::Display_BodyPart));
|
mColumns.emplace_back(Columns::ColumnId_Head, ColumnBase::Display_BodyPart);
|
||||||
npcColumns.mHead = &mColumns.back();
|
npcColumns.mHead = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_Gender, ColumnBase::Display_GenderNpc));
|
mColumns.emplace_back(Columns::ColumnId_Gender, ColumnBase::Display_GenderNpc);
|
||||||
npcColumns.mGender = &mColumns.back();
|
npcColumns.mGender = &mColumns.back();
|
||||||
|
|
||||||
npcColumns.mFlags.insert (std::make_pair (essential, ESM::NPC::Essential));
|
npcColumns.mFlags.insert (std::make_pair (essential, ESM::NPC::Essential));
|
||||||
|
@ -503,36 +503,36 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
// These needs to be driven from the autocalculated setting.
|
// These needs to be driven from the autocalculated setting.
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_NpcAttributes,
|
mColumns.emplace_back(Columns::ColumnId_NpcAttributes,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
npcColumns.mAttributes = &mColumns.back();
|
npcColumns.mAttributes = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> attrMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> attrMap;
|
||||||
attrMap.insert(std::make_pair(UniversalId::Type_Npc, new NpcAttributesRefIdAdapter()));
|
attrMap.insert(std::make_pair(UniversalId::Type_Npc, new NpcAttributesRefIdAdapter()));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), attrMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), attrMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_Attribute, CSMWorld::ColumnBase::Display_Attribute, false, false));
|
new RefIdColumn (Columns::ColumnId_Attribute, CSMWorld::ColumnBase::Display_Attribute, false, false));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_UChar, CSMWorld::ColumnBase::Display_UnsignedInteger8));
|
new RefIdColumn (Columns::ColumnId_UChar, CSMWorld::ColumnBase::Display_UnsignedInteger8));
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_NpcSkills,
|
mColumns.emplace_back(Columns::ColumnId_NpcSkills,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
npcColumns.mSkills = &mColumns.back();
|
npcColumns.mSkills = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> skillsMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> skillsMap;
|
||||||
skillsMap.insert(std::make_pair(UniversalId::Type_Npc, new NpcSkillsRefIdAdapter()));
|
skillsMap.insert(std::make_pair(UniversalId::Type_Npc, new NpcSkillsRefIdAdapter()));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), skillsMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), skillsMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_Skill, CSMWorld::ColumnBase::Display_SkillId, false, false));
|
new RefIdColumn (Columns::ColumnId_Skill, CSMWorld::ColumnBase::Display_SkillId, false, false));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_UChar, CSMWorld::ColumnBase::Display_UnsignedInteger8));
|
new RefIdColumn (Columns::ColumnId_UChar, CSMWorld::ColumnBase::Display_UnsignedInteger8));
|
||||||
|
|
||||||
// Nested list
|
// Nested list
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_NpcMisc,
|
mColumns.emplace_back(Columns::ColumnId_NpcMisc,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_List));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_List);
|
||||||
npcColumns.mMisc = &mColumns.back();
|
npcColumns.mMisc = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> miscMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> miscMap;
|
||||||
miscMap.insert(std::make_pair(UniversalId::Type_Npc, new NpcMiscRefIdAdapter()));
|
miscMap.insert(std::make_pair(UniversalId::Type_Npc, new NpcMiscRefIdAdapter()));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), miscMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), miscMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_Level, CSMWorld::ColumnBase::Display_SignedInteger16));
|
new RefIdColumn (Columns::ColumnId_Level, CSMWorld::ColumnBase::Display_SignedInteger16));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
|
@ -554,15 +554,15 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
|
|
||||||
WeaponColumns weaponColumns (enchantableColumns);
|
WeaponColumns weaponColumns (enchantableColumns);
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_WeaponType, ColumnBase::Display_WeaponType));
|
mColumns.emplace_back(Columns::ColumnId_WeaponType, ColumnBase::Display_WeaponType);
|
||||||
weaponColumns.mType = &mColumns.back();
|
weaponColumns.mType = &mColumns.back();
|
||||||
|
|
||||||
weaponColumns.mHealth = health;
|
weaponColumns.mHealth = health;
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_WeaponSpeed, ColumnBase::Display_Float));
|
mColumns.emplace_back(Columns::ColumnId_WeaponSpeed, ColumnBase::Display_Float);
|
||||||
weaponColumns.mSpeed = &mColumns.back();
|
weaponColumns.mSpeed = &mColumns.back();
|
||||||
|
|
||||||
mColumns.push_back (RefIdColumn (Columns::ColumnId_WeaponReach, ColumnBase::Display_Float));
|
mColumns.emplace_back(Columns::ColumnId_WeaponReach, ColumnBase::Display_Float);
|
||||||
weaponColumns.mReach = &mColumns.back();
|
weaponColumns.mReach = &mColumns.back();
|
||||||
|
|
||||||
for (int i=0; i<3; ++i)
|
for (int i=0; i<3; ++i)
|
||||||
|
@ -572,8 +572,7 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
|
|
||||||
for (int j=0; j<2; ++j)
|
for (int j=0; j<2; ++j)
|
||||||
{
|
{
|
||||||
mColumns.push_back (
|
mColumns.emplace_back(Columns::ColumnId_MinChop+i*2+j, ColumnBase::Display_Integer);
|
||||||
RefIdColumn (Columns::ColumnId_MinChop+i*2+j, ColumnBase::Display_Integer));
|
|
||||||
column[j] = &mColumns.back();
|
column[j] = &mColumns.back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -591,19 +590,19 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
|
|
||||||
for (int i=0; sWeaponFlagTable[i].mName!=-1; ++i)
|
for (int i=0; sWeaponFlagTable[i].mName!=-1; ++i)
|
||||||
{
|
{
|
||||||
mColumns.push_back (RefIdColumn (sWeaponFlagTable[i].mName, ColumnBase::Display_Boolean));
|
mColumns.emplace_back(sWeaponFlagTable[i].mName, ColumnBase::Display_Boolean);
|
||||||
weaponColumns.mFlags.insert (std::make_pair (&mColumns.back(), sWeaponFlagTable[i].mFlag));
|
weaponColumns.mFlags.insert (std::make_pair (&mColumns.back(), sWeaponFlagTable[i].mFlag));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_PartRefList, ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
mColumns.emplace_back(Columns::ColumnId_PartRefList, ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
const RefIdColumn *partRef = &mColumns.back();
|
const RefIdColumn *partRef = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> partMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> partMap;
|
||||||
partMap.insert(std::make_pair(UniversalId::Type_Armor,
|
partMap.insert(std::make_pair(UniversalId::Type_Armor,
|
||||||
new BodyPartRefIdAdapter<ESM::Armor> (UniversalId::Type_Armor)));
|
new BodyPartRefIdAdapter<ESM::Armor> (UniversalId::Type_Armor)));
|
||||||
partMap.insert(std::make_pair(UniversalId::Type_Clothing,
|
partMap.insert(std::make_pair(UniversalId::Type_Clothing,
|
||||||
new BodyPartRefIdAdapter<ESM::Clothing> (UniversalId::Type_Clothing)));
|
new BodyPartRefIdAdapter<ESM::Clothing> (UniversalId::Type_Clothing)));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), partMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), partMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_PartRefType, CSMWorld::ColumnBase::Display_PartRefType));
|
new RefIdColumn (Columns::ColumnId_PartRefType, CSMWorld::ColumnBase::Display_PartRefType));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
|
@ -614,30 +613,30 @@ CSMWorld::RefIdCollection::RefIdCollection()
|
||||||
LevListColumns levListColumns (baseColumns);
|
LevListColumns levListColumns (baseColumns);
|
||||||
|
|
||||||
// Nested table
|
// Nested table
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_LevelledList,
|
mColumns.emplace_back(Columns::ColumnId_LevelledList,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue);
|
||||||
levListColumns.mLevList = &mColumns.back();
|
levListColumns.mLevList = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> levListMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> levListMap;
|
||||||
levListMap.insert(std::make_pair(UniversalId::Type_CreatureLevelledList,
|
levListMap.insert(std::make_pair(UniversalId::Type_CreatureLevelledList,
|
||||||
new NestedLevListRefIdAdapter<ESM::CreatureLevList> (UniversalId::Type_CreatureLevelledList)));
|
new NestedLevListRefIdAdapter<ESM::CreatureLevList> (UniversalId::Type_CreatureLevelledList)));
|
||||||
levListMap.insert(std::make_pair(UniversalId::Type_ItemLevelledList,
|
levListMap.insert(std::make_pair(UniversalId::Type_ItemLevelledList,
|
||||||
new NestedLevListRefIdAdapter<ESM::ItemLevList> (UniversalId::Type_ItemLevelledList)));
|
new NestedLevListRefIdAdapter<ESM::ItemLevList> (UniversalId::Type_ItemLevelledList)));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), levListMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), levListMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_LevelledItemId, CSMWorld::ColumnBase::Display_Referenceable));
|
new RefIdColumn (Columns::ColumnId_LevelledItemId, CSMWorld::ColumnBase::Display_Referenceable));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_LevelledItemLevel, CSMWorld::ColumnBase::Display_Integer));
|
new RefIdColumn (Columns::ColumnId_LevelledItemLevel, CSMWorld::ColumnBase::Display_Integer));
|
||||||
|
|
||||||
// Nested list
|
// Nested list
|
||||||
mColumns.push_back(RefIdColumn (Columns::ColumnId_LevelledList,
|
mColumns.emplace_back(Columns::ColumnId_LevelledList,
|
||||||
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_List));
|
ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_List);
|
||||||
levListColumns.mNestedListLevList = &mColumns.back();
|
levListColumns.mNestedListLevList = &mColumns.back();
|
||||||
std::map<UniversalId::Type, NestedRefIdAdapterBase*> nestedListLevListMap;
|
std::map<UniversalId::Type, NestedRefIdAdapterBase*> nestedListLevListMap;
|
||||||
nestedListLevListMap.insert(std::make_pair(UniversalId::Type_CreatureLevelledList,
|
nestedListLevListMap.insert(std::make_pair(UniversalId::Type_CreatureLevelledList,
|
||||||
new NestedListLevListRefIdAdapter<ESM::CreatureLevList> (UniversalId::Type_CreatureLevelledList)));
|
new NestedListLevListRefIdAdapter<ESM::CreatureLevList> (UniversalId::Type_CreatureLevelledList)));
|
||||||
nestedListLevListMap.insert(std::make_pair(UniversalId::Type_ItemLevelledList,
|
nestedListLevListMap.insert(std::make_pair(UniversalId::Type_ItemLevelledList,
|
||||||
new NestedListLevListRefIdAdapter<ESM::ItemLevList> (UniversalId::Type_ItemLevelledList)));
|
new NestedListLevListRefIdAdapter<ESM::ItemLevList> (UniversalId::Type_ItemLevelledList)));
|
||||||
mNestedAdapters.push_back (std::make_pair(&mColumns.back(), nestedListLevListMap));
|
mNestedAdapters.emplace_back(&mColumns.back(), nestedListLevListMap);
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
new RefIdColumn (Columns::ColumnId_LevelledItemTypeEach, CSMWorld::ColumnBase::Display_Boolean));
|
new RefIdColumn (Columns::ColumnId_LevelledItemTypeEach, CSMWorld::ColumnBase::Display_Boolean));
|
||||||
mColumns.back().addColumn(
|
mColumns.back().addColumn(
|
||||||
|
|
|
@ -32,9 +32,9 @@ namespace CSMWorld
|
||||||
int flag = Flag_Table | Flag_Dialogue, bool editable = true,
|
int flag = Flag_Table | Flag_Dialogue, bool editable = true,
|
||||||
bool userEditable = true);
|
bool userEditable = true);
|
||||||
|
|
||||||
virtual bool isEditable() const;
|
bool isEditable() const override;
|
||||||
|
|
||||||
virtual bool isUserEditable() const;
|
bool isUserEditable() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RefIdCollection : public CollectionBase, public NestedCollection
|
class RefIdCollection : public CollectionBase, public NestedCollection
|
||||||
|
@ -60,82 +60,82 @@ namespace CSMWorld
|
||||||
|
|
||||||
virtual ~RefIdCollection();
|
virtual ~RefIdCollection();
|
||||||
|
|
||||||
virtual int getSize() const;
|
int getSize() const override;
|
||||||
|
|
||||||
virtual std::string getId (int index) const;
|
std::string getId (int index) const override;
|
||||||
|
|
||||||
virtual int getIndex (const std::string& id) const;
|
int getIndex (const std::string& id) const override;
|
||||||
|
|
||||||
virtual int getColumns() const;
|
int getColumns() const override;
|
||||||
|
|
||||||
virtual const ColumnBase& getColumn (int column) const;
|
const ColumnBase& getColumn (int column) const override;
|
||||||
|
|
||||||
virtual QVariant getData (int index, int column) const;
|
QVariant getData (int index, int column) const override;
|
||||||
|
|
||||||
virtual void setData (int index, int column, const QVariant& data);
|
void setData (int index, int column, const QVariant& data) override;
|
||||||
|
|
||||||
virtual void removeRows (int index, int count);
|
void removeRows (int index, int count) override;
|
||||||
|
|
||||||
virtual void cloneRecord(const std::string& origin,
|
void cloneRecord(const std::string& origin,
|
||||||
const std::string& destination,
|
const std::string& destination,
|
||||||
const UniversalId::Type type);
|
const UniversalId::Type type) override;
|
||||||
|
|
||||||
virtual bool touchRecord(const std::string& id);
|
bool touchRecord(const std::string& id) override;
|
||||||
|
|
||||||
virtual void appendBlankRecord (const std::string& id, UniversalId::Type type);
|
void appendBlankRecord (const std::string& id, UniversalId::Type type) override;
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||||
|
|
||||||
virtual int searchId (const std::string& id) const;
|
int searchId (const std::string& id) const override;
|
||||||
////< Search record with \a id.
|
////< Search record with \a id.
|
||||||
/// \return index of record (if found) or -1 (not found)
|
/// \return index of record (if found) or -1 (not found)
|
||||||
|
|
||||||
virtual void replace (int index, const RecordBase& record);
|
void replace (int index, const RecordBase& record) override;
|
||||||
///< If the record type does not match, an exception is thrown.
|
///< If the record type does not match, an exception is thrown.
|
||||||
///
|
///
|
||||||
/// \attention \a record must not change the ID.
|
/// \attention \a record must not change the ID.
|
||||||
|
|
||||||
virtual void appendRecord (const RecordBase& record, UniversalId::Type type);
|
void appendRecord (const RecordBase& record, UniversalId::Type type) override;
|
||||||
///< If the record type does not match, an exception is thrown.
|
///< If the record type does not match, an exception is thrown.
|
||||||
///
|
///
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||||
|
|
||||||
virtual const RecordBase& getRecord (const std::string& id) const;
|
const RecordBase& getRecord (const std::string& id) const override;
|
||||||
|
|
||||||
virtual const RecordBase& getRecord (int index) const;
|
const RecordBase& getRecord (int index) const override;
|
||||||
|
|
||||||
void load (ESM::ESMReader& reader, bool base, UniversalId::Type type);
|
void load (ESM::ESMReader& reader, bool base, UniversalId::Type type);
|
||||||
|
|
||||||
virtual int getAppendIndex (const std::string& id, UniversalId::Type type) const;
|
int getAppendIndex (const std::string& id, UniversalId::Type type) const override;
|
||||||
///< \param type Will be ignored, unless the collection supports multiple record types
|
///< \param type Will be ignored, unless the collection supports multiple record types
|
||||||
|
|
||||||
virtual std::vector<std::string> getIds (bool listDeleted) const;
|
std::vector<std::string> getIds (bool listDeleted) const override;
|
||||||
///< Return a sorted collection of all IDs
|
///< Return a sorted collection of all IDs
|
||||||
///
|
///
|
||||||
/// \param listDeleted include deleted record in the list
|
/// \param listDeleted include deleted record in the list
|
||||||
|
|
||||||
virtual bool reorderRows (int baseIndex, const std::vector<int>& newOrder);
|
bool reorderRows (int baseIndex, const std::vector<int>& newOrder) override;
|
||||||
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
///< Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices
|
||||||
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
/// given in \a newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
||||||
///
|
///
|
||||||
/// \return Success?
|
/// \return Success?
|
||||||
|
|
||||||
virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const;
|
QVariant getNestedData(int row, int column, int subRow, int subColumn) const override;
|
||||||
|
|
||||||
virtual NestedTableWrapperBase* nestedTable(int row, int column) const;
|
NestedTableWrapperBase* nestedTable(int row, int column) const override;
|
||||||
|
|
||||||
virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable);
|
void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable) override;
|
||||||
|
|
||||||
virtual int getNestedRowsCount(int row, int column) const;
|
int getNestedRowsCount(int row, int column) const override;
|
||||||
|
|
||||||
virtual int getNestedColumnsCount(int row, int column) const;
|
int getNestedColumnsCount(int row, int column) const override;
|
||||||
|
|
||||||
NestableColumn *getNestableColumn(int column);
|
NestableColumn *getNestableColumn(int column) override;
|
||||||
|
|
||||||
virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn);
|
void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn) override;
|
||||||
|
|
||||||
virtual void removeNestedRows(int row, int column, int subRow);
|
void removeNestedRows(int row, int column, int subRow) override;
|
||||||
|
|
||||||
virtual void addNestedRow(int row, int col, int position);
|
void addNestedRow(int row, int col, int position) override;
|
||||||
|
|
||||||
void save (int index, ESM::ESMWriter& writer) const;
|
void save (int index, ESM::ESMWriter& writer) const;
|
||||||
|
|
||||||
|
|
|
@ -66,24 +66,24 @@ namespace CSMWorld
|
||||||
{
|
{
|
||||||
std::vector<Record<RecordT> > mContainer;
|
std::vector<Record<RecordT> > mContainer;
|
||||||
|
|
||||||
virtual int getSize() const;
|
int getSize() const override;
|
||||||
|
|
||||||
virtual const RecordBase& getRecord (int index) const;
|
const RecordBase& getRecord (int index) const override;
|
||||||
|
|
||||||
virtual RecordBase& getRecord (int index);
|
RecordBase& getRecord (int index) override;
|
||||||
|
|
||||||
virtual void appendRecord (const std::string& id, bool base);
|
void appendRecord (const std::string& id, bool base) override;
|
||||||
|
|
||||||
virtual void insertRecord (RecordBase& record);
|
void insertRecord (RecordBase& record) override;
|
||||||
|
|
||||||
virtual int load (ESM::ESMReader& reader, bool base);
|
int load (ESM::ESMReader& reader, bool base) override;
|
||||||
///< \return index of a loaded record or -1 if no record was loaded
|
///< \return index of a loaded record or -1 if no record was loaded
|
||||||
|
|
||||||
virtual void erase (int index, int count);
|
void erase (int index, int count) override;
|
||||||
|
|
||||||
virtual std::string getId (int index) const;
|
std::string getId (int index) const override;
|
||||||
|
|
||||||
virtual void save (int index, ESM::ESMWriter& writer) const;
|
void save (int index, ESM::ESMWriter& writer) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename RecordT>
|
template<typename RecordT>
|
||||||
|
|
|
@ -91,15 +91,15 @@ namespace CSMWorld
|
||||||
|
|
||||||
RegionMap (Data& data);
|
RegionMap (Data& data);
|
||||||
|
|
||||||
virtual int rowCount (const QModelIndex& parent = QModelIndex()) const;
|
int rowCount (const QModelIndex& parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual int columnCount (const QModelIndex& parent = QModelIndex()) const;
|
int columnCount (const QModelIndex& parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const;
|
QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||||
///< \note Calling this function with role==Role_CellId may return the ID of a cell
|
///< \note Calling this function with role==Role_CellId may return the ID of a cell
|
||||||
/// that does not exist.
|
/// that does not exist.
|
||||||
|
|
||||||
virtual Qt::ItemFlags flags (const QModelIndex& index) const;
|
Qt::ItemFlags flags (const QModelIndex& index) const override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
|
|
@ -18,41 +18,40 @@ namespace CSMWorld
|
||||||
|
|
||||||
virtual ~ResourceTable();
|
virtual ~ResourceTable();
|
||||||
|
|
||||||
virtual int rowCount (const QModelIndex & parent = QModelIndex()) const;
|
int rowCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual int columnCount (const QModelIndex & parent = QModelIndex()) const;
|
int columnCount (const QModelIndex & parent = QModelIndex()) const override;
|
||||||
|
|
||||||
virtual QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const;
|
QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
virtual QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
virtual bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
bool setData ( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||||
|
|
||||||
virtual Qt::ItemFlags flags (const QModelIndex & index) const;
|
Qt::ItemFlags flags (const QModelIndex & index) const override;
|
||||||
|
|
||||||
virtual QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex())
|
QModelIndex index (int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
||||||
const;
|
|
||||||
|
|
||||||
virtual QModelIndex parent (const QModelIndex& index) const;
|
QModelIndex parent (const QModelIndex& index) const override;
|
||||||
|
|
||||||
virtual QModelIndex getModelIndex (const std::string& id, int column) const;
|
QModelIndex getModelIndex (const std::string& id, int column) const override;
|
||||||
|
|
||||||
/// Return index of column with the given \a id. If no such column exists, -1 is
|
/// Return index of column with the given \a id. If no such column exists, -1 is
|
||||||
/// returned.
|
/// returned.
|
||||||
virtual int searchColumnIndex (Columns::ColumnId id) const;
|
int searchColumnIndex (Columns::ColumnId id) const override;
|
||||||
|
|
||||||
/// Return index of column with the given \a id. If no such column exists, an
|
/// Return index of column with the given \a id. If no such column exists, an
|
||||||
/// exception is thrown.
|
/// exception is thrown.
|
||||||
virtual int findColumnIndex (Columns::ColumnId id) const;
|
int findColumnIndex (Columns::ColumnId id) const override;
|
||||||
|
|
||||||
/// Return the UniversalId and the hint for viewing \a row. If viewing is not
|
/// Return the UniversalId and the hint for viewing \a row. If viewing is not
|
||||||
/// supported by this table, return (UniversalId::Type_None, "").
|
/// supported by this table, return (UniversalId::Type_None, "").
|
||||||
virtual std::pair<UniversalId, std::string> view (int row) const;
|
std::pair<UniversalId, std::string> view (int row) const override;
|
||||||
|
|
||||||
/// Is \a id flagged as deleted?
|
/// Is \a id flagged as deleted?
|
||||||
virtual bool isDeleted (const std::string& id) const;
|
bool isDeleted (const std::string& id) const override;
|
||||||
|
|
||||||
virtual int getColumnId (int column) const;
|
int getColumnId (int column) const override;
|
||||||
|
|
||||||
/// Signal Qt that the data is about to change.
|
/// Signal Qt that the data is about to change.
|
||||||
void beginReset();
|
void beginReset();
|
||||||
|
|
|
@ -23,23 +23,23 @@ namespace CSMWorld
|
||||||
|
|
||||||
ScriptContext (const Data& data);
|
ScriptContext (const Data& data);
|
||||||
|
|
||||||
virtual bool canDeclareLocals() const;
|
bool canDeclareLocals() const override;
|
||||||
///< Is the compiler allowed to declare local variables?
|
///< Is the compiler allowed to declare local variables?
|
||||||
|
|
||||||
virtual char getGlobalType (const std::string& name) const;
|
char getGlobalType (const std::string& name) const override;
|
||||||
///< 'l: long, 's': short, 'f': float, ' ': does not exist.
|
///< 'l: long, 's': short, 'f': float, ' ': does not exist.
|
||||||
|
|
||||||
virtual std::pair<char, bool> getMemberType (const std::string& name,
|
std::pair<char, bool> getMemberType (const std::string& name,
|
||||||
const std::string& id) const;
|
const std::string& id) const override;
|
||||||
///< Return type of member variable \a name in script \a id or in script of reference of
|
///< Return type of member variable \a name in script \a id or in script of reference of
|
||||||
/// \a id
|
/// \a id
|
||||||
/// \return first: 'l: long, 's': short, 'f': float, ' ': does not exist.
|
/// \return first: 'l: long, 's': short, 'f': float, ' ': does not exist.
|
||||||
/// second: true: script of reference
|
/// second: true: script of reference
|
||||||
|
|
||||||
virtual bool isId (const std::string& name) const;
|
bool isId (const std::string& name) const override;
|
||||||
///< Does \a name match an ID, that can be referenced?
|
///< Does \a name match an ID, that can be referenced?
|
||||||
|
|
||||||
virtual bool isJournalId (const std::string& name) const;
|
bool isJournalId (const std::string& name) const override;
|
||||||
///< Does \a name match a journal ID?
|
///< Does \a name match a journal ID?
|
||||||
|
|
||||||
void invalidateIds();
|
void invalidateIds();
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace CSMWorld
|
||||||
{
|
{
|
||||||
const IdCollection<Cell>& mCells;
|
const IdCollection<Cell>& mCells;
|
||||||
|
|
||||||
virtual void loadRecord (ESXRecordT& record, ESM::ESMReader& reader, bool& isDeleted);
|
void loadRecord (ESXRecordT& record, ESM::ESMReader& reader, bool& isDeleted) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace CSMWorld
|
||||||
|
|
||||||
~TableMimeData();
|
~TableMimeData();
|
||||||
|
|
||||||
virtual QStringList formats() const;
|
QStringList formats() const override;
|
||||||
|
|
||||||
std::string getIcon() const;
|
std::string getIcon() const;
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace CSVDoc
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void closeEvent (QCloseEvent *event);
|
void closeEvent (QCloseEvent *event) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace CSVDoc
|
||||||
|
|
||||||
void create();
|
void create();
|
||||||
|
|
||||||
void reject();
|
void reject() override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace CSVDoc
|
||||||
|
|
||||||
RunLogSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document);
|
RunLogSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document);
|
||||||
|
|
||||||
virtual void setEditLock (bool locked);
|
void setEditLock (bool locked) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace CSVDoc
|
||||||
SizeHintWidget(QWidget *parent = 0);
|
SizeHintWidget(QWidget *parent = 0);
|
||||||
~SizeHintWidget();
|
~SizeHintWidget();
|
||||||
|
|
||||||
virtual QSize sizeHint() const;
|
QSize sizeHint() const override;
|
||||||
void setSizeHint(const QSize &size);
|
void setSizeHint(const QSize &size);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace CSVDoc
|
||||||
|
|
||||||
void setUniversalId(const CSMWorld::UniversalId& id);
|
void setUniversalId(const CSMWorld::UniversalId& id);
|
||||||
|
|
||||||
bool event (QEvent *event);
|
bool event (QEvent *event) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ namespace CSVDoc
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void closeEvent (QCloseEvent *event);
|
void closeEvent (QCloseEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace CSVDoc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document);
|
CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class SubViewT>
|
template<class SubViewT>
|
||||||
|
@ -32,7 +32,7 @@ namespace CSVDoc
|
||||||
|
|
||||||
SubViewFactoryWithCreator (bool sorting = true);
|
SubViewFactoryWithCreator (bool sorting = true);
|
||||||
|
|
||||||
virtual CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document);
|
CSVDoc::SubView *makeSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class SubViewT, class CreatorFactoryT>
|
template<class SubViewT, class CreatorFactoryT>
|
||||||
|
|
|
@ -64,7 +64,7 @@ namespace CSVDoc
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void closeEvent (QCloseEvent *event);
|
void closeEvent (QCloseEvent *event) override;
|
||||||
|
|
||||||
QAction* createMenuEntry(CSMWorld::UniversalId::Type type, QMenu* menu, const char* shortcutName);
|
QAction* createMenuEntry(CSMWorld::UniversalId::Type type, QMenu* menu, const char* shortcutName);
|
||||||
QAction* createMenuEntry(const std::string& title, const std::string& iconName, QMenu* menu, const char* shortcutName);
|
QAction* createMenuEntry(const std::string& title, const std::string& iconName, QMenu* menu, const char* shortcutName);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue