mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 11:17:15 +08:00
29 lines
606 B
C++
29 lines
606 B
C++
#include "WindowHelper.h"
|
|
|
|
#include "FluRegister.h"
|
|
#include "FluApp.h"
|
|
|
|
WindowHelper::WindowHelper(QObject *parent)
|
|
: QObject{parent}
|
|
{
|
|
|
|
}
|
|
|
|
void WindowHelper::initWindow(QQuickWindow* window){
|
|
this->window = window;
|
|
}
|
|
|
|
QVariant WindowHelper::createRegister(QQuickWindow* window,const QString& path){
|
|
FluRegister *p = new FluRegister(window);
|
|
p->from(window);
|
|
p->path(path);
|
|
return QVariant::fromValue(p);
|
|
}
|
|
|
|
void WindowHelper::deleteWindow(){
|
|
if(this->window){
|
|
FluApp::getInstance()->wnds.remove(this->window->winId());
|
|
this->window->deleteLater();
|
|
}
|
|
}
|