Commit 6d7f26b1 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Merge remote-tracking branch 'origin' into rempt/T379-resource-management

parents a18f7f1a e2a5181d
......@@ -207,7 +207,7 @@ endif (ENABLE_PYTHON_DEPS OR NOT MINGW)
if (MSVC OR MINGW)
add_subdirectory( ext_drmingw )
add_subdirectory( ext_ffmpeg )
# add_subdirectory( ext_ffmpeg )
endif (MSVC OR MINGW)
if (NOT APPLE)
......
......@@ -2,7 +2,7 @@ SET(PREFIX_ext_exiv2 "${EXTPREFIX}" )
ExternalProject_Add( ext_exiv2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://www.exiv2.org/builds/exiv2-0.26-trunk.tar.gz
URL http://files.kde.org/krita/build/dependencies/exiv2-0.26-trunk.tar.gz
URL_MD5 5399e3b570d7f9205f0e76d47582da4c
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/tzname.patch
......
......@@ -57,10 +57,8 @@ if (APPLE)
add_definitions(-mmacosx-version-min=10.11 -Wno-macro-redefined -Wno-deprecated-register)
endif()
if (LINUX)
if (CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 AND NOT WINDOWS)
add_definitions(-Werror=delete-incomplete)
endif()
if (CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 AND NOT WIN32)
add_definitions(-Werror=delete-incomplete)
endif()
######################
......@@ -533,6 +531,13 @@ set_package_properties(GIF PROPERTIES
TYPE OPTIONAL
PURPOSE "Required by the Krita GIF filter")
find_package(HEIF "1.2.0")
set_package_properties(HEIF PROPERTIES
DESCRIPTION "Library for loading and saving heif files."
URL "https://github.com/strukturag/libheif"
TYPE OPTIONAL
PURPOSE "Required by the Krita HEIF filter")
set(LIBRAW_MIN_VERSION "0.16")
find_package(LibRaw ${LIBRAW_MIN_VERSION})
set_package_properties(LibRaw PROPERTIES
......
......@@ -8,52 +8,52 @@
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (NOT WIN32)
include(LibFindMacros)
libfind_pkg_check_modules(FFTW3_PKGCONF fftw3>=3.2)
find_path(FFTW3_INCLUDE_DIR
NAMES fftw3.h
HINTS ${FFTW3_PKGCONF_INCLUDE_DIRS} ${FFTW3_PKGCONF_INCLUDEDIR}
PATH_SUFFIXES fftw3
)
find_library(FFTW3_LIBRARY
NAMES fftw3
HINTS ${FFTW3_PKGCONF_LIBRARY_DIRS} ${FFTW3_PKGCONF_LIBDIR}
)
set(FFTW3_PROCESS_LIBS FFTW3_LIBRARY)
set(FFTW3_PROCESS_INCLUDES FFTW3_INCLUDE_DIR)
libfind_process(FFTW3)
if(FFTW3_FOUND)
message(STATUS "FFTW Found Version: " ${FFTW_VERSION})
endif()
include(LibFindMacros)
libfind_pkg_check_modules(FFTW3_PKGCONF fftw3>=3.2)
find_path(FFTW3_INCLUDE_DIR
NAMES fftw3.h
HINTS ${FFTW3_PKGCONF_INCLUDE_DIRS} ${FFTW3_PKGCONF_INCLUDEDIR}
PATH_SUFFIXES fftw3
)
find_library(FFTW3_LIBRARY
NAMES fftw3
HINTS ${FFTW3_PKGCONF_LIBRARY_DIRS} ${FFTW3_PKGCONF_LIBDIR}
)
set(FFTW3_PROCESS_LIBS FFTW3_LIBRARY)
set(FFTW3_PROCESS_INCLUDES FFTW3_INCLUDE_DIR)
libfind_process(FFTW3)
if(FFTW3_FOUND)
message(STATUS "FFTW Found Version: " ${FFTW_VERSION})
endif()
else()
# TODO: Maybe use fftw3/FFTW3Config.cmake?
# TODO: Maybe use fftw3/FFTW3Config.cmake?
find_path(FFTW3_INCLUDE_DIR
NAMES fftw3.h
)
find_path(FFTW3_INCLUDE_DIR
NAMES fftw3.h
)
find_library(
FFTW3_LIBRARY
NAMES libfftw3 libfftw3-3 libfftw3f-3 libfftw3l-3
DOC "Libraries to link against for FFT Support")
find_library(
FFTW3_LIBRARY
NAMES libfftw3 libfftw3-3 libfftw3f-3 libfftw3l-3
DOC "Libraries to link against for FFT Support")
if (FFTW3_LIBRARY)
set(FFTW3_LIBRARY_DIR ${FFTW3_LIBRARY})
endif()
if (FFTW3_LIBRARY)
set(FFTW3_LIBRARY_DIR ${FFTW3_LIBRARY})
endif()
set (FFTW3_LIBRARIES ${FFTW3_LIBRARY})
set (FFTW3_LIBRARIES ${FFTW3_LIBRARY})
if(FFTW3_INCLUDE_DIR AND FFTW3_LIBRARY_DIR)
set (FFTW3_FOUND true)
message(STATUS "Correctly found FFTW3")
else()
message(STATUS "Could not find FFTW3")
endif()
if(FFTW3_INCLUDE_DIR AND FFTW3_LIBRARY_DIR)
set (FFTW3_FOUND true)
message(STATUS "Correctly found FFTW3")
else()
message(STATUS "Could not find FFTW3")
endif()
endif()
# - Try to find the libheif library
# Once done this will define
#
# HEIF_FOUND - system has heif
# HEIF_INCLUDE_DIRS - the heif include directories
# HEIF_LIBRARIES - the libraries needed to use heif
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (NOT WIN32)
include(LibFindMacros)
libfind_pkg_check_modules(HEIF_PKGCONF libheif)
find_path(HEIF_INCLUDE_DIR
NAMES libheif/heif.h
HINTS ${HEIF_PKGCONF_INCLUDE_DIRS} ${HEIF_PKGCONF_INCLUDEDIR}
PATH_SUFFIXES heif
)
find_library(HEIF_LIBRARY
NAMES heif
HINTS ${HEIF_PKGCONF_LIBRARY_DIRS} ${HEIF_PKGCONF_LIBDIR}
)
set(HEIF_PROCESS_LIBS HEIF_LIBRARY)
set(HEIF_PROCESS_INCLUDES HEIF_INCLUDE_DIR)
libfind_process(HEIF)
else()
find_path(HEIF_INCLUDE_DIR
NAMES heif.h
)
find_library (
HEIF_LIBRARY
NAMES libheif libheif
DOC "Libraries to link against for HEIF Support"
)
if (HEIF_LIBRARY)
set(HEIF_LIBRARY_DIR ${HEIF_LIBRARY})
endif()
set (HEIF_LIBRARIES ${HEIF_LIBRARY})
if(HEIF_INCLUDE_DIR AND HEIF_LIBRARY_DIR)
set (HEIF_FOUND true)
endif()
endif()
# - Try to find the libwpd (WordPerfect library)
# Once done this will define
#
# LIBWPD_FOUND - system has LIBWPD
# LIBWPD_INCLUDE_DIRS - the LIBWPD include directory
# LIBWPD_LIBRARIES - Link these to use LIBWPD
# LIBWPD_DEFINITIONS - Compiler switches required for using LIBWPD
#
include(LibFindMacros)
libfind_pkg_check_modules(WPD_PKGCONF libwpd-0.10)
find_path(WPD_INCLUDE_DIR
NAMES libwpd/libwpd.h
HINTS ${WPD_PKGCONF_INCLUDE_DIRS} ${WPD_PKGCONF_INCLUDEDIR}
PATH_SUFFIXES libwpd-0.10
)
find_library(WPD_LIBRARY
NAMES wpd libwpd wpd-0.10 libwpd-0.10
HINTS ${WPD_PKGCONF_LIBRARY_DIRS} ${WPD_PKGCONF_LIBDIR}
)
set(LIBWPD_PROCESS_LIBS WPD_LIBRARY)
set(LIBWPD_PROCESS_INCLUDES WPD_INCLUDE_DIR)
libfind_process(LIBWPD)
# - Try to find LibWpg
# Once done this will define
#
# LIBWPG_FOUND - libwpg is available
# LIBWPG_INCLUDE_DIRS - include directory, e.g. /usr/include
# LIBWPG_LIBRARIES - the libraries needed to use LibWpg
# LIBWPG_DEFINITIONS - Compiler switches required for using LibWpg
#
# Copyright (C) 2007 Ariya Hidayat <ariya@kde.org>
# Redistribution and use is allowed according to the terms of the BSD license.
include(LibFindMacros)
libfind_package(LIBWPG LibWpd)
libfind_pkg_check_modules(LIBWPG_PKGCONF libwpg-0.3)
find_path(LIBWPG_INCLUDE_DIR
NAMES libwpg/libwpg.h
HINTS ${LIBWPG_PKGCONF_INCLUDE_DIRS} ${LIBWPG_PKGCONF_INCLUDEDIR}
PATH_SUFFIXES libwpg-0.3
)
find_library(LIBWPG_LIBRARY
NAMES wpg wpg-0.3
HINTS ${LIBWPG_PKGCONF_LIBRARY_DIRS} ${LIBWPG_PKGCONF_LIBDIR}
)
set(LIBWPG_PROCESS_LIBS LIBWPG_LIBRARY LIBWPD_LIBRARIES)
set(LIBWPG_PROCESS_INCLUDES LIBWPG_INCLUDE_DIR LIBWPD_INCLUDE_DIRS)
libfind_process(LIBWPG)
# - Try to find LibWps
# Once done this will define
#
# LIBWPS_FOUND - libwps is available
# LIBWPS_INCLUDE_DIRS - include directory, e.g. /usr/include
# LIBWPS_LIBRARIES - the libraries needed to use LibWps
#
# Copyright (C) 2013 Yue Liu <yue.liu@mail.com>
# Redistribution and use is allowed according to the terms of the BSD license.
include(LibFindMacros)
libfind_package(LIBWPS LibWpd)
libfind_pkg_check_modules(LIBWPS_PKGCONF libwps-0.3)
find_path(LIBWPS_INCLUDE_DIR
NAMES libwps/libwps.h
HINTS ${LIBWPS_PKGCONF_INCLUDE_DIRS} ${LIBWPS_PKGCONF_INCLUDEDIR}
PATH_SUFFIXES libwps-0.3
)
find_library(LIBWPS_LIBRARY
NAMES wps wps-0.3
HINTS ${LIBWPS_PKGCONF_LIBRARY_DIRS} ${LIBWPS_PKGCONF_LIBDIR}
)
set(LIBWPS_PROCESS_LIBS LIBWPS_LIBRARY LIBWPD_LIBRARIES)
set(LIBWPS_PROCESS_INCLUDES LIBWPS_INCLUDE_DIR LIBWPD_INCLUDE_DIRS)
libfind_process(LIBWPS)
......@@ -2141,24 +2141,11 @@
<statusTip></statusTip>
</Action>
<Action name="insert_keyframes_right">
<icon></icon>
<text>Insert Keyframe Right</text>
<whatsThis></whatsThis>
<toolTip>Insert keyframes to the right of selection moving the tail of animation to the right</toolTip>
<iconText></iconText>
<activationFlags>100000</activationFlags>
<activationConditions>0</activationConditions>
<shortcut></shortcut>
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="insert_keyframes_left">
<Action name="insert_keyframe_left">
<icon></icon>
<text>Insert Keyframe Left</text>
<whatsThis></whatsThis>
<toolTip>Insert keyframes to the left of selection moving the tail of animation to the right</toolTip>
<toolTip>Insert keyframes to the left of selection, moving the tail of animation to the right.</toolTip>
<iconText></iconText>
<activationFlags>100000</activationFlags>
<activationConditions>0</activationConditions>
......@@ -2167,11 +2154,11 @@
<statusTip></statusTip>
</Action>
<Action name="insert_n_keyframes_right">
<Action name="insert_keyframe_right">
<icon></icon>
<text>Insert N Keyframes Right</text>
<text>Insert Keyframe Right</text>
<whatsThis></whatsThis>
<toolTip>Insert several keyframes to the right of selection moving the tail of animation to the right</toolTip>
<toolTip>Insert keyframes to the right of selection, moving the tail of animation to the right.</toolTip>
<iconText></iconText>
<activationFlags>100000</activationFlags>
<activationConditions>0</activationConditions>
......@@ -2180,11 +2167,11 @@
<statusTip></statusTip>
</Action>
<Action name="insert_n_keyframes_left">
<Action name="insert_multiple_keyframes">
<icon></icon>
<text>Insert N Keyframes Left</text>
<text>Insert Multiple Keyframes</text>
<whatsThis></whatsThis>
<toolTip>Insert several keyframes to the left of selection moving the tail of animation to the right</toolTip>
<toolTip>Insert several keyframes based on user parameters.</toolTip>
<iconText></iconText>
<activationFlags>100000</activationFlags>
<activationConditions>0</activationConditions>
......@@ -2219,24 +2206,11 @@
<statusTip></statusTip>
</Action>
<Action name="insert_columns_right">
<icon></icon>
<text>Insert Column Right</text>
<whatsThis></whatsThis>
<toolTip>Insert column to the right of selection moving the tail of animation to the right</toolTip>
<iconText></iconText>
<activationFlags>100000</activationFlags>
<activationConditions>0</activationConditions>
<shortcut></shortcut>
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
<Action name="insert_columns_left">
<Action name="insert_column_left">
<icon></icon>
<text>Insert Column Left</text>
<whatsThis></whatsThis>
<toolTip>Insert column to the left of selection moving the tail of animation to the right</toolTip>
<toolTip>Insert column to the left of selection, moving the tail of animation to the right</toolTip>
<iconText></iconText>
<activationFlags>100000</activationFlags>
<activationConditions>0</activationConditions>
......@@ -2245,11 +2219,11 @@
<statusTip></statusTip>
</Action>
<Action name="insert_n_columns_right">
<Action name="insert_column_right">
<icon></icon>
<text>Insert N Columns Right</text>
<text>Insert Column Right</text>
<whatsThis></whatsThis>
<toolTip>Insert several columns to the right of selection moving the tail of animation to the right</toolTip>
<toolTip>Insert column to the right of selection, moving the tail of animation to the right</toolTip>
<iconText></iconText>
<activationFlags>100000</activationFlags>
<activationConditions>0</activationConditions>
......@@ -2258,11 +2232,11 @@
<statusTip></statusTip>
</Action>
<Action name="insert_n_columns_left">
<Action name="insert_multiple_columns">
<icon></icon>
<text>Insert N Columns Left</text>
<text>Insert Multiple Columns</text>
<whatsThis></whatsThis>
<toolTip>Insert several columns to the left of selection moving the tail of animation to the right</toolTip>
<toolTip>Insert several columns based on user parameters.</toolTip>
<iconText></iconText>
<activationFlags>100000</activationFlags>
<activationConditions>0</activationConditions>
......@@ -2310,9 +2284,9 @@
<statusTip></statusTip>
</Action>
<Action name="insert_n_hold_frames">
<Action name="insert_multiple_hold_frames">
<icon></icon>
<text>Insert N Hold Frames</text>
<text>Insert Multiple Hold Frames</text>
<whatsThis></whatsThis>
<toolTip>Insert N hold frames after every keyframe</toolTip>
<iconText></iconText>
......@@ -2336,9 +2310,9 @@
<statusTip></statusTip>
</Action>
<Action name="remove_n_hold_frames">
<Action name="remove_multiple_hold_frames">
<icon></icon>
<text>Remove N Hold Frames</text>
<text>Remove Multiple Hold Frames</text>
<whatsThis></whatsThis>
<toolTip>Remove N hold frames after every keyframe</toolTip>
<iconText></iconText>
......@@ -2362,9 +2336,9 @@
<statusTip></statusTip>
</Action>
<Action name="insert_n_hold_columns">
<Action name="insert_multiple_hold_columns">
<icon></icon>
<text>Insert N Hold Columns</text>
<text>Insert Multiple Hold Columns</text>
<whatsThis></whatsThis>
<toolTip>Insert N hold columns into the frame at the current position</toolTip>
<iconText></iconText>
......@@ -2388,9 +2362,9 @@
<statusTip></statusTip>
</Action>
<Action name="remove_n_hold_columns">
<Action name="remove_multiple_hold_columns">
<icon></icon>
<text>Remove N Hold Columns</text>
<text>Remove Multiple Hold Columns</text>
<whatsThis></whatsThis>
<toolTip>Remove N hold columns from the frame at the current position</toolTip>
<iconText></iconText>
......
<?xml version="1.0" encoding="utf-8"?>
<component type="desktop">
<id>org.kde.krita.desktop</id>
<id>org.kde.krita</id>
<launchable type="desktop-id">org.kde.krita.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-only</project_license>
<developer_name>Krita Foundation</developer_name>
<update_contact>foundation@krita.org</update_contact>
<name>Krita</name>
<name xml:lang="ar">كريتا</name>
<name xml:lang="ast">Krita</name>
......@@ -196,7 +200,31 @@
<image>https://cdn.kde.org/screenshots/krita/2018-03-17_screenshot_006.png</image>
</screenshot>
</screenshots>
<update_contact>foundation@krita.org</update_contact>
<content_rating type="oars-1.0">
<content_attribute id="violence-cartoon">none</content_attribute>
<content_attribute id="violence-fantasy">none</content_attribute>
<content_attribute id="violence-realistic">none</content_attribute>
<content_attribute id="violence-bloodshed">none</content_attribute>
<content_attribute id="violence-sexual">none</content_attribute>
<content_attribute id="drugs-alcohol">none</content_attribute>
<content_attribute id="drugs-narcotics">none</content_attribute>
<content_attribute id="drugs-tobacco">none</content_attribute>
<content_attribute id="sex-nudity">none</content_attribute>
<content_attribute id="sex-themes">none</content_attribute>
<content_attribute id="language-profanity">none</content_attribute>
<content_attribute id="language-humor">none</content_attribute>
<content_attribute id="language-discrimination">none</content_attribute>
<content_attribute id="social-chat">none</content_attribute>
<content_attribute id="social-info">none</content_attribute>
<content_attribute id="social-audio">none</content_attribute>
<content_attribute id="social-location">none</content_attribute>
<content_attribute id="social-contacts">none</content_attribute>
<content_attribute id="money-purchasing">none</content_attribute>
<content_attribute id="money-gambling">none</content_attribute>
</content_rating>
<categories>
<category>Graphics</category>
</categories>
<project_group>KDE</project_group>
<provides>
<binary>krita</binary>
......
......@@ -25,15 +25,22 @@
#include <kis_paint_layer.h>
#include <kis_group_layer.h>
/**
* @brief The KisExifInfoVisitor class looks for a layer with metadata.
*
* If there is more than one layer with metadata, the metadata provided
* by the visitor is the metadata associated with the last layer that
* had metadata on it. Only use the metadata if only one layer with
* metadata was found.
*
* The metadata pointer is OWNED by the layer.
*
*/
class KisExifInfoVisitor : public KisNodeVisitor
{
public:
KisExifInfoVisitor() :
m_exifInfo(0),
m_countPaintLayer(0) { }
public:
KisExifInfoVisitor() { }
bool visit(KisNode*) override {
return true;
......@@ -67,8 +74,8 @@ public:
}
bool visit(KisPaintLayer* layer) override {
m_countPaintLayer++;
if (!layer->metaData()->empty()) {
m_metaDataObjectsEncountered++;
m_exifInfo = layer->metaData();
}
return true;
......@@ -79,17 +86,20 @@ public:
return visitAll(layer, true);
}
public:
inline uint countPaintLayer() {
return m_countPaintLayer;
inline uint metaDataCount()
{
qDebug() << "number of layers with metadata" << m_metaDataObjectsEncountered;
return m_metaDataObjectsEncountered;
}
inline KisMetaData::Store* exifInfo() {
inline KisMetaData::Store* exifInfo()
{
return m_exifInfo;
}
private:
KisMetaData::Store* m_exifInfo;
uint m_countPaintLayer;
KisMetaData::Store *m_exifInfo {0};
int m_metaDataObjectsEncountered {0};
};
#endif
......@@ -282,6 +282,11 @@ void KisMimeDatabase::fillMimeData()
mimeType.suffixes = QStringList() << "psb";
s_mimeDatabase << mimeType;
mimeType.mimeType = "image/heic";
mimeType.description = i18nc("description of a file type", "HEIC/HEIF Image");
mimeType.suffixes = QStringList() << "heic" << "heif";
s_mimeDatabase << mimeType;
debugPlugin << "Filled mimedatabase with" << s_mimeDatabase.count() << "special mimetypes";
}
}
......@@ -420,8 +420,8 @@ void KisAdvancedColorSpaceSelector::fillDescription()
if (currentDepthStr == "U8") {
d->colorSpaceSelector->textProfileDescription->append("<p>"+i18nc("When the selected Bitdepth is 8",
"<b>8 bit integer</b>: The default amount of colors per channel. Each channel will have 256 values available, "
"leading to a total amount of 256*amount of channels. Recommended to use for images intended for the web, "
"<b>8 bit integer</b>: The default number of colors per channel. Each channel will have 256 values available, "
"leading to a total amount of colors of 256 to the power of the number of channels. Recommended to use for images intended for the web, "
"or otherwise simple images.")+"</p>");
}
else if (currentDepthStr == "U16") {
......
......@@ -304,7 +304,7 @@ KUndo2Command* KisTimeBasedItemModel::createOffsetFramesCommand(QModelIndexList
}
Q_FOREACH(KisKeyframeChannel *channel, channelsAt(srcIndex)) {
if (moveEmptyFrames || channel->keyframeAt(srcIndex.column())) {
if (moveEmptyFrames || channel->keyframeAt(srcIndex.column())) {
srcFrameItems << KisAnimationUtils::FrameItem(srcNode, channel->id(), srcIndex.column());
dstFrameItems << KisAnimationUtils::FrameItem(dstNode, channel->id(), dstIndex.column());
}
......@@ -350,8 +350,8 @@ bool KisTimeBasedItemModel::removeFramesAndOffset(QModelIndexList indexes)
new KisSwitchCurrentTimeCommand(m_d->image->animationInterface(),
oldTime,
newTime, parentCommand);
newTime,
parentCommand);
}
KisProcessingApplicator::runSingleCommandStroke(m_d->image, parentCommand, KisStrokeJobData::BARRIER);
......
......@@ -19,6 +19,7 @@
#ifndef __TIMELINE_FRAMES_MODEL_H
#define __TIMELINE_FRAMES_MODEL_H
#include <QScopedPointer>
#include <QIcon>
......@@ -86,9 +87,9 @@ public:
Qt::DropActions supportedDragActions() const override;
Qt::DropActions supportedDropActions() const override;
QStringList mimeTypes() const override;
QMimeData * mimeData(const QModelIndexList &indexes) const override;
QMimeData * mimeDataExtended(const QModelIndexList &indexes, const QModelIndex &baseIndex, MimeCopyPolicy copyPolicy) const;
bool dropMimeData(const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent) override;
QMimeData *mimeData(const QModelIndexList &indexes) const override;
QMimeData *mimeDataExtended(const QModelIndexList &indexes, const QModelIndex &baseIndex, MimeCopyPolicy copyPolicy) const;
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
bool dropMimeDataExtended(const QMimeData *data, Qt::DropAction action, const QModelIndex &parent, bool *dataMoved = 0);
......
......@@ -19,6 +19,7 @@
#ifndef __TIMELINE_FRAMES_VIEW_H
#define __TIMELINE_FRAMES_VIEW_H
#include <QScopedPointer>
#include <QTableView>
#include "kis_action_manager.h"
......@@ -27,9 +28,20 @@
class KisAction;
class TimelineWidget;
enum TimelineDirection : short
{
LEFT = -1,
BEFORE = -1,
RIGHT = 1,
AFTER = 1
};
class KRITAANIMATIONDOCKER_EXPORT TimelineFramesView : public QTableView
{
Q_OBJECT
public:
TimelineFramesView(QWidget *parent);
~TimelineFramesView() override;
......@@ -40,7 +52,7 @@ public:
void setShowInTimeline(KisAction *action);
void setActionManager( KisActionManager * actionManager);
void setActionManager(KisActionManager *actionManager);
public Q_SLOTS:
void slotSelectionChanged();
......@@ -61,51 +73,49 @@ private Q_SLOTS:
void slotRemoveLayer();
void slotLayerContextMenuRequested(const QPoint &globalPos);
// New, Copy, Insert and Remove Frames
void slotNewFrame();
void slotCopyFrame();
void slotInsertKeyframesLeft(int count = 1, int timing = 1, bool forceEntireColumn = false);
void slotInsertKeyframesRight(int count = 1, int timing = 1, bool forceEntireColumn = false);
// New, Insert and Remove Frames
void slotAddBlankFrame();
void slotAddDuplicateFrame();
void slotInsertKeyframesLeftCustom();
void slotInsertKeyframesRightCustom();
void slotInsertKeyframeLeft() {insertKeyframes(-1, 1, TimelineDirection::LEFT, false);}
void slotInsertKeyframeRight() {insertKeyframes(-1, 1, TimelineDirection::RIGHT, false);}
void slotRemoveFrame(bool forceEntireColumn = false, bool needsOffset = false);
void slotRemoveFramesAndShift(bool forceEntireColumn = false);
void slotInsertKeyframeColumnLeft() {insertKeyframes(-1, 1, TimelineDirection::LEFT, true);}
void slotInsertKeyframeColumnRight() {insertKeyframes(-1, 1, TimelineDirection::RIGHT, true);}
void slotInsertColumnsLeft(int count = 1, int timing = 1);
void slotInsertColumnsLeftCustom();
void slotInsertMultipleKeyframes() {insertMultipleKeyframes(false);}
void slotInsertMultipleKeyframeColumns() {insertMultipleKeyframes(true);}
void slotInsertColumnsRight(int count = 1, int timing = 1);
void slotInsertColumnsRightCustom();
void slotRemoveSelectedFrames(bool entireColumn = false, bool needsOffset = false);
void slotRemoveSelectedFramesAndShift() {slotRemoveSelectedFrames(false, true);}
void slotRemoveColumns();
void slotRemoveColumnsAndShift();
void slotRemoveSelectedColumns() {slotRemoveSelectedFrames(true);}
void slotRemoveSelectedColumnsAndShift() {slotRemoveSelectedFrames(true, true);}
void slotInsertHoldFrames(int count = 1, bool forceEntireColumn = false);
void slotRemoveHoldFrames(int count = 1, bool forceEntireColumn = false);
void slotInsertHoldFrame() {insertOrRemoveHoldFrames(1);}
void slotRemoveHoldFrame() {insertOrRemoveHoldFrames(-1);}
void slotInsertHoldFramesCustom();
void slotRemoveHoldFramesCustom();
void slotInsertHoldFrameColumn() {insertOrRemoveHoldFrames(1,true);}
void slotRemoveHoldFrameColumn() {insertOrRemoveHoldFrames(-1,true);}
void slotInsertHoldColumns(int count = 1);
void slotRemoveHoldColumns(int count = 1);
void slotInsertMultipleHoldFrames() {insertOrRemoveMultipleHoldFrames(true);}
void slotRemoveMultipleHoldFrames() {insertOrRemoveMultipleHoldFrames(false);}
void slotInsertHoldColumnsCustom();
void slotRemoveHoldColumnsCustom();
void slotInsertMultipleHoldFrameColumns() {insertOrRemoveMultipleHoldFrames(true, true);}
void slotRemoveMultipleHoldFrameColumns() {insertOrRemoveMultipleHoldFrames(false, true);}
void slotMirrorFrames(bool forceEntireColumn = false);
void slotMirrorColumns();
void slotMirrorFrames(bool entireColumn = false);
void slotMirrorColumns() {slotMirrorFrames(true);}
// Copy-paste
void slotCopyFrames(bool forceEntireColumn = false);
void slotCutFrames(bool forceEntireColumn = false);
void slotPasteFrames(bool forceEntireColumn = false);
void slotCopyFrames() {cutCopyImpl(false, true);}