|
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 |
d1f6c4 |
class PlaybackExecutor final : 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 |
d1f6c4 |
class FlipSlider final : 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 |
d1f6c4 |
class DVAPI FlipConsole final : public QWidget {
|
|
Shinya Kitaoka |
120a6e |
Q_OBJECT
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
enum EGadget {
|
|
manongjohn |
77dd6e |
eBegin,
|
|
manongjohn |
77dd6e |
ePlay,
|
|
manongjohn |
77dd6e |
eLoop,
|
|
manongjohn |
77dd6e |
ePause,
|
|
manongjohn |
77dd6e |
ePrev,
|
|
manongjohn |
77dd6e |
eNext,
|
|
manongjohn |
77dd6e |
eFirst,
|
|
manongjohn |
77dd6e |
eLast,
|
|
manongjohn |
77dd6e |
eRed,
|
|
manongjohn |
77dd6e |
eGreen,
|
|
manongjohn |
77dd6e |
eBlue,
|
|
manongjohn |
77dd6e |
eGRed,
|
|
manongjohn |
77dd6e |
eGGreen,
|
|
manongjohn |
77dd6e |
eGBlue,
|
|
manongjohn |
77dd6e |
eMatte,
|
|
manongjohn |
77dd6e |
eFrames,
|
|
manongjohn |
77dd6e |
eRate,
|
|
manongjohn |
77dd6e |
eSound,
|
|
manongjohn |
77dd6e |
eHisto,
|
|
manongjohn |
77dd6e |
eBlackBg,
|
|
manongjohn |
77dd6e |
eWhiteBg,
|
|
manongjohn |
77dd6e |
eCheckBg,
|
|
manongjohn |
77dd6e |
eSaveImg,
|
|
manongjohn |
77dd6e |
eCompare,
|
|
manongjohn |
77dd6e |
eCustomize,
|
|
manongjohn |
77dd6e |
eSave,
|
|
manongjohn |
77dd6e |
eDefineSubCamera,
|
|
manongjohn |
77dd6e |
eFilledRaster, // Used only in LineTest
|
|
manongjohn |
77dd6e |
eDefineLoadBox,
|
|
manongjohn |
77dd6e |
eUseLoadBox,
|
|
manongjohn |
77dd6e |
eLocator,
|
|
manongjohn |
77dd6e |
eZoomIn,
|
|
manongjohn |
77dd6e |
eZoomOut,
|
|
manongjohn |
77dd6e |
eFlipHorizontal,
|
|
manongjohn |
77dd6e |
eFlipVertical,
|
|
manongjohn |
77dd6e |
eResetView,
|
|
manongjohn |
77dd6e |
eEnd
|
|
Shinya Kitaoka |
120a6e |
};
|
|
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)
|
|
manongjohn |
77dd6e |
FlipConsole(QVBoxLayout *layout, std::vector<int> gadgetsMask,</int>
|
|
manongjohn |
77dd6e |
bool isLinkable, QWidget *customWidget,
|
|
manongjohn |
77dd6e |
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 |
}
|
|
shun_iwasawa |
d77cdf |
void setFrameRate(int rate, bool forceUpdate = true);
|
|
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; }
|
|
Jeremy Bullock |
b6833a |
int getCurrentFps() const { return m_fps; }
|
|
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 |
|
|
manongjohn |
77dd6e |
bool hasButton(std::vector<int> buttonMask, FlipConsole::EGadget buttonId) {</int>
|
|
manongjohn |
77dd6e |
if (buttonMask.size() == 0) return true;
|
|
manongjohn |
77dd6e |
return std::find(buttonMask.begin(), buttonMask.end(), buttonId) ==
|
|
manongjohn |
77dd6e |
buttonMask.end();
|
|
manongjohn |
77dd6e |
}
|
|
manongjohn |
77dd6e |
|
|
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,
|
|
manongjohn |
77dd6e |
*m_filledRasterSep, *m_viewerSep;
|
|
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;
|
|
manongjohn |
77dd6e |
std::vector<int> m_gadgetsMask;</int>
|
|
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;
|
|
shun_iwasawa |
d77cdf |
int m_fps, m_sceneFps;
|
|
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();
|
|
manongjohn |
77dd6e |
void createPlayToolBar(QWidget *customWidget);
|
|
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:
|
|
shun_iwasawa |
1f4a70 |
void onPreferenceChanged(const QString &);
|
|
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
|