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