Commit 7e10a745 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add Krita Gemini and Krita Sketch to git master

REVIEW:113327

Conflicts:
	libs/main/KoMainWindow.cpp
	libs/main/KoMainWindow.h
parent 0712092d
......@@ -410,7 +410,6 @@ macro_log_feature(HAVE_OPENGL "OpenGL" "OpenGL support" "" FALSE "" "Required by
macro_optional_find_package(KdepimLibs)
macro_log_feature(KDEPIMLIBS_FOUND "KDE PIMLibs" "KDE Personal Information Management Libraries" "http://www.kde.org/" FALSE "" "Required by Plan and the KDE address book integration (available as a module in KDE)")
##
## Test for eigen2
##
......@@ -501,21 +500,49 @@ if(HAVE_VC)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${Vc_CMAKE_MODULES_DIR}")
include (VcMacros)
macro(ko_compile_for_all_implementations_no_scalar _objs _src)
if(PACKAGERS_BUILD)
vc_compile_for_all_implementations(${_objs} ${_src} FLAGS -fPIC ONLY SSE2 SSSE3 SSE4_1 AVX)
else(PACKAGERS_BUILD)
set(${_objs} ${_src})
endif(PACKAGERS_BUILD)
endmacro()
macro(ko_compile_for_all_implementations _objs _src)
if(PACKAGERS_BUILD)
vc_compile_for_all_implementations(${_objs} ${_src} FLAGS -fPIC ONLY Scalar SSE2 SSSE3 SSE4_1 AVX)
else(PACKAGERS_BUILD)
set(${_objs} ${_src})
endif(PACKAGERS_BUILD)
endmacro()
#Handle Vc master
if(Vc_VERSION_MAJOR GREATER 0 OR Vc_VERSION_MINOR GREATER 7)
message(STATUS "Vc version is greater than 0.7, enabling AVX2 support")
if(Vc_COMPILER_IS_GCC)
AddCompilerFlag("-std=c++11" _ok)
if(NOT _ok)
AddCompilerFlag("-std=c++0x" _ok)
endif()
endif(Vc_COMPILER_IS_GCC)
macro(ko_compile_for_all_implementations_no_scalar _objs _src)
if(PACKAGERS_BUILD)
vc_compile_for_all_implementations(${_objs} ${_src} FLAGS -fPIC ONLY SSE2 SSSE3 SSE4_1 AVX AVX2)
else(PACKAGERS_BUILD)
set(${_objs} ${_src})
endif(PACKAGERS_BUILD)
endmacro()
macro(ko_compile_for_all_implementations _objs _src)
if(PACKAGERS_BUILD)
vc_compile_for_all_implementations(${_objs} ${_src} FLAGS -fPIC ONLY Scalar SSE2 SSSE3 SSE4_1 AVX AVX2)
else(PACKAGERS_BUILD)
set(${_objs} ${_src})
endif(PACKAGERS_BUILD)
endmacro()
else()
macro(ko_compile_for_all_implementations_no_scalar _objs _src)
if(PACKAGERS_BUILD)
vc_compile_for_all_implementations(${_objs} ${_src} FLAGS -fPIC ONLY SSE2 SSSE3 SSE4_1 AVX)
else(PACKAGERS_BUILD)
set(${_objs} ${_src})
endif(PACKAGERS_BUILD)
endmacro()
macro(ko_compile_for_all_implementations _objs _src)
if(PACKAGERS_BUILD)
vc_compile_for_all_implementations(${_objs} ${_src} FLAGS -fPIC ONLY Scalar SSE2 SSSE3 SSE4_1 AVX)
else(PACKAGERS_BUILD)
set(${_objs} ${_src})
endif(PACKAGERS_BUILD)
endmacro()
endif()
if (NOT PACKAGERS_BUILD)
# Optimize the whole Calligra for current architecture
......
......@@ -90,6 +90,7 @@ set(KRITA_INCLUDES
${CMAKE_SOURCE_DIR}/libs/widgetutils
${EIGEN2_INCLUDE_DIR}
${Vc_INCLUDE_DIR}
# 'Export' this for use by filters
CACHE INTERNAL ""
......@@ -130,7 +131,7 @@ if (Q_WS_MAC)
endif (Q_WS_MAC)
target_link_libraries(kdeinit_krita kritaui)
target_link_libraries(krita ${QT_QTCORE_LIBRARY} kdeinit_krita)
target_link_libraries(krita kdeinit_krita)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
find_package(OpenCTL)
......@@ -159,6 +160,5 @@ install( FILES kritapart.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install( FILES krita.rc DESTINATION ${DATA_INSTALL_DIR}/krita)
add_subdirectory(tablettester)
add_subdirectory(sketch)
add_subdirectory(gemini)
add_subdirectory( brushes )
add_subdirectory( paintoppresets )
add_subdirectory( patterns )
add_subdirectory( gradients )
add_subdirectory( profiles )
......@@ -10,6 +9,8 @@ add_subdirectory( workspaces )
add_subdirectory( themes )
add_subdirectory( predefined_image_sizes )
add_subdirectory( input )
add_subdirectory( paintoppresets )
########### install files ###############
install( FILES
......
......@@ -6,17 +6,17 @@ install( FILES
3_rake.png
3_splat.png
3_texture.png
A_abstract-textured1.gbr
A_abstract-textured2.gbr
A_Angular_church.gbr
A_Angular_church_HR.gbr
A_bamboo.gih
A_bamboo-leaves.gih
A_bokey.gbr
A_Braids_b.gbr
A_Braids.gbr
A_Chain.gbr
A_cloudy.gbr
A_abstract-textured1.gbr
A_abstract-textured2.gbr
A_Angular_church.gbr
A_Angular_church_HR.gbr
A_bamboo.gih
A_bamboo-leaves.gih
A_bokey.gbr
A_Braids_b.gbr
A_Braids.gbr
A_Chain.gbr
A_cloudy.gbr
A_concrete.gbr
A_crackled.gbr
A_craqules.gbr
......
......@@ -2,3 +2,13 @@ install(FILES
kritadefault.profile
DESTINATION ${DATA_INSTALL_DIR}/krita/input
)
install(FILES
kritadefault.profile
DESTINATION ${DATA_INSTALL_DIR}/kritagemini/input
)
install(FILES
kritadefault.profile
DESTINATION ${DATA_INSTALL_DIR}/kritasketch/input
)
......@@ -15,6 +15,7 @@ name=Krita Default
3={1;1;[1000012];0;0;0}
4={0;2;[];4;0;0}
5={0;2;[20];1;0;0}
6={0;4;[];0;0;2}
[Rotate Canvas]
0={3;1;[36];0;0;0}
......@@ -38,7 +39,6 @@ name=Krita Default
[Zoom Canvas]
0={5;1;[32];0;0;0}
1={2;1;[2b];0;0;0}
10={0;2;[1000021,20];1;0;0}
2={4;1;[31];0;0;0}
3={3;1;[2d];0;0;0}
4={2;1;[3d];0;0;0}
......@@ -47,3 +47,5 @@ name=Krita Default
7={0;2;[1000021];4;0;0}
8={6;1;[33];0;0;0}
9={1;2;[1000021,1000023,20];1;0;0}
10={0;2;[1000021,20];1;0;0}
11={0;4;[];0;0;1}
\ No newline at end of file
......@@ -5,9 +5,6 @@ Airbrush_linear_noisy.kpp
Airbrush_pressure.kpp
Basic_circle.kpp
Basic_circle_wet.kpp
Basic_tip_default.kpp
Basic_tip_gaussian.kpp
Basic_tip_soft.kpp
Block_basic.kpp
Block_bristles.kpp
Block_fuzzy.kpp
......@@ -18,40 +15,27 @@ Bristles_hairy.kpp
Bristles_textured.kpp
Bristles_wet.kpp
Clone_tool.kpp
Curve_curvy.kpp
Curve_ink.kpp
Curve_recurvy.kpp
Curve_smooth.kpp
Eraser_circle.kpp
Eraser_hard.kpp
Eraser_soft.kpp
FX_color_HSY.kpp
FX_explode.kpp
FX_glow_add.kpp
FX_overlay.kpp
FX_splat_starfield.kpp
Fill_block.kpp
Fill_circle.kpp
Grid_square_25.kpp
FX_explode.kpp
Hairy_Details.kpp
Hairy_Large.kpp
Hairy_Special_Blender.kpp
Hairy_Squared.kpp
Hairy_Tapered.kpp
Hairy_Texture.kpp
Hatch_crispy.kpp
Hatch_cross_regular.kpp
Hatch_cross_small.kpp
Hatch_diag_S.kpp
Hatch_diag_fat.kpp
Hatch_moire.kpp
Hatch_noisy.kpp
Hatch_diag_S.kpp
Ink_ballpen.kpp
Ink_brush_25.kpp
Ink_circle_05.kpp
Ink_circle_10.kpp
Ink_gpen_10.kpp
Ink_gpen_25.kpp
ink_precision_03.kpp
Ink_tilt_10.kpp
Ink_tilt_20.kpp
Layout_block.kpp
......@@ -59,52 +43,37 @@ Layout_circle_soft.kpp
Layout_oval.kpp
Layout_pen.kpp
Mix_dull.kpp
Mix_smear.kpp
Mix_smear_soft.kpp
Mixover_dull.kpp
Mixover_dull_bristle_soft.kpp
Mixover_dull_bristles.kpp
Mixover_dull_bristle_soft.kpp
Mixover_dull.kpp
Mixover_oil.kpp
Mixover_smear.kpp
Mix_smear.kpp
Mix_smear_soft.kpp
Move_tool.kpp
Pastel_texture_large.kpp
Pastel_texture_thin.kpp
Pencil_2B.kpp
Pencil_HB.kpp
Pencil_texture.kpp
Pencil_tilt.kpp
Rake_bristle_dry.kpp
Rake_texture.kpp
Screentones.kpp
Screentones_eraser.kpp
Shape_fill.kpp
Shape_smooth.kpp
Sketch.kpp
Sketch_chrome.kpp
Sketch_fur.kpp
Screentones.kpp
Sketch_ink_big.kpp
Sketch_ink_small.kpp
Sketch.kpp
Sketch_line.kpp
Sketch_shade.kpp
Sketch_shade_wash.kpp
Sketch_speedpaint.kpp
Sketch_speedpaint_shade.kpp
Sketch_wires.kpp
Smudge_block_tilt.kpp
Smudge_rake.kpp
Smudge_rake_2.kpp
Smudge_rake.kpp
Smudge_soft.kpp
Smudge_textured.kpp
Special_FuzzyColor.kpp
Splat_mix_cells.kpp
Splat_texture.kpp
Splat_texture_2.kpp
Splatter_thin.kpp
Splat_texture_2.kpp
Splat_texture.kpp
Sponge_texture.kpp
Spray_splat.kpp
Texture_fuzzy.kpp
Texture_hair.kpp
Texture_leaves_fuzzy.kpp
ink_precision_03.kpp
pixel1.kpp
DESTINATION ${DATA_INSTALL_DIR}/krita/paintoppresets)
########### install files ###############
install(FILES
01_canvas.png
02_rough-canvas.png
02b_WoofTissue.png
02_rough-canvas.png
03_default-paper.png
04_paper-C-grain.png
05_paper-torchon.png
06_hard-grain.png
07_big-grain.png
08_bump-relief.png
09_drawed_crosshatched.png
09b_drawed-CrossedLines.png
09_drawed_crosshatched.png
10_drawed_dotted.png
11_drawed_furry.png
12_drawed_vertical.png
......@@ -20,8 +21,8 @@ install(FILES
15_texture-rockB.png
16_texture-woody.png
17_texture-melt.png
18_texture-bark.png
18b_WaveFlex.png
18_texture-bark.png
19_texture-crackle.png
20_texture-vegetal.png
21_texture-chainmail.png
......@@ -29,8 +30,11 @@ install(FILES
23-dynamic-screentone-A.png
24-dynamic-screentone-B.png
25-dynamic-screentone-C.png
Canvas_Hard.pat
3-flat-hack.png
3-mini-rock-soft.png
3-rock-smooth.png
Canvas_covered.pat
Canvas_Hard.pat
Canvas_small_01.pat
Canvas_small_02.pat
Cross01.pat
......@@ -41,11 +45,16 @@ Cross05.pat
Cross06.pat
Cross07.pat
Crumpled_Paper.pat
fractal_pattern.pat
generic_paper1.pat
generic_paper2.pat
granite.pat
Grid01.pat
Grid02.pat
Grid03.pat
Grid04.pat
Grid05.pat
hexacolBW__2.pat
HR_PastelPaper_02.pat
HR_Wall_Paper.pat
Pattern01.pat
......@@ -76,10 +85,5 @@ Zigzag01.pat
Zigzag02.pat
Zigzag03.pat
Zigzag04.pat
fractal_pattern.pat
generic_paper1.pat
generic_paper2.pat
granite.pat
hexacolBW__2.pat
DESTINATION ${DATA_INSTALL_DIR}/krita/patterns)
if (WIN32)
option(ENABLE_GEMINI_STARTUP_MAGIC "Enable Gemini's windows startup magic" ON)
if (ENABLE_GEMINI_STARTUP_MAGIC)
add_definitions(-DGEMINI_ENABLE_STARTUP_MAGIC)
endif (ENABLE_GEMINI_STARTUP_MAGIC)
endif (WIN32)
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/models
${KRITA_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR})
set(kritagemini_SRCS
main.cpp
MainWindow.cpp
desktopviewproxy.cpp
)
if (WIN32)
set(kritagemini_SRCS ${kritagemini_SRCS} KritaGemini.rc)
else (WIN32)
kde4_add_app_icon(kritagemini_SRCS "${KDE4_ICON_DIR}/oxygen/*/apps/kritagemini.png")
endif (WIN32)
# Krita Gemini application
# =============================================================================
kde4_add_executable(kritagemini ${kritagemini_SRCS})
target_link_libraries(kritagemini
${QT_QTDECLARATIVE_LIBRARY}
${QT_QTGUI_LIBRARIES}
${QT_QTCORE_LIBRARIES}
${QT_LIBRARIES}
${GLEW_LIBRARIES}
kritaui
${GLEW_LIBRARIES}
kritasketchlib
)
install(TARGETS kritagemini ${INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS kritagemini.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES kritageminirc kritageminipanelsrc DESTINATION ${CONFIG_INSTALL_DIR} )
install(FILES kritagemini.qml DESTINATION ${DATA_INSTALL_DIR}/kritagemini)
IDI_ICON1 ICON DISCARDABLE "KritaGemini.ico"
This diff is collapsed.
/* This file is part of the KDE project
* Copyright (C) 2012 Arjen Hiemstra <ahiemstra@heimr.nl>
* Copyright (C) 2013 Dan Leinir Turthra Jensen <admin@leinir.dk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
class KisCanvasResourceProvider;
class MainWindow : public QMainWindow
{
Q_OBJECT
Q_PROPERTY(bool allowClose READ allowClose WRITE setAllowClose)
Q_PROPERTY(bool slateMode READ slateMode NOTIFY slateModeChanged)
Q_PROPERTY(QString applicationName READ applicationName CONSTANT)
Q_PROPERTY(QString currentSketchPage READ currentSketchPage WRITE setCurrentSketchPage NOTIFY currentSketchPageChanged)
Q_PROPERTY(bool temporaryFile READ temporaryFile WRITE setTemporaryFile NOTIFY temporaryFileChanged)
Q_PROPERTY(QObject* sketchKisView READ sketchKisView WRITE setSketchKisView NOTIFY sketchKisViewChanged)
public:
explicit MainWindow(QStringList fileNames, QWidget* parent = 0, Qt::WindowFlags flags = 0);
virtual ~MainWindow();
bool allowClose() const;
void setAllowClose(bool allow);
bool slateMode() const;
QString applicationName() const {
return QLatin1String("KRITA GEMINI");
}
QString currentSketchPage() const;
void setCurrentSketchPage(QString newPage);
bool temporaryFile() const;
void setTemporaryFile(bool newValue);
QObject* sketchKisView() const;
void setSketchKisView(QObject* newView);
virtual void closeEvent(QCloseEvent* event);
public Q_SLOTS:
void minimize();
void closeWindow();
void switchToSketch();
void switchToDesktop(bool justLoaded = false);
void documentChanged();
Q_SIGNALS:
void closeRequested();
void switchedToSketch();
void slateModeChanged();
void currentSketchPageChanged();
void temporaryFileChanged();
void sketchKisViewChanged();
private Q_SLOTS:
void switchDesktopForced();
void switchSketchForced();
void adjustZoomOnDocumentChangedAndStuff();
void sketchChange();
private:
void cloneResources(KisCanvasResourceProvider *from, KisCanvasResourceProvider *to);
class Private;
Private * const d;
#ifdef Q_OS_WIN
bool winEvent(MSG * message, long * result);
#endif
};
#endif // MAINWINDOW_H
/*
* This file is part of the KDE project
* Copyright (C) 2013 Arjen Hiemstra <ahiemstra@heimr.nl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,