2023-02-27 18:46:39 +08:00
|
|
|
|
#include "WindowHelper.h"
|
|
|
|
|
|
|
|
|
|
WindowHelper::WindowHelper(QObject *parent)
|
|
|
|
|
: QObject{parent}
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-27 23:04:52 +08:00
|
|
|
|
void WindowHelper::setTitle(const QString& text){
|
|
|
|
|
window->setTitle(text);
|
2023-02-27 18:46:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-02-27 23:04:52 +08:00
|
|
|
|
void WindowHelper::initWindow(FramelessView* window){
|
|
|
|
|
this->window = window;
|
2023-02-27 18:46:39 +08:00
|
|
|
|
}
|
2023-03-01 11:58:30 +08:00
|
|
|
|
|
|
|
|
|
void WindowHelper::setMinimumSize(const QSize &size){
|
|
|
|
|
this->window->setMinimumSize(size);
|
|
|
|
|
}
|
|
|
|
|
void WindowHelper::setMaximumSize(const QSize &size){
|
|
|
|
|
this->window->setMaximumSize(size);
|
|
|
|
|
}
|
2023-03-01 22:06:48 +08:00
|
|
|
|
|
2023-03-02 00:35:58 +08:00
|
|
|
|
void WindowHelper::refreshWindow(){
|
|
|
|
|
this->window->setFlag(Qt::FramelessWindowHint,true);
|
|
|
|
|
this->window->setFlag(Qt::FramelessWindowHint,false);
|
2023-03-01 22:06:48 +08:00
|
|
|
|
}
|