first commit
This commit is contained in:
40
project/fm_viewer/ui/rm_frame_top.cpp
Normal file
40
project/fm_viewer/ui/rm_frame_top.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "rm_frame_top.h"
|
||||
#if (DUAL_VIEWER)
|
||||
#define TOP_FRAME_HEIGHT (MAIN_VIDEO_CONTROL_HEIGHT+10)
|
||||
|
||||
RMFrameTop::RMFrameTop(QWidget *parent) : RMWidgetBase(parent,true)
|
||||
{
|
||||
this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
|
||||
this->setFixedHeight(MAIN_VIDEO_CONTROL_HEIGHT+10);
|
||||
|
||||
layout = new QHBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setSpacing(0);
|
||||
|
||||
frameMainVideo = new RMFrameVideoMain(this);
|
||||
layout->addWidget(frameMainVideo);
|
||||
|
||||
frameVideoSub = new RMFrameVideoSub(this);
|
||||
layout->addWidget(frameVideoSub);
|
||||
|
||||
// 끄기
|
||||
frameVideoSub->dualOff(true);
|
||||
}
|
||||
void RMFrameTop::onAppEvent(RMApp::Event event,int param)
|
||||
{
|
||||
if(event == RMApp::WillFullScreen || event == RMApp::WillNormalScreen)
|
||||
{
|
||||
bool bFullScreen = (event == RMApp::WillFullScreen) ? true : false;
|
||||
if(bFullScreen)
|
||||
{
|
||||
this->setFixedSize(QWIDGETSIZE_MAX,QWIDGETSIZE_MAX);
|
||||
this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Fixed);
|
||||
this->setFixedHeight(TOP_FRAME_HEIGHT);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // DUAL_VIEWER
|
||||
Reference in New Issue
Block a user