first commit

This commit is contained in:
2026-02-21 17:11:31 +09:00
commit 18b4338361
4001 changed files with 365464 additions and 0 deletions

View File

@@ -0,0 +1,531 @@
#include "rm_frame_play.h"
#include "../fm_dimensions.h"
#include "fm_button.h"
#include <QTimer>
#include "../core/rm_player.h"
#include "../data/rm_video_list.h"
#include "../data/rm_video_item_loader.h"
#include "../core/rm_play_process.h"
#include "rm_widget_video_list.h"
#include "../core/fm_strings.h"
#include <QScreen>
#if (SPEED_IN_PLAY_CONTROL)
#include "rm_slider.h"
#include "fm_colors.h"
#endif // SPEED_IN_PLAY_CONTROL
#if (USE_RM_KEYBOARD_EVENT)
#include "../core/rm_key_event.h"
#endif
#if (RM_MODEL == RM_MODEL_TYPE_TB4000)
#include "window_main.h"
#endif // TB4000
RMFramePlay::RMFramePlay(QWidget *parent) : RMWidgetBase(parent,true)
{
#if (RM_MODEL != RM_MODEL_TYPE_EMT_KR)
setStyleSheet("RMFramePlay{border-image: url(:/image/play_bg.png) 0 0 0 0 repeat stretch;}");
#endif
_createLayouts();
// 플레이 중 버튼 상태 업데이트
connect(RMPlayer::instance(),SIGNAL(playEvent(PLAY_EVENT, RMVideoItem*)),SLOT(onPlayEvent(PLAY_EVENT, RMVideoItem*)));
// 리스트 로딩 완료 후 버튼 상태 업데이트
connect(RMVideoFileList::instance(),SIGNAL(listUpdateEnd(bool,RMVideoItem*)),this,SLOT(onLoadingListEnd(bool,RMVideoItem*)));
//_pressTimer = new QElapsedTimer();
}
void RMFramePlay::_createLayouts()
{
layout = new QHBoxLayout(this);
layout->setContentsMargins(0,1,0,0);
#if (RM_MODEL == RM_MODEL_TYPE_EMT_KR)
QWidget* left = new QWidget(this);
left->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
layout->addWidget(left);
QHBoxLayout* left_layout = new QHBoxLayout(left);
left_layout->setAlignment(Qt::AlignBottom | Qt::AlignLeft);
left_layout->setContentsMargins(10,0,0,10);
QLabel* vLabel = new QLabel(left);
vLabel->setText(QString().sprintf("v%d.%d.%d",RM_MODEL_VERSION_0,RM_MODEL_VERSION_1,RM_MODEL_VERSION_2));
vLabel->setStyleSheet("font-family: Arial;font-size: 14px;color : #AAAAAA;");
left_layout->addWidget(vLabel);
layout->setAlignment(Qt::AlignVCenter);
layout->setSpacing(10);
//LAYOUT_SPACE(layout,17,0);// RMLayout::addSpacer(layout,16,0);
QSize buttonSize = QSize(62,62);
filePreviousButton = FMButton::btn2(this,layout,"play_previous","play_file_previous",buttonSize);
filePreviousButton->setEnabled(false);
frameBackwardButton = FMButton::btn2(this,layout,"play_backward","play_backward",buttonSize);
frameBackwardButton->setAutoRepeat(false);
RMKeyEvent* k = RMKeyEvent::instance();
connect(frameBackwardButton,SIGNAL(pressed()),k,SLOT(onPressedB1()));
connect(frameBackwardButton,SIGNAL(released()),k,SLOT(onReleasedB1()));
frameBackwardButton->setEnabled(false);
//_paused = false;
// 正方向再生 MKU8("\xe6\xad\xa3\xe6\x96\xb9\xe5\x90\x91\xe5\x86\x8d\xe7\x94\x9f")
playButton = FMButton::btnCheck2(this,layout,"play_play","play_play",buttonSize);
connect(playButton, SIGNAL(released()),this,SLOT(onPlayOrPause()));
playButton->setEnabled(false);
playShortcut = new QShortcut(QKeySequence(Qt::Key_Space), this);
playShortcut->setContext(Qt::ApplicationShortcut);
connect(playShortcut, SIGNAL(activated()),this,SLOT(onPlayOrPause()));
playShortcut->setEnabled(false);
restartShortcut = new QShortcut(QKeySequence(Qt::Key_Backspace), this);
restartShortcut->setContext(Qt::ApplicationShortcut);
connect(restartShortcut, SIGNAL(activated()),RMPlayer::instance(),SLOT(onPlayRestart()));
restartShortcut->setEnabled(false);
stopButton = FMButton::btn2(this,layout,"play_stop","play_stop",buttonSize);
connect(stopButton,SIGNAL(clicked()),RMPlayer::instance(),SLOT(onUserStop())); // 정지
stopButton->setEnabled(false);
stopButton->setHidden(true);
// 10秒進む MKU8("\x31\x30\xe7\xa7\x92\xe9\x80\xb2\xe3\x82\x80")
frameForwardButton = FMButton::btn2(this,layout,"play_forward","play_forward",buttonSize);
frameForwardButton->setAutoRepeat(false);
connect(frameForwardButton,SIGNAL(pressed()),k,SLOT(onPressedF1()));
connect(frameForwardButton,SIGNAL(released()),k,SLOT(onReleasedF1()));
frameForwardButton->setEnabled(false);
fileNextButton = FMButton::btn2(this,layout,"play_next","play_file_next",buttonSize);
fileNextButton->setEnabled(false);
connect(k,SIGNAL(pressedF1()),RMPlayer::instance(),SLOT(onSeekForwardStart()));
connect(k,SIGNAL(releasedF1()),RMPlayer::instance(),SLOT(onSeekStepEnd()));
connect(k,SIGNAL(pressedB1()),RMPlayer::instance(),SLOT(onSeekBackwardStart()));
connect(k,SIGNAL(releasedB1()),RMPlayer::instance(),SLOT(onSeekStepEnd()));
connect(k,SIGNAL(pressedFF()),RMPlayer::instance(),SLOT(onSeekFrameForwardStart()));
connect(k,SIGNAL(releasedFF()),RMPlayer::instance(),SLOT(onSeekStepEnd()));
QWidget* right = new QWidget(this);
right->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
layout->addWidget(right);
QHBoxLayout* right_layout = new QHBoxLayout(right);
right_layout->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
ZERO_LAYOUT(right_layout);
#else // RM_MODEL_TYPE_EMT_KR
layout->setAlignment(Qt::AlignVCenter);
#if !(SPEED_IN_PLAY_CONTROL)
const int space = 10;
#else // SPEED_IN_PLAY_CONTROL
const int space = 7;
#endif // SPEED_IN_PLAY_CONTROL
layout->setSpacing(space);
LAYOUT_SPACE(layout,17,0);// RMLayout::addSpacer(layout,16,0);
QSize buttonSize = QSize(62,62);
#if !(REMOVE_SEEK_BUTTON)
// 10秒前へ 이전으로 이동한다 MKU8("\x31\x30\xe7\xa7\x92\xe5\x89\x8d\xe3\x81\xb8")
#if (LIVE_LANGUAGE2)
frameBackwardButton = FMButton::btn2(this,layout,"play_backward","play_backward",buttonSize);
#else // #if (LIVE_LANGUAGE2)
frameBackwardButton = FMButton::btn(this,layout,"play_backward",FMS::txt("play_backward"),buttonSize);
#endif // #if (LIVE_LANGUAGE2)
frameBackwardButton->setAutoRepeat(false);
#if (USE_RM_KEYBOARD_EVENT)
RMKeyEvent* k = RMKeyEvent::instance();
connect(frameBackwardButton,SIGNAL(pressed()),k,SLOT(onPressedB1()));
connect(frameBackwardButton,SIGNAL(released()),k,SLOT(onReleasedB1()));
#endif
frameBackwardButton->setEnabled(false);
#endif // #if !(REMOVE_SEEK_BUTTON)
#if (RM_MODEL == RM_MODEL_TYPE_KEIYO1 || RM_MODEL == RM_MODEL_TYPE_MBJ5010 || RM_MODEL == RM_MODEL_TYPE_FC_DR232W)
// 버튼아이콘 다름
filePreviousButton = FMButton::btn(this,layout,"play_backward",FMS::txt("play_file_previous"),buttonSize);
filePreviousButton->setEnabled(false);
#endif
//_paused = false;
// 正方向再生 MKU8("\xe6\xad\xa3\xe6\x96\xb9\xe5\x90\x91\xe5\x86\x8d\xe7\x94\x9f")
#if (LIVE_LANGUAGE2)
playButton = FMButton::btnCheck2(this,layout,"play_play","play_play",buttonSize);
#else // LIVE_LANGUAGE2
playButton = FMButton::btnCheck(this,layout,"play_play",FMS::txt("play_play"),buttonSize);
#endif // LIVE_LANGUAGE2
//playButton->setCheckable(false);
//connect(playButton, SIGNAL(released()),RMPlayer::instance(),SLOT(onPlayOrPause()));
connect(playButton, SIGNAL(released()),this,SLOT(onPlayOrPause()));
playButton->setEnabled(false);
#if !(REMOVE_ALL_SHORT_CUTS)
playShortcut = new QShortcut(QKeySequence(Qt::Key_Space), this);
playShortcut->setContext(Qt::ApplicationShortcut);
connect(playShortcut, SIGNAL(activated()),this,SLOT(onPlayOrPause()));
playShortcut->setEnabled(false);
restartShortcut = new QShortcut(QKeySequence(Qt::Key_Backspace), this);
restartShortcut->setContext(Qt::ApplicationShortcut);
connect(restartShortcut, SIGNAL(activated()),RMPlayer::instance(),SLOT(onPlayRestart()));
restartShortcut->setEnabled(false);
#endif
// 停止 MKU8("\xe5\x81\x9c\xe6\xad\xa2")
#if (LIVE_LANGUAGE2)
stopButton = FMButton::btn2(this,layout,"play_stop","play_stop",buttonSize);
#else // LIVE_LANGUAGE2
stopButton = FMButton::btn(this,layout,"play_stop",FMS::txt("play_stop"),buttonSize);
#endif // LIVE_LANGUAGE2
connect(stopButton,SIGNAL(clicked()),RMPlayer::instance(),SLOT(onUserStop())); // 정지
stopButton->setEnabled(false);
#if !(REMOVE_SEEK_BUTTON)
// 10秒進む MKU8("\x31\x30\xe7\xa7\x92\xe9\x80\xb2\xe3\x82\x80")
#if (LIVE_LANGUAGE2)
frameForwardButton = FMButton::btn2(this,layout,"play_forward","play_forward",buttonSize);
#else // LIVE_LANGUAGE2
frameForwardButton = FMButton::btn(this,layout,"play_forward",FMS::txt("play_forward"),buttonSize);
#endif // LIVE_LANGUAGE2
frameForwardButton->setAutoRepeat(false);
#if (USE_RM_KEYBOARD_EVENT)
connect(frameForwardButton,SIGNAL(pressed()),k,SLOT(onPressedF1()));
connect(frameForwardButton,SIGNAL(released()),k,SLOT(onReleasedF1()));
//#else
// connect(frameForwardButton,SIGNAL(clicked()),RMPlayer::instance(),SLOT(onSeekForward()));
#endif
frameForwardButton->setEnabled(false);
#endif // #if !(REMOVE_SEEK_BUTTON)
// 以前ファイル
#if !(RM_MODEL == RM_MODEL_TYPE_KEIYO1 || RM_MODEL == RM_MODEL_TYPE_MBJ5010 || RM_MODEL == RM_MODEL_TYPE_FC_DR232W)
#if (LIVE_LANGUAGE2)
filePreviousButton = FMButton::btn2(this,layout,"play_previous","play_file_previous",buttonSize);
#else // LIVE_LANGUAGE2
filePreviousButton = FMButton::btn(this,layout,"play_previous",FMS::txt("play_file_previous"),buttonSize);
#endif // LIVE_LANGUAGE2
filePreviousButton->setEnabled(false);
#endif
#if (RM_MODEL == RM_MODEL_TYPE_TB4000)
layout->removeWidget(filePreviousButton);
layout->insertWidget(1,filePreviousButton);
#endif
// 次のファイル
#if (RM_MODEL == RM_MODEL_TYPE_KEIYO1 || RM_MODEL == RM_MODEL_TYPE_MBJ5010 || RM_MODEL == RM_MODEL_TYPE_FC_DR232W)
fileNextButton = FMButton::btn(this,layout,"play_forward",FMS::txt("play_file_next"),buttonSize);
#else
#if (LIVE_LANGUAGE2)
fileNextButton = FMButton::btn2(this,layout,"play_next","play_file_next",buttonSize);
#else // LIVE_LANGUAGE2
fileNextButton = FMButton::btn(this,layout,"play_next",FMS::txt("play_file_next"),buttonSize);
#endif // LIVE_LANGUAGE2
#endif
fileNextButton->setEnabled(false);
//connect(fileNextButton,SIGNAL(clicked()),fileList,SLOT(onPlayNextVideo()));
#if !(REMOVE_SEEK_BUTTON)
#if (USE_RM_KEYBOARD_EVENT)
connect(k,SIGNAL(pressedF1()),RMPlayer::instance(),SLOT(onSeekForwardStart()));
connect(k,SIGNAL(releasedF1()),RMPlayer::instance(),SLOT(onSeekStepEnd()));
connect(k,SIGNAL(pressedB1()),RMPlayer::instance(),SLOT(onSeekBackwardStart()));
connect(k,SIGNAL(releasedB1()),RMPlayer::instance(),SLOT(onSeekStepEnd()));
connect(k,SIGNAL(pressedFF()),RMPlayer::instance(),SLOT(onSeekFrameForwardStart()));
connect(k,SIGNAL(releasedFF()),RMPlayer::instance(),SLOT(onSeekStepEnd()));
#if (PLAY_SYNC_FIX2)
connect(k,SIGNAL(pressedBF()),RMPlayer::instance(),SLOT(onSeekFrameBackwardStart()));
connect(k,SIGNAL(releasedBF()),RMPlayer::instance(),SLOT(onSeekStepEnd()));
#endif // PLAY_SYNC_FIX2
#endif // USE_RM_KEYBOARD_EVENT
#endif // REMOVE_SEEK_BUTTON
#endif // #else // RM_MODEL_TYPE_EMT_KR
#if !(LIVE_LANGUAGE2)
#if (LIVE_LANGUAGE_CHANGE)
RMLanguage* lng = RMLanguage::instance();
lng->appendENGToolTip(filePreviousButton,QString("Move to previous file"));
#if !(REMOVE_SEEK_BUTTON)
lng->appendENGToolTip(frameBackwardButton,QString("Move 1 sec backward"));
#endif
lng->appendENGToolTip(playButton,QString("Play"));
lng->appendENGToolTip(stopButton,QString("Stop"));
#if !(REMOVE_SEEK_BUTTON)
lng->appendENGToolTip(frameForwardButton,QString("Move 1 sec forward"));
#endif
lng->appendENGToolTip(fileNextButton,QString("Move to next file"));
#endif
#endif // #if (LIVE_LANGUAGE2)
#if (USE_MAXIMIZE)
maxSpace = new QSpacerItem(1,0,QSizePolicy::Expanding,QSizePolicy::Fixed);
#endif
#if (SPEED_IN_PLAY_CONTROL)
QWidget* speedControl = new QWidget(this);
speedControl->setFixedWidth(130);
layout->addWidget(speedControl);
QHBoxLayout* speedLayout = new QHBoxLayout(speedControl);
ZERO_LAYOUT(speedLayout);
speedLayout->setAlignment(Qt::AlignVCenter);
speedBtn = FMButton::btn(speedControl,speedLayout,"v_speed",FMS::txt("play_speed"), QSize(30,30));
connect(speedBtn,SIGNAL(clicked()),SLOT(onDefaultSpeed()));
speedSlider = new RMReleasedSlider(speedControl);
speedSlider->setTickInterval(1);
speedSlider->setValue(DEFAULT_SPEED_INDEX); // 1.0 = 2
speedSlider->setRange(0,3);
FMSlider(speedSlider,"small_slider",FM_SILDER_COLOR,0x666666,true);
speedLayout->addWidget(speedSlider);
LAYOUT_SPACE(speedLayout,5,0);
speedLabel = new QLabel(speedControl);
speedLabel->setAlignment(Qt::AlignCenter);
FMLabelBackground(speedLabel,"speed_label","Arial",0xf5f5f5,11,false,0x262626);
speedLabel->setText("1 x");
speedLabel->setFixedSize(25,16);
speedLayout->addWidget(speedLabel);
//qInfo() << speedControl->width() << __FUNCTION__;
RMPlayer::instance()->setSpeedSlider(speedSlider,speedLabel);
#endif // #if (SPEED_IN_PLAY_CONTROL)
#if (RM_MODEL == RM_MODEL_TYPE_TB4000)
layout->addItem(maxSpace);
tool = new QWidget(this);
layout->addWidget(tool);
QHBoxLayout* toolLayout = new QHBoxLayout(tool);
ZERO_LAYOUT(toolLayout);
reportButton = FMButton::btn(tool,toolLayout,"report_t",FMS::txt("register"),QSize(77,70));
openButton = FMButton::btn(tool,toolLayout,"open",FMS::txt("open"),QSize(77,70));
saveButton = FMButton::btn(tool,toolLayout,"save_t",FMS::txt("save_video"),QSize(77,70));
fSaveButton = FMButton::btn(tool,toolLayout,"ffilesave",FM_WSTR(L"파일저장"),QSize(125,70));
fPrintButton = FMButton::btn(tool,toolLayout,"fprint",FM_WSTR(L"프린트"),QSize(125,70));
fReportButtonCH1 = FMButton::btn(tool,toolLayout,"freport_ch1",FM_WSTR(L"1번채널 보고서작성"),QSize(125,70));
fReportButtonCH2 = FMButton::btn(tool,toolLayout,"freport_ch2",FM_WSTR(L"2번채널 보고서작성"),QSize(125,70));
fSaveButton->setHidden(true);
fPrintButton->setHidden(true);
fReportButtonCH1->setHidden(true);
fReportButtonCH2->setHidden(true);
//endItem = new QSpacerItem(10,0);
//toolLayout->addSpacerItem(endItem);
#elif (RM_MODEL_EMT_KR)
QLabel* seperator = new QLabel(this);
seperator->setPixmap(QPixmap(":/image/play_seperator.png"));
right_layout->addWidget(seperator);
openButton = FMButton::btn2(this,right_layout,"open","open",QSize(121,70));
#else // RM_MODEL_TYPE_TB4000
// MKU8("\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe3\x82\x92\xe9\x96\x8b\xe3\x81\x8f")
#if (LIVE_LANGUAGE2)
openButton = FMButton::btn2(this,layout,"open","open",QSize(121,70));
#else // LIVE_LANGUAGE2
openButton = FMButton::btn(this,layout,"open",FMS::txt("open"),QSize(121,70));
#endif // LIVE_LANGUAGE2
#endif // RM_MODEL_TYPE_TB4000
layout->setAlignment(openButton,Qt::AlignRight);
#if (LIVE_LANGUAGE2)
connect(RMLanguage::instance(),SIGNAL(languageChange(RMLanguage::LANGUAGE_TYPE)),SLOT(onLanguageChange(RMLanguage::LANGUAGE_TYPE)));
onLanguageChange(RMLanguage::instance()->language());
#endif // LIVE_LANGUAGE2
}
#if (LIVE_LANGUAGE2)
void RMFramePlay::onLanguageChange(RMLanguage::LANGUAGE_TYPE language)
{
Q_UNUSED(language)
//qInfo() << "LANGUAGE:" << RMLanguage::instance()->language() << RMLanguage::instance()->languageTag() << __FUNCTION__;
openButton->setIcon("open" + RMLanguage::instance()->languageTag());
}
#endif // LIVE_LANGUAGE2
#if (SPEED_IN_PLAY_CONTROL)
void RMFramePlay::onDefaultSpeed()
{
speedSlider->setValue(DEFAULT_SPEED_INDEX);
RMPlayer::instance()->updateSpeedForce(1.0);
speedLabel->setText("1 x");
}
#endif // #if (SPEED_IN_PLAY_CONTROL)
void RMFramePlay::onPlayOrPause()
{
playButton->blockFor(150);
RMPlayer::instance()->onPlayOrPause();
}
RMFramePlay::~RMFramePlay()
{
// delete _pressTimer;
}
void RMFramePlay::onLoadingListEnd(bool bLoading,RMVideoItem* selected)
{
Q_UNUSED(selected)
Q_UNUSED(bLoading)
bool bExist = RMVideoFileList::instance()->filteredItems().count() > 0;
playButton->setEnabled(bExist);
filePreviousButton->setEnabled(bExist);
fileNextButton->setEnabled(bExist);
#if !(REMOVE_ALL_SHORT_CUTS)
playShortcut->setEnabled(bExist);
restartShortcut->setEnabled(bExist);
#endif
}
void RMFramePlay::onAppEvent(RMApp::Event event,int param)
{
if(event == RMApp::WillFullScreen || event == RMApp::WillNormalScreen)
{
#if (RM_MODEL == RM_MODEL_TYPE_TB4000)
WindowMain* pw = (WindowMain*)RMApp::instance()->pMainWindow;
// 일반화면에서는 무조건 제거
if(event == RMApp::WillNormalScreen) {
fSaveButton->setHidden(true);
fPrintButton->setHidden(true);
fReportButtonCH1->setHidden(true);
fReportButtonCH2->setHidden(true);
//endItem->changeSize(0,0);
}
//qInfo() << "pw->mMAXIMIZE:" << pw->mMAXIMIZE << "EVENT:" << event << __FUNCTION__;
// 최대화 모드가 아닌 전체화면일 경우 채널버튼 켜기
if(RMApp::mMAXIMIZE)
{
} else {
if(event == RMApp::WillFullScreen) {
fSaveButton->setHidden(false);
fPrintButton->setHidden(false);
#if (SINGLE_CH_VIEWER)
fReportButtonCH1->setHidden(false);
#else // SINGLE_CH_VIEWER
#if (FORCE_2CH)
fReportButtonCH1->setHidden(pw->bSubFullScreen);
fReportButtonCH2->setHidden(!pw->bSubFullScreen);
#else // FORCE_2CH
fReportButtonCH1->setHidden(pw->bSubFullScreen);
#endif // FORCE_2CH
#endif // #if (!SINGLE_CH_VIEWER)
//fReportButton->setText(pw->bSubFullScreen ? FM_WSTR(L"2번채널\n보고서작성") : FM_WSTR(L"1번채널\n보고서작성") );
//endItem->changeSize(10,0);
}
// 최대화 모드에서는 건드리지 않는다
openButton->setHidden((event == RMApp::WillFullScreen));
saveButton->setHidden((event == RMApp::WillFullScreen));
reportButton->setHidden((event == RMApp::WillFullScreen));
}
#else // TB4000
#if (USE_MAXIMIZE)
if(event == RMApp::WillNormalScreen)
{
layout->removeItem(maxSpace);
}
else {
layout->insertItem(layout->indexOf(openButton),maxSpace);
}
#endif // USE_MAXIMIZE
if(param == 1)
{
#if (USE_MAXIMIZE)
#endif // #if (USE_MAXIMIZE)
}
else {
openButton->setHidden((event == RMApp::WillFullScreen));
}
#endif // #else // TB4000
}
}
void RMFramePlay::onPlayEvent(PLAY_EVENT event, RMVideoItem* item)
{
Q_UNUSED(item)
//#if (PLAY_CONTINUE_EVENT)
// 다음파일 플레이시 변화 없도록 처리
// if(RMPlayProcess::instance()->isLoadingNextFile()) {
// if(frameForwardButton->isDown())
// {
//// QCoreApplication::processEvents();
//// emit frameForwardButton->released();
// }
// return;
// }
//#endif
if(event == PLAY_DID_PAUSED || event == PLAY_DID_PLAYED || event == PLAY_DID_CLEARED)
{
bool bShowPaused = (event == PLAY_DID_PLAYED);
//qInfo() << "bShowPaused:" << bShowPaused << __FUNCTION__;
playButton->setChecked(bShowPaused);
//playButton->setStyleStatus("paused",bShowPaused);
// 一時停止, 正方向再生
// MKU8("\xe6\xad\xa3\xe6\x96\xb9\xe5\x90\x91\xe5\x86\x8d\xe7\x94\x9f")
#if(REMOVE_OLD_C)
playButton->setToolTip(bShowPaused ? FMS::txt("play_pause") :FMS::txt("play_play"));
#else // REMOVE_OLD_C
#if (LIVE_LANGUAGE_CHANGE)
if(RMLanguage::isJP()) {
#endif //LIVE_LANGUAGE_CHANGE
playButton->setToolTip(bShowPaused ? FMS::txt("play_pause") :FMS::txt("play_play"));
#if (LIVE_LANGUAGE_CHANGE)
} else {
playButton->setToolTip(bShowPaused ? "Pause" : "Play");
}
#endif // LIVE_LANGUAGE_CHANGE
#endif // REMOVE_OLD_C
}
if(event == PLAY_DID_CLEARED && (item != NULL || RMPlayProcess::instance()->isLoadingNextFile()))
{
return;
}
if(event == PLAY_DID_CLEARED || event == PLAY_DID_LOADED || event == PLAY_DID_USER_STOP)
{
// 다음파일로 넘어갈때 5(PLAY_DID_CLEARED),5,2(PLAY_DID_LOADED) 발생
// TODO 초기 리스트 로딩시 여러번 발생하는데 특별히 문제는 없음
// 변경사항이 아니면 처리하지 않는다.
// ??? pressed 된 상태에서 enabled 처리되면 release 안됨!!
#if !(REMOVE_SEEK_BUTTON)
bool bEnabled = (event == PLAY_DID_LOADED);
if(bEnabled != frameBackwardButton->isEnabled())
#endif
{
#if !(REMOVE_SEEK_BUTTON)
frameBackwardButton->setEnabled(event == PLAY_DID_LOADED);
frameForwardButton->setEnabled(event == PLAY_DID_LOADED);
#endif
stopButton->setEnabled(event == PLAY_DID_LOADED);
}
#if (PROFILE_VIDEO_FILE_LOADING && PROFILE_VIDEO_FILE_LOADING_AUTOPLAY)
if(event == PLAY_DID_LOADED && item->durationInMSecs() > 1000)
{
QTimer::singleShot(1000,Qt::PreciseTimer,this,SLOT(onTestNext()));
}
#endif
}
}
#if (PROFILE_VIDEO_FILE_LOADING && PROFILE_VIDEO_FILE_LOADING_AUTOPLAY)
void RMFramePlay::onTestNext()
{
emit fileNextButton->clicked();
}
#endif