|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef FLICONSOLE_H
|
|
Toshihiro Shimizu |
890ddd |
#define FLICONSOLE_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include <qwidget></qwidget>
|
|
Toshihiro Shimizu |
890ddd |
#include <qaction></qaction>
|
|
Toshihiro Shimizu |
890ddd |
#include <qmap></qmap>
|
|
Toshihiro Shimizu |
890ddd |
#include <qlist></qlist>
|
|
Toshihiro Shimizu |
890ddd |
#include <qtime></qtime>
|
|
Toshihiro Shimizu |
890ddd |
#include <qstyleoption></qstyleoption>
|
|
Toshihiro Shimizu |
890ddd |
#include <qstyleoptionframev3></qstyleoptionframev3>
|
|
Toshihiro Shimizu |
890ddd |
#include <qcolor></qcolor>
|
|
Toshihiro Shimizu |
890ddd |
#include <qimage></qimage>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tcommon.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tpixel.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "toonzqt/intfield.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "toonz/imagepainter.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tstopwatch.h"
|
|
Toshihiro Shimizu |
890ddd |
#include <qthread></qthread>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TOONZQT_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class QToolBar;
|
|
Toshihiro Shimizu |
890ddd |
class QLabel;
|
|
Toshihiro Shimizu |
890ddd |
class QSlider;
|
|
Toshihiro Shimizu |
890ddd |
class QTimerEvent;
|
|
Toshihiro Shimizu |
890ddd |
class QVBoxLayout;
|
|
Toshihiro Shimizu |
890ddd |
class QActionGroup;
|
|
Toshihiro Shimizu |
890ddd |
class QAbstractButton;
|
|
Toshihiro Shimizu |
890ddd |
class QPushButton;
|
|
Toshihiro Shimizu |
890ddd |
class QScrollBar;
|
|
Toshihiro Shimizu |
890ddd |
class DoubleButton;
|
|
Toshihiro Shimizu |
890ddd |
class FlipSlider;
|
|
Toshihiro Shimizu |
890ddd |
class FlipConsole;
|
|
Toshihiro Shimizu |
890ddd |
class ToolBarContainer;
|
|
Toshihiro Shimizu |
890ddd |
class FlipConsoleOwner;
|
|
Toshihiro Shimizu |
890ddd |
class TFrameHandle;
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class PlaybackExecutor : public QThread {
|
|
Shinya Kitaoka |
120a6e |
Q_OBJECT
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int m_fps;
|
|
Shinya Kitaoka |
120a6e |
bool m_abort;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
PlaybackExecutor();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void resetFps(int fps);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void run() override;
|
|
Shinya Kitaoka |
120a6e |
void abort() { m_abort = true; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void emitNextFrame(int fps) { emit nextFrame(fps); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
signals:
|
|
Shinya Kitaoka |
120a6e |
void nextFrame(int fps); // Must be connect with Qt::BlockingQueuedConnection
|
|
Shinya Kitaoka |
120a6e |
// connection type.
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
// Implements a flipbook slider with a progress bar in background.
|
|
Shinya Kitaoka |
120a6e |
class FlipSlider : public QAbstractSlider {
|
|
Shinya Kitaoka |
120a6e |
Q_OBJECT
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(int PBHeight READ getPBHeight WRITE setPBHeight)
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(QImage PBOverlay READ getPBOverlay WRITE setPBOverlay)
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(QImage PBMarker READ getPBMarker WRITE setPBMarker)
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(int PBColorMarginLeft READ getPBColorMarginLeft WRITE
|
|
Shinya Kitaoka |
120a6e |
setPBColorMarginLeft)
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(
|
|
Shinya Kitaoka |
120a6e |
int PBColorMarginTop READ getPBColorMarginTop WRITE setPBColorMarginTop)
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(int PBColorMarginRight READ getPBColorMarginRight WRITE
|
|
Shinya Kitaoka |
120a6e |
setPBColorMarginRight)
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(int PBColorMarginBottom READ getPBColorMarginBottom WRITE
|
|
Shinya Kitaoka |
120a6e |
setPBColorMarginBottom)
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(int PBMarkerMarginLeft READ getPBMarkerMarginLeft WRITE
|
|
Shinya Kitaoka |
120a6e |
setPBMarkerMarginLeft)
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(int PBMarkerMarginRight READ getPBMarkerMarginRight WRITE
|
|
Shinya Kitaoka |
120a6e |
setPBMarkerMarginRight)
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(QColor baseColor READ getBaseColor WRITE setBaseColor)
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(
|
|
Shinya Kitaoka |
120a6e |
QColor notStartedColor READ getNotStartedColor WRITE setNotStartedColor)
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(QColor startedColor READ getStartedColor WRITE setStartedColor)
|
|
Shinya Kitaoka |
120a6e |
Q_PROPERTY(QColor finishedColor READ getFinishedColor WRITE setFinishedColor)
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
bool m_enabled;
|
|
Shinya Kitaoka |
120a6e |
const std::vector<uchar> *m_progressBarStatus;</uchar>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
enum { PBFrameNotStarted, PBFrameStarted, PBFrameFinished };
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
FlipSlider(QWidget *parent);
|
|
Shinya Kitaoka |
120a6e |
~FlipSlider() {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void setProgressBarEnabled(bool enabled) { m_enabled = enabled; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void setProgressBarStatus(const std::vector<uchar> *pbStatus) {</uchar>
|
|
Shinya Kitaoka |
120a6e |
m_progressBarStatus = pbStatus;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
const std::vector<uchar> *getProgressBarStatus() const {</uchar>
|
|
Shinya Kitaoka |
120a6e |
return m_progressBarStatus;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
// Properties setters-getters
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int getPBHeight() const;
|
|
Shinya Kitaoka |
120a6e |
void setPBHeight(int height);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
QImage getPBOverlay() const;
|
|
Shinya Kitaoka |
120a6e |
void setPBOverlay(const QImage &img);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
QImage getPBMarker() const;
|
|
Shinya Kitaoka |
120a6e |
void setPBMarker(const QImage &img);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int getPBColorMarginLeft() const;
|
|
Shinya Kitaoka |
120a6e |
void setPBColorMarginLeft(int margin);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int getPBColorMarginTop() const;
|
|
Shinya Kitaoka |
120a6e |
void setPBColorMarginTop(int margin);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int getPBColorMarginRight() const;
|
|
Shinya Kitaoka |
120a6e |
void setPBColorMarginRight(int margin);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int getPBColorMarginBottom() const;
|
|
Shinya Kitaoka |
120a6e |
void setPBColorMarginBottom(int margin);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int getPBMarkerMarginLeft() const;
|
|
Shinya Kitaoka |
120a6e |
void setPBMarkerMarginLeft(int margin);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int getPBMarkerMarginRight() const;
|
|
Shinya Kitaoka |
120a6e |
void setPBMarkerMarginRight(int margin);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
QColor getBaseColor() const;
|
|
Shinya Kitaoka |
120a6e |
void setBaseColor(const QColor &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
QColor getNotStartedColor() const;
|
|
Shinya Kitaoka |
120a6e |
void setNotStartedColor(const QColor &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
QColor getStartedColor() const;
|
|
Shinya Kitaoka |
120a6e |
void setStartedColor(const QColor &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
QColor getFinishedColor() const;
|
|
Shinya Kitaoka |
120a6e |
void setFinishedColor(const QColor &color);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
473e70 |
void paintEvent(QPaintEvent *ev) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void mousePressEvent(QMouseEvent *me) override;
|
|
Shinya Kitaoka |
473e70 |
void mouseMoveEvent(QMouseEvent *me) override;
|
|
Shinya Kitaoka |
473e70 |
void mouseReleaseEvent(QMouseEvent *me) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
int sliderPositionFromValue(int min, int max, int pos, int span);
|
|
Shinya Kitaoka |
120a6e |
int sliderValueFromPosition(int min, int max, int step, int pos, int span);
|
|
Shinya Kitaoka |
120a6e |
int pageStepVal(int val);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
signals:
|
|
Shinya Kitaoka |
120a6e |
void flipSliderReleased();
|
|
Shinya Kitaoka |
120a6e |
void flipSliderPressed();
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class DVAPI FlipConsole : public QWidget {
|
|
Shinya Kitaoka |
120a6e |
Q_OBJECT
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
enum EGadget {
|
|
Shinya Kitaoka |
120a6e |
eBegin = 0,
|
|
Shinya Kitaoka |
120a6e |
ePlay = 0x1,
|
|
Shinya Kitaoka |
120a6e |
eLoop = 0x2,
|
|
Shinya Kitaoka |
120a6e |
ePause = 0x4,
|
|
Shinya Kitaoka |
120a6e |
ePrev = 0x8,
|
|
Shinya Kitaoka |
120a6e |
eNext = 0x10,
|
|
Shinya Kitaoka |
120a6e |
eFirst = 0x20,
|
|
Shinya Kitaoka |
120a6e |
eLast = 0x40,
|
|
Shinya Kitaoka |
120a6e |
eRed = 0x80,
|
|
Shinya Kitaoka |
120a6e |
eGreen = 0x100,
|
|
Shinya Kitaoka |
120a6e |
eBlue = 0x200,
|
|
Shinya Kitaoka |
120a6e |
eGRed = 0x400,
|
|
Shinya Kitaoka |
120a6e |
eGGreen = 0x800,
|
|
Shinya Kitaoka |
120a6e |
eGBlue = 0x1000,
|
|
Shinya Kitaoka |
120a6e |
eMatte = 0x2000,
|
|
Shinya Kitaoka |
120a6e |
eFrames = 0x4000,
|
|
Shinya Kitaoka |
120a6e |
eRate = 0x8000,
|
|
Shinya Kitaoka |
120a6e |
eSound = 0x10000,
|
|
Shinya Kitaoka |
120a6e |
eHisto = 0x20000,
|
|
Shinya Kitaoka |
120a6e |
eBlackBg = 0x40000,
|
|
Shinya Kitaoka |
120a6e |
eWhiteBg = 0x80000,
|
|
Shinya Kitaoka |
120a6e |
eCheckBg = 0x100000,
|
|
Shinya Kitaoka |
120a6e |
eSaveImg = 0x200000,
|
|
Shinya Kitaoka |
120a6e |
eCompare = 0x400000,
|
|
Shinya Kitaoka |
120a6e |
eCustomize = 0x800000,
|
|
Shinya Kitaoka |
120a6e |
eSave = 0x1000000,
|
|
Shinya Kitaoka |
120a6e |
eDefineSubCamera = 0x2000000,
|
|
Shinya Kitaoka |
120a6e |
eFilledRaster = 0x4000000, // Used only in LineTest
|
|
Shinya Kitaoka |
120a6e |
eDefineLoadBox = 0x8000000,
|
|
Shinya Kitaoka |
120a6e |
eUseLoadBox = 0x10000000,
|
|
Shinya Kitaoka |
120a6e |
eEnd = 0x20000000
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
static const UINT cFullConsole = eEnd - 1;
|
|
Shinya Kitaoka |
120a6e |
static const UINT cFilterRgb = eRed | eGreen | eBlue;
|
|
Shinya Kitaoka |
120a6e |
static const UINT cFilterGRgb = eGRed | eGGreen | eGBlue;
|
|
Shinya Kitaoka |
120a6e |
static const UINT eFilterRgbm = cFilterRgb | eMatte;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
static FlipConsole *m_currentConsole;
|
|
Shinya Kitaoka |
120a6e |
static QList<flipconsole *=""> m_visibleConsoles;</flipconsole>
|
|
Shinya Kitaoka |
120a6e |
static bool m_isLinkedPlaying;
|
|
Shinya Kitaoka |
120a6e |
static bool m_areLinked;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
// blanksEnabled==true->at begin of each loop a number of blank frames are
|
|
Shinya Kitaoka |
120a6e |
// drawn (according to rpeferences settings)
|
|
Shinya Kitaoka |
120a6e |
FlipConsole(QVBoxLayout *layout, UINT gadgetsMask, bool isLinkable,
|
|
Shinya Kitaoka |
120a6e |
QWidget *customWidget, const QString &customizeId,
|
|
Shinya Kitaoka |
120a6e |
FlipConsoleOwner *consoleOwner, // call
|
|
Shinya Kitaoka |
120a6e |
// consoleOwner->onDrawFrame()
|
|
Shinya Kitaoka |
120a6e |
// intead of emitting drawFrame
|
|
Shinya Kitaoka |
120a6e |
// signal
|
|
Shinya Kitaoka |
120a6e |
bool enableBlanks = false);
|
|
Shinya Kitaoka |
120a6e |
void enableBlanks(bool state);
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void setFrameRange(
|
|
Shinya Kitaoka |
120a6e |
int from, int to, int step,
|
|
Shinya Kitaoka |
120a6e |
int current = -1); // if current==-1, current position will be ==from
|
|
Shinya Kitaoka |
120a6e |
void getFrameRange(int &from, int &to, int &step) const {
|
|
Shinya Kitaoka |
120a6e |
from = m_from, to = m_to, step = m_step;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
void setFrameRate(int rate);
|
|
Shinya Kitaoka |
120a6e |
// if doShowHide==true, applies set visible, otherwise applies setEnabled
|
|
Shinya Kitaoka |
120a6e |
void enableButton(UINT button, bool enable, bool doShowHide = true);
|
|
Shinya Kitaoka |
120a6e |
void showCurrentFrame();
|
|
Shinya Kitaoka |
120a6e |
int getCurrentFrame() const { return m_currentFrame; }
|
|
Shinya Kitaoka |
120a6e |
void setChecked(UINT button, bool state);
|
|
Shinya Kitaoka |
120a6e |
bool isChecked(UINT button) const;
|
|
Shinya Kitaoka |
120a6e |
void setCurrentFrame(int frame, bool forceResetting = false);
|
|
Shinya Kitaoka |
120a6e |
void setMarkers(int fromIndex, int toIndex) {
|
|
Shinya Kitaoka |
120a6e |
m_markerFrom = fromIndex + 1;
|
|
Shinya Kitaoka |
120a6e |
m_markerTo = toIndex + 1;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
void pressButton(UINT button) {
|
|
Shinya Kitaoka |
120a6e |
doButtonPressed(button);
|
|
Shinya Kitaoka |
120a6e |
setChecked(button, !isChecked(button));
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
// the main (currently the only) use for current flipconsole and setActive is
|
|
Shinya Kitaoka |
120a6e |
// to
|
|
Shinya Kitaoka |
120a6e |
// support shortcuts handling
|
|
Shinya Kitaoka |
120a6e |
// setActive() should be called every time the visibility state of the console
|
|
Shinya Kitaoka |
120a6e |
// changes
|
|
Shinya Kitaoka |
120a6e |
// a list of visible console is maintained. calling setActive(false) for the
|
|
Shinya Kitaoka |
120a6e |
// current
|
|
Shinya Kitaoka |
120a6e |
// console makes automatically current the next one in the list
|
|
Shinya Kitaoka |
120a6e |
static FlipConsole *getCurrent() { return m_currentConsole; };
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
static void toggleLinked();
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void makeCurrent();
|
|
Shinya Kitaoka |
120a6e |
void setActive(bool active);
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void pressButton(EGadget buttonId);
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void showHideAllParts(bool);
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void enableProgressBar(bool enable);
|
|
Shinya Kitaoka |
120a6e |
void setProgressBarStatus(const std::vector<uchar> *status);</uchar>
|
|
Shinya Kitaoka |
120a6e |
const std::vector<uchar> *getProgressBarStatus() const;</uchar>
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void setFrameHandle(TFrameHandle *frameHandle) {
|
|
Shinya Kitaoka |
120a6e |
m_frameHandle = frameHandle;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
bool isLinkable() const { return m_isLinkable; }
|
|
Shinya Kitaoka |
120a6e |
void playNextFrame();
|
|
Shinya Kitaoka |
120a6e |
void updateCurrentFPS(int val);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
signals:
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void buttonPressed(FlipConsole::EGadget button);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void playStateChanged(bool isPlaying);
|
|
Shinya Kitaoka |
120a6e |
void sliderReleased();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
UINT m_customizeMask;
|
|
Shinya Kitaoka |
120a6e |
QString m_customizeId;
|
|
Shinya Kitaoka |
120a6e |
QAction *m_customAction;
|
|
Shinya Kitaoka |
120a6e |
PlaybackExecutor m_playbackExecutor;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
QAction *m_customSep, *m_rateSep, *m_histoSep, *m_bgSep, *m_vcrSep,
|
|
Shinya Kitaoka |
120a6e |
*m_compareSep, *m_saveSep, *m_colorFilterSep, *m_soundSep, *m_subcamSep,
|
|
Shinya Kitaoka |
120a6e |
*m_filledRasterSep;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
QToolBar *m_playToolBar;
|
|
Shinya Kitaoka |
120a6e |
QActionGroup *m_colorFilterGroup;
|
|
Shinya Kitaoka |
120a6e |
ToolBarContainer *m_playToolBarContainer;
|
|
Shinya Kitaoka |
120a6e |
QFrame *m_frameSliderFrame;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
QLabel *m_fpsLabel;
|
|
Shinya Kitaoka |
120a6e |
QScrollBar *m_fpsSlider;
|
|
Shinya Kitaoka |
120a6e |
DVGui::IntLineEdit *m_fpsField;
|
|
Shinya Kitaoka |
120a6e |
QAction *m_fpsFieldAction;
|
|
Shinya Kitaoka |
120a6e |
QAction *m_fpsLabelAction;
|
|
Shinya Kitaoka |
120a6e |
QAction *m_fpsSliderAction;
|
|
Shinya Kitaoka |
120a6e |
QFrame *createFpsSlider();
|
|
Shinya Kitaoka |
120a6e |
QAction *m_doubleRedAction, *m_doubleGreenAction, *m_doubleBlueAction;
|
|
Shinya Kitaoka |
120a6e |
DoubleButton *m_doubleRed, *m_doubleGreen, *m_doubleBlue;
|
|
Shinya Kitaoka |
120a6e |
UINT m_gadgetsMask;
|
|
Shinya Kitaoka |
120a6e |
int m_from, m_to, m_step;
|
|
Shinya Kitaoka |
120a6e |
int m_currentFrame, m_framesCount;
|
|
Shinya Kitaoka |
120a6e |
ImagePainter::VisualSettings m_settings;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
bool m_isPlay;
|
|
Shinya Kitaoka |
120a6e |
int m_fps;
|
|
Shinya Kitaoka |
120a6e |
bool m_reverse;
|
|
Shinya Kitaoka |
120a6e |
int m_markerFrom, m_markerTo;
|
|
Shinya Kitaoka |
120a6e |
bool m_drawBlanksEnabled;
|
|
Shinya Kitaoka |
120a6e |
int m_blanksCount;
|
|
Shinya Kitaoka |
120a6e |
TPixel m_blankColor;
|
|
Shinya Kitaoka |
120a6e |
int m_blanksToDraw;
|
|
Shinya Kitaoka |
120a6e |
bool m_isLinkable;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
QMap<egadget, *="" qabstractbutton=""> m_buttons;</egadget,>
|
|
Shinya Kitaoka |
120a6e |
QMap<egadget, *="" qaction=""> m_actions;</egadget,>
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void createCustomizeMenu(bool withCustomWidget);
|
|
Shinya Kitaoka |
120a6e |
void addMenuItem(UINT id, const QString &text, QMenu *menu);
|
|
Shinya Kitaoka |
120a6e |
void createButton(UINT buttonMask, const char *iconStr, const QString &tip,
|
|
Shinya Kitaoka |
120a6e |
bool checkable, QActionGroup *groupIt = 0);
|
|
Shinya Kitaoka |
120a6e |
QAction *createCheckedButtonWithBorderImage(
|
|
Shinya Kitaoka |
120a6e |
UINT buttonMask, const char *iconStr, const QString &tip, bool checkable,
|
|
Shinya Kitaoka |
120a6e |
QActionGroup *groupIt = 0, const char *cmdId = 0);
|
|
Shinya Kitaoka |
120a6e |
void createOnOffButton(UINT buttonMask, const char *iconStr,
|
|
Shinya Kitaoka |
120a6e |
const QString &tip, QActionGroup *group);
|
|
Shinya Kitaoka |
120a6e |
QAction *createDoubleButton(UINT buttonMask1, UINT buttonMask2,
|
|
Shinya Kitaoka |
120a6e |
const char *iconStr1, const char *iconStr2,
|
|
Shinya Kitaoka |
120a6e |
const QString &tip1, const QString &tip2,
|
|
Shinya Kitaoka |
120a6e |
QActionGroup *group, DoubleButton *&w);
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
QFrame *createFrameSlider();
|
|
Shinya Kitaoka |
120a6e |
void createPlayToolBar(bool withCustomWidget);
|
|
Shinya Kitaoka |
120a6e |
DVGui::IntLineEdit *m_editCurrFrame;
|
|
Shinya Kitaoka |
120a6e |
FlipSlider *m_currFrameSlider;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void doButtonPressed(UINT button);
|
|
Shinya Kitaoka |
120a6e |
static void pressLinkedConsoleButton(UINT button, FlipConsole *skipIt);
|
|
Shinya Kitaoka |
120a6e |
void applyCustomizeMask();
|
|
Shinya Kitaoka |
120a6e |
void onLoadBox(bool isDefine);
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
QPushButton *m_enableBlankFrameButton;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
FlipConsoleOwner *m_consoleOwner;
|
|
Shinya Kitaoka |
120a6e |
TFrameHandle *m_frameHandle;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected slots:
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void OnSetCurrentFrame();
|
|
Shinya Kitaoka |
120a6e |
void OnFrameSliderRelease();
|
|
Shinya Kitaoka |
120a6e |
void OnFrameSliderPress();
|
|
Shinya Kitaoka |
120a6e |
void OnSetCurrentFrame(int);
|
|
Shinya Kitaoka |
120a6e |
void setCurrentFPS(int);
|
|
Shinya Kitaoka |
120a6e |
void setCurrentFPS(bool dragging);
|
|
Shinya Kitaoka |
120a6e |
inline void onButtonPressed(QAction *action) {
|
|
Shinya Kitaoka |
120a6e |
onButtonPressed(action->data().toUInt());
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
void onButtonPressed(int button);
|
|
Shinya Kitaoka |
120a6e |
void incrementCurrentFrame(int delta);
|
|
Shinya Kitaoka |
120a6e |
void onNextFrame(int fps);
|
|
Shinya Kitaoka |
120a6e |
void onCustomizeButtonPressed(QAction *);
|
|
Shinya Kitaoka |
120a6e |
bool drawBlanks(int from, int to);
|
|
Shinya Kitaoka |
120a6e |
void onSliderRelease();
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
void onFPSEdited();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public slots:
|
|
Shinya Kitaoka |
120a6e |
void onPreferenceChanged();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
friend class PlaybackExecutor;
|
|
Shinya Kitaoka |
120a6e |
PlaybackExecutor &playbackExecutor() { return m_playbackExecutor; }
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|