Commit 1cb2d177 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Merge krita-mvc-rempt into master

This refactors Krita to allow the user to have more than one
image open in a window. Krita no longer uses or depends on the
komain library.

For now, Sketch and Gemini are disabled.

review:119612

Conflicts:
	krita/ui/kis_view2.cpp
	krita/ui/tool/kis_delegated_tool.h
parent 137c8990
......@@ -668,6 +668,13 @@ include(MacroCalligraBuildTest)
# for config.h and <toplevel/foo.h> includes (if any?)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/interfaces )
set(KOVERSION_INCLUDES ${CMAKE_SOURCE_DIR}/libs/version
${CMAKE_BINARY_DIR}/libs/version
)
include_directories(${KOVERSION_INCLUDES})
# koplugin is at the bottom of the stack
set(KOPLUGIN_INCLUDES ${CMAKE_SOURCE_DIR}/libs/koplugin)
......@@ -676,15 +683,16 @@ set(KUNDO2_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kundo2)
# koodf is at the bottom of the stack
set(KOODF_INCLUDES ${CMAKE_SOURCE_DIR}/libs/odf
${CMAKE_BINARY_DIR}/libs/odf
${KOVERSION_INCLUDES}
${KDE4_INCLUDES})
# pigment depends on koplugin and lcms
set(PIGMENT_INCLUDES ${KOPLUGIN_INCLUDES}
${KOVERSION_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/pigment
${CMAKE_SOURCE_DIR}/libs/pigment/compositeops
${CMAKE_SOURCE_DIR}/libs/pigment/resources
${Boost_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${QT_INCLUDES}
${KDE4_INCLUDES})
......@@ -715,23 +723,31 @@ set(KOTEXT_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kotext
${CMAKE_SOURCE_DIR}/libs/kotext/opendocument
${SOPRANO_INCLUDE_DIR}
${FLAKE_INCLUDES}
${KOODF_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/main)
${KOODF_INCLUDES})
# TextLayout depends on kotext
set(TEXTLAYOUT_INCLUDES ${KOTEXT_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/textlayout)
# Widgets depends on flake
set(KOWIDGETS_INCLUDES ${FLAKE_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/widgetutils
${CMAKE_SOURCE_DIR}/libs/widgets)
# BasicFlakes depends on flake, widgets
set(BASICFLAKES_INCLUDES ${KOWIDGETS_INCLUDES} ${FLAKE_INCLUDES}
set(BASICFLAKES_INCLUDES ${FLAKE_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/basicflakes
${CMAKE_SOURCE_DIR}/libs/basicflakes/tools)
set(KOWIDGETS_INCLUDES ${KDE4_INCLUDES}
${BASICFLAKES_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/widgets
${CMAKE_SOURCE_DIR}/libs/widgetutils)
# komain depends on kotext & flake
set(KOMAIN_INCLUDES ${KDE4_INCLUDES}
${KOWIDGETS_INCLUDES}
${TEXTLAYOUT_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/widgets
${CMAKE_SOURCE_DIR}/libs/widgetutils
${CMAKE_SOURCE_DIR}/libs/main
${CMAKE_BINARY_DIR}/libs/main
${CMAKE_SOURCE_DIR}/libs/main/config)
......
......@@ -102,9 +102,9 @@ set(KRITA_INCLUDES
${CMAKE_BINARY_DIR}/krita/ui
${PIGMENT_INCLUDES}
${KOTEXT_INCLUDES}
${KOMAIN_INCLUDES}
${BASICFLAKES_INCLUDES}
${TEXTLAYOUT_INCLUDES}
${CMAKE_SOURCE_DIR}/libs/widgets
${CMAKE_SOURCE_DIR}/libs/widgets/resources
${CMAKE_SOURCE_DIR}/libs/widgets/colorwidgets
${CMAKE_SOURCE_DIR}/libs/widgetutils
......@@ -140,17 +140,13 @@ endif (WIN32 AND USE_BREAKPAD)
if (NOT WIN32)
add_subdirectory( benchmarks )
endif (NOT WIN32)
add_subdirectory( animator )
set(kritapart_PART_SRCS krita_part_init.cc)
kde4_add_plugin(kritapart ${kritapart_PART_SRCS})
target_link_libraries(kritapart kritaui)
install(TARGETS kritapart DESTINATION ${PLUGIN_INSTALL_DIR})
set(krita_KDEINIT_SRCS main.cc kis_splash_screen.cpp)
kde4_add_ui_files(krita_KDEINIT_SRCS
wdgsplash.ui
)
set(krita_KDEINIT_SRCS main.cc)
if(WIN32 AND USE_BREAKPAD)
set(krita_KDEINIT_SRCS ${krita_KDEINIT_SRCS} kis_crash_handler.cpp)
......@@ -167,7 +163,7 @@ if (Q_WS_MAC)
endif (Q_WS_MAC)
target_link_libraries(kdeinit_krita kritaui ${BREAKPAD_LIBS})
target_link_libraries(krita kdeinit_krita)
target_link_libraries(krita kdeinit_krita kritaui)
install(TARGETS krita ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kdeinit_krita ${INSTALL_TARGETS_DEFAULT_ARGS})
......@@ -177,6 +173,6 @@ install(FILES krita.rc DESTINATION ${DATA_INSTALL_DIR}/krita)
install(FILES krita.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/appdata/ )
if (${QTVERSION} VERSION_GREATER 4.7.0 AND NOT APPLE AND HAVE_OPENGL)
add_subdirectory(sketch)
add_subdirectory(gemini)
# add_subdirectory(sketch)
# add_subdirectory(gemini)
endif (${QTVERSION} VERSION_GREATER 4.7.0 AND NOT APPLE AND HAVE_OPENGL)
project(kritaanimation)
set(kritaanimationpart_PART_SRCS kritaanimation_part_init.cpp)
kde4_add_plugin(kritaanimationpart ${kritaanimationpart_PART_SRCS})
target_link_libraries(kritaanimationpart kritaui)
install(TARGETS kritaanimationpart DESTINATION ${PLUGIN_INSTALL_DIR})
set(kritaanimation_KDEINIT_SRCS main.cpp "${CMAKE_CURRENT_SOURCE_DIR}/../kis_splash_screen.cpp")
if(WIN32 AND USE_BREAKPAD)
set(kritaanimation_KDEINIT_SRCS ${kritaanimation_KDEINIT_SRCS} ../kis_crash_handler.cpp)
set(BREAKPAD_LIBS breakpad)
endif(WIN32 AND USE_BREAKPAD)
kde4_add_ui_files(kritaanimation_KDEINIT_SRCS
"${CMAKE_CURRENT_SOURCE_DIR}/../wdgsplash.ui"
)
kde4_add_app_icon(kritaanimation_KDEINIT_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../pics/app/hi*-app-calligrakrita.png")
kde4_add_kdeinit_executable(kritaanimation ${kritaanimation_KDEINIT_SRCS})
target_link_libraries(kdeinit_kritaanimation kritaui)
target_link_libraries(kritaanimation ${BREAKPAD_LIBS} kdeinit_kritaanimation)
install(TARGETS kritaanimation ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kdeinit_kritaanimation ${INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS kritaanimation.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}/calligra)
install(FILES kritaanimationpart.desktop DESTINATION ${SERVICES_INSTALL_DIR}/calligra)
install(FILES kritaanimation.rc DESTINATION ${DATA_INSTALL_DIR}/kritaanimation)
install(FILES kritaanimationrc DESTINATION ${CONFIG_INSTALL_DIR} )
install(FILES krita_animationdock.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
install(FILES kritaanimation.xml DESTINATION ${XDG_MIME_INSTALL_DIR})
update_xdg_mimetypes(${XDG_MIME_INSTALL_DIR})
[Desktop Entry]
Type=ServiceType
X-KDE-ServiceType=Krita/AnimationDock
Comment=Animation Docker for Krita
Comment[ca]=Acoblador d'animació per al Krita
Comment[cs]=Dok animace pro Kritu
Comment[de]=Animations-Docker für Krita
Comment[en_GB]=Animation Docker for Krita
Comment[es]=Ventana acoplable de animación para Krita
Comment[fi]=Krita-animaatiotelakka
Comment[it]=Area di aggancio delle animazioni di Krita
Comment[ja]=Krita のアニメーションドッキングパネル
Comment[nb]=Animeringsdokker for Krita
Comment[nl]=Animatievastzetter voor Krita
Comment[pl]=Dokowanie animacji dla Krita
Comment[pt]=Acoplador de Animação para o Krita
Comment[pt_BR]=Acoplador de animação para o Krita
Comment[sk]=Docker animácií pre Krita
Comment[sv]=Animeringsdockningsfönster för Krita
Comment[uk]=Бічна панель анімації Krita
Comment[x-test]=xxAnimation Docker for Kritaxx
[PropertyDef::X-Krita-Version]
Type=int
[Desktop Entry]
Name=Krita Animation
Name[ca]=Animació del Krita
Name[cs]=Animace Krita
Name[de]=Krita-Animation
Name[en_GB]=Krita Animation
Name[es]=Krita animación
Name[fi]=Krita-animaatio
Name[ia]=Krita Animation
Name[it]=Animazione di Krita
Name[ja]=Krita Animation
Name[nb]=Krita-animasjon
Name[nl]=Animatie van Krita
Name[pl]=Animacje Krita
Name[pt]=Krita Animação
Name[pt_BR]=Animação do Krita
Name[sk]=Krita animácia
Name[sv]=Krita-animering
Name[uk]=Krita Animation
Name[x-test]=xxKrita Animationxx
Exec=kritaanimation %U
X-DocPath=http://userbase.kde.org/Special:MyLanguage/Krita
GenericName=Digital Painting
GenericName[bs]=Digitalno Bojenje
GenericName[ca]=Dibuix digital
GenericName[ca@valencia]=Dibuix digital
GenericName[da]=Digital tegning
GenericName[de]=Digitales Malen
GenericName[el]=Ψηφιακή ζωγραφική
GenericName[en_GB]=Digital Painting
GenericName[es]=Pintura digital
GenericName[et]=Digitaalne joonistamine
GenericName[eu]=Pintura digitala
GenericName[fi]=Digitaalimaalaus
GenericName[fr]=Peinture numérique
GenericName[gl]=Debuxo dixital
GenericName[hu]=Digitális festészet
GenericName[it]=Pittura digitale
GenericName[ja]=デジタルペインティング
GenericName[kk]=Цифрлық сурет салу
GenericName[lt]=Skaitmeninis piešimas
GenericName[mr]=डिजिटल पेंटिंग
GenericName[nb]=Digital maling
GenericName[nl]=Digitaal schilderen
GenericName[pl]=Cyfrowe malowanie
GenericName[pt]=Pintura Digital
GenericName[pt_BR]=Pintura digital
GenericName[ru]=Цифровая живопись
GenericName[sk]=Digitálne maľovanie
GenericName[sl]=Digitalno slikanje
GenericName[sv]=Digital målning
GenericName[ug]=سىفىرلىق رەسىم سىزغۇ
GenericName[uk]=Цифрове малювання
GenericName[x-test]=xxDigital Paintingxx
MimeType=application/x-krita-animation
Comment=Digital Painting
Comment[bs]=Digitalno Bojenje
Comment[ca]=Dibuix digital
Comment[ca@valencia]=Dibuix digital
Comment[da]=Digital tegning
Comment[de]=Digitales Malen
Comment[el]=Ψηφιακή ζωγραφική
Comment[en_GB]=Digital Painting
Comment[es]=Pintura digital
Comment[et]=Digitaalne joonistamine
Comment[eu]=Pintura digitala
Comment[fi]=Digitaalimaalaus
Comment[fr]=Peinture numérique
Comment[gl]=Debuxo dixital.
Comment[hu]=Digitális festészet
Comment[it]=Pittura digitale
Comment[ja]=デジタルペインティング
Comment[kk]=Цифрлық сурет салу
Comment[lt]=Skaitmeninis piešimas
Comment[mr]=डिजिटल पेंटिंग
Comment[nb]=Digital maling
Comment[nl]=Digitaal schilderen
Comment[pl]=Cyfrowe malowanie
Comment[pt]=Pintura Digital
Comment[pt_BR]=Pintura digital
Comment[ru]=Цифровая живопись
Comment[sk]=Digitálne maľovanie
Comment[sl]=Digitalno slikanje
Comment[sv]=Digitalt målningsverktyg
Comment[ug]=سىفىرلىق رەسىم سىزغۇ
Comment[uk]=Цифрове малювання
Comment[x-test]=xxDigital Paintingxx
Type=Application
Icon=calligrakrita
Categories=Qt;KDE;Graphics;
X-KDE-ServiceTypes=Calligra/Application
X-Calligra-DefaultMimeTypes=application/x-krita-animation
X-KDE-NativeMimeType=application/x-krita-animation
StartupNotify=true
X-DBUS-StartupType=Multi
X-DBUS-ServiceName=org.krita.kritaanimation
X-Krita-Version=28
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd" ><kpartgui name="Krita Animation" version="47">
<MenuBar>
<Menu name="file"><text>&amp;File</text>
<Separator/>
<Action name="save_incremental_version"/>
<Action name="save_incremental_backup"/>
<Action name="createTemplate"/>
</Menu>
<Menu name="Edit"><text>&amp;Edit</text>
<Action name="edit_undo"/>
<Action name="edit_redo"/>
<Separator/>
<Action name="edit_cut"/>
<Action name="edit_copy"/>
<Action name="copy_merged"/>
<Action name="edit_paste"/>
<Action name="paste_new"/>
<Action name="clear"/>
<Action name="fill_selection_foreground_color"/>
<Action name="fill_selection_background_color"/>
<Action name="fill_selection_pattern"/>
<Action name="stroke_shapes"/>
<Action name="delete"/>
<Separator/>
<Action name="revert"/>
<Separator/>
<Menu name="Resources"><text>&amp;Resources</text>
<Action name="add_palette"/>
<Action name="edit_palette"/>
<Action name="edit_blacklist_cleanup"/>
</Menu>
</Menu>
<Menu name="View"><text>&amp;View</text>
<Action name="view_show_just_the_canvas"/>
<Action name="view_fullscreen"/>
<Action name="mirror_canvas"/>
<Separator/>
<Action name="view_newview"/>
<Separator/>
<Action name="zoom"/>
<Action name="zoom_in"/>
<Action name="zoom_out"/>
<Action name="actual_pixels"/>
<Action name="actual_size"/>
<Action name="fit_to_canvas"/>
<Separator/>
<Action name="view_ruler"/>
<!--Action name="view_guidelines"/-->
<Separator/>
<Action name="view_grid" />
<Action name="view_snap_to_grid" />
<Menu name="view_fast_grid_config"><text>Grid Spacing</text>
<Action name="view_fast_grid_1x1" />
<Action name="view_fast_grid_2x2" />
<Action name="view_fast_grid_5x5" />
<Action name="view_fast_grid_10x10" />
<Action name="view_fast_grid_20x20" />
<Action name="view_fast_grid_40x40" />
</Menu>
<Separator/>
<Action name="view_toggle_perspective_grid" />
<Action name="view_clear_perspective_grid" />
<Separator/>
<Action name="view_toggle_painting_assistants" />
<Separator/>
<Action name="view_palette_action_menu"/>
<Separator/>
<Action name="refresh_canvas"/>
</Menu>
<Menu name="Image"><text>&amp;Image</text>
<Action name="image_properties"/>
<Action name="duplicate_image"/>