mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
Embed mapeditor resources
This commit is contained in:
@@ -107,24 +107,60 @@ set(editor_FORMS
|
||||
inspector/portraitwidget.ui
|
||||
)
|
||||
|
||||
set(editor_TS
|
||||
translation/chinese.ts
|
||||
translation/czech.ts
|
||||
translation/english.ts
|
||||
translation/french.ts
|
||||
translation/german.ts
|
||||
translation/polish.ts
|
||||
translation/portuguese.ts
|
||||
translation/russian.ts
|
||||
translation/spanish.ts
|
||||
translation/ukrainian.ts
|
||||
translation/vietnamese.ts
|
||||
set(editor_RESOURCES
|
||||
resources.qrc
|
||||
)
|
||||
|
||||
assign_source_group(${editor_SRCS} ${editor_HEADERS} mapeditor.rc)
|
||||
set(translationsDir "translation")
|
||||
set(editor_TS
|
||||
"${translationsDir}/chinese.ts"
|
||||
"${translationsDir}/czech.ts"
|
||||
"${translationsDir}/english.ts"
|
||||
"${translationsDir}/french.ts"
|
||||
"${translationsDir}/german.ts"
|
||||
"${translationsDir}/polish.ts"
|
||||
"${translationsDir}/portuguese.ts"
|
||||
"${translationsDir}/russian.ts"
|
||||
"${translationsDir}/spanish.ts"
|
||||
"${translationsDir}/ukrainian.ts"
|
||||
"${translationsDir}/vietnamese.ts"
|
||||
)
|
||||
if(ENABLE_TRANSLATIONS)
|
||||
if(TARGET Qt5::Core)
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${translationsDir}")
|
||||
set_source_files_properties(${editor_TS} PROPERTIES OUTPUT_LOCATION "${translationsDir}")
|
||||
qt5_add_translation(editor_QM ${editor_TS})
|
||||
|
||||
# Tell CMake to run moc when necessary:
|
||||
set(translationsResource "${CMAKE_CURRENT_BINARY_DIR}/translations.qrc")
|
||||
list(APPEND editor_RESOURCES "${translationsResource}")
|
||||
|
||||
set(rccQmFiles "")
|
||||
foreach(qmFile ${editor_QM})
|
||||
string(APPEND rccQmFiles "<file>${qmFile}</file>\n")
|
||||
endforeach()
|
||||
file(WRITE "${translationsResource}"
|
||||
"<!DOCTYPE RCC>
|
||||
<RCC version=\"1.0\">
|
||||
<qresource prefix=\"/\">
|
||||
${rccQmFiles}
|
||||
</qresource>
|
||||
</RCC>"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(editor_ICON mapeditor.rc)
|
||||
endif()
|
||||
|
||||
assign_source_group(${editor_SRCS} ${editor_HEADERS} ${editor_RESOURCES} ${editor_TS} ${editor_ICON})
|
||||
|
||||
# TODO: enabling AUTORCC breaks msvc build on CI
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
if(NOT (MSVC AND "$ENV{GITHUB_ACTIONS}" STREQUAL true))
|
||||
set(CMAKE_AUTORCC ON)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0071)
|
||||
cmake_policy(SET CMP0071 NEW)
|
||||
@@ -134,33 +170,28 @@ endif()
|
||||
# to always look for includes there:
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
if(TARGET Qt6::Core)
|
||||
qt_wrap_ui(editor_UI_HEADERS ${editor_FORMS})
|
||||
if(ENABLE_SINGLE_APP_BUILD OR ANDROID)
|
||||
add_library(vcmieditor OBJECT ${editor_QM})
|
||||
else()
|
||||
qt5_wrap_ui(editor_UI_HEADERS ${editor_FORMS})
|
||||
if(ENABLE_TRANSLATIONS)
|
||||
set_source_files_properties(${editor_TS} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/translation)
|
||||
qt5_add_translation( editor_QM ${editor_TS} )
|
||||
endif()
|
||||
add_executable(vcmieditor WIN32 ${editor_QM} ${editor_SRCS} ${editor_HEADERS} ${editor_UI_HEADERS} ${editor_ICON})
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(editor_ICON mapeditor.rc)
|
||||
endif()
|
||||
|
||||
add_executable(vcmieditor WIN32 ${editor_QM} ${editor_SRCS} ${editor_HEADERS} ${editor_UI_HEADERS} ${editor_ICON})
|
||||
|
||||
if(TARGET Qt6::Core)
|
||||
if(ENABLE_TRANSLATIONS)
|
||||
set_source_files_properties(${editor_TS} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/translation)
|
||||
if(ENABLE_TRANSLATIONS)
|
||||
if(TARGET Qt6::Core)
|
||||
qt_add_translations(vcmieditor
|
||||
TS_FILES ${editor_TS}
|
||||
QM_FILES_OUTPUT_VARIABLE editor_QM
|
||||
RESOURCE_PREFIX "/${translationsDir}"
|
||||
INCLUDE_DIRECTORIES
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_sources(vcmieditor PRIVATE
|
||||
${editor_SRCS}
|
||||
${editor_HEADERS}
|
||||
${editor_RESOURCES}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(vcmieditor
|
||||
PROPERTIES
|
||||
@@ -189,23 +220,15 @@ target_include_directories(vcmieditor
|
||||
vcmi_set_output_dir(vcmieditor "")
|
||||
enable_pch(vcmieditor)
|
||||
|
||||
# Copy to build directory for easier debugging
|
||||
add_custom_command(TARGET vcmieditor POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/mapeditor/
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake_modules/create_link.cmake ${CMAKE_SOURCE_DIR}/mapeditor/icons ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/mapeditor/icons
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake_modules/create_link.cmake ${CMAKE_CURRENT_BINARY_DIR}/translation ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/mapeditor/translation
|
||||
)
|
||||
|
||||
install(TARGETS vcmieditor DESTINATION ${BIN_DIR})
|
||||
# copy whole directory
|
||||
install(DIRECTORY icons DESTINATION ${DATA_DIR}/mapeditor)
|
||||
install(FILES ${editor_QM} DESTINATION ${DATA_DIR}/mapeditor/translation)
|
||||
|
||||
# Install icons and desktop file on Linux
|
||||
if(NOT WIN32 AND NOT APPLE)
|
||||
foreach(iconSize 32 48 64 128 256)
|
||||
install(FILES "icons/mapeditor.${iconSize}x${iconSize}.png"
|
||||
DESTINATION "share/icons/hicolor/${iconSize}x${iconSize}/apps"
|
||||
RENAME vcmieditor.png
|
||||
)
|
||||
endforeach()
|
||||
install(FILES "vcmieditor.desktop" DESTINATION share/applications)
|
||||
install(FILES "icons/mapeditor.32x32.png" DESTINATION share/icons/hicolor/32x32/apps RENAME vcmieditor.png)
|
||||
install(FILES "icons/mapeditor.48x48.png" DESTINATION share/icons/hicolor/48x48/apps RENAME vcmieditor.png)
|
||||
install(FILES "icons/mapeditor.64x64.png" DESTINATION share/icons/hicolor/64x64/apps RENAME vcmieditor.png)
|
||||
install(FILES "icons/mapeditor.128x128.png" DESTINATION share/icons/hicolor/128x128/apps RENAME vcmieditor.png)
|
||||
install(FILES "icons/mapeditor.256x256.png" DESTINATION share/icons/hicolor/256x256/apps RENAME vcmieditor.png)
|
||||
endif()
|
||||
|
BIN
mapeditor/icons/tool-area.png
Normal file
BIN
mapeditor/icons/tool-area.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
mapeditor/icons/tool-fill.png
Normal file
BIN
mapeditor/icons/tool-fill.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
mapeditor/icons/tool-lasso.png
Normal file
BIN
mapeditor/icons/tool-lasso.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
mapeditor/icons/tool-line.png
Normal file
BIN
mapeditor/icons/tool-line.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
mapeditor/icons/tool-select.png
Normal file
BIN
mapeditor/icons/tool-select.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@@ -133,25 +133,17 @@ void MainWindow::parseCommandLine(ExtractionOptions & extractionOptions)
|
||||
void MainWindow::loadTranslation()
|
||||
{
|
||||
#ifdef ENABLE_QT_TRANSLATIONS
|
||||
std::string translationFile = settings["general"]["language"].String() + ".qm";
|
||||
const std::string translationFile = settings["general"]["language"].String() + ".qm";
|
||||
logGlobal->info("Loading translation '%s'", translationFile);
|
||||
|
||||
QVector<QString> searchPaths;
|
||||
|
||||
for(auto const & string : VCMIDirs::get().dataPaths())
|
||||
searchPaths.push_back(pathToQString(string / "mapeditor" / "translation" / translationFile));
|
||||
searchPaths.push_back(pathToQString(VCMIDirs::get().userDataPath() / "mapeditor" / "translation" / translationFile));
|
||||
|
||||
for(auto const & string : boost::adaptors::reverse(searchPaths))
|
||||
if (!translator.load(QString{":/translation/%1"}.arg(translationFile.c_str())))
|
||||
{
|
||||
if (translator.load(string))
|
||||
{
|
||||
if (!qApp->installTranslator(&translator))
|
||||
logGlobal->error("Failed to install translator");
|
||||
return;
|
||||
}
|
||||
logGlobal->error("Failed to load translation");
|
||||
return;
|
||||
}
|
||||
|
||||
logGlobal->error("Failed to find translation");
|
||||
if (!qApp->installTranslator(&translator))
|
||||
logGlobal->error("Failed to install translator");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -163,13 +155,9 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||
// Set current working dir to executable folder.
|
||||
// This is important on Mac for relative paths to work inside DMG.
|
||||
QDir::setCurrent(QApplication::applicationDirPath());
|
||||
|
||||
for(auto & string : VCMIDirs::get().dataPaths())
|
||||
QDir::addSearchPath("icons", pathToQString(string / "mapeditor" / "icons"));
|
||||
QDir::addSearchPath("icons", pathToQString(VCMIDirs::get().userDataPath() / "mapeditor" / "icons"));
|
||||
|
||||
|
||||
new QShortcut(QKeySequence("Backspace"), this, SLOT(on_actionErase_triggered()));
|
||||
|
||||
|
||||
ExtractionOptions extractionOptions;
|
||||
parseCommandLine(extractionOptions);
|
||||
|
||||
@@ -206,6 +194,36 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||
loadTranslation();
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
setWindowIcon(QIcon{":/icons/menu-game.png"});
|
||||
ui->toolBrush->setIcon(QIcon{":/icons/brush-1.png"});
|
||||
ui->toolBrush2->setIcon(QIcon{":/icons/brush-2.png"});
|
||||
ui->toolBrush4->setIcon(QIcon{":/icons/brush-4.png"});
|
||||
ui->toolLasso->setIcon(QIcon{":/icons/tool-lasso.png"});
|
||||
ui->toolLine->setIcon(QIcon{":/icons/tool-line.png"});
|
||||
ui->toolArea->setIcon(QIcon{":/icons/tool-area.png"});
|
||||
ui->toolFill->setIcon(QIcon{":/icons/tool-fill.png"});
|
||||
ui->toolSelect->setIcon(QIcon{":/icons/tool-select.png"});
|
||||
ui->actionOpen->setIcon(QIcon{":/icons/document-open.png"});
|
||||
ui->actionSave->setIcon(QIcon{":/icons/document-save.png"});
|
||||
ui->actionNew->setIcon(QIcon{":/icons/document-new.png"});
|
||||
ui->actionLevel->setIcon(QIcon{":/icons/toggle-underground.png"});
|
||||
ui->actionPass->setIcon(QIcon{":/icons/toggle-pass.png"});
|
||||
ui->actionCut->setIcon(QIcon{":/icons/edit-cut.png"});
|
||||
ui->actionCopy->setIcon(QIcon{":/icons/edit-copy.png"});
|
||||
ui->actionPaste->setIcon(QIcon{":/icons/edit-paste.png"});
|
||||
ui->actionFill->setIcon(QIcon{":/icons/fill-obstacles.png"});
|
||||
ui->actionGrid->setIcon(QIcon{":/icons/toggle-grid.png"});
|
||||
ui->actionUndo->setIcon(QIcon{":/icons/edit-undo.png"});
|
||||
ui->actionRedo->setIcon(QIcon{":/icons/edit-redo.png"});
|
||||
ui->actionErase->setIcon(QIcon{":/icons/edit-clear.png"});
|
||||
ui->actionTranslations->setIcon(QIcon{":/icons/translations.png"});
|
||||
ui->actionLock->setIcon(QIcon{":/icons/lock-closed.png"});
|
||||
ui->actionUnlock->setIcon(QIcon{":/icons/lock-open.png"});
|
||||
ui->actionZoom_in->setIcon(QIcon{":/icons/zoom_plus.png"});
|
||||
ui->actionZoom_out->setIcon(QIcon{":/icons/zoom_minus.png"});
|
||||
ui->actionZoom_reset->setIcon(QIcon{":/icons/zoom_zero.png"});
|
||||
|
||||
loadUserSettings(); //For example window size
|
||||
setTitle();
|
||||
|
||||
|
@@ -511,10 +511,6 @@
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:brush-1.png</normaloff>icons:brush-1.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
@@ -558,10 +554,6 @@
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:brush-2.png</normaloff>icons:brush-2.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
@@ -605,10 +597,6 @@
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:brush-4.png</normaloff>icons:brush-4.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
@@ -652,10 +640,6 @@
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:brush-3.png</normaloff>icons:brush-3.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -697,10 +681,6 @@
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:brush-7.png</normaloff>icons:brush-7.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -732,10 +712,6 @@
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:brush-5.png</normaloff>icons:brush-5.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -770,10 +746,6 @@
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:brush-6.png</normaloff>icons:brush-6.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -808,10 +780,6 @@
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:brush-0.png</normaloff>icons:brush-0.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -1044,10 +1012,6 @@
|
||||
</widget>
|
||||
</widget>
|
||||
<action name="actionOpen">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:document-open.png</normaloff>icons:document-open.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Open</string>
|
||||
</property>
|
||||
@@ -1056,10 +1020,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSave">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:document-save.png</normaloff>icons:document-save.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
@@ -1068,10 +1028,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNew">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:document-new.png</normaloff>icons:document-new.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>New</string>
|
||||
</property>
|
||||
@@ -1088,10 +1044,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLevel">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:toggle-underground.png</normaloff>icons:toggle-underground.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>U/G</string>
|
||||
</property>
|
||||
@@ -1106,10 +1058,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:toggle-pass.png</normaloff>icons:toggle-pass.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pass</string>
|
||||
</property>
|
||||
@@ -1118,10 +1066,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCut">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:edit-cut.png</normaloff>icons:edit-cut.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cut</string>
|
||||
</property>
|
||||
@@ -1130,10 +1074,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCopy">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:edit-copy.png</normaloff>icons:edit-copy.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Copy</string>
|
||||
</property>
|
||||
@@ -1142,10 +1082,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPaste">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:edit-paste.png</normaloff>icons:edit-paste.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Paste</string>
|
||||
</property>
|
||||
@@ -1154,10 +1090,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFill">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:fill-obstacles.png</normaloff>icons:fill-obstacles.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fill</string>
|
||||
</property>
|
||||
@@ -1172,10 +1104,6 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:toggle-grid.png</normaloff>icons:toggle-grid.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Grid</string>
|
||||
</property>
|
||||
@@ -1212,10 +1140,6 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:edit-undo.png</normaloff>icons:edit-undo.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Undo</string>
|
||||
</property>
|
||||
@@ -1233,10 +1157,6 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:edit-redo.png</normaloff>icons:edit-redo.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Redo</string>
|
||||
</property>
|
||||
@@ -1251,10 +1171,6 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:edit-clear.png</normaloff>icons:edit-clear.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Erase</string>
|
||||
</property>
|
||||
@@ -1400,10 +1316,6 @@
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:translations.png</normaloff>icons:translations.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Translations</string>
|
||||
</property>
|
||||
@@ -1420,10 +1332,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLock">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:lock-closed.png</normaloff>icons:lock-closed.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Lock</string>
|
||||
</property>
|
||||
@@ -1435,10 +1343,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionUnlock">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:lock-open.png</normaloff>icons:lock-open.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unlock</string>
|
||||
</property>
|
||||
@@ -1450,10 +1354,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionZoom_in">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:zoom_plus.png</normaloff>icons:zoom_plus.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Zoom in</string>
|
||||
</property>
|
||||
@@ -1462,10 +1362,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionZoom_out">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:zoom_minus.png</normaloff>icons:zoom_minus.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Zoom out</string>
|
||||
</property>
|
||||
@@ -1474,10 +1370,6 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionZoom_reset">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>icons:zoom_zero.png</normaloff>icons:zoom_zero.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Zoom reset</string>
|
||||
</property>
|
||||
|
45
mapeditor/resources.qrc
Normal file
45
mapeditor/resources.qrc
Normal file
@@ -0,0 +1,45 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/brush-1.png</file>
|
||||
<file>icons/brush-2.png</file>
|
||||
<file>icons/brush-4.png</file>
|
||||
<file>icons/document-new.png</file>
|
||||
<file>icons/document-open.png</file>
|
||||
<file>icons/document-save.png</file>
|
||||
<file>icons/edit-clear.png</file>
|
||||
<file>icons/edit-copy.png</file>
|
||||
<file>icons/edit-cut.png</file>
|
||||
<file>icons/edit-paste.png</file>
|
||||
<file>icons/edit-redo.png</file>
|
||||
<file>icons/edit-undo.png</file>
|
||||
<file>icons/fill-obstacles.png</file>
|
||||
<file>icons/lock-closed.png</file>
|
||||
<file>icons/lock-open.png</file>
|
||||
<file>icons/mapeditor.32x32.png</file>
|
||||
<file>icons/mapeditor.48x48.png</file>
|
||||
<file>icons/mapeditor.64x64.png</file>
|
||||
<file>icons/mapeditor.128x128.png</file>
|
||||
<file>icons/mapeditor.256x256.png</file>
|
||||
<file>icons/menu-game.png</file>
|
||||
<file>icons/menu-mods.png</file>
|
||||
<file>icons/menu-settings.png</file>
|
||||
<file>icons/mod-delete.png</file>
|
||||
<file>icons/mod-disabled.png</file>
|
||||
<file>icons/mod-download.png</file>
|
||||
<file>icons/mod-enabled.png</file>
|
||||
<file>icons/mod-update.png</file>
|
||||
<file>icons/toggle-grid.png</file>
|
||||
<file>icons/toggle-pass.png</file>
|
||||
<file>icons/toggle-underground.png</file>
|
||||
<file>icons/tool-area.png</file>
|
||||
<file>icons/tool-fill.png</file>
|
||||
<file>icons/tool-lasso.png</file>
|
||||
<file>icons/tool-line.png</file>
|
||||
<file>icons/tool-select.png</file>
|
||||
<file>icons/translations.png</file>
|
||||
<file>icons/zoom_base.png</file>
|
||||
<file>icons/zoom_minus.png</file>
|
||||
<file>icons/zoom_plus.png</file>
|
||||
<file>icons/zoom_zero.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
@@ -29,7 +29,7 @@ Validator::Validator(const CMap * map, QWidget *parent) :
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
std::array<QString, 2> icons{"mapeditor/icons/mod-update.png", "mapeditor/icons/mod-delete.png"};
|
||||
std::array<QString, 2> icons{":/icons/mod-update.png", ":/icons/mod-delete.png"};
|
||||
|
||||
for(auto & issue : Validator::validate(map))
|
||||
{
|
||||
|
Reference in New Issue
Block a user