<commit_before>#include "musicremotewidgetforsquare.h"
#include "musicsettingmanager.h"

MusicRemoteWidgetForSquare::MusicRemoteWidgetForSquare(QWidget *parent)
    : MusicRemoteWidget(parent)
{
    setGeometry(200,200,100,100);
    setAttribute(Qt::WA_TranslucentBackground);

    QSize windowSize = M_SETTING->value(MusicSettingManager::ScreenSize).toSize();
    move( windowSize.width() - width() - 150, height() + 70);

    m_PreSongButton->setStyleSheet(MusicUIObject::MPushButtonStyle12);
    m_NextSongButton->setStyleSheet(MusicUIObject::MPushButtonStyle12);
    m_PlayButton->setStyleSheet(MusicUIObject::MPushButtonStyle12);
    m_SettingButton->setStyleSheet(MusicUIObject::MPushButtonStyle12);
    m_showMainWindow->setIconSize(QSize(40,40));
    m_PreSongButton->setIconSize(QSize(30,30));
    m_NextSongButton->setIconSize(QSize(30,30));
    m_PlayButton->setIconSize(QSize(30,30));
    m_SettingButton->setIconSize(QSize(30,30));
    m_mainWidget->setStyleSheet("#mainWidget{" + MusicUIObject::MCustomStyle09 + "}");

    QGridLayout* grid = new QGridLayout(this);
    for(int i=0; i<3; i++)
    {
        grid->setRowMinimumHeight(i, 30);
        grid->setRowStretch(i, 1);
    }
    for(int j=0; j<3; j++)
    {
        grid->setColumnMinimumWidth(j, 30);
        grid->setColumnStretch(j, 1);
    }
    m_PreSongButton->setFixedSize(50,50);
    m_NextSongButton->setFixedSize(50,50);
    m_PlayButton->setFixedSize(50,50);
    m_SettingButton->setFixedSize(50,50);
    m_mainWidget->setFixedSize(70,70);
    grid->addWidget(m_PlayButton,0,1,Qt::AlignCenter);
    grid->addWidget(m_PreSongButton,1,0,Qt::AlignCenter);
    grid->addWidget(m_NextSongButton,1,2,Qt::AlignCenter);
    grid->addWidget(m_SettingButton,2,1,Qt::AlignCenter);
    grid->addWidget(m_mainWidget,1,1,Qt::AlignCenter);

    QVBoxLayout *mainWidgetLayout = new QVBoxLayout(m_mainWidget);
    mainWidgetLayout->setContentsMargins(0,0,0,0);
    mainWidgetLayout->setSpacing(0);
    mainWidgetLayout->addWidget(m_showMainWindow);
    mainWidgetLayout->setAlignment(m_showMainWindow,Qt::AlignCenter);
    mainWidgetLayout->addWidget(m_volumeWidget);
    m_showMainWindow->setFixedSize(30,40);

    m_interval = 0.0f;
    for(int i=0; i<4; ++i)
    {
        m_effect[i] = new QGraphicsOpacityEffect(this);
        m_effect[i]->setOpacity(m_interval);
    }

    connect(&m_enterTimer, SIGNAL(timeout()), SLOT(enterTimeout()));
    connect(&m_leaveTimer, SIGNAL(timeout()), SLOT(leaveTimeout()));
}

MusicRemoteWidgetForSquare::~MusicRemoteWidgetForSquare()
{
    for(int i=0; i<4; ++i)
    {
        delete m_effect[i];
    }
}

void MusicRemoteWidgetForSquare::enterEvent(QEvent *event)
{
    QWidget::enterEvent(event);<commit_msg>clean code for musicremotesquare[875414]<commit_after>#include "musicremotewidgetforsquare.h"
#include "musicsettingmanager.h"

MusicRemoteWidgetForSquare::MusicRemoteWidgetForSquare(QWidget *parent)
    : MusicRemoteWidget(parent)
{
    setGeometry(200, 200, 100, 100);
    setAttribute(Qt::WA_TranslucentBackground);

    QSize windowSize = M_SETTING->value(MusicSettingManager::ScreenSize).toSize();
    move( windowSize.width() - width() - 150, height() + 70);

    m_PreSongButton->setStyleSheet(MusicUIObject::MPushButtonStyle12);
    m_NextSongButton->setStyleSheet(MusicUIObject::MPushButtonStyle12);
    m_PlayButton->setStyleSheet(MusicUIObject::MPushButtonStyle12);
    m_SettingButton->setStyleSheet(MusicUIObject::MPushButtonStyle12);
    m_showMainWindow->setIconSize(QSize(40, 40));
    m_PreSongButton->setIconSize(QSize(30, 30));
    m_NextSongButton->setIconSize(QSize(30, 30));
    m_PlayButton->setIconSize(QSize(30, 30));
    m_SettingButton->setIconSize(QSize(30, 30));
    m_mainWidget->setStyleSheet("#mainWidget{" + MusicUIObject::MCustomStyle09 + "}");

    QGridLayout* grid = new QGridLayout(this);
    for(int i=0; i<3; i++)
    {
        grid->setRowMinimumHeight(i, 30);
        grid->setRowStretch(i, 1);
    }
    for(int j=0; j<3; j++)
    {
        grid->setColumnMinimumWidth(j, 30);
        grid->setColumnStretch(j, 1);
    }
    m_PreSongButton->setFixedSize(50, 50);
    m_NextSongButton->setFixedSize(50, 50);
    m_PlayButton->setFixedSize(50, 50);
    m_SettingButton->setFixedSize(50, 50);
    m_mainWidget->setFixedSize(70, 70);
    grid->addWidget(m_PlayButton, 0, 1, Qt::AlignCenter);
    grid->addWidget(m_PreSongButton, 1, 0, Qt::AlignCenter);
    grid->addWidget(m_NextSongButton, 1, 2, Qt::AlignCenter);
    grid->addWidget(m_SettingButton, 2, 1, Qt::AlignCenter);
    grid->addWidget(m_mainWidget, 1, 1, Qt::AlignCenter);

    QVBoxLayout *mainWidgetLayout = new QVBoxLayout(m_mainWidget);
    mainWidgetLayout->setContentsMargins(0, 0, 0, 0);
    mainWidgetLayout->setSpacing(0);
    mainWidgetLayout->addWidget(m_showMainWindow);
    mainWidgetLayout->setAlignment(m_showMainWindow, Qt::AlignCenter);
    mainWidgetLayout->addWidget(m_volumeWidget);
    m_showMainWindow->setFixedSize(30, 40);

    m_interval = 0.0f;
    for(int i=0; i<4; ++i)
    {
        m_effect[i] = new QGraphicsOpacityEffect(this);
        m_effect[i]->setOpacity(m_interval);
    }

    connect(&m_enterTimer, SIGNAL(timeout()), SLOT(enterTimeout()));
    connect(&m_leaveTimer, SIGNAL(timeout()), SLOT(leaveTimeout()));
}

MusicRemoteWidgetForSquare::~MusicRemoteWidgetForSquare()
{
    for(int i=0; i<4; ++i)
    {
        delete m_effect[i];
    }
}

void MusicRemoteWidgetForSquare::enterEvent(QEvent *event)
{
    QWidget::enterEvent(event);
{'fraction_non_alphanumeric': 0.14493809176984704, 'fraction_numerical': 0.03823743627093955, 'mean_word_length': 5.2633979475484605, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6260901', 'n_tokens_mistral': 2063, 'n_tokens_neox': 1896, 'n_words': 227}