2023-04-27 17:29:39 +08:00
|
|
|
|
#include "FluTools.h"
|
|
|
|
|
#include <QGuiApplication>
|
|
|
|
|
#include <QClipboard>
|
|
|
|
|
#include <QUuid>
|
|
|
|
|
|
2023-05-11 18:24:58 +08:00
|
|
|
|
FluTools* FluTools::m_instance = nullptr;
|
|
|
|
|
|
|
|
|
|
FluTools *FluTools::getInstance()
|
|
|
|
|
{
|
|
|
|
|
if(FluTools::m_instance == nullptr){
|
|
|
|
|
FluTools::m_instance = new FluTools;
|
|
|
|
|
}
|
|
|
|
|
return FluTools::m_instance;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-04-27 17:29:39 +08:00
|
|
|
|
FluTools::FluTools(QObject *parent)
|
|
|
|
|
: QObject{parent}
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FluTools::clipText(const QString& text){
|
|
|
|
|
QGuiApplication::clipboard()->setText(text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QString FluTools::uuid(){
|
|
|
|
|
return QUuid::createUuid().toString();
|
|
|
|
|
}
|