tahoma2d/toonz/sources/include/toonzqt/flipconsole.h

452 lines
13 KiB
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef FLICONSOLE_H
#define FLICONSOLE_H
#include <QWidget>
#include <QAction>
#include <QMap>
#include <QList>
#include <QTime>
#include <QStyleOption>
#include <QStyleOptionFrameV3>
#include <QColor>
#include <QImage>
#include "tcommon.h"
#include "tpixel.h"
#include "toonzqt/intfield.h"
#include "toonz/imagepainter.h"
#include "tstopwatch.h"
#include <QThread>
#undef DVAPI
#undef DVVAR
#ifdef TOONZQT_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
2020-05-25 10:00:44 +12:00
enum {
eShowCompare = 0x001,
eShowBg = 0x002,
eShowFramerate = 0x004,
eShowVcr = 0x008,
eShowcolorFilter = 0x010,
eShowCustom = 0x020,
eShowHisto = 0x040,
eShowSave = 0x080,
eShowDefineSubCamera = 0x100,
eShowFilledRaster = 0x200,
eShowDefineLoadBox = 0x400,
eShowUseLoadBox = 0x800,
eShowViewerControls = 0x1000,
eShowSound = 0x2000,
eShowLocator = 0x4000,
eShowHowMany = 0x8000
};
2016-03-19 06:57:51 +13:00
class QToolBar;
class QLabel;
class QSlider;
class QTimerEvent;
class QVBoxLayout;
class QActionGroup;
class QAbstractButton;
class QPushButton;
class QScrollBar;
class DoubleButton;
class FlipSlider;
class FlipConsole;
class ToolBarContainer;
class FlipConsoleOwner;
class TFrameHandle;
//-----------------------------------------------------------------------------
class PlaybackExecutor final : public QThread {
2016-06-15 18:43:10 +12:00
Q_OBJECT
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int m_fps;
bool m_abort;
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
PlaybackExecutor();
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void resetFps(int fps);
2016-03-19 06:57:51 +13:00
2016-06-19 20:06:29 +12:00
void run() override;
2016-06-15 18:43:10 +12:00
void abort() { m_abort = true; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void emitNextFrame(int fps) { emit nextFrame(fps); }
2016-03-19 06:57:51 +13:00
signals:
2016-06-15 18:43:10 +12:00
void nextFrame(int fps); // Must be connect with Qt::BlockingQueuedConnection
// connection type.
void playbackAborted();
2016-03-19 06:57:51 +13:00
};
//-----------------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
// Implements a flipbook slider with a progress bar in background.
class FlipSlider final : public QAbstractSlider {
2016-06-15 18:43:10 +12:00
Q_OBJECT
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
Q_PROPERTY(int PBHeight READ getPBHeight WRITE setPBHeight)
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
Q_PROPERTY(QImage PBOverlay READ getPBOverlay WRITE setPBOverlay)
Q_PROPERTY(QImage PBMarker READ getPBMarker WRITE setPBMarker)
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
Q_PROPERTY(int PBColorMarginLeft READ getPBColorMarginLeft WRITE
setPBColorMarginLeft)
Q_PROPERTY(
int PBColorMarginTop READ getPBColorMarginTop WRITE setPBColorMarginTop)
Q_PROPERTY(int PBColorMarginRight READ getPBColorMarginRight WRITE
setPBColorMarginRight)
Q_PROPERTY(int PBColorMarginBottom READ getPBColorMarginBottom WRITE
setPBColorMarginBottom)
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
Q_PROPERTY(int PBMarkerMarginLeft READ getPBMarkerMarginLeft WRITE
setPBMarkerMarginLeft)
Q_PROPERTY(int PBMarkerMarginRight READ getPBMarkerMarginRight WRITE
setPBMarkerMarginRight)
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
Q_PROPERTY(QColor baseColor READ getBaseColor WRITE setBaseColor)
Q_PROPERTY(
QColor notStartedColor READ getNotStartedColor WRITE setNotStartedColor)
Q_PROPERTY(QColor startedColor READ getStartedColor WRITE setStartedColor)
Q_PROPERTY(QColor finishedColor READ getFinishedColor WRITE setFinishedColor)
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
bool m_enabled;
const std::vector<UCHAR> *m_progressBarStatus;
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
enum { PBFrameNotStarted, PBFrameStarted, PBFrameFinished };
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
FlipSlider(QWidget *parent);
~FlipSlider() {}
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void setProgressBarEnabled(bool enabled) { m_enabled = enabled; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void setProgressBarStatus(const std::vector<UCHAR> *pbStatus) {
m_progressBarStatus = pbStatus;
}
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
const std::vector<UCHAR> *getProgressBarStatus() const {
return m_progressBarStatus;
}
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
// Properties setters-getters
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int getPBHeight() const;
void setPBHeight(int height);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
QImage getPBOverlay() const;
void setPBOverlay(const QImage &img);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
QImage getPBMarker() const;
void setPBMarker(const QImage &img);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int getPBColorMarginLeft() const;
void setPBColorMarginLeft(int margin);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int getPBColorMarginTop() const;
void setPBColorMarginTop(int margin);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int getPBColorMarginRight() const;
void setPBColorMarginRight(int margin);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int getPBColorMarginBottom() const;
void setPBColorMarginBottom(int margin);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int getPBMarkerMarginLeft() const;
void setPBMarkerMarginLeft(int margin);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int getPBMarkerMarginRight() const;
void setPBMarkerMarginRight(int margin);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
QColor getBaseColor() const;
void setBaseColor(const QColor &color);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
QColor getNotStartedColor() const;
void setNotStartedColor(const QColor &color);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
QColor getStartedColor() const;
void setStartedColor(const QColor &color);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
QColor getFinishedColor() const;
void setFinishedColor(const QColor &color);
2016-03-19 06:57:51 +13:00
protected:
2016-06-19 20:06:29 +12:00
void paintEvent(QPaintEvent *ev) override;
2016-03-19 06:57:51 +13:00
2016-06-19 20:06:29 +12:00
void mousePressEvent(QMouseEvent *me) override;
void mouseMoveEvent(QMouseEvent *me) override;
void mouseReleaseEvent(QMouseEvent *me) override;
2016-03-19 06:57:51 +13:00
private:
2016-06-15 18:43:10 +12:00
int sliderPositionFromValue(int min, int max, int pos, int span);
int sliderValueFromPosition(int min, int max, int step, int pos, int span);
int pageStepVal(int val);
2016-03-19 06:57:51 +13:00
signals:
2016-06-15 18:43:10 +12:00
void flipSliderReleased();
void flipSliderPressed();
2016-03-19 06:57:51 +13:00
};
//-----------------------------------------------------------------------------
class DVAPI FlipConsole final : public QWidget {
2016-06-15 18:43:10 +12:00
Q_OBJECT
2016-03-19 06:57:51 +13:00
UI update and Icons from Konero (#126) * add multi arc mockup * implement mutli arc * add join and smooth option * reset multiarc and arc when deactivated * create self loop if the last point is the same as the first * make join option in multiarc consistent with tape tool * fix a bug where thickness don't affect mutliarc in vector level * remove join option in geometric tool * stop mutliarc after closing shape * double click can also end multi arc * fix a bug where multiArc will produce buggy stroke * fix a bug where geometric tools is not deactivated * add multiArc shortcut * rewrite multiArc * revert changes to tvectorimage * add undo data for multiArc * Paste as Copy Command for XSheet * Remove unneeded code * Bug fix * prevent guide lines from jumping around in MultiArc * make stroke color consistent in MultiArc * remove color in MultiArc's undo data * make color consistent in MultiArc with previous version * Fix single image raster levels * fix compilation error * fix a bug where multiArc might generate bugged stroke * Remove ICONV dep (#3304) * fix crash on saving studio palette * Move to Paste Special Menu * Don't Set Fixed Width if Docking a Floating Panel * Update how_to_build_win.md New draft of pr for requested changes to windows build instructions. * fix geometric tool multiarc smooth option * fix level saving failure * fix wrong warning after saving palette * fix a bug where moving a control point while holding alt has unintended result * fix travis-install (#3389) * Fix assert debug crash in flipconsole.cpp Fix crash when using the viewer controls in the console (debug) * Redraw Audio Waveform Fills the waveform rather than outlines it. * Update .gitignore * fix undo data when drawing arc and mutliarc * fix overwriting raster drawing palette (#3387) * mode sensitive fx settings * Create New Style Command Button (#3394) * Create New Style Command Button This PR creates a new button in the pallette editor that creates a new style. Button is large and easy access for a faster and easier workflow. Original code developed by Turtletooth for Tahoma. Given permission to develop within Openoonz. Co-Authored-By: Jeremy Bullock <turtletooth@users.noreply.github.com> * Update paletteviewergui.cpp Made changes to the PR per request by Shun. * Fixed a space within the code that wasn't suppose to be there. Co-authored-by: Jeremy Bullock <turtletooth@users.noreply.github.com> * tahoma license (#3396) * new style button optional * fix loading pegbars (removing updateKeyframes) * periodic random expression * add fx in linear color space this commit is based on source for the ComposeAdd plugin fx by DWANGO Co., Ltd. in dwango_opentoonz_plugins and opentoonz_plugin_utility repositories. * fractal noise iwa fx * skip unnecessary icon invalidation * fix frame range fill with tablet * stop function editor to open by dbl clicking key * Expanding the radius of the rotation handle. This just changes when the cursor transforms into the rotation tool. (cherry picked from commit 7722ae989bbdc6aa5cb48df7a4c08bae1fe6ea39) * fix vector img patern stroke style * Update Stylesheets - Support the new icon sizes - XSheet and Timeline significantly redesigned - Lots of margin fixes and refactoring - Remove deprecated icons, as some icons are moved into binary - New Light theme * New Icons - Redesigns almost every icon as symbolic - Adds icons for most commands * Add Option for Icon Themes - Adds option for icon themes - Removes useless label from Preferences category list * Update Icon Functions - Adds themePath() boolean - Adds function for recoloring black pixels in pixmaps to any color - Rebuilds createQIcon to use fromTheme() and recolorPixmap() - Removes createQIconOnOff as it seemed to be a rarely used duplicate of createQIcon - Removes a grey horizontal line drawn above the console play bar in the viewer * Set Default Icon Theme and Paths - Sets search paths for icons for use with QIcon::fromTheme() - Sets default start icon theme on first install - Sets flag for displaying icons in menus, so we can selectively hide them * Set Icons for Commands - Sets icons for the commands - Hides icons being displayed in menus as most icons are 20x20, they will look blurry when shrunk to 16x16 - Selectively allows icons to display for Tools in menus * Change Icon Sizes, General Fixes and Stylesheet Additions - Change icon sizes to new size - Remove margin around FX Editor window - Remove white line under color sliders in Style Editor - Make keyframe icons uniform and color stylable in the stylesheets - Removes deprecated stylesheet strings - Redesign GUI for palette list view - Make tree list header sort row stylable - Remove black lines from scrollbars in New Project window - Remove margin around combobox in Level Strip - Alter how some lines are drawn in the Timeline to fix some alpha issues - Make conditional fixed onion skin and normal onion skin dots contrast more against a light background area to make sure they have good visibility - Make text always viewable in the FPS field in console bar - Increase size of radio buttons in Cleanup Settings - Increase size of switches in motion path nodes - Remove unessesary "Layer" label in Timeline and other rects - Various colors made stylable in the stylesheets; palette numpad and selection frame, cleanup settings border, scene cast folder path, schematic lines, ruler, xsheet lines, keyframes, cell input box and more - Moves some external stylesheet icons into binary * Make TPanelTitleBar Icon States Stylable - Makes icon states for TPanelTitleBar buttons stylable in stylesheets * Travis Fixes * Swap Startup Popup Logos They were in the wrong folders * Revert "Swap Startup Popup Logos" This reverts commit 815908a9f3e725f48507dab8a2270bdfa045649d. * Fix Startup Popup Logo It wasn't switching * Feedback Changes - Change render visualization to clapboard - Fix text contrast on levels in XSheet * Make Cell Selection More Clear * Darken Light Theme and Tint Empty Cell Selection * Fix missing icons * Fix memo button * Bring back colors * Hide Motion Tab * Fix Play Range Area (Light) Make play range area more visible * Vector Column Color Co-authored-by: pojienie <pojienie@gmail.com> Co-authored-by: rim <11380091+rozhuk-im@users.noreply.github.com> Co-authored-by: shun-iwasawa <shun.iwasawa@ghibli.jp> Co-authored-by: Rodney <rodney.baker@gmail.com> Co-authored-by: DoctorRyan <65507211+DoctorRyan@users.noreply.github.com> Co-authored-by: shun-iwasawa <shun-iwasawa@users.noreply.github.com> Co-authored-by: Kite <konero@users.noreply.github.com> Co-authored-by: Jeremy Bullock <turtletooth@users.noreply.github.com> Co-authored-by: DoctorRyan <doctorryan1969.gmail.com>
2020-09-01 06:51:22 +12:00
QColor m_fpsFieldColor;
Q_PROPERTY(QColor FpsFieldColor READ getFpsFieldColor WRITE setFpsFieldColor)
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
enum EGadget {
eBegin,
ePlay,
eLoop,
ePause,
ePrev,
eNext,
eFirst,
eLast,
eRed,
eGreen,
eBlue,
eGRed,
eGGreen,
eGBlue,
eMatte,
eFrames,
eRate,
eSound,
eHisto,
eSaveImg,
eCompare,
eCustomize,
eSave,
eDefineSubCamera,
eFilledRaster, // Used only in LineTest
eDefineLoadBox,
eUseLoadBox,
eLocator,
eZoomIn,
eZoomOut,
eFlipHorizontal,
eFlipVertical,
eResetView,
2019-12-06 07:44:50 +13:00
// following values are hard-coded in ImagePainter
eBlackBg = 0x40000,
eWhiteBg = 0x80000,
eCheckBg = 0x100000,
eEnd
2016-06-15 18:43:10 +12:00
};
static FlipConsole *m_currentConsole;
static QList<FlipConsole *> m_visibleConsoles;
static bool m_isLinkedPlaying;
static bool m_areLinked;
// blanksEnabled==true->at begin of each loop a number of blank frames are
// drawn (according to rpeferences settings)
FlipConsole(QVBoxLayout *layout, std::vector<int> gadgetsMask,
bool isLinkable, QWidget *customWidget,
const QString &customizeId,
2016-06-15 18:43:10 +12:00
FlipConsoleOwner *consoleOwner, // call
// consoleOwner->onDrawFrame()
// intead of emitting drawFrame
// signal
bool enableBlanks = false);
void enableBlanks(bool state);
void setFrameRange(
int from, int to, int step,
int current = -1); // if current==-1, current position will be ==from
void getFrameRange(int &from, int &to, int &step) const {
from = m_from, to = m_to, step = m_step;
}
2017-07-26 17:05:17 +12:00
void setFrameRate(int rate, bool forceUpdate = true);
2016-06-15 18:43:10 +12:00
// if doShowHide==true, applies set visible, otherwise applies setEnabled
void enableButton(UINT button, bool enable, bool doShowHide = true);
void showCurrentFrame();
int getCurrentFrame() const { return m_currentFrame; }
int getCurrentFps() const { return m_fps; }
2016-06-15 18:43:10 +12:00
void setChecked(UINT button, bool state);
bool isChecked(UINT button) const;
void setCurrentFrame(int frame, bool forceResetting = false);
void setMarkers(int fromIndex, int toIndex) {
m_markerFrom = fromIndex + 1;
m_markerTo = toIndex + 1;
}
void pressButton(UINT button) {
doButtonPressed(button);
setChecked(button, !isChecked(button));
}
2020-05-25 10:00:44 +12:00
UINT getCustomizeMask() { return m_customizeMask; }
void setCustomizemask(UINT mask);
void setStopAt(int frame);
2016-06-15 18:43:10 +12:00
// the main (currently the only) use for current flipconsole and setActive is
// to
// support shortcuts handling
// setActive() should be called every time the visibility state of the console
// changes
// a list of visible console is maintained. calling setActive(false) for the
// current
// console makes automatically current the next one in the list
static FlipConsole *getCurrent() { return m_currentConsole; };
static void toggleLinked();
void makeCurrent();
void setActive(bool active);
void pressButton(EGadget buttonId);
void showHideAllParts(bool);
void showHidePlaybar(bool);
void showHideFrameSlider(bool);
2016-06-15 18:43:10 +12:00
void enableProgressBar(bool enable);
void setProgressBarStatus(const std::vector<UCHAR> *status);
const std::vector<UCHAR> *getProgressBarStatus() const;
void setFrameHandle(TFrameHandle *frameHandle) {
m_frameHandle = frameHandle;
}
bool isLinkable() const { return m_isLinkable; }
void playNextFrame();
void updateCurrentFPS(int val);
2016-03-19 06:57:51 +13:00
bool hasButton(std::vector<int> buttonMask, FlipConsole::EGadget buttonId) {
if (buttonMask.size() == 0) return true;
return std::find(buttonMask.begin(), buttonMask.end(), buttonId) ==
buttonMask.end();
}
UI update and Icons from Konero (#126) * add multi arc mockup * implement mutli arc * add join and smooth option * reset multiarc and arc when deactivated * create self loop if the last point is the same as the first * make join option in multiarc consistent with tape tool * fix a bug where thickness don't affect mutliarc in vector level * remove join option in geometric tool * stop mutliarc after closing shape * double click can also end multi arc * fix a bug where multiArc will produce buggy stroke * fix a bug where geometric tools is not deactivated * add multiArc shortcut * rewrite multiArc * revert changes to tvectorimage * add undo data for multiArc * Paste as Copy Command for XSheet * Remove unneeded code * Bug fix * prevent guide lines from jumping around in MultiArc * make stroke color consistent in MultiArc * remove color in MultiArc's undo data * make color consistent in MultiArc with previous version * Fix single image raster levels * fix compilation error * fix a bug where multiArc might generate bugged stroke * Remove ICONV dep (#3304) * fix crash on saving studio palette * Move to Paste Special Menu * Don't Set Fixed Width if Docking a Floating Panel * Update how_to_build_win.md New draft of pr for requested changes to windows build instructions. * fix geometric tool multiarc smooth option * fix level saving failure * fix wrong warning after saving palette * fix a bug where moving a control point while holding alt has unintended result * fix travis-install (#3389) * Fix assert debug crash in flipconsole.cpp Fix crash when using the viewer controls in the console (debug) * Redraw Audio Waveform Fills the waveform rather than outlines it. * Update .gitignore * fix undo data when drawing arc and mutliarc * fix overwriting raster drawing palette (#3387) * mode sensitive fx settings * Create New Style Command Button (#3394) * Create New Style Command Button This PR creates a new button in the pallette editor that creates a new style. Button is large and easy access for a faster and easier workflow. Original code developed by Turtletooth for Tahoma. Given permission to develop within Openoonz. Co-Authored-By: Jeremy Bullock <turtletooth@users.noreply.github.com> * Update paletteviewergui.cpp Made changes to the PR per request by Shun. * Fixed a space within the code that wasn't suppose to be there. Co-authored-by: Jeremy Bullock <turtletooth@users.noreply.github.com> * tahoma license (#3396) * new style button optional * fix loading pegbars (removing updateKeyframes) * periodic random expression * add fx in linear color space this commit is based on source for the ComposeAdd plugin fx by DWANGO Co., Ltd. in dwango_opentoonz_plugins and opentoonz_plugin_utility repositories. * fractal noise iwa fx * skip unnecessary icon invalidation * fix frame range fill with tablet * stop function editor to open by dbl clicking key * Expanding the radius of the rotation handle. This just changes when the cursor transforms into the rotation tool. (cherry picked from commit 7722ae989bbdc6aa5cb48df7a4c08bae1fe6ea39) * fix vector img patern stroke style * Update Stylesheets - Support the new icon sizes - XSheet and Timeline significantly redesigned - Lots of margin fixes and refactoring - Remove deprecated icons, as some icons are moved into binary - New Light theme * New Icons - Redesigns almost every icon as symbolic - Adds icons for most commands * Add Option for Icon Themes - Adds option for icon themes - Removes useless label from Preferences category list * Update Icon Functions - Adds themePath() boolean - Adds function for recoloring black pixels in pixmaps to any color - Rebuilds createQIcon to use fromTheme() and recolorPixmap() - Removes createQIconOnOff as it seemed to be a rarely used duplicate of createQIcon - Removes a grey horizontal line drawn above the console play bar in the viewer * Set Default Icon Theme and Paths - Sets search paths for icons for use with QIcon::fromTheme() - Sets default start icon theme on first install - Sets flag for displaying icons in menus, so we can selectively hide them * Set Icons for Commands - Sets icons for the commands - Hides icons being displayed in menus as most icons are 20x20, they will look blurry when shrunk to 16x16 - Selectively allows icons to display for Tools in menus * Change Icon Sizes, General Fixes and Stylesheet Additions - Change icon sizes to new size - Remove margin around FX Editor window - Remove white line under color sliders in Style Editor - Make keyframe icons uniform and color stylable in the stylesheets - Removes deprecated stylesheet strings - Redesign GUI for palette list view - Make tree list header sort row stylable - Remove black lines from scrollbars in New Project window - Remove margin around combobox in Level Strip - Alter how some lines are drawn in the Timeline to fix some alpha issues - Make conditional fixed onion skin and normal onion skin dots contrast more against a light background area to make sure they have good visibility - Make text always viewable in the FPS field in console bar - Increase size of radio buttons in Cleanup Settings - Increase size of switches in motion path nodes - Remove unessesary "Layer" label in Timeline and other rects - Various colors made stylable in the stylesheets; palette numpad and selection frame, cleanup settings border, scene cast folder path, schematic lines, ruler, xsheet lines, keyframes, cell input box and more - Moves some external stylesheet icons into binary * Make TPanelTitleBar Icon States Stylable - Makes icon states for TPanelTitleBar buttons stylable in stylesheets * Travis Fixes * Swap Startup Popup Logos They were in the wrong folders * Revert "Swap Startup Popup Logos" This reverts commit 815908a9f3e725f48507dab8a2270bdfa045649d. * Fix Startup Popup Logo It wasn't switching * Feedback Changes - Change render visualization to clapboard - Fix text contrast on levels in XSheet * Make Cell Selection More Clear * Darken Light Theme and Tint Empty Cell Selection * Fix missing icons * Fix memo button * Bring back colors * Hide Motion Tab * Fix Play Range Area (Light) Make play range area more visible * Vector Column Color Co-authored-by: pojienie <pojienie@gmail.com> Co-authored-by: rim <11380091+rozhuk-im@users.noreply.github.com> Co-authored-by: shun-iwasawa <shun.iwasawa@ghibli.jp> Co-authored-by: Rodney <rodney.baker@gmail.com> Co-authored-by: DoctorRyan <65507211+DoctorRyan@users.noreply.github.com> Co-authored-by: shun-iwasawa <shun-iwasawa@users.noreply.github.com> Co-authored-by: Kite <konero@users.noreply.github.com> Co-authored-by: Jeremy Bullock <turtletooth@users.noreply.github.com> Co-authored-by: DoctorRyan <doctorryan1969.gmail.com>
2020-09-01 06:51:22 +12:00
void setFpsFieldColor(const QColor &color) { m_fpsFieldColor = color; }
QColor getFpsFieldColor() const { return m_fpsFieldColor; }
2016-03-19 06:57:51 +13:00
signals:
2016-06-15 18:43:10 +12:00
void buttonPressed(FlipConsole::EGadget button);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void playStateChanged(bool isPlaying);
void sliderReleased();
void changeSceneFps(int);
2016-03-19 06:57:51 +13:00
private:
2016-06-15 18:43:10 +12:00
UINT m_customizeMask;
QString m_customizeId;
QAction *m_customAction;
PlaybackExecutor m_playbackExecutor;
QAction *m_customSep, *m_rateSep, *m_histoSep, *m_bgSep, *m_vcrSep,
*m_compareSep, *m_saveSep, *m_colorFilterSep, *m_soundSep, *m_subcamSep,
*m_filledRasterSep, *m_viewerSep;
2016-06-15 18:43:10 +12:00
QToolBar *m_playToolBar;
QActionGroup *m_colorFilterGroup;
ToolBarContainer *m_playToolBarContainer;
QFrame *m_frameSliderFrame;
QLabel *m_fpsLabel, *m_timeLabel;
2016-06-15 18:43:10 +12:00
QScrollBar *m_fpsSlider;
DVGui::IntLineEdit *m_fpsField;
UI update and Icons from Konero (#126) * add multi arc mockup * implement mutli arc * add join and smooth option * reset multiarc and arc when deactivated * create self loop if the last point is the same as the first * make join option in multiarc consistent with tape tool * fix a bug where thickness don't affect mutliarc in vector level * remove join option in geometric tool * stop mutliarc after closing shape * double click can also end multi arc * fix a bug where multiArc will produce buggy stroke * fix a bug where geometric tools is not deactivated * add multiArc shortcut * rewrite multiArc * revert changes to tvectorimage * add undo data for multiArc * Paste as Copy Command for XSheet * Remove unneeded code * Bug fix * prevent guide lines from jumping around in MultiArc * make stroke color consistent in MultiArc * remove color in MultiArc's undo data * make color consistent in MultiArc with previous version * Fix single image raster levels * fix compilation error * fix a bug where multiArc might generate bugged stroke * Remove ICONV dep (#3304) * fix crash on saving studio palette * Move to Paste Special Menu * Don't Set Fixed Width if Docking a Floating Panel * Update how_to_build_win.md New draft of pr for requested changes to windows build instructions. * fix geometric tool multiarc smooth option * fix level saving failure * fix wrong warning after saving palette * fix a bug where moving a control point while holding alt has unintended result * fix travis-install (#3389) * Fix assert debug crash in flipconsole.cpp Fix crash when using the viewer controls in the console (debug) * Redraw Audio Waveform Fills the waveform rather than outlines it. * Update .gitignore * fix undo data when drawing arc and mutliarc * fix overwriting raster drawing palette (#3387) * mode sensitive fx settings * Create New Style Command Button (#3394) * Create New Style Command Button This PR creates a new button in the pallette editor that creates a new style. Button is large and easy access for a faster and easier workflow. Original code developed by Turtletooth for Tahoma. Given permission to develop within Openoonz. Co-Authored-By: Jeremy Bullock <turtletooth@users.noreply.github.com> * Update paletteviewergui.cpp Made changes to the PR per request by Shun. * Fixed a space within the code that wasn't suppose to be there. Co-authored-by: Jeremy Bullock <turtletooth@users.noreply.github.com> * tahoma license (#3396) * new style button optional * fix loading pegbars (removing updateKeyframes) * periodic random expression * add fx in linear color space this commit is based on source for the ComposeAdd plugin fx by DWANGO Co., Ltd. in dwango_opentoonz_plugins and opentoonz_plugin_utility repositories. * fractal noise iwa fx * skip unnecessary icon invalidation * fix frame range fill with tablet * stop function editor to open by dbl clicking key * Expanding the radius of the rotation handle. This just changes when the cursor transforms into the rotation tool. (cherry picked from commit 7722ae989bbdc6aa5cb48df7a4c08bae1fe6ea39) * fix vector img patern stroke style * Update Stylesheets - Support the new icon sizes - XSheet and Timeline significantly redesigned - Lots of margin fixes and refactoring - Remove deprecated icons, as some icons are moved into binary - New Light theme * New Icons - Redesigns almost every icon as symbolic - Adds icons for most commands * Add Option for Icon Themes - Adds option for icon themes - Removes useless label from Preferences category list * Update Icon Functions - Adds themePath() boolean - Adds function for recoloring black pixels in pixmaps to any color - Rebuilds createQIcon to use fromTheme() and recolorPixmap() - Removes createQIconOnOff as it seemed to be a rarely used duplicate of createQIcon - Removes a grey horizontal line drawn above the console play bar in the viewer * Set Default Icon Theme and Paths - Sets search paths for icons for use with QIcon::fromTheme() - Sets default start icon theme on first install - Sets flag for displaying icons in menus, so we can selectively hide them * Set Icons for Commands - Sets icons for the commands - Hides icons being displayed in menus as most icons are 20x20, they will look blurry when shrunk to 16x16 - Selectively allows icons to display for Tools in menus * Change Icon Sizes, General Fixes and Stylesheet Additions - Change icon sizes to new size - Remove margin around FX Editor window - Remove white line under color sliders in Style Editor - Make keyframe icons uniform and color stylable in the stylesheets - Removes deprecated stylesheet strings - Redesign GUI for palette list view - Make tree list header sort row stylable - Remove black lines from scrollbars in New Project window - Remove margin around combobox in Level Strip - Alter how some lines are drawn in the Timeline to fix some alpha issues - Make conditional fixed onion skin and normal onion skin dots contrast more against a light background area to make sure they have good visibility - Make text always viewable in the FPS field in console bar - Increase size of radio buttons in Cleanup Settings - Increase size of switches in motion path nodes - Remove unessesary "Layer" label in Timeline and other rects - Various colors made stylable in the stylesheets; palette numpad and selection frame, cleanup settings border, scene cast folder path, schematic lines, ruler, xsheet lines, keyframes, cell input box and more - Moves some external stylesheet icons into binary * Make TPanelTitleBar Icon States Stylable - Makes icon states for TPanelTitleBar buttons stylable in stylesheets * Travis Fixes * Swap Startup Popup Logos They were in the wrong folders * Revert "Swap Startup Popup Logos" This reverts commit 815908a9f3e725f48507dab8a2270bdfa045649d. * Fix Startup Popup Logo It wasn't switching * Feedback Changes - Change render visualization to clapboard - Fix text contrast on levels in XSheet * Make Cell Selection More Clear * Darken Light Theme and Tint Empty Cell Selection * Fix missing icons * Fix memo button * Bring back colors * Hide Motion Tab * Fix Play Range Area (Light) Make play range area more visible * Vector Column Color Co-authored-by: pojienie <pojienie@gmail.com> Co-authored-by: rim <11380091+rozhuk-im@users.noreply.github.com> Co-authored-by: shun-iwasawa <shun.iwasawa@ghibli.jp> Co-authored-by: Rodney <rodney.baker@gmail.com> Co-authored-by: DoctorRyan <65507211+DoctorRyan@users.noreply.github.com> Co-authored-by: shun-iwasawa <shun-iwasawa@users.noreply.github.com> Co-authored-by: Kite <konero@users.noreply.github.com> Co-authored-by: Jeremy Bullock <turtletooth@users.noreply.github.com> Co-authored-by: DoctorRyan <doctorryan1969.gmail.com>
2020-09-01 06:51:22 +12:00
//QColor m_fpsFieldColor = QColor(1, 1, 1);
2016-06-15 18:43:10 +12:00
QAction *m_fpsFieldAction;
QAction *m_fpsLabelAction;
QAction *m_fpsSliderAction;
QFrame *createFpsSlider();
QAction *m_doubleRedAction, *m_doubleGreenAction, *m_doubleBlueAction;
DoubleButton *m_doubleRed, *m_doubleGreen, *m_doubleBlue;
std::vector<int> m_gadgetsMask;
2016-06-15 18:43:10 +12:00
int m_from, m_to, m_step;
int m_currentFrame, m_framesCount;
int m_stopAt = -1;
2016-06-15 18:43:10 +12:00
ImagePainter::VisualSettings m_settings;
bool m_isPlay;
2017-07-26 17:05:17 +12:00
int m_fps, m_sceneFps;
2016-06-15 18:43:10 +12:00
bool m_reverse;
int m_markerFrom, m_markerTo;
bool m_drawBlanksEnabled;
int m_blanksCount;
TPixel m_blankColor;
int m_blanksToDraw;
bool m_isLinkable;
2020-05-25 10:00:44 +12:00
QMenu *m_menu;
2016-06-15 18:43:10 +12:00
QMap<EGadget, QAbstractButton *> m_buttons;
QMap<EGadget, QAction *> m_actions;
void createCustomizeMenu(bool withCustomWidget);
void addMenuItem(UINT id, const QString &text, QMenu *menu);
void createButton(UINT buttonMask, const char *iconStr, const QString &tip,
bool checkable, QActionGroup *groupIt = 0);
QAction *createCheckedButtonWithBorderImage(
UINT buttonMask, const char *iconStr, const QString &tip, bool checkable,
QActionGroup *groupIt = 0, const char *cmdId = 0);
void createOnOffButton(UINT buttonMask, const char *iconStr,
const QString &tip, QActionGroup *group);
QAction *createDoubleButton(UINT buttonMask1, UINT buttonMask2,
const char *iconStr1, const char *iconStr2,
const QString &tip1, const QString &tip2,
QActionGroup *group, DoubleButton *&w);
QFrame *createFrameSlider();
void createPlayToolBar(QWidget *customWidget);
2016-06-15 18:43:10 +12:00
DVGui::IntLineEdit *m_editCurrFrame;
FlipSlider *m_currFrameSlider;
void updateCurrentTime();
2016-06-15 18:43:10 +12:00
void doButtonPressed(UINT button);
static void pressLinkedConsoleButton(UINT button, FlipConsole *skipIt);
void applyCustomizeMask();
void onLoadBox(bool isDefine);
QPushButton *m_enableBlankFrameButton;
FlipConsoleOwner *m_consoleOwner;
TFrameHandle *m_frameHandle;
2016-03-19 06:57:51 +13:00
protected slots:
2016-06-15 18:43:10 +12:00
void OnSetCurrentFrame();
void OnFrameSliderRelease();
void OnFrameSliderPress();
void OnSetCurrentFrame(int);
void setCurrentFPS(int);
void setCurrentFPS(bool dragging);
inline void onButtonPressed(QAction *action) {
onButtonPressed(action->data().toUInt());
}
void onButtonPressed(int button);
void incrementCurrentFrame(int delta);
void onNextFrame(int fps);
void setFpsFieldColors();
2016-06-15 18:43:10 +12:00
void onCustomizeButtonPressed(QAction *);
bool drawBlanks(int from, int to);
void onSliderRelease();
void onFPSEdited();
2016-03-19 06:57:51 +13:00
public slots:
2017-02-28 17:56:07 +13:00
void onPreferenceChanged(const QString &);
void resetToSceneFps();
void setSceneFpsToCurrent();
2016-03-19 06:57:51 +13:00
private:
2016-06-15 18:43:10 +12:00
friend class PlaybackExecutor;
PlaybackExecutor &playbackExecutor() { return m_playbackExecutor; }
2016-03-19 06:57:51 +13:00
};
#endif