代码拉取完成,页面将自动刷新
#include "widget.h"
#include <QDebug>
#include <QScreen>
Widget::Widget(QScreen *screen, QWidget *parent) : QWidget(parent)
{
TopLeft = new requ(screen, requ::TopLeft);
TopRight = new requ(screen, requ::TopRight);
LowerLeft = new requ(screen, requ::LowerLeft);
LowerRight = new requ(screen, requ::LowerRight);
qaq = new QSettings(QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config/GXDE/gxde-requ/gxde-requ-setting.qaq",
QSettings::IniFormat);
QString kwinrules;
QFileInfo file1(QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config/ukui-kwinrulesrc");
qDebug()<<file1.exists();
if(file1.exists() == false)
{
kwinrules="deepin-kwinrulesrc";
} else {
kwinrules="ukui-kwinrulesrc";
}
QFile file(QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config/" + kwinrules);
file.open(QFile::ReadOnly);
QString r = QLatin1String(file.readAll());
file.close();
QSettings tmp(QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config/" + kwinrules, QSettings::IniFormat);
qDebug() << r;
if(!r.contains("gxde-requ",Qt::CaseSensitive))
{
QSettings *tmp = new QSettings(QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config/" + kwinrules,
QSettings::IniFormat);
tmp->setValue(QString::number(tmp->value("count").toInt()+1) + "/Description", "gxde-requ");
tmp->setValue(QString::number(tmp->value("count").toInt()+1) + "/desktop", -1);
tmp->setValue(QString::number(tmp->value("count").toInt()+1) + "/desktoprule", 2);
tmp->setValue(QString::number(tmp->value("count").toInt()+1) + "/wmclass", "gxde-requ gxde-requ");
tmp->setValue(QString::number(tmp->value("count").toInt()+1) + "/wmclasscomplete", true);
tmp->setValue(QString::number(tmp->value("count").toInt()+1) + "/wmclassmatch", 1);
tmp->setValue("count", tmp->value("count").toInt()+1);
}
TopLeft->setShell(qaq->value("TopLeftShell").toString());
TopRight->setShell(qaq->value("TopRightShell").toString());
LowerLeft->setShell(qaq->value("LowerLeftShell").toString());
LowerRight->setShell(qaq->value("LowerRightShell").toString());
qDebug() << qaq->value("TopLeftShell").toString();
qDebug() << qaq->value("TopRightShell").toString();
qDebug() << qaq->value("LowerLeftShell").toString();
qDebug() << qaq->value("LowerRightShell").toString();
//TopLeft->setGeometry(0, 0, 1, 1);
//TopRight->setGeometry(screenRect.width() - WIDGET_WIDTH, 0, 1, 1);
//LowerLeft->setGeometry(0, screenRect.height() - WIDGET_WIDTH, 1, 1);
/*LowerRight->setGeometry(screenRect.width() - WIDGET_WIDTH,
screenRect.height() - WIDGET_WIDTH,
1,
1);*/
TopLeft->show();
TopRight->show();
LowerLeft->show();
LowerRight->show();
}
Widget::~Widget() {
delete TopLeft;
delete TopRight;
delete LowerLeft;
delete LowerRight;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。