713 lines
24 KiB
C++
713 lines
24 KiB
C++
#include "fm_frame_title.h"
|
|
#include "../fm_dimensions.h"
|
|
#include <QStyleOption>
|
|
#include <QPainter>
|
|
#include <QHBoxLayout>
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
#include <QToolButton>
|
|
#include <QDesktopServices>
|
|
#include <QFileInfo>
|
|
|
|
#include "rm_app.h"
|
|
#include "../data/rm_video_item_2ch.h"
|
|
#include "../core/rm_player.h"
|
|
#include "../core/rm_play_process.h"
|
|
#include "rm_popup.h"
|
|
#include "fm_button.h"
|
|
#include "../core/fm_strings.h"
|
|
|
|
#if (USER_LOGER || RM_MODEL_EMT_KR)
|
|
#include "fm_label_click.h"
|
|
#include <QTimer>
|
|
#endif // #if (USER_LOGER)
|
|
|
|
|
|
#if (USE_JP_ADDRESS_TOOL)
|
|
#include "../data/fm_address.h"
|
|
#endif // USE_JP_ADDRESS_TOOL
|
|
|
|
#include "rm_dialog_map.h"
|
|
|
|
|
|
|
|
|
|
FMFrameTitle::FMFrameTitle(QWidget *parent, QString title, QString icon) : RMWidgetBase(parent,true)
|
|
{
|
|
#if (RM_MODEL_EMT_KR)
|
|
setStyleSheet("FMFrameTitle{border-image: url(:/image/title_bg.png) 0 0 0 0 repeat stretch;}");
|
|
this->setFixedHeight(MAIN_TITLE_BAR_HEIGHT);
|
|
this->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Fixed);
|
|
_layout = new QHBoxLayout(this);
|
|
ZERO_LAYOUT(_layout);
|
|
_layout->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
|
LAYOUT_SPACE(_layout,8,0);
|
|
|
|
if(icon.isEmpty() == false || title.isEmpty() == false)
|
|
{
|
|
_titleLabel = new FMClickURLLabel("https://nexian.kr",this);
|
|
if(icon.isEmpty() == false)
|
|
{
|
|
_titleLabel->setPixmap( QPixmap(":/image/" + icon) );
|
|
_titleLabel->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Preferred);
|
|
_titleLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
|
_titleLabel->setOpenExternalLinks(true);
|
|
}
|
|
else if (title.isEmpty() == false)
|
|
{
|
|
_titleLabel->setText(title);
|
|
_titleLabel->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
|
|
}
|
|
_layout->addWidget(_titleLabel);
|
|
}
|
|
|
|
// 모델 정보
|
|
_modelInfo = new QLabel(this);
|
|
_modelInfo->setAccessibleName("model_info_label"); // 자동화를 위해 사용
|
|
_layout->addWidget(_modelInfo);
|
|
// font-family: Fixedsys; border: 1px solid red;
|
|
_modelInfo->setStyleSheet("font-family: Arial;font-weight:bold;font-size: 14px;color : #CCCCCC;");
|
|
_modelInfo->setText("---"); // NP5000 v.0.0.2
|
|
_modelInfo->setFixedHeight(22);
|
|
_modelInfo->setAlignment(Qt::AlignBottom);
|
|
|
|
#if (REPORT_CRASH_LOG)
|
|
_modelInfo->setText(QString().sprintf("[ver.%d.%d.%d.%d] CRASH REPORT VERSION",RM_MODEL_VERSION_0,RM_MODEL_VERSION_1,RM_MODEL_VERSION_2,RM_MODEL_SVN_VERSION));
|
|
#endif //
|
|
|
|
// 툴바 우측부터 추가
|
|
QWidget* toolBar = new QWidget(this);
|
|
//LAYOUT_DEBUG(toolBar);
|
|
//toolBar->setStyleSheet("border: 1px solid red;");
|
|
toolBar->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
|
|
_layout->addWidget(toolBar);
|
|
|
|
QHBoxLayout* toolBarLayout = new QHBoxLayout(toolBar);
|
|
ZERO_LAYOUT(toolBarLayout);
|
|
toolBarLayout->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
|
|
|
QSize btnSize = QSize(36,36);
|
|
toolBarLayout->setAlignment(Qt::AlignRight);
|
|
|
|
// 순서는 보고서, 분할, 캡쳐, 지도, 설정, 도움말, 최소화, 닫기
|
|
const int tool_space = 1;
|
|
|
|
// 보고서
|
|
_reportButton = FMButton::btn2(toolBar,toolBarLayout,"title_report","report",btnSize);
|
|
_reportButton->setEnabled(false);
|
|
#if (RM_MODEL_EMT_KR)
|
|
_reportButton->setVisible(false);
|
|
#endif // RM_MODEL_EMT_KR
|
|
LAYOUT_SPACE(toolBarLayout,tool_space,0);
|
|
|
|
// 분할
|
|
#if (SUPPORT_AVI_SPLIT || SPLIT_MULTI_TRACK_VIDEO)
|
|
_btnExport = FMButton::btn2(toolBar,toolBarLayout,"title_split","split_files",btnSize,0);
|
|
_btnExport->setEnabled(false);
|
|
LAYOUT_SPACE(toolBarLayout,tool_space,0);
|
|
#endif
|
|
|
|
// 캡쳐
|
|
_captureButton = FMButton::btn2(toolBar,toolBarLayout,"title_capture","capture",btnSize);
|
|
_captureButton->setEnabled(false);
|
|
LAYOUT_SPACE(toolBarLayout,tool_space,0);
|
|
|
|
// 지도
|
|
_mapButton = FMButton::btn2(toolBar,toolBarLayout,"title_map","map",btnSize);
|
|
LAYOUT_SPACE(toolBarLayout,tool_space,0);
|
|
|
|
// 설정
|
|
_settingsButton = FMButton::btn2(toolBar,toolBarLayout,"title_setup","settings",btnSize);
|
|
_settingsButton->setEnabled(false);
|
|
LAYOUT_SPACE(toolBarLayout,tool_space,0);
|
|
|
|
// 도움말
|
|
_infoButton = FMButton::btn2(toolBar,toolBarLayout,"title_info","viewer_info",btnSize);
|
|
LAYOUT_SPACE(toolBarLayout,tool_space,0);
|
|
|
|
QLabel* seperator = new QLabel(toolBar);
|
|
seperator->setFixedSize(5,36);
|
|
seperator->setPixmap(QPixmap(":/image/title_seperator.png") );
|
|
toolBarLayout->addWidget(seperator);
|
|
|
|
_minimizeButton = FMButton::btn2(toolBar,toolBarLayout,"title_minimize","minimize",btnSize);
|
|
LAYOUT_SPACE(toolBarLayout,tool_space,0);
|
|
|
|
// 最大化
|
|
#if (USE_MAXIMIZE)
|
|
maximizeButton = FMButton::btnCheck2(toolBar,toolBarLayout,"title_maximize","maximize",btnSize);
|
|
LAYOUT_SPACE(toolBarLayout,2,0);
|
|
#endif
|
|
|
|
_closeButton = FMButton::btn2(toolBar,toolBarLayout,"title_close","close",btnSize);
|
|
LAYOUT_SPACE(toolBarLayout,8,0);
|
|
|
|
#if !(SETUP_ONLY_BUILD)
|
|
connect(RMPlayer::instance(),SIGNAL(playEvent(PLAY_EVENT,RMVideoItem*)),SLOT(onPlayEvent(PLAY_EVENT,RMVideoItem*)));
|
|
#endif //
|
|
|
|
_reportShortcut = new QShortcut(QKeySequence(Qt::Key_F3), this);
|
|
_reportShortcut->setContext(Qt::ApplicationShortcut);
|
|
_settingsShortcut = new QShortcut(QKeySequence(Qt::Key_F6), this);
|
|
_settingsShortcut->setContext(Qt::ApplicationShortcut);
|
|
|
|
_infoShortcut = new QShortcut(QKeySequence(Qt::Key_F7), this);
|
|
_infoShortcut->setContext(Qt::ApplicationShortcut);
|
|
|
|
_captureShortcut = new QShortcut(QKeySequence(Qt::Key_F5), this);
|
|
_captureShortcut->setContext(Qt::ApplicationShortcut);
|
|
_captureShortcut->setEnabled(false);
|
|
|
|
#else // #if (RM_MODEL_EMT_KR)
|
|
setStyleSheet("FMFrameTitle{border-image: url(:/image/title_bg.png) 0 0 0 0 repeat stretch;}");
|
|
|
|
#if (USER_LOGER)
|
|
_clickCount = 0;
|
|
_versionLabel = NULL;
|
|
_clickReset = NULL;
|
|
#endif
|
|
|
|
this->setFixedHeight(MAIN_TITLE_BAR_HEIGHT);
|
|
this->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Fixed);
|
|
_layout = new QHBoxLayout(this);
|
|
ZERO_LAYOUT(_layout);
|
|
_layout->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
|
|
|
LAYOUT_SPACE(_layout,8,0);
|
|
#if (USE_TEXT_TITLE)
|
|
_titleLabel = new QLabel(this);
|
|
|
|
#if (RM_MODEL == RM_MODEL_TYPE_FC_DR232W)
|
|
_titleLabel->setPixmap( QPixmap(":/image/title_logo_nx.png") );
|
|
_titleLabel->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Preferred);
|
|
#else // RM_MODEL_TYPE_FC_DR232W
|
|
#if (SUB_MODEL_KEIYO_KR)
|
|
_titleLabel->setText(WINDOW_TITLE);
|
|
#elif (SUB_MODEL_KEIYO_360)
|
|
#if (ARCH_64_BIT)
|
|
_titleLabel->setText("Golf Cart Eyes");
|
|
#else
|
|
_titleLabel->setText("Golf Cart Eyes");
|
|
#endif // ARCH_64_BIT
|
|
#else //SUB_MODEL_KEIYO_KR
|
|
#if (ARCH_64_BIT)
|
|
_titleLabel->setText("DVPlayer 2B");
|
|
#else
|
|
_titleLabel->setText("DVPlayer 2A");
|
|
#endif // ARCH_64_BIT
|
|
#endif // SUB_MODEL_KEIYO_KR
|
|
|
|
|
|
#endif // FC_DR232W
|
|
_titleLabel->setStyleSheet("font-family: Arial; font-size: 16px; font-weight: bold; color : #BBBBBB");
|
|
_layout->addWidget(_titleLabel);
|
|
LAYOUT_SPACE(_layout,10,0);
|
|
#if (RM_MODEL != RM_MODEL_TYPE_FC_DR232W)
|
|
QLabel* versionLabel = new QLabel(this);
|
|
versionLabel->setText(QString().sprintf("[ Ver.%d.%d.%d ]",RM_MODEL_VERSION_0,RM_MODEL_VERSION_1,RM_MODEL_VERSION_2));
|
|
versionLabel->setStyleSheet("font-family: Arial; font-size: 13px; color : #BBBBBB");
|
|
_layout->addWidget(versionLabel);
|
|
#endif
|
|
|
|
#else
|
|
if(icon.isEmpty() == false || title.isEmpty() == false)
|
|
{
|
|
_titleLabel = new QLabel(this);
|
|
if(icon.isEmpty() == false)
|
|
{
|
|
_titleLabel->setPixmap( QPixmap(":/image/" + icon) );
|
|
_titleLabel->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Preferred);
|
|
}
|
|
else if (title.isEmpty() == false)
|
|
{
|
|
_titleLabel->setText(title);
|
|
_titleLabel->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
|
|
}
|
|
_layout->addWidget(_titleLabel);
|
|
}
|
|
#endif
|
|
|
|
#if (RM_MODEL == RM_MODEL_TYPE_TB4000 && !PLAYER_ONLY_LIBRARY_MODE)
|
|
FMClickLabel* versionLabel = new FMClickLabel(this);
|
|
// DEFINES += RM_MODEL_VERSION_0=0
|
|
#if (REPORT_CRASH_LOG)
|
|
versionLabel->setText(QString().sprintf("[ver.%d.%d.%d.%d] CRASH REPORT VERSION",RM_MODEL_VERSION_0,RM_MODEL_VERSION_1,RM_MODEL_VERSION_2,RM_MODEL_SVN_VERSION));
|
|
#else // REPORT_CRASH_LOG
|
|
QString versionString = QString().sprintf("[ver.%d.%d.%d]",RM_MODEL_VERSION_0,RM_MODEL_VERSION_1,RM_MODEL_VERSION_2);
|
|
#if (TB5000_INSPECTION_VERSION)
|
|
versionString += " [INSPECTION]";
|
|
#endif //
|
|
versionLabel->setText(versionString);
|
|
|
|
#endif // REPORT_CRASH_LOG
|
|
versionLabel->setStyleSheet("font-family: Fixedsys;color : #FFFFFF");
|
|
connect(versionLabel,SIGNAL(clicked()),SLOT(onVersion()));
|
|
_layout->addWidget(versionLabel);
|
|
#endif // RM_MODEL_TYPE_TB4000
|
|
|
|
#if (USER_LOGER)
|
|
_versionLabel = versionLabel;
|
|
#endif // USER_LOGER
|
|
|
|
#if (USE_FILE_NAME_TITLE)
|
|
LAYOUT_SPACE(_layout,10,0);
|
|
_fileNameTitle = new QLabel(this);
|
|
//_fileNameTitle->setText("________________________________________");
|
|
_fileNameTitle->setStyleSheet("font-family: Arial; font-size: 13px; color : #BBBBBB");
|
|
_layout->addWidget(_fileNameTitle);
|
|
#endif
|
|
// 툴바 우측부터 추가
|
|
QWidget* toolBar = new QWidget(this);
|
|
//LAYOUT_DEBUG(toolBar);
|
|
//toolBar->setStyleSheet("border: 1px solid red;");
|
|
toolBar->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
|
|
_layout->addWidget(toolBar);
|
|
|
|
QHBoxLayout* toolBarLayout = new QHBoxLayout(toolBar);
|
|
ZERO_LAYOUT(toolBarLayout);
|
|
toolBarLayout->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
|
|
|
|
QSize btnSize = QSize(36,36);
|
|
toolBarLayout->setAlignment(Qt::AlignRight);
|
|
|
|
#if (USE_JP_ADDRESS_TOOL)
|
|
_toolButton = FMButton::btn(toolBar,toolBarLayout,"title_report","CONVERT",btnSize);
|
|
LAYOUT_SPACE(toolBarLayout,2,0);
|
|
connect(_toolButton,SIGNAL(clicked()),SLOT(onAddressTool()));
|
|
#endif
|
|
|
|
#if (SUPPORT_AVI_SPLIT)
|
|
_btnExport = FMButton::btn(toolBar,toolBarLayout,"vt_split",FMS::txt("split_files"),btnSize,0);
|
|
_btnExport->setEnabled(false);
|
|
//LAYOUT_SPACE(titleToolLayout,6,0);
|
|
#endif
|
|
|
|
#if !(RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
// レポート
|
|
#if (LIVE_LANGUAGE2)
|
|
_reportButton = FMButton::btn2(toolBar,toolBarLayout,"title_report","report",btnSize);
|
|
#else // LIVE_LANGUAGE2
|
|
_reportButton = FMButton::btn(toolBar,toolBarLayout,"title_report",FMS::txt("report"),btnSize);
|
|
#endif // LIVE_LANGUAGE2
|
|
_reportButton->setEnabled(false);
|
|
LAYOUT_SPACE(toolBarLayout,2,0);
|
|
#if !(RM_MODEL == RM_MODEL_TYPE_XLDR_88 || RM_MODEL == RM_MODEL_TYPE_EMT_KR)
|
|
_reportButton->setHidden(true);
|
|
#endif
|
|
|
|
#if (LIVE_LANGUAGE2)
|
|
// JPG 保存
|
|
_captureButton = FMButton::btn2(toolBar,
|
|
toolBarLayout,
|
|
"title_capture",
|
|
"capture",
|
|
btnSize);
|
|
#else // LIVE_LANGUAGE2
|
|
// JPG 保存
|
|
_captureButton = FMButton::btn(toolBar,
|
|
toolBarLayout,
|
|
"title_capture",
|
|
FMS::txt("capture"),
|
|
btnSize);
|
|
|
|
#endif // LIVE_LANGUAGE2
|
|
_captureButton->setEnabled(false);
|
|
LAYOUT_SPACE(toolBarLayout,2,0);
|
|
#endif // #if !(RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
// 設定
|
|
#if (LIVE_LANGUAGE2)
|
|
_settingsButton = FMButton::btn2(toolBar,toolBarLayout,"title_setup","settings",btnSize);
|
|
#else // LIVE_LANGUAGE2
|
|
#if (RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
_settingsButton = FMButton::btnTypeTextColor(toolBar, toolBarLayout,"PW", FMS::txt("password"),btnSize,g_default_text_button_color_set);
|
|
#else // RM_MODEL_TYPE_TB4000
|
|
_settingsButton = FMButton::btn(toolBar,toolBarLayout,"title_setup",MKU8("\xe8\xa8\xad\xe5\xae\x9a"),btnSize);
|
|
#endif // RM_MODEL_TYPE_TB4000
|
|
|
|
#endif // LIVE_LANGUAGE2
|
|
LAYOUT_SPACE(toolBarLayout,2,0);
|
|
#if !(RM_MODEL == RM_MODEL_TYPE_XLDR_88 || RM_MODEL == RM_MODEL_TYPE_TB4000 || RM_MODEL == RM_MODEL_TYPE_AN6000 || RM_MODEL == RM_MODEL_TYPE_EMT_KR)
|
|
_settingsButton->setHidden(true);
|
|
#endif
|
|
|
|
#if !(RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
// ビューアー情報
|
|
#if (LIVE_LANGUAGE2)
|
|
_infoButton = FMButton::btn2(toolBar,
|
|
toolBarLayout,
|
|
"title_info",
|
|
"viewer_info",
|
|
btnSize);
|
|
#else // LIVE_LANGUAGE2
|
|
_infoButton = FMButton::btn(toolBar,
|
|
toolBarLayout,
|
|
"title_info",
|
|
FMS::txt("viewer_info"),
|
|
btnSize);
|
|
#endif // LIVE_LANGUAGE2
|
|
LAYOUT_SPACE(toolBarLayout,2,0);
|
|
//_infoButton->setHidden(true);
|
|
|
|
#if (LIVE_LANGUAGE_CHANGE)
|
|
|
|
#if (LIVE_LANGUAGE2)
|
|
_languageButton = FMButton::btn2(toolBar,toolBarLayout,"title_language","language",btnSize);
|
|
#else // LIVE_LANGUAGE2
|
|
// 言語選択
|
|
_languageButton = FMButton::btn(toolBar,toolBarLayout,"title_language",FMS::txt("language"),btnSize);
|
|
RMLanguage::instance()->appendENGToolTip(_languageButton,"Language");
|
|
#endif // LIVE_LANGUAGE2
|
|
connect(_languageButton,SIGNAL(clicked()),SLOT(onLanguage()));
|
|
LAYOUT_SPACE(toolBarLayout,2,0);
|
|
#if !(LIVE_LANGUAGE2)
|
|
_languageButton->setHidden(true);
|
|
#endif // SUB_MODEL_BV5000
|
|
|
|
#if (RM_MODEL == RM_MODEL_TYPE_EMT_KR)
|
|
_languageButton->setHidden(true);
|
|
#endif // RM_MODEL_TYPE_EMT_KR
|
|
|
|
#endif // LIVE_LANGUAGE_CHANGE
|
|
|
|
#if !(DO_NOT_USE_MAP)
|
|
#if !(TOGGLE_PLAYER)
|
|
// 지도 MKU8("\xe5\x9c\xb0\xe5\x9b\xb3")
|
|
#if (LIVE_LANGUAGE2)
|
|
_mapButton = FMButton::btn2(toolBar,toolBarLayout,"title_map","map",btnSize);
|
|
#else // LIVE_LANGUAGE2
|
|
#if (USE_GOOGLE_MAP_AND_OSM)
|
|
_mapButton = FMButton::btn(toolBar,toolBarLayout,"title_gmap",FMS::txt("map"),btnSize);
|
|
#else // USE_GOOGLE_MAP_AND_OSM
|
|
_mapButton = FMButton::btn(toolBar,toolBarLayout,"title_map",FMS::txt("map"),btnSize);
|
|
#endif // USE_GOOGLE_MAP_AND_OSM
|
|
#endif // LIVE_LANGUAGE2
|
|
|
|
#if (USE_GOOGLE_MAP_AND_OSM)
|
|
_mapButton->setToolTip("Google " + FMS::txt("map"));
|
|
_mapOSMButton = FMButton::btn(toolBar,toolBarLayout,"title_map","OpenStreet " + FMS::txt("map"),btnSize);
|
|
#endif // USE_GOOGLE_MAP_AND_OSM
|
|
|
|
LAYOUT_SPACE(toolBarLayout,12,0);
|
|
#endif // TOGGLE_PLAYER
|
|
|
|
#if (RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
_mapButton->setHidden(true);
|
|
#endif
|
|
#endif // #if !(DO_NOT_USE_MAP)
|
|
#endif // #if !(RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
|
|
#if (LIVE_LANGUAGE2)
|
|
_minimizeButton = FMButton::btn2(toolBar,
|
|
toolBarLayout,
|
|
"title_minimize",
|
|
"minimize",
|
|
btnSize);
|
|
#else // LIVE_LANGUAGE2
|
|
_minimizeButton = FMButton::btn(toolBar,
|
|
toolBarLayout,
|
|
"title_minimize",
|
|
FMS::txt("minimize"),
|
|
btnSize);
|
|
#endif // LIVE_LANGUAGE2
|
|
|
|
|
|
|
|
LAYOUT_SPACE(toolBarLayout,2,0);
|
|
|
|
// 最大化
|
|
#if (USE_MAXIMIZE)
|
|
#if (LIVE_LANGUAGE2)
|
|
maximizeButton = FMButton::btnCheck2(toolBar,toolBarLayout,"title_maximize","maximize",btnSize);
|
|
#else // LIVE_LANGUAGE2
|
|
maximizeButton = FMButton::btnCheck(toolBar,toolBarLayout,"title_maximize",FMS::txt("maximize"),btnSize);
|
|
#endif // LIVE_LANGUAGE2
|
|
#endif
|
|
|
|
LAYOUT_SPACE(toolBarLayout,2,0);
|
|
|
|
// 閉じる MKU8("\xe9\x96\x89\xe3\x81\x98\xe3\x82\x8b"),
|
|
#if (LIVE_LANGUAGE2)
|
|
_closeButton = FMButton::btn2(toolBar,
|
|
toolBarLayout,
|
|
"title_close",
|
|
"close",
|
|
btnSize);
|
|
#else // LIVE_LANGUAGE2
|
|
_closeButton = FMButton::btn(toolBar,
|
|
toolBarLayout,
|
|
"title_close",
|
|
FMS::txt("close"),
|
|
btnSize);
|
|
#endif // LIVE_LANGUAGE2
|
|
|
|
LAYOUT_SPACE(toolBarLayout,8,0);
|
|
#if !(LIVE_LANGUAGE2)
|
|
#if(LIVE_LANGUAGE_CHANGE)
|
|
|
|
RMLanguage* lng = RMLanguage::instance();
|
|
lng->appendENGToolTip(_minimizeButton,"Minimize");
|
|
//#if !defined(MODEL_WATEX) // WATEX 는 전체화면 툴바에 있음
|
|
// lng->appendENGToolTip(_fullScreenButton,"Full Screen");
|
|
//#endif
|
|
lng->appendENGToolTip(_closeButton,"Exit");
|
|
#endif
|
|
#endif // #if (LIVE_LANGUAGE2)
|
|
|
|
#if !(SETUP_ONLY_BUILD)
|
|
connect(RMPlayer::instance(),SIGNAL(playEvent(PLAY_EVENT,RMVideoItem*)),SLOT(onPlayEvent(PLAY_EVENT,RMVideoItem*)));
|
|
#endif //
|
|
|
|
#if !(RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
#if !(REMOVE_ALL_SHORT_CUTS)
|
|
#if !(REMOVE_REPORT)
|
|
_reportShortcut = new QShortcut(QKeySequence(Qt::Key_F3), this);
|
|
_reportShortcut->setContext(Qt::ApplicationShortcut);
|
|
#endif
|
|
_settingsShortcut = new QShortcut(QKeySequence(Qt::Key_F6), this);
|
|
_settingsShortcut->setContext(Qt::ApplicationShortcut);
|
|
|
|
_infoShortcut = new QShortcut(QKeySequence(Qt::Key_F7), this);
|
|
_infoShortcut->setContext(Qt::ApplicationShortcut);
|
|
|
|
_captureShortcut = new QShortcut(QKeySequence(Qt::Key_F5), this);
|
|
_captureShortcut->setContext(Qt::ApplicationShortcut);
|
|
_captureShortcut->setEnabled(false);
|
|
#endif
|
|
#endif // #if !(RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
|
|
#if !(RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
#if !(LIVE_LANGUAGE2)
|
|
#if(LIVE_LANGUAGE_CHANGE)
|
|
// WFF_800C
|
|
#if !(REMOVE_REPORT)
|
|
lng->appendENGToolTip(_reportButton,"Report");
|
|
#endif
|
|
lng->appendENGToolTip(_settingsButton,"Settings");
|
|
lng->appendENGToolTip(_infoButton,"Info");
|
|
lng->appendENGToolTip(_captureButton,"Capture");
|
|
#endif
|
|
#endif // #if (LIVE_LANGUAGE2)
|
|
#endif // #if !(RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
#endif // #if (RM_MODEL_EMT_KR)
|
|
|
|
#if(PROFILE_BUILD)
|
|
setStyleSheet("FMFrameTitle{ background-color: #007a0c;}");
|
|
style()->unpolish(this);
|
|
style()->polish(this);
|
|
#endif // PROFILE_BUILD
|
|
}
|
|
|
|
#if (USER_LOGER)
|
|
void FMFrameTitle::_clearClickTimer()
|
|
{
|
|
if(_clickReset != NULL)
|
|
{
|
|
_clickReset->stop();
|
|
delete _clickReset;
|
|
_clickReset = NULL;
|
|
}
|
|
}
|
|
|
|
void FMFrameTitle::onVersion()
|
|
{
|
|
if(_clickCount == 0) {
|
|
_clearClickTimer();
|
|
_clickReset = new QTimer(this);
|
|
_clickReset->setSingleShot(true);
|
|
_clickReset->setInterval(2000);
|
|
connect(_clickReset,SIGNAL(timeout()),SLOT(onClickReset()));
|
|
_clickReset->start();
|
|
}
|
|
_clickCount += 1;
|
|
// 토글
|
|
if(_clickCount == 5) {
|
|
RMApp::userLog = !RMApp::userLog;
|
|
_clickCount = 0;
|
|
if(RMApp::userLog) {
|
|
_versionLabel->setStyleSheet("font-family: Fixedsys;color : #FF0000");
|
|
} else {
|
|
_versionLabel->setStyleSheet("font-family: Fixedsys;color : #FFFFFF");
|
|
}
|
|
RMApp::instance()->userLogs.clear();
|
|
_clearClickTimer();
|
|
}
|
|
}
|
|
void FMFrameTitle::onClickReset() {
|
|
_clickCount = 0;
|
|
_clearClickTimer();
|
|
}
|
|
|
|
#endif // #if (USER_LOGER)
|
|
void FMFrameTitle::paintEvent(QPaintEvent *pe)
|
|
{
|
|
Q_UNUSED(pe);
|
|
QStyleOption o;
|
|
o.initFrom(this);
|
|
QPainter p(this);
|
|
style()->drawPrimitive(QStyle::PE_Widget, &o, &p, this);
|
|
}
|
|
#if !(SETUP_ONLY_BUILD)
|
|
void FMFrameTitle::onPlayEvent(PLAY_EVENT event,RMVideoItem* item)
|
|
{
|
|
Q_UNUSED(item)
|
|
#if !(RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
#if (USE_FILE_NAME_TITLE)
|
|
if(event == PLAY_DID_LOADED) {
|
|
_fileNameTitle->setText(item->anyFilePath());
|
|
}
|
|
else if (event == PLAY_DID_CLEARED) {
|
|
_fileNameTitle->setText("");
|
|
}
|
|
#endif // USE_FILE_NAME_TITLE
|
|
|
|
#if (PLAY_CONTINUE_EVENT)
|
|
// 로딩...등 다음파일 플레이시 변화 없도록 처리
|
|
if(event == PLAY_DID_CLEARED && (item != NULL || RMPlayProcess::instance()->isLoadingNextFile()))
|
|
{
|
|
return;
|
|
}
|
|
#endif
|
|
// 사용자 STOP 일 경우 PLAY ITEM CLEAR
|
|
if(event == PLAY_DID_LOADED || event == PLAY_DID_CLEARED || event == PLAY_DID_USER_STOP)
|
|
{
|
|
#if (SUPPORT_AVI_SPLIT)
|
|
_btnExport->setEnabled(event == PLAY_DID_LOADED && item !=NULL && (QFileInfo(item->anyFilePath()).suffix().toUpper() == "AVI"));
|
|
#endif // SUPPORT_AVI_SPLIT
|
|
#if (SPLIT_MULTI_TRACK_VIDEO)
|
|
_btnExport->setEnabled(event == PLAY_DID_LOADED && item !=NULL);
|
|
#endif // SPLIT_MULTI_TRACK_VIDEO
|
|
|
|
#if (MODEL_STANDARD)
|
|
#if !(REMOVE_REPORT)
|
|
_reportButton->setEnabled(event == PLAY_DID_LOADED);
|
|
#endif
|
|
_captureButton->setEnabled(event == PLAY_DID_LOADED);
|
|
|
|
#if !(REMOVE_ALL_SHORT_CUTS)
|
|
#if !(REMOVE_REPORT)
|
|
_reportShortcut->setEnabled(event == PLAY_DID_LOADED);
|
|
#endif
|
|
_captureShortcut->setEnabled(event == PLAY_DID_LOADED);
|
|
#endif
|
|
|
|
#endif
|
|
}
|
|
#endif // #if !(RM_MODEL == RM_MODEL_TYPE_TB4000)
|
|
}
|
|
#endif // #if !(SETUP_ONLY_BUILD)
|
|
|
|
#if (DUAL_VIEWER)
|
|
void TitleWidget::onMap()
|
|
{
|
|
//qInfo() << "size:" << _videoWidget->size();
|
|
if(RMDialogMap::instance()->isHiddenReal()) {
|
|
RMDialogMap::instance()->show();
|
|
RMDialogMap::instance()->setFocus();
|
|
}
|
|
else
|
|
{
|
|
RMDialogMap::instance()->onClose();
|
|
}
|
|
}
|
|
#endif
|
|
|
|
#if (LIVE_LANGUAGE_CHANGE && (!FIXED_ENGLISH))
|
|
void FMFrameTitle::onLanguage()
|
|
{
|
|
#if (FORCE_FM_STRING)
|
|
#if (SUPPORT_LANGUAGE_INSERT)
|
|
FMS::insert_if_not_exist(1,"select_language",FM_WSTR(L"언어선택"));
|
|
FMS::insert_if_not_exist(2,"select_language",FM_WSTR(L"言語選択"));
|
|
FMS::insert_if_not_exist(3,"select_language",FM_WSTR(L"Select a language"));
|
|
#endif // SUPPORT_LANGUAGE_INSERT
|
|
QString title = FMS::txt("select_language");
|
|
#else
|
|
QString title = RMLanguage::isJP() ? MKU8("\xe8\xa8\x80\xe8\xaa\x9e\xe9\x81\xb8\xe6\x8a\x9e") : "Select a language";
|
|
#endif
|
|
//qInfo() << title << __FUNCTION__;
|
|
RMPopup* dialog = new RMPopup(this,title);
|
|
dialog->createLanguageLayout();
|
|
if(dialog->exec())
|
|
{
|
|
int index = RMPopup::languageIndex;
|
|
RMLanguage::LANGUAGE_TYPE type = RMLanguage::LANGUAGE_JP;
|
|
if(index == 0)
|
|
{
|
|
RMLanguage::isAuto = true;
|
|
type = RMLanguage::systemLanguage();
|
|
RMSettings::instance()->setAutoLanguage(true);
|
|
}
|
|
#if (RC_LANGUAGE == 0x0412)
|
|
else if(index == 1) // KR
|
|
{
|
|
RMLanguage::isAuto = false;
|
|
type = RMLanguage::LANGUAGE_KR;
|
|
RMSettings::instance()->setAutoLanguage(false);
|
|
}
|
|
#endif // #if (RC_LANGUAGE == 0x0412)
|
|
else if(index == 2) // JP
|
|
{
|
|
RMLanguage::isAuto = false;
|
|
type = RMLanguage::LANGUAGE_JP;
|
|
RMSettings::instance()->setAutoLanguage(false);
|
|
}
|
|
#if !(LANGUAGE_REMOVE_ENG)
|
|
else if(index == 3) // EN
|
|
{
|
|
RMLanguage::isAuto = false;
|
|
type = RMLanguage::LANGUAGE_EN;
|
|
RMSettings::instance()->setAutoLanguage(false);
|
|
}
|
|
#endif // MODEL_WATEX
|
|
//qInfo() << "onLanguageSelected:" << type << index;
|
|
if(RMLanguage::instance()->language() != type)
|
|
{
|
|
RMLanguage::instance()->setLanguage(type);
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
void FMFrameTitle::onAppEvent(RMApp::Event event,int param)
|
|
{
|
|
if(event == RMApp::WillFullScreen) {
|
|
#if (USE_MAXIMIZE)
|
|
maximizeButton->setToolTip(FMS::txt("restore_window"));
|
|
if(param == 1) {
|
|
maximizeButton->setChecked(true);
|
|
}
|
|
else {
|
|
setHidden(true);
|
|
}
|
|
#else // USE_MAXIMIZE
|
|
Q_UNUSED(param)
|
|
setHidden(true);
|
|
#endif // USE_MAXIMIZE
|
|
}
|
|
else if (event == RMApp::WillNormalScreen) {
|
|
#if (USE_MAXIMIZE)
|
|
maximizeButton->setToolTip(FMS::txt("maximize"));
|
|
maximizeButton->setChecked(false);
|
|
#endif
|
|
setHidden(false);
|
|
}
|
|
}
|
|
#if (USE_JP_ADDRESS_TOOL)
|
|
void FMFrameTitle::onAddressTool() {
|
|
|
|
if(FMAddress::instance()->open()) {
|
|
QStringList res;
|
|
FMAddress::instance()->search(136.033182,35.380830,res,100);
|
|
qInfo() << res;
|
|
}
|
|
// ,
|
|
// FMAddress add;
|
|
// add.convert("C://home//roadmovie//script//jpaddr//type_1_from_db//ADDR_2TH.csv",
|
|
// "C://home//roadmovie//script//jpaddr//20210120_jp_addr.bin");
|
|
// add.open("C://home//roadmovie//script//jpaddr//20210120_jp_addr.bin");
|
|
// add.verify("C://home//roadmovie//script//jpaddr//type_1_from_db//ADDR_2TH.csv"); // 검증
|
|
}
|
|
|
|
#endif
|
|
|
|
|