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,47 @@
#include "rm_widget_style_base.h"
#include <QStyleOption>
#include <QPainter>
RMWidgetStyleBase::RMWidgetStyleBase(QWidget *parent,QString styleChangeName,bool bEvent) : RMWidgetBase(parent,bEvent)
{
if(styleChangeName.isEmpty() == false)
{
setObjectName(styleChangeName);
normalStyle = styleChangeName;
}
}
void RMWidgetStyleBase::paintEvent(QPaintEvent *pe)
{
Q_UNUSED(pe);
QStyleOption o;
o.initFrom(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &o, &p, this);
}
void RMWidgetStyleBase::onAppEvent(RMApp::Event event,int param)
{
Q_UNUSED(param)
if(normalStyle.isEmpty() == false)
{
bool bUpdate = false;
if(event == RMApp::WillNormalScreen)
{
setObjectName(normalStyle);
bUpdate = true;
}
else if (event == RMApp::WillFullScreen)
{
setObjectName("");
bUpdate = true;
}
if (bUpdate)
{
style()->unpolish(this);
style()->polish(this);
update();
}
}
}