Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Merge OT master changes with conflicts resolved

manongjohn71163fbd736b
diff --cc toonz/sources/include/toonzqt/schematicviewer.h
index 23423552b,ef266d8b9..d26e1f83a
--- a/toonz/sources/include/toonzqt/schematicviewer.h
+++ b/toonz/sources/include/toonzqt/schematicviewer.h
@@@ -12,8 -12,9 +12,10 @@@
// Qt includes
#include <QGraphicsScene>
#include <QGraphicsView>
+#include <QTouchDevice>
+ #include <QIcon>
+
// STD includes
#include <set>
@@@ -190,8 -286,164 +325,166 @@@ public
bool isStageSchematicViewed();
void setStageSchematicViewed(bool isStageSchematic);
+ void setTextColor(const QColor &color) { m_textColor = color; }
+ QColor getTextColor() const { return m_textColor; }
+
+ void setVerticalLineColor(const QColor &color) {
+ m_verticalLineColor = color;
+ }
+ QColor getVerticalLineColor() const { return m_verticalLineColor; }
+
+ // TZP column
+ void setLevelColumnColor(const QColor &color) { m_levelColumnColor = color; }
+ QColor getLevelColumnColor() const { return m_levelColumnColor; }
+
+ // PLI column
+ void setVectorColumnColor(const QColor &color) {
+ m_vectorColumnColor = color;
+ }
+ QColor getVectorColumnColor() const { return m_vectorColumnColor; }
+
+ // subXsheet column
+ void setChildColumnColor(const QColor &color) { m_childColumnColor = color; }
+ QColor getChildColumnColor() const { return m_childColumnColor; }
+
+ // Raster image column
+ void setFullcolorColumnColor(const QColor &color) {
+ m_fullcolorColumnColor = color;
+ }
+ QColor getFullcolorColumnColor() const { return m_fullcolorColumnColor; }
+
+ // Fx column
+ void setFxColumnColor(const QColor &color) { m_fxColumnColor = color; }
+ QColor getFxColumnColor() const { return m_fxColumnColor; }
+
+ // Palette column
+ void setPaletteColumnColor(const QColor &color) {
+ m_paletteColumnColor = color;
+ }
+ QColor getPaletteColumnColor() const { return m_paletteColumnColor; }
+
+ // Mesh column
+ void setMeshColumnColor(const QColor &color) { m_meshColumnColor = color; }
+ QColor getMeshColumnColor() const { return m_meshColumnColor; }
+
+ // Table node
+ void setTableColor(const QColor &color) { m_tableColor = color; }
+ QColor getTableColor() const { return m_tableColor; }
+
+ // Camera nodes
+ void setActiveCameraColor(const QColor &color) {
+ m_activeCameraColor = color;
+ }
+ void setOtherCameraColor(const QColor &color) { m_otherCameraColor = color; }
+ QColor getActiveCameraColor() const { return m_activeCameraColor; }
+ QColor getOtherCameraColor() const { return m_otherCameraColor; }
+
+ // Group node
+ void setGroupColor(const QColor &color) { m_groupColor = color; }
+ QColor getGroupColor() const { return m_groupColor; }
+
+ // Peg node
+ void setPegColor(const QColor &color) { m_pegColor = color; }
+ QColor getPegColor() const { return m_pegColor; }
+
+ // Path node
+ void setSplineColor(const QColor &color) { m_splineColor = color; }
+ QColor getSplineColor() const { return m_splineColor; }
+
+ // Output nodes
+ void setActiveOutputColor(const QColor &color) {
+ m_activeOutputColor = color;
+ }
+ void setOtherOutputColor(const QColor &color) { m_otherOutputColor = color; }
+ QColor getActiveOutputColor() const { return m_activeOutputColor; }
+ QColor getOtherOutputColor() const { return m_otherOutputColor; }
+
+ // Xsheet node
+ void setXsheetColor(const QColor &color) { m_xsheetColor = color; }
+ QColor getXsheetColor() const { return m_xsheetColor; }
+
+ // Fx nodes
+ QColor getNormalFxColor() const { return m_normalFx; }
+ void setNormalFxColor(const QColor &color) { m_normalFx = color; }
+
+ QColor getMacroFxColor() const { return m_macroFx; }
+ void setMacroFxColor(const QColor &color) { m_macroFx = color; }
+
+ QColor getImageAdjustFxColor() const { return m_imageAdjustFx; }
+ void setImageAdjustFxColor(const QColor &color) { m_imageAdjustFx = color; }
+
+ QColor getLayerBlendingFxColor() const { return m_layerBlendingFx; }
+ void setLayerBlendingFxColor(const QColor &color) {
+ m_layerBlendingFx = color;
+ }
+
+ QColor getMatteFxColor() const { return m_matteFx; }
+ void setMatteFxColor(const QColor &color) { m_matteFx = color; }
+
+ // Schematic Preview Button
+ void setSchematicPreviewButtonBgOnColor(const QColor &color) {
+ m_schematicPreviewButtonBgOnColor = color;
+ }
+ void setSchematicPreviewButtonOnImage(const QIcon &image) {
+ m_schematicPreviewButtonOnImage = image;
+ }
+ void setSchematicPreviewButtonBgOffColor(const QColor &color) {
+ m_schematicPreviewButtonBgOffColor = color;
+ }
+ void setSchematicPreviewButtonOffImage(const QIcon &image) {
+ m_schematicPreviewButtonOffImage = image;
+ }
+ QColor getSchematicPreviewButtonBgOnColor() const {
+ return m_schematicPreviewButtonBgOnColor;
+ }
+ QIcon getSchematicPreviewButtonOnImage() const {
+ return m_schematicPreviewButtonOnImage;
+ }
+ QColor getSchematicPreviewButtonBgOffColor() const {
+ return m_schematicPreviewButtonBgOffColor;
+ }
+ QIcon getSchematicPreviewButtonOffImage() const {
+ return m_schematicPreviewButtonOffImage;
+ }
+
+ // Schematic Camstand Button
+ void setSchematicCamstandButtonBgOnColor(const QColor &color) {
+ m_schematicCamstandButtonBgOnColor = color;
+ }
+ void setSchematicCamstandButtonOnImage(const QIcon &image) {
+ m_schematicCamstandButtonOnImage = image;
+ }
+ void setSchematicCamstandButtonTranspImage(const QIcon &image) {
+ m_schematicCamstandButtonTranspImage = image;
+ }
+ void setSchematicCamstandButtonBgOffColor(const QColor &color) {
+ m_schematicCamstandButtonBgOffColor = color;
+ }
+ void setSchematicCamstandButtonOffImage(const QIcon &image) {
+ m_schematicCamstandButtonOffImage = image;
+ }
+ QColor getSchematicCamstandButtonBgOnColor() const {
+ return m_schematicCamstandButtonBgOnColor;
+ }
+ QIcon getSchematicCamstandButtonOnImage() const {
+ return m_schematicCamstandButtonOnImage;
+ }
+ QIcon getSchematicCamstandButtonTranspImage() const {
+ return m_schematicCamstandButtonTranspImage;
+ }
+ QColor getSchematicCamstandButtonBgOffColor() const {
+ return m_schematicCamstandButtonBgOffColor;
+ }
+ QIcon getSchematicCamstandButtonOffImage() const {
+ return m_schematicCamstandButtonOffImage;
+ }
+
+ void getNodeColor(int ltype, QColor &nodeColor);
+
+ QColor getSelectedNodeTextColor();
+
+ void setCursorMode(CursorMode mode);
+
public slots:
void updateSchematic();
diff --cc toonz/sources/toonzqt/schematicviewer.cpp
index caf05df46,de424ed1f..489d3a6e9
--- a/toonz/sources/toonzqt/schematicviewer.cpp
+++ b/toonz/sources/toonzqt/schematicviewer.cpp
@@@ -27,9 -28,8 +28,10 @@@
#include "toonz/fxdag.h"
#include "toonz/tapplication.h"
#include "toonz/tscenehandle.h"
+ #include "toonz/txshleveltypes.h"
+#include "../toonz/menubarcommandids.h"
+
// Qt includes
#include <QGraphicsSceneMouseEvent>
#include <QMouseEvent>
@@@ -1085,23 -873,12 +1151,35 @@@ void SchematicViewer::changeNodeSize()
//------------------------------------------------------------------
+ QColor SchematicViewer::getSelectedNodeTextColor() {
+ // get colors
+ TPixel currentColumnPixel;
+ Preferences::instance()->getCurrentColumnData(currentColumnPixel);
+ QColor currentColumnColor((int)currentColumnPixel.r,
+ (int)currentColumnPixel.g,
+ (int)currentColumnPixel.b, 255);
+ return currentColumnColor;
+ }
++
++//------------------------------------------------------------------
++
+void SchematicViewer::setCursorMode(CursorMode cursorMode) {
+ m_cursorMode = cursorMode;
+ m_viewer->setCursorMode(m_cursorMode);
+
+ m_selectMode->setChecked((m_cursorMode == CursorMode::Select));
+ m_zoomMode->setChecked((m_cursorMode == CursorMode::Zoom));
+ m_handMode->setChecked((m_cursorMode == CursorMode::Hand));
+}
+
+//------------------------------------------------------------------
+
+void SchematicViewer::selectModeEnabled() { setCursorMode(CursorMode::Select); }
+
+//------------------------------------------------------------------
+
+void SchematicViewer::zoomModeEnabled() { setCursorMode(CursorMode::Zoom); }
+
+//------------------------------------------------------------------
+
+void SchematicViewer::handModeEnabled() { setCursorMode(CursorMode::Hand); }
diff --cc toonz/sources/toonzqt/toonzqt.qrc
index 055d02873,ad87e118e..d2256d3c8
--- a/toonz/sources/toonzqt/toonzqt.qrc
+++ b/toonz/sources/toonzqt/toonzqt.qrc
@@@ -313,11 -314,8 +314,14 @@@
<file>Resources/switchport_off.svg</file>
<file>Resources/switchport_over.svg</file>
<file>Resources/plus.svg</file>
+ <file>Resources/iconifynodes_on.svg</file>
+ <file>Resources/iconifynodes_off.svg</file>
+ <file>Resources/iconifynodes_over.svg</file>
+ <file>Resources/schematic_selection_mode_on.svg</file>
+ <file>Resources/schematic_selection_mode_off.svg</file>
+ <file>Resources/schematic_zoom_mode_on.svg</file>
+ <file>Resources/schematic_zoom_mode_off.svg</file>
+ <file>Resources/schematic_hand_mode_on.svg</file>
+ <file>Resources/schematic_hand_mode_off.svg</file>
</qresource>
</RCC>