!7 bugfix 130009,136684
Merge pull request !7 from DkAlsace/openkylin/yangtze
|
@ -1,40 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "CJsonObject.hpp"
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef CLOCKINTERFACE_H
|
||||
#define CLOCKINTERFACE_H
|
||||
#include <string>
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "CustomButton.h"
|
||||
#include <QDebug>
|
||||
#include "theme.h"
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef CUSTOMBUTTON_H
|
||||
#define CUSTOMBUTTON_H
|
||||
|
||||
|
|
58
about.cpp
|
@ -1,49 +1,25 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "about.h"
|
||||
#include "ui_about.h"
|
||||
#include <X11/Xlib.h>
|
||||
#include "xatom-helper.h"
|
||||
#include "configutil.h"
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
|
||||
extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
|
||||
|
||||
About::About(QWidget *parent) :
|
||||
|
@ -53,7 +29,7 @@ About::About(QWidget *parent) :
|
|||
ui->setupUi(this);
|
||||
|
||||
// 添加窗管协议
|
||||
// XAtomHelper::setStandardWindowHint(this->winId());
|
||||
// XAtomHelper::setStandardWindowHint(this->winId());
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
|
||||
setWindowTitle(tr("About"));
|
||||
|
|
53
about.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef ABOUT_H
|
||||
#define ABOUT_H
|
||||
|
||||
|
|
|
@ -1,39 +1,18 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "adaptscreeninfo.h"
|
||||
|
|
|
@ -1,39 +1,18 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef ADAPTSCREENINFO_H
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "baseverticalscroll.h"
|
||||
#include <QWheelEvent>
|
||||
#include <QDebug>
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef BASEVERTICALSCROLL_H
|
||||
#define BASEVERTICALSCROLL_H
|
||||
|
||||
|
|
55
btnNew.cpp
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "btnNew.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QDebug>
|
||||
|
@ -55,7 +34,7 @@ Btn_new::Btn_new(int num, QString name, Btn_new::BTN_NEW_TYPE btnType, QWidget *
|
|||
IconLabel = new QLabel(this);
|
||||
noName = new QLabel(this);
|
||||
//num不同,name与text的大小配比不同
|
||||
int lineHeight = 22;
|
||||
int lineHeight = 23;
|
||||
int lineMoveHeight = 13;
|
||||
int nameWidth = 100;
|
||||
int editWidth = 200;
|
||||
|
|
53
btnNew.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef BTN_NEW_H
|
||||
#define BTN_NEW_H
|
||||
|
||||
|
|
52
cJSON.h
|
@ -1,40 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef cJSON__h
|
||||
#define cJSON__h
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "clickableLabel.h"
|
||||
#include <QDebug>
|
||||
|
||||
|
|
|
@ -1,41 +1,21 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
//避免重复加载,循环引用
|
||||
#ifndef CLICKABLELABEL_H
|
||||
#define CLICKABLELABEL_H
|
||||
|
|
530
clock.cpp
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "clock.h"
|
||||
#include "ui_clock.h"
|
||||
#include <QMessageBox>
|
||||
|
@ -44,13 +23,16 @@
|
|||
#include "mediaplayerpool.h"
|
||||
#include <QLibraryInfo>
|
||||
#include "coreplayer/playcontroller.h"
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "kwidget.h"
|
||||
#include "kwindowbuttonbar.h"
|
||||
#include <QDBusReply>
|
||||
#include "kwindowsystem.h"
|
||||
#include <QScrollBar>
|
||||
#include "windowmanager/windowmanager.h"
|
||||
|
||||
using std::string;
|
||||
using clockInterface::ReturnMsg;
|
||||
using clockInterface::STATUS_CODE;
|
||||
|
||||
using namespace kdk;
|
||||
|
||||
extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
|
||||
const double PI=3.141592;
|
||||
|
@ -58,14 +40,13 @@ const double PI=3.141592;
|
|||
|
||||
#define SWITCH_BTN_HIGHLIGHT_BACK_COLOR 61,107,229,255
|
||||
|
||||
const static int DIALOG_MOVE_WIDTH = 16;
|
||||
const static int DIALOG_MOVE_WIDTH = 24;
|
||||
const static int DIALOG_WIDTH = 340;
|
||||
|
||||
Clock::Clock(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::Clock)
|
||||
{
|
||||
utils = new Utils();
|
||||
//异步初始化
|
||||
// MediaPlayerPool::getInstance();
|
||||
music = new QMediaPlayer();
|
||||
|
@ -77,6 +58,7 @@ Clock::Clock(QWidget *parent) :
|
|||
// Get system locale
|
||||
//切换英文
|
||||
QLocale en_us = QLocale("en_US");
|
||||
QLocale bo_cn = QLocale("bo_CN");
|
||||
QLocale current = QLocale();
|
||||
if (translator->load(current, QLatin1String("ukui-clock"), QLatin1String("_"), QLatin1String("/usr/share/ukui-clock/ukui31"))){
|
||||
QApplication::installTranslator(translator);
|
||||
|
@ -101,8 +83,7 @@ Clock::Clock(QWidget *parent) :
|
|||
clock_sql::createConnection();
|
||||
//in order to use the same world in English
|
||||
this->setWindowTitle(tr(CLOCK_TITLE_NAME));
|
||||
ui->clockTitleLabel->setText(tr(CLOCK_TITLE_NAME));
|
||||
|
||||
ui->titileWidget->setWidgetName(tr(CLOCK_TITLE_NAME));
|
||||
//创建用户手册dbus客户端
|
||||
createUserGuideDebusClient();
|
||||
mousePressed = 0;
|
||||
|
@ -133,12 +114,14 @@ Clock::Clock(QWidget *parent) :
|
|||
ui->alarmListWidget->setProperty("contextMenuPolicy", Qt::CustomContextMenu); /*重要:设置QListWidget的contextMenuPolicy属性,不然不能显示右键菜单*/
|
||||
ui->alarmListWidget ->setGridSize(QSize(340, 108+15));
|
||||
ui->timeListWidget ->setGridSize(QSize(340, 58+10));
|
||||
ui->alarmListWidget->setProperty("drawScrollBarGroove", false);
|
||||
ui->timeListWidget->setProperty("drawScrollBarGroove", false);
|
||||
//主屏信息
|
||||
primaryManager = new PrimaryManager();
|
||||
//闹钟居中
|
||||
//move((m_pSreenInfo->m_screenWidth - this->width() + m_pSreenInfo->m_nScreen_x )/2, (m_pSreenInfo->m_screenHeight - this->height())/2);
|
||||
// utils = new Utils();
|
||||
// utils->centerToScreen(this);
|
||||
utils = new Utils();
|
||||
utils->centerToScreen(this);
|
||||
ui->switchClock->setFixedSize(40,40);
|
||||
navigationBtnStyle(ui->switchClock);
|
||||
ui->switchClock->setToolTip(tr(CLOCK_TITLE_NAME));
|
||||
|
@ -211,8 +194,7 @@ Clock::Clock(QWidget *parent) :
|
|||
//倒计时上的小闹钟
|
||||
// ui->countdownAlarmIcon->setProperty("useButtonPalette", true);
|
||||
|
||||
|
||||
|
||||
iniWaylandWinId();
|
||||
|
||||
}
|
||||
|
||||
|
@ -238,18 +220,19 @@ Clock::~Clock()
|
|||
//重写关闭事件
|
||||
void Clock::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
closeHandel();
|
||||
// closeHandel();
|
||||
|
||||
if(close_or_hide_page->close_flag==1){
|
||||
event->ignore();
|
||||
setWindowState(Qt::WindowMinimized);
|
||||
close_or_hide_page->close_flag = 0;
|
||||
}else if(close_or_hide_page->close_flag==2){
|
||||
event->accept();
|
||||
exit(0);
|
||||
}else{
|
||||
event->ignore();
|
||||
}
|
||||
// if(close_or_hide_page->close_flag==1){
|
||||
// event->ignore();
|
||||
// setWindowState(Qt::WindowMinimized);
|
||||
// close_or_hide_page->close_flag = 0;
|
||||
// }else if(close_or_hide_page->close_flag==2){
|
||||
// event->accept();
|
||||
// exit(0);
|
||||
// }else{
|
||||
// event->ignore();
|
||||
// }
|
||||
return;
|
||||
}
|
||||
void Clock::closeHandel()
|
||||
{
|
||||
|
@ -277,7 +260,18 @@ void Clock::enableTrayIcon()
|
|||
m_trayIcon->setIcon(trayicon);
|
||||
connect(m_trayIcon, &QSystemTrayIcon::activated, this, [=](QSystemTrayIcon::ActivationReason r){
|
||||
if (r == QSystemTrayIcon::Trigger) {
|
||||
this->showThisWindow();
|
||||
//不知道什么原因,加了最小化后,点击托盘后,不再处于最小化状态
|
||||
showMinimized();
|
||||
if (isHidden()) {
|
||||
// show();
|
||||
this->showThisWindow();
|
||||
}
|
||||
else if (!isActiveWindow()) {
|
||||
KWindowSystem::forceActiveWindow(winId());
|
||||
}
|
||||
else {
|
||||
hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
m_trayIcon->show();
|
||||
|
@ -321,7 +315,7 @@ void Clock::settingsStyle()
|
|||
this->whiteStyle();
|
||||
});
|
||||
connect(subject,&GsettingSubject::iconChnaged, this,[=](){
|
||||
ui->titleIcon->setPixmap(QIcon::fromTheme("kylin-alarm-clock").pixmap(24,24));
|
||||
ui->titileWidget->setIcon("kylin-alarm-clock");
|
||||
});
|
||||
|
||||
|
||||
|
@ -338,8 +332,63 @@ void Clock::settingsStyle()
|
|||
subject->iniFontSize();
|
||||
subject->iniTimeZone();
|
||||
|
||||
}
|
||||
connect(this,&Clock::timeJump,this,[=](qint64 timeValue){
|
||||
qWarning()<<"dbq检测到时间跳跃"<<timeValue;
|
||||
//倒计时运行时,做时间跳跃
|
||||
if(countdown_isStarted){
|
||||
int ringmax = countdown_hour*3600 + countdown_minute*60 + countdown_second;
|
||||
qWarning()<<"dbq-当前时间"<<countdown_hour<<countdown_minute<<countdown_second<<ringmax;
|
||||
if(timeValue>ringmax){
|
||||
//倒计时归零
|
||||
countdown_hour = 0;
|
||||
countdown_minute = 0;
|
||||
countdown_second = 0;
|
||||
}else{
|
||||
int jumpH = timeValue/3600;
|
||||
countdown_hour = countdown_hour-jumpH;
|
||||
timeValue = timeValue-jumpH*3600;
|
||||
int jumpM = timeValue/60;
|
||||
//分钟
|
||||
if(countdown_minute>=jumpM){
|
||||
countdown_minute = countdown_minute-jumpM;
|
||||
}else{
|
||||
countdown_hour--;
|
||||
countdown_minute = countdown_minute-jumpM+60;
|
||||
}
|
||||
timeValue = timeValue-jumpM*60;
|
||||
//秒
|
||||
if(countdown_second>=timeValue){
|
||||
countdown_second = countdown_second-timeValue;
|
||||
}else{
|
||||
if(countdown_minute>=1){
|
||||
countdown_minute--;
|
||||
}else{
|
||||
//借小时位
|
||||
countdown_hour--;
|
||||
countdown_minute = 59;
|
||||
}
|
||||
countdown_second = countdown_second-timeValue+60;
|
||||
}
|
||||
|
||||
}
|
||||
qWarning()<<"dbq-减去跳跃时间"<<countdown_hour<<countdown_minute<<countdown_second;
|
||||
updateCountdownTime();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
void Clock::iniWaylandWinId()
|
||||
{
|
||||
connect(WindowManager::self(),&WindowManager::windowAdded,this,[=](const WindowId& windowId){
|
||||
|
||||
qDebug()<< "getpid:"<<WindowManager::getPid(windowId);
|
||||
qDebug()<< "this pid:"<<getpid();
|
||||
if(getpid() == WindowManager::getPid(windowId))
|
||||
{
|
||||
m_pid = windowId.toULongLong();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 闹钟按钮图片初始化 Alarm button picture initialization
|
||||
|
@ -353,16 +402,20 @@ void Clock::buttonImageInit()
|
|||
//启用主题框架不需要代码
|
||||
// this->setWindowIcon(QIcon::fromTheme("kylin-alarm-clock",QIcon(":/image/kylin-alarm-clock.svg")));
|
||||
//左上角闹钟图标
|
||||
ui->titleIcon->setPixmap(QIcon::fromTheme("kylin-alarm-clock").pixmap(24,24));
|
||||
ui->titileWidget->setIcon("kylin-alarm-clock");
|
||||
//倒计时上的小闹钟图标
|
||||
ui->countdownAlarmIcon->setPixmap(pixmap4);
|
||||
ui->countdownAlarmIcon->setVisible(true);
|
||||
ui->countdownAlarmIcon->setFocusPolicy(Qt::NoFocus);
|
||||
// ui->countdownAlarmIcon->move(152,100);
|
||||
|
||||
muteBtnStyle();
|
||||
minBtnStyle();
|
||||
menuBtnStyle();
|
||||
closeBtnStyle();
|
||||
ui->titileWidget->windowButtonBar()->maximumButton()->hide();
|
||||
disconnect(ui->titileWidget->windowButtonBar()->closeButton(), &QPushButton::clicked, this, &KWidget::close);
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -466,6 +519,9 @@ void Clock::stopwatchInit()
|
|||
ui->timeShowBig->setText("00:00.00");
|
||||
//显示时间小
|
||||
ui->timeShowSmall->setText("00:00.00");
|
||||
QPalette ptext;
|
||||
ptext.setColor(QPalette::WindowText,Qt::gray);
|
||||
ui->timeShowSmall->setPalette(ptext);
|
||||
isStarted = 0;
|
||||
hour=0;
|
||||
minute=0;
|
||||
|
@ -566,7 +622,7 @@ void Clock::keyPressEvent(QKeyEvent *event)
|
|||
void Clock::callUserGuide()
|
||||
{
|
||||
if(userGuideInterface!=nullptr){
|
||||
userGuideInterface->call(QString("showGuide"), "ukui-clock");
|
||||
userGuideInterface->call(QString("showGuide"), "kylin-alarm-clock");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -660,6 +716,7 @@ void Clock::bellIni()
|
|||
{
|
||||
m_selectBtnUtil = new SelectBtnUtil();
|
||||
int rowNum = m_bellQueryModel->rowCount();
|
||||
int localeNum = m_selectBtnUtil->getCurrentLocale();
|
||||
if (rowNum < 1) {
|
||||
QList<QString> * defaultBell = SelectBtnUtil::getDefaultBellList();
|
||||
QList<QString> * defaultBellTr = SelectBtnUtil::getDefaultBellTrList();
|
||||
|
@ -667,23 +724,47 @@ void Clock::bellIni()
|
|||
m_bellQueryModel->insertRow(i);
|
||||
QString temp = defaultBell->at(i);
|
||||
QString tempTr = defaultBellTr->at(i);
|
||||
if(localeNum ==1){
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 1), tempTr);
|
||||
}else if(localeNum ==2){
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 2), tempTr);
|
||||
}
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 0), Utils::getRandomId());
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 1), tempTr);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 2), temp);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 3), temp);
|
||||
QString path = DEFAULT_BELL_SAVE_PATH;
|
||||
path = path.append(temp).append(".wav");
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 3), path);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 4), path);
|
||||
QDateTime time = QDateTime::currentDateTime(); //获取当前时间
|
||||
qint64 timeT = time.toMSecsSinceEpoch();
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 4), timeT);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 5), 0);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 5), timeT);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 6), 0);
|
||||
//排序,暂停1ms
|
||||
QThread::msleep(1);
|
||||
}
|
||||
delete defaultBell;
|
||||
m_bellQueryModel->submitAll();
|
||||
m_selectBtnUtil->refreshBellData();
|
||||
}else{
|
||||
QList<QString> * defaultBell = SelectBtnUtil::getDefaultBellList();
|
||||
if(localeNumBack != localeNum){
|
||||
QList<QString> * defaultBellTr = SelectBtnUtil::getDefaultBellTrList();
|
||||
if(localeNum ==1){
|
||||
for (int i=0;i<defaultBell->size();i++) {
|
||||
QString tempTr = defaultBellTr->at(i);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 1), tempTr);
|
||||
}
|
||||
}else if(localeNum == 2){
|
||||
for (int i=0;i<defaultBell->size();i++) {
|
||||
QString tempTrbo = defaultBellTr->at(i);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 2), tempTrbo);
|
||||
}
|
||||
}
|
||||
delete defaultBell;
|
||||
m_bellQueryModel->submitAll();
|
||||
m_selectBtnUtil->refreshBellData();
|
||||
}
|
||||
}
|
||||
localeNumBack = localeNum;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -843,8 +924,8 @@ void Clock::stopwatchStartAnimation()
|
|||
|
||||
animation3 = new QPropertyAnimation(ui->timeListWidget, "geometry");
|
||||
animation3->setDuration(1000);
|
||||
animation3->setKeyValueAt(0, QRect(25 ,230, 340, 270));
|
||||
animation3->setEndValue(QRect(25, 109, 340, 270));
|
||||
animation3->setKeyValueAt(0, QRect(25 ,230, 356, 270));
|
||||
animation3->setEndValue(QRect(25, 109, 356, 270));
|
||||
animation3->start();
|
||||
}
|
||||
/*
|
||||
|
@ -867,8 +948,8 @@ void Clock::stopwatchStopAnimation()
|
|||
|
||||
animation3 = new QPropertyAnimation(ui->timeListWidget, "geometry");
|
||||
animation3->setDuration(1000);
|
||||
animation3->setKeyValueAt(0, QRect(25 ,109, 340, 270));
|
||||
animation3->setEndValue(QRect(25, 230, 340, 270));
|
||||
animation3->setKeyValueAt(0, QRect(25 ,109, 356, 270));
|
||||
animation3->setEndValue(QRect(25, 230, 356, 270));
|
||||
animation3->start();
|
||||
}
|
||||
|
||||
|
@ -883,6 +964,7 @@ void Clock::onPushbuttonRingClicked()
|
|||
//清空数据
|
||||
timeSepOrderIndex->clear();
|
||||
hisLongShortIndex->clear();
|
||||
ui->timeListWidget->verticalScrollBar()->setHidden(true);
|
||||
if (nullptr != timer) {
|
||||
timer->stop();
|
||||
timer_2->stop();
|
||||
|
@ -918,8 +1000,12 @@ void Clock::onPushbuttonRingClicked()
|
|||
stopwatch_aItem[stopwatch_item_flag]->setTextColor(QColor(255, 0, 0, 255));
|
||||
ui->timeListWidget->insertItem(0,stopwatch_aItem[stopwatch_item_flag]);
|
||||
|
||||
ui->timeListWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
ui->timeListWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
ui->timeListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
ui->timeListWidget->verticalScrollBar()->setHidden(true);
|
||||
if(stopwatch_item_flag>2){
|
||||
ui->timeListWidget->verticalScrollBar()->setHidden(false);
|
||||
}
|
||||
stopwatch_w[stopwatch_item_flag] = new stopwatch_item(ui->timeListWidget);
|
||||
|
||||
stopwatch_w[stopwatch_item_flag]->stopwatch1->setText(tr("count")+QString::number(stopwatch_item_flag+1));
|
||||
|
@ -1016,6 +1102,7 @@ void Clock::onPushbuttonTimeselectClicked()
|
|||
*/
|
||||
void Clock::windowClosingClicked()
|
||||
{
|
||||
ui->titileWidget->setVisible(true);
|
||||
closeHandel();
|
||||
|
||||
if(close_or_hide_page->close_flag==1){
|
||||
|
@ -1035,7 +1122,6 @@ void Clock::windowClosingClicked()
|
|||
*/
|
||||
void Clock::windowMinimizingClicked()
|
||||
{
|
||||
// kdk::WindowManager::minimizeWindow(this->winId());
|
||||
this->showNormal();
|
||||
this->showMinimized();
|
||||
}
|
||||
|
@ -1048,7 +1134,7 @@ void Clock::muteAllBell()
|
|||
if(m_muteOn){
|
||||
pixmap = QPixmap(":/image/miniIcon/mute-on.png");
|
||||
}
|
||||
ui->muteBtn->setIcon(pixmap);
|
||||
muteBtn->setIcon(pixmap);
|
||||
if(m_muteOn){
|
||||
QPoint position = frameGeometry().center();
|
||||
int x = position.x()-m_commonToolTip->geometry().width()/2;
|
||||
|
@ -1059,12 +1145,55 @@ void Clock::muteAllBell()
|
|||
m_commonToolTipCloseTimer->start();
|
||||
//存储静音到数据库
|
||||
model_setup->setData(model_setup->index(0, 0), 1);//静音 Mute
|
||||
if(countdownNoticeDialog->isVisible() == 1){
|
||||
if(countdownNoticeDialog->m_musicPlayer->state()!= MMediaPlayer::State::PausedState){
|
||||
countdownNoticeDialog->m_musicPlayer->pause();
|
||||
}
|
||||
}
|
||||
if(alarmNoticeDialog){
|
||||
if(alarmNoticeDialog->m_musicPlayer->state()!= MMediaPlayer::State::PausedState)
|
||||
alarmNoticeDialog->m_musicPlayer->pause();
|
||||
}
|
||||
}else{
|
||||
model_setup->setData(model_setup->index(0, 0), 0);//静音 Mute
|
||||
if(countdownNoticeDialog->isVisible() == 1){
|
||||
ringContinueWhenMute(countdownNoticeDialog);
|
||||
}
|
||||
if(alarmNoticeDialog){
|
||||
ringContinueWhenMute(alarmNoticeDialog);
|
||||
}
|
||||
}
|
||||
model_setup->submitAll();
|
||||
}
|
||||
|
||||
void Clock::ringContinueWhenMute(Natice_alarm *tempdialog)
|
||||
{
|
||||
auto startpos = tempdialog->timer_value * 1000;
|
||||
auto starttime = 60000-startpos;
|
||||
auto sumtime = tempdialog->m_musicPlayer->duration();
|
||||
int num;
|
||||
if(tempdialog == countdownNoticeDialog){
|
||||
num=count_music_sellect->listWidget->currentRow();
|
||||
}else if(tempdialog == alarmNoticeDialog){
|
||||
num=dialog_music->listWidget->currentRow();
|
||||
}
|
||||
//调整自定义铃声的播放位置
|
||||
if(num<5){
|
||||
tempdialog->m_musicPlayer->pause();
|
||||
}else{
|
||||
if(sumtime>1){
|
||||
if(starttime>sumtime){
|
||||
starttime = starttime%sumtime;
|
||||
}
|
||||
tempdialog->m_musicPlayer->setPosition(starttime);
|
||||
}else{
|
||||
tempdialog->m_musicPlayer->pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 倒计时切换
|
||||
* Countdown switch
|
||||
|
@ -1079,6 +1208,7 @@ void Clock:: CountdownPageSwitch ()
|
|||
void Clock::setBtnIcon(QPushButton *btn, QString imgUrl, QString localUrl)
|
||||
{
|
||||
QIcon icon=Utils::getQIcon(imgUrl,localUrl);
|
||||
// btn->setIcon(QIcon::fromTheme(imgUrl));
|
||||
btn->setIcon(icon);
|
||||
btn->setIconSize(QSize(18, 18));
|
||||
QPainter p(btn);
|
||||
|
@ -1244,21 +1374,24 @@ bool Clock::checkSystem24()
|
|||
|
||||
void Clock::muteBtnStyle()
|
||||
{
|
||||
muteBtn = new QPushButton(ui->titileWidget);
|
||||
muteBtn->setFixedSize(30,30);
|
||||
muteBtn->move(238,5);
|
||||
int mute = model_setup->index(0, 0).data().toInt();
|
||||
m_muteOn = mute==1?true:false;
|
||||
QPixmap pixmap = QPixmap(":/image/miniIcon/mute-off.png");
|
||||
if(m_muteOn){
|
||||
pixmap = QPixmap(":/image/miniIcon/mute-on.png");
|
||||
}
|
||||
ui->muteBtn->setIcon(pixmap);
|
||||
ui->muteBtn->setIconSize(QSize(32, 32));
|
||||
QPainter p(ui->muteBtn);
|
||||
muteBtn->setIcon(pixmap);
|
||||
muteBtn->setIconSize(QSize(32, 32));
|
||||
QPainter p(muteBtn);
|
||||
//表示引擎应尽可能对图元的边缘进行抗锯齿。
|
||||
p.setRenderHint(QPainter::Antialiasing);
|
||||
ui->muteBtn->setFlat(true);
|
||||
ui->muteBtn->setVisible(true);
|
||||
ui->muteBtn->setFocusPolicy(Qt::NoFocus);
|
||||
ui->muteBtn->setToolTip(tr("mute"));
|
||||
muteBtn->setFlat(true);
|
||||
muteBtn->setVisible(true);
|
||||
muteBtn->setFocusPolicy(Qt::NoFocus);
|
||||
muteBtn->setToolTip(tr("mute"));
|
||||
//弹窗初始化
|
||||
m_commonToolTip = new CommonToolTip(this);
|
||||
m_commonToolTip->hide();
|
||||
|
@ -1273,7 +1406,9 @@ void Clock::muteBtnStyle()
|
|||
m_commonToolTip->hide();
|
||||
}
|
||||
});
|
||||
connect(ui->muteBtn, SIGNAL(clicked()), this, SLOT(muteAllBell()));
|
||||
connect(muteBtn, SIGNAL(clicked()), this, SLOT(muteAllBell()));
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
* @brief 最小化按钮样式
|
||||
|
@ -1281,87 +1416,58 @@ void Clock::muteBtnStyle()
|
|||
void Clock::minBtnStyle()
|
||||
{
|
||||
//窗口最小化
|
||||
ui->minmizeBtn->setIcon(QIcon::fromTheme("window-minimize-symbolic"));
|
||||
ui->minmizeBtn->setFlat(true);
|
||||
ui->minmizeBtn->setVisible(true);
|
||||
ui->minmizeBtn->setFocusPolicy(Qt::NoFocus);
|
||||
ui->minmizeBtn->setProperty("useIconHighlightEffect", 0x2);
|
||||
ui->minmizeBtn->setProperty("isWindowButton", 0x01);
|
||||
ui->minmizeBtn->setToolTip(tr("Minimize"));
|
||||
connect(ui->minmizeBtn, SIGNAL(clicked()), this, SLOT(windowMinimizingClicked()));
|
||||
QPushButton* btn = ui->titileWidget->windowButtonBar()->minimumButton();
|
||||
btn->setToolTip(tr("Minimize"));
|
||||
connect(btn, SIGNAL(clicked()), this, SLOT(windowMinimizingClicked()));
|
||||
}
|
||||
/**
|
||||
* @brief 关闭按钮样式
|
||||
*/
|
||||
void Clock::closeBtnStyle()
|
||||
{
|
||||
|
||||
//窗口关闭
|
||||
ui->closeTitleBtn->setIcon(QIcon::fromTheme("window-close-symbolic"));
|
||||
ui->closeTitleBtn->setFlat(true);
|
||||
ui->closeTitleBtn->setVisible(true);
|
||||
ui->closeTitleBtn->setFocusPolicy(Qt::NoFocus);
|
||||
//主题框架1.0.6-5kylin2
|
||||
ui->closeTitleBtn->setProperty("isWindowButton", 0x2);
|
||||
ui->closeTitleBtn->setProperty("useIconHighlightEffect", 0x8);
|
||||
ui->closeTitleBtn->setToolTip(tr("Quit"));
|
||||
connect(ui->closeTitleBtn, SIGNAL(clicked()), this, SLOT(windowClosingClicked()));
|
||||
//适配sdk
|
||||
QPushButton* btn = ui->titileWidget->windowButtonBar()->closeButton();
|
||||
btn->setToolTip(tr("Quit"));
|
||||
disconnect(ui->titileWidget->windowButtonBar()->closeButton(), &QPushButton::clicked, this, &KWidget::close);
|
||||
connect(btn, SIGNAL(clicked()), this, SLOT(windowClosingClicked()));
|
||||
}
|
||||
/**
|
||||
* @brief 菜单按钮样式
|
||||
*/
|
||||
void Clock::menuBtnStyle()
|
||||
{
|
||||
//菜单项
|
||||
ui->menuBtn->setIcon(QIcon::fromTheme("open-menu-symbolic"));
|
||||
ui->menuBtn->setVisible(true);
|
||||
ui->menuBtn->setFocusPolicy(Qt::NoFocus);
|
||||
ui->menuBtn->setToolTip(tr("Menu"));
|
||||
ui->menuBtn->setProperty("useIconHighlightEffect", 0x2);
|
||||
ui->menuBtn->setProperty("useButtonPalette", true);
|
||||
/*设置关于页*/
|
||||
ui->menuBtn->setPopupMode(QToolButton::InstantPopup);
|
||||
m_menu = new QMenu(ui->menuBtn);
|
||||
m_menu->setProperty("fillIconSymbolicColor", true);
|
||||
// ui->pushButton_12->setProperty("useButtonPalette", true);
|
||||
//菜单项的操作
|
||||
//适配sdk
|
||||
//删除原sdk中的多余选项
|
||||
KMenuButton* btn = ui->titileWidget->windowButtonBar()->menuButton();
|
||||
btn->setToolTip(tr("Menu"));
|
||||
QMenu* menu = ui->titileWidget->windowButtonBar()->menuButton()->menu();
|
||||
QAction* settingAction = ui->titileWidget->windowButtonBar()->menuButton()->settingAction();
|
||||
QAction* themeAction = ui->titileWidget->windowButtonBar()->menuButton()->themeAction();
|
||||
menu->removeAction(settingAction);
|
||||
menu->removeAction(themeAction);
|
||||
//帮助
|
||||
QAction *m_helpAction = new QAction(m_menu);
|
||||
QAction* m_helpAction = ui->titileWidget->windowButtonBar()->menuButton()->assistAction();
|
||||
//关于
|
||||
QAction *m_aboutAction = new QAction(m_menu);
|
||||
QAction* m_aboutAction = ui->titileWidget->windowButtonBar()->menuButton()->aboutAction();
|
||||
//关闭
|
||||
QAction *m_closeAction = new QAction(m_menu);
|
||||
QAction* m_closeAction = ui->titileWidget->windowButtonBar()->menuButton()->quitAction();
|
||||
m_helpAction->setText(tr("Help"));
|
||||
m_aboutAction->setText(tr("About"));
|
||||
m_closeAction->setText(tr("Close"));
|
||||
m_menu->addAction(m_helpAction);
|
||||
m_menu->addAction(m_aboutAction);
|
||||
m_menu->addAction(m_closeAction);
|
||||
ui->menuBtn->setMenu(m_menu);
|
||||
connect(m_helpAction, &QAction::triggered, this, [=](){
|
||||
qDebug() << "help clicked";
|
||||
callUserGuide();
|
||||
});
|
||||
connect(m_aboutAction, &QAction::triggered, this, [=](){
|
||||
About *dialog = new About();
|
||||
dialog->hide();
|
||||
auto geoQrect = this->geometry();
|
||||
QPointF position = QPointF(geoQrect.x(),geoQrect.y());
|
||||
QPointF position = this->pos();
|
||||
// XAtomHelper::setStandardWindowHint(dialog->winId());
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(dialog);
|
||||
dialog->show();
|
||||
QRect aboutQRect = QRect(position.x()-15,position.y()+130,dialog->width(),dialog->height());
|
||||
qWarning()<<"dbq-position"<<position.x()<<position.y()<<aboutQRect;
|
||||
// XAtomHelper::setStandardWindowHint(dialog->winId());
|
||||
dialog->move(position.x()-15,position.y()+130);
|
||||
// kdk::WindowManager::setGeometry(dialog->windowHandle(),aboutQRect);
|
||||
dialog->exec();
|
||||
});
|
||||
connect(m_closeAction, SIGNAL(triggered()), this, SLOT(windowClosingClicked()));
|
||||
|
||||
//手动改成透明色
|
||||
QPalette pale =ui->menuBtn->palette();
|
||||
pale.setColor(QPalette::Active,QPalette::Button,Qt::transparent);
|
||||
ui->menuBtn->setPalette(pale);
|
||||
}
|
||||
/*
|
||||
* @brief 检查小窗体是否初始化
|
||||
|
@ -1417,8 +1523,6 @@ void Clock::widgetListWhiteStyle(QListWidget *listWidget)
|
|||
QListWidget::Item{background-color:"+listBackColor+";border-radius:"+selectItemRadius+"px;}\
|
||||
QListWidget::item::selected{background-color:rgba(233, 233, 233,255);border-radius:"+selectItemRadius+"px;border:1px solid rgba(131, 131, 131,0);}\
|
||||
QListWidget::item:hover{background-color:rgba(233, 233, 233,255);border-radius:"+selectItemRadius+"px;}\
|
||||
QScrollBar:vertical{width:4px;background:rgba(0, 0, 0, 0);}QScrollBar::handle:vertical{width:4px;background:rgba(186, 193, 201, 1);}\
|
||||
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical{background: white;border: 2px solid transparent;}\
|
||||
");
|
||||
}
|
||||
|
||||
|
@ -1429,11 +1533,40 @@ void Clock::widgetListBlackStyle(QListWidget *listWidget)
|
|||
QListWidget::Item{background-color:rgba(41, 41, 41, 255);border-radius:"+selectItemRadius+"px;}\
|
||||
QListWidget::item::selected{background-color:rgba(55, 55, 59, 255);border-radius:"+selectItemRadius+"px;border:1px solid rgba(131, 131, 131,0);}\
|
||||
QListWidget::item:hover{background-color:rgba(55, 55, 59, 255);border-radius:"+selectItemRadius+"px;}\
|
||||
QScrollBar:vertical{width:4px;background:rgba(0, 0, 0, 0);}QScrollBar::handle:vertical{width:4px;background:rgba(186, 193, 201, 1);}\
|
||||
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical{background: white;border: 2px solid transparent;}\
|
||||
");
|
||||
}
|
||||
void Clock::watchTimeJump()
|
||||
{
|
||||
QTime time = QTime::currentTime();
|
||||
int timeH = time.hour();
|
||||
int timeM = time.minute();
|
||||
int timeS = time.second();
|
||||
auto dateTimeSecs = QDateTime::currentSecsSinceEpoch();
|
||||
// qDebug()<<"dbq-闹钟"<<timeH<<":"<<timeM<<":"<<timeS<<dateTimeSecs;
|
||||
auto watchTimeModel = clock_sql::getWatchTimeTable(this);
|
||||
int rowCount = watchTimeModel->rowCount();
|
||||
QString timeInfo =QString::number(dateTimeSecs);
|
||||
qint64 lastTimeInfo = 0;
|
||||
int index = 0;
|
||||
if(rowCount<1){
|
||||
//新建
|
||||
watchTimeModel->insertRow(index);
|
||||
watchTimeModel->setData(watchTimeModel->index(index, 0), Utils::getRandomId());
|
||||
watchTimeModel->setData(watchTimeModel->index(index, 1), timeInfo);
|
||||
}else{
|
||||
QString lastTimeInfoStr = watchTimeModel->index(index, 1).data().toString();
|
||||
lastTimeInfo = lastTimeInfoStr.toLong();
|
||||
// qDebug()<<"dbq-lastTimeInfoStr"<<lastTimeInfoStr<<"lastTimeInfo"<<lastTimeInfo;
|
||||
int timeGap = dateTimeSecs-lastTimeInfo;
|
||||
if(timeGap>1){
|
||||
// qDebug()<<"dbq-timeGap"<<timeGap;
|
||||
emit timeJump(timeGap);
|
||||
}
|
||||
watchTimeModel->setData(watchTimeModel->index(index, 1), timeInfo);
|
||||
}
|
||||
watchTimeModel->submitAll();
|
||||
|
||||
}
|
||||
/*
|
||||
* 动态监控闹钟与本地时间
|
||||
* Dynamic monitoring alarm clock and local time
|
||||
|
@ -1445,6 +1578,8 @@ void Clock::timerUpdate()
|
|||
int timeM = time.minute();
|
||||
int timeS = time.second();
|
||||
|
||||
watchTimeJump();
|
||||
|
||||
model_setup->select();
|
||||
//更新闹钟列表项
|
||||
textTimerupdate();
|
||||
|
@ -1552,7 +1687,7 @@ void Clock::noticeDialogShow(int close_time, int alarm_num, QString id)
|
|||
}
|
||||
else
|
||||
moveUnderMultiScreen(UP_RIGHT,alarmNoticeDialog,1);
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(alarmNoticeDialog);
|
||||
alarmNoticeDialog->screenSaveStyle();
|
||||
alarmNoticeDialog->playMusic();
|
||||
}
|
||||
|
||||
|
@ -1584,8 +1719,17 @@ void Clock::updateAlarmClock()
|
|||
aItem[alarmNum]->setSizeHint(QSize(340,108));
|
||||
aItem[alarmNum]->setTextColor(QColor(255, 0, 0, 255));
|
||||
ui->alarmListWidget->addItem(aItem[alarmNum]);
|
||||
ui->alarmListWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
//避免滚动条因占据item空间而使item发生变化
|
||||
ui->alarmListWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
ui->alarmListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
ui->alarmListWidget->verticalScrollBar()->setHidden(true);
|
||||
connect(ui->alarmListWidget->verticalScrollBar(),&QScrollBar::rangeChanged,this, [=](){
|
||||
if (ui->alarmListWidget->verticalScrollBar()->maximum() == 0) {
|
||||
ui->alarmListWidget->verticalScrollBar()->setHidden(true);
|
||||
} else {
|
||||
ui->alarmListWidget->verticalScrollBar()->setHidden(false);
|
||||
}
|
||||
});
|
||||
//闹钟信息
|
||||
w1[alarmNum] = new item_new(ui->alarmListWidget);
|
||||
//信息与展示窗体绑定
|
||||
|
@ -1687,9 +1831,9 @@ void Clock::updateAlarmClock()
|
|||
w1[alarmNum]->alarmLabel_s0->setText(tr("No repetition"));
|
||||
}
|
||||
}
|
||||
updateLabelStrCnEn(w1[alarmNum]->alarmLabel_s0,20,25);
|
||||
//闹钟开关绑定
|
||||
// connect( w1[alarmNum]->alarm_on_off0, SIGNAL(clicked()), this, SLOT(OnOffAlarm()) );
|
||||
connect(w1[alarmNum]->alarm_on_off0,SIGNAL(stateChanged()),this, SLOT(OnOffAlarm()));
|
||||
connect(w1[alarmNum]->alarm_on_off0,SIGNAL(stateChanged(bool)),this, SLOT(OnOffAlarm()));
|
||||
alarmNum++;
|
||||
}
|
||||
// updateClockIdByNum(needIdNumList,numToIndex);
|
||||
|
@ -1851,9 +1995,6 @@ void Clock::setAlarmSave()
|
|||
ui->mainWidget->setCurrentIndex(1);
|
||||
ui->mainWidget->raise();/*将页面放置最前方
|
||||
Put the page at the front*/
|
||||
ui->minmizeBtn->raise();
|
||||
ui->closeTitleBtn->raise();
|
||||
ui->menuBtn->raise();
|
||||
|
||||
if (dialog_repeat)
|
||||
dialog_repeat->close();
|
||||
|
@ -1886,9 +2027,6 @@ void Clock::setAlarmSave()
|
|||
ui->mainWidget->setCurrentIndex(1);
|
||||
ui->mainWidget->raise();//将页面放置最前方
|
||||
// Put the page at the front
|
||||
ui->minmizeBtn->raise();
|
||||
ui->closeTitleBtn->raise();
|
||||
ui->menuBtn->raise();
|
||||
|
||||
if (dialog_repeat)
|
||||
dialog_repeat->close();
|
||||
|
@ -1896,6 +2034,7 @@ void Clock::setAlarmSave()
|
|||
dialog_music->close();
|
||||
}
|
||||
updateAlarmItemFront(CURRENT_FONT_SIZE);
|
||||
playController::getInstance().stop();
|
||||
}
|
||||
|
||||
void Clock::saveClockToDatabase(int rowNum)
|
||||
|
@ -2088,9 +2227,7 @@ void Clock::alarmCancelSave()
|
|||
{
|
||||
ui->mainWidget->setCurrentIndex(1);
|
||||
ui->mainWidget->raise();
|
||||
ui->minmizeBtn->raise();
|
||||
ui->closeTitleBtn->raise();
|
||||
ui->menuBtn->raise();
|
||||
playController::getInstance().stop();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2310,11 +2447,9 @@ void Clock::OnOffAlarm()
|
|||
QString id = w1[i]->id();
|
||||
auto sqlQuery = getClockByPK(id);
|
||||
if (sqlQuery.value(3).toInt() == 0) {
|
||||
// btn->closeSlot();
|
||||
w1[i]->closeStyle(CURRENT_FONT_SIZE);
|
||||
updateClockDatabase(id,nullptr,nullptr,nullptr,1);
|
||||
} else {
|
||||
// btn->openSlot();
|
||||
w1[i]->openStyle(CURRENT_FONT_SIZE);
|
||||
updateClockDatabase(id,nullptr,nullptr,nullptr,0);
|
||||
}
|
||||
|
@ -2513,6 +2648,12 @@ void Clock::statCountdownMsec()
|
|||
}
|
||||
countdown_msec=1000;
|
||||
}
|
||||
updateCountdownTime();
|
||||
|
||||
}
|
||||
|
||||
void Clock::updateCountdownTime()
|
||||
{
|
||||
//设置当前时间
|
||||
int ringmax = countdown_hour*3600 + countdown_minute*60 + countdown_second;
|
||||
ui->countdownRunPage->countdownRunRoundBar->setValue(ringmax);
|
||||
|
@ -2556,6 +2697,7 @@ void Clock::statCountdownMsec()
|
|||
tinycountdownDia->updateTimeInfo(h+TIME_SEPARATOR+m+TIME_SEPARATOR+s);
|
||||
}
|
||||
}
|
||||
// qDebug()<<"dbq-倒计时"<<countdown_hour<<":"<<countdown_minute<<":"<<countdown_second;
|
||||
//时间归零
|
||||
if (countdown_hour==0 && countdown_minute==0 && (countdown_second)==0) {
|
||||
startbtnCountdown();
|
||||
|
@ -2597,16 +2739,19 @@ void Clock::countdownNoticeDialogShow()
|
|||
moveUnderMultiScreen(UP_RIGHT,countdownNoticeDialog,0);
|
||||
} else
|
||||
moveUnderMultiScreen(UP_RIGHT,countdownNoticeDialog,1);
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(countdownNoticeDialog);
|
||||
countdownNoticeDialog->screenSaveStyle();
|
||||
countdownNoticeDialog->playMusic();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 倒计时开始-结束
|
||||
* Countdown start end callback
|
||||
*/
|
||||
void Clock::startbtnCountdown(){
|
||||
if (!countdown_isStarted) {
|
||||
playController::getInstance().stop();
|
||||
|
||||
//点击了开始
|
||||
if (hourTimerRing->m_currentValue==0 && minuteTimeRing->m_currentValue==0 && secondTimeRing->m_currentValue==0) {
|
||||
|
@ -2800,21 +2945,17 @@ void Clock::onTinyClicked()
|
|||
{
|
||||
this->m_selectTinyCountdown=true;
|
||||
//主窗体最小化
|
||||
// kdk::WindowManager::minimizeWindow(m_pid);
|
||||
setWindowState(Qt::WindowMinimized);
|
||||
// kdk::WindowManager::minimizeWindow(this->winId());
|
||||
// tinycountdownDia->showTop();
|
||||
moveUnderMultiScreen(UP_RIGHT,tinycountdownDia,0);
|
||||
}
|
||||
|
||||
void Clock::activeWindow()
|
||||
{
|
||||
// setWindowState(Qt::WindowActive);
|
||||
kdk::WindowManager::activateWindow(this->winId());
|
||||
showThisWindow();
|
||||
kdk::WindowManager::activateWindow(m_pid);
|
||||
}
|
||||
void Clock::showThisWindow()
|
||||
{
|
||||
// this->hide();
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
this->show();
|
||||
QRect rect = utils->centerToScreenQRect(this);
|
||||
|
@ -3110,6 +3251,16 @@ void Clock::updateRepeatStr(QLabel *label){
|
|||
updateLabelTextByLength(label,25);
|
||||
}
|
||||
}
|
||||
|
||||
void Clock::updateLabelStrCnEn(QLabel *label, int cnLimit, int enLimit)
|
||||
{
|
||||
if(Utils::checkLocalChina()){
|
||||
updateLabelTextByLength(label,cnLimit);
|
||||
}
|
||||
if(Utils::checkLocalUs()){
|
||||
updateLabelTextByLength(label,enLimit);
|
||||
}
|
||||
}
|
||||
void Clock::updateLabelTextByLength(QLabel *label, int limitSize)
|
||||
{
|
||||
QString str = label->text();
|
||||
|
@ -3597,65 +3748,56 @@ void Clock::moveUnderMultiScreen(Clock::ScreenPosition spostion,QWidget * tempDi
|
|||
int screen_height = screen->geometry().height();
|
||||
int x = primaryManager->getNScreen_x();
|
||||
int y = primaryManager->getNScreen_y();
|
||||
qWarning()<<"dbq-screen_width"<<screen_width<<"screen_height"<<screen_height<<"x"<<x<<"y"<<y;
|
||||
int heightRadio = 20;
|
||||
int widthRadio = 14;
|
||||
|
||||
int moveWidth = 0;
|
||||
int moveHeight =0;
|
||||
int diaWidth = tempDialog->width();
|
||||
int diaHeight = tempDialog->height();
|
||||
|
||||
switch (spostion) {
|
||||
case SP_LEFT:
|
||||
{
|
||||
int moveWidth = x+round(tempDialog->width()+round(1.0/heightRadio*screen_width));
|
||||
int moveHeight = y+round(screen_height-tempDialog->height()-round(1.0/widthRadio*screen_height));
|
||||
// tempDialog->move(moveWidth,moveHeight);
|
||||
kdk::WindowManager::setGeometry(tempDialog->windowHandle(),QRect(moveWidth,moveHeight,diaWidth,diaHeight));
|
||||
moveWidth = x+round(tempDialog->width()+round(1.0/heightRadio*screen_width));
|
||||
moveHeight = y+round(screen_height-tempDialog->height()-round(1.0/widthRadio*screen_height));
|
||||
}break;
|
||||
case SP_RIGHT:
|
||||
{
|
||||
int moveWidth = x+round(screen_width-tempDialog->width());
|
||||
int moveHeight = y+round(screen_height-tempDialog->height()-50);
|
||||
tempDialog->move(moveWidth,moveHeight);
|
||||
if (hiddenFlag == 1){
|
||||
// tempDialog->move(moveWidth,moveHeight);
|
||||
kdk::WindowManager::setGeometry(tempDialog->windowHandle(),QRect(moveWidth,moveHeight,diaWidth,diaHeight));
|
||||
}
|
||||
else{
|
||||
// tempDialog->move(moveWidth,moveHeight-tempDialog->height());
|
||||
kdk::WindowManager::setGeometry(tempDialog->windowHandle(),QRect(moveWidth,moveHeight-tempDialog->height(),diaWidth,diaHeight));
|
||||
}
|
||||
|
||||
moveWidth = x+round(screen_width-tempDialog->width());
|
||||
moveHeight = y+round(screen_height-tempDialog->height()-50);
|
||||
}break;
|
||||
case SP_CENTER:
|
||||
{
|
||||
int moveWidth = x+round((screen_width-tempDialog->width())*1.0/2);
|
||||
int moveHeight = y+round((screen_height-tempDialog->height())*1.0/2);
|
||||
// tempDialog->move(moveWidth,moveHeight);
|
||||
kdk::WindowManager::setGeometry(tempDialog->windowHandle(),QRect(moveWidth,moveHeight,diaWidth,diaHeight));
|
||||
moveWidth = x+round((screen_width-tempDialog->width())*1.0/2);
|
||||
moveHeight = y+round((screen_height-tempDialog->height())*1.0/2);
|
||||
}break;
|
||||
case UP_LEFT:
|
||||
{
|
||||
int moveWidth = x+round(tempDialog->width()+round(1.0/heightRadio*screen_width));
|
||||
int moveHeight = y+round(tempDialog->height()+round(1.0/widthRadio*screen_height));
|
||||
// tempDialog->move(moveWidth,moveHeight);
|
||||
kdk::WindowManager::setGeometry(tempDialog->windowHandle(),QRect(moveWidth,moveHeight,diaWidth,diaHeight));
|
||||
moveWidth = x+round(tempDialog->width()+round(1.0/heightRadio*screen_width));
|
||||
moveHeight = y+round(tempDialog->height()+round(1.0/widthRadio*screen_height));
|
||||
}break;
|
||||
case UP_RIGHT:
|
||||
{
|
||||
int moveWidth = x+round(screen_width-tempDialog->width()-round(1.0/heightRadio*screen_width));
|
||||
int moveHeight = y+round(1.0/20*screen_height);
|
||||
qWarning()<<"dbq-UP_RIGHT"<<moveWidth<<moveHeight<<screen_width<<screen_height<<diaWidth<<diaHeight;
|
||||
// tempDialog->move(moveWidth,moveHeight);
|
||||
kdk::WindowManager::setGeometry(tempDialog->windowHandle(),QRect(moveWidth,moveHeight,diaWidth,diaHeight));
|
||||
moveWidth = x+round(screen_width-tempDialog->width()-round(1.0/heightRadio*screen_width));
|
||||
moveHeight = y+round(1.0/20*screen_height);
|
||||
}break;
|
||||
case UP_CENTER:
|
||||
{
|
||||
int moveWidth = x+round((screen_width-tempDialog->width())*1.0/2);
|
||||
int moveHeight = y+round((screen_height-tempDialog->height())*1.0/2);
|
||||
kdk::WindowManager::setGeometry(tempDialog->windowHandle(),QRect(moveWidth,moveHeight,diaWidth,diaHeight));
|
||||
// tempDialog->move(moveWidth,moveHeight);
|
||||
moveWidth = x+round((screen_width-tempDialog->width())*1.0/2);
|
||||
moveHeight = y+round((screen_height-tempDialog->height())*1.0/2);
|
||||
}break;
|
||||
default:
|
||||
{}
|
||||
}
|
||||
if (hiddenFlag == 1){
|
||||
kdk::WindowManager::setGeometry(tempDialog->windowHandle(),QRect(moveWidth,moveHeight,diaWidth,diaHeight));
|
||||
}
|
||||
else{
|
||||
kdk::WindowManager::setGeometry(tempDialog->windowHandle(),QRect(moveWidth,moveHeight-tempDialog->height(),diaWidth,diaHeight));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
76
clock.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef CLOCK_H
|
||||
#define CLOCK_H
|
||||
#include <QPainterPath>
|
||||
|
@ -122,6 +101,9 @@
|
|||
#include "commontooltip.h"
|
||||
#include "btnNew.h"
|
||||
#include "selectbtnutil.h"
|
||||
#include "kwidget.h"
|
||||
#include "kwindowbuttonbar.h"
|
||||
#include "gui_g.h"
|
||||
#include <QPointer>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
|
@ -136,6 +118,7 @@ class QSqlTableModel;
|
|||
class SelectBtn;
|
||||
class close_or_hide;
|
||||
|
||||
using namespace kdk;
|
||||
|
||||
namespace Ui {
|
||||
class Clock;
|
||||
|
@ -183,6 +166,8 @@ public:
|
|||
QString updateClockByIdJosn(QString param);
|
||||
QString selectClockByIdJosn(QString param);
|
||||
QString deleteClockByIdJosn(QString param);
|
||||
|
||||
KWindowButtonBar* m_windowButtonBar;
|
||||
void showThisWindow();
|
||||
protected:
|
||||
void paintEvent1(QPaintEvent *);
|
||||
|
@ -234,7 +219,9 @@ private slots:
|
|||
// window closing
|
||||
void windowMinimizingClicked(); // 窗口最小化
|
||||
void muteAllBell();
|
||||
void ringContinueWhenMute(Natice_alarm *tempdialog);
|
||||
// window minimizing
|
||||
void watchTimeJump();
|
||||
void timerUpdate(); // 动态监控闹钟与本地时间
|
||||
// Dynamic monitoring alarm clock and local time
|
||||
void textTimerupdate(); // 闹钟上方电子表
|
||||
|
@ -264,6 +251,7 @@ private slots:
|
|||
// Countdown start animation move
|
||||
void statCountdown(); // 倒计时执行
|
||||
void statCountdownMsec();
|
||||
void updateCountdownTime();
|
||||
// Countdown execution
|
||||
void setcoutdownNumber(int h, int m, int s); // 设置倒计时初始时间
|
||||
// Set the initial countdown time
|
||||
|
@ -321,6 +309,7 @@ private slots:
|
|||
void addDivBell(set_alarm_repeat_Dialog *tempDialog,btnType type);
|
||||
// Countdown music selection single callback
|
||||
void countdownNoticeDialogShow(); // 倒计时通知弹窗
|
||||
|
||||
// Countdown notification pop-up
|
||||
void offAlarm(int); // 重复时单独关闭闹钟
|
||||
// Turn off the alarm separately if it is not repeated
|
||||
|
@ -336,6 +325,9 @@ private slots:
|
|||
void createUserGuideDebusClient();
|
||||
void onTinyClicked();
|
||||
void activeWindow();
|
||||
|
||||
signals:
|
||||
void timeJump(qint64 timeValue);
|
||||
private:
|
||||
QPoint m_startPoint;
|
||||
QTimer *timer = nullptr;
|
||||
|
@ -349,6 +341,10 @@ private:
|
|||
int alarmMinute;
|
||||
int cPauseTime;
|
||||
bool isStarted;
|
||||
QPushButton* muteBtn;
|
||||
QPushButton* closeTitleBtn;
|
||||
QPushButton* minmizeBtn;
|
||||
KMenuButton* menuBtn;
|
||||
/**
|
||||
* @brief 倒计时运行标记
|
||||
*/
|
||||
|
@ -503,7 +499,6 @@ private:
|
|||
QList<int> * hisLongShortIndex = nullptr;
|
||||
SelectBtnUtil * m_selectBtnUtil = nullptr;
|
||||
QMediaPlayer *music = nullptr;
|
||||
|
||||
void updateClockSelectBtnStyle(SelectBtn * temp,int moveHeight);
|
||||
void updateCountdownSelectBtnStyle(SelectBtn * temp,int moveWidth,int moveHeight);
|
||||
|
||||
|
@ -524,6 +519,7 @@ private:
|
|||
void setSwitchHighlightColor(QPushButton *btn);
|
||||
QString getDefaultGreyColor();
|
||||
void updateRepeatStr(QLabel *label);
|
||||
void updateLabelStrCnEn(QLabel *label,int cnLimit,int enLimit);
|
||||
void updateLabelTextByLength(QLabel *label, int limitSize);
|
||||
void closeHandel();
|
||||
QPointer<QSystemTrayIcon> m_trayIcon;
|
||||
|
@ -533,7 +529,9 @@ private:
|
|||
QString changeNumToStrWithAm(int alarmHour);
|
||||
void updateTrayIconTooltip(QString info);
|
||||
void setDefaultTrayIconTooltip();
|
||||
|
||||
int localeNumBack;
|
||||
quint32 m_pid;
|
||||
void iniWaylandWinId();
|
||||
};
|
||||
|
||||
#endif // CLOCK_H
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
[common]
|
||||
version=3.1.4.0.0k0-0k0.2
|
||||
version=3.1.4.0.0k0-0k0.3
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "clockdbusadaptor.h"
|
||||
#include <QDBusArgument>
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef CLOCKDBUSADAPTOR_H
|
||||
#define CLOCKDBUSADAPTOR_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "clockentitydao.h"
|
||||
#include "fieldvalidutil.h"
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef CLOCKENTITYDAO_H
|
||||
#define CLOCKENTITYDAO_H
|
||||
|
||||
|
|
|
@ -1,49 +1,28 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "closeOrHide.h"
|
||||
#include "ui_closeOrHide.h"
|
||||
#include "QDebug"
|
||||
#include <X11/Xlib.h>
|
||||
#include "xatom-helper.h"
|
||||
#include "constant_class.h"
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
#include <math.h>
|
||||
|
||||
extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
|
||||
|
||||
close_or_hide::close_or_hide(QWidget *parent) :
|
||||
|
@ -51,16 +30,18 @@ close_or_hide::close_or_hide(QWidget *parent) :
|
|||
ui(new Ui::close_or_hide)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->surebtn->setText("");
|
||||
ui->cancelbtn->setText("");
|
||||
// this->setProperty("blurRegion", QRegion(QRect(1, 1, 1, 1)));
|
||||
// setAttribute(Qt::WA_TranslucentBackground);
|
||||
// this->setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog);
|
||||
|
||||
ui->backrunRadio->setChecked(1);
|
||||
|
||||
// 添加窗管协议
|
||||
// XAtomHelper::setStandardWindowHint(this->winId());
|
||||
// XAtomHelper::setStandardWindowRadius(this->winId(),WINDOWN_RADIUS);
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
ui->closeInfoLabel->setText(tr("Please select the state after closing:"));
|
||||
ui->closeInfoLabel->setWordWrap(true);
|
||||
ui->closeInfoLabel->setAlignment(Qt::AlignTop);
|
||||
|
@ -90,6 +71,25 @@ close_or_hide::close_or_hide(QWidget *parent) :
|
|||
//关闭按钮去掉聚焦状态
|
||||
ui->closebtn->setFocusPolicy(Qt::NoFocus);
|
||||
|
||||
|
||||
//按钮文本居中显示,避免使用stylesheet,添加label于pushbutton上
|
||||
QLabel *sureLabel = new QLabel();
|
||||
sureLabel->setText(tr("sure"));
|
||||
sureLabel->adjustSize();
|
||||
QHBoxLayout *myLayout = new QHBoxLayout(ui->surebtn);
|
||||
myLayout->addWidget(sureLabel);
|
||||
myLayout->setContentsMargins(0,2,0,4);
|
||||
myLayout->setAlignment(Qt::AlignHCenter);
|
||||
ui->surebtn->setLayout(myLayout);
|
||||
|
||||
QLabel *cancelLabel = new QLabel();
|
||||
cancelLabel->setText(tr("cancel"));
|
||||
cancelLabel->adjustSize();
|
||||
QHBoxLayout *myLayout1 = new QHBoxLayout(ui->cancelbtn);
|
||||
myLayout1->addWidget(cancelLabel);
|
||||
myLayout1->setContentsMargins(0,2,0,4);
|
||||
myLayout1->setAlignment(Qt::AlignHCenter);
|
||||
ui->cancelbtn->setLayout(myLayout1);
|
||||
}
|
||||
|
||||
close_or_hide::~close_or_hide()
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef CLOSE_OR_HIDE_H
|
||||
#define CLOSE_OR_HIDE_H
|
||||
|
||||
|
@ -45,6 +24,7 @@
|
|||
#include <QPainterPath>
|
||||
#include <QMouseEvent>
|
||||
#include <QGSettings/qgsettings.h>
|
||||
#include <QLabel>
|
||||
|
||||
namespace Ui {
|
||||
class close_or_hide;
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "commontooltip.h"
|
||||
#include <QBitmap>
|
||||
#include <QPainter>
|
||||
|
@ -45,6 +24,7 @@
|
|||
CommonToolTip::CommonToolTip(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
|
||||
this->setFixedSize(155,50);
|
||||
this->setAttribute(Qt::WA_TranslucentBackground);//设置窗口背景透明
|
||||
this->setWindowFlags(Qt::FramelessWindowHint|Qt::ToolTip); //设置无边框窗口
|
||||
setRoundStyle();
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef COMMONTOOLTIP_H
|
||||
#define COMMONTOOLTIP_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "configutil.h"
|
||||
#include <QtCore/QtCore>
|
||||
#include <QDebug>
|
||||
|
|
53
configutil.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef CONFIGUTIL_H
|
||||
#define CONFIGUTIL_H
|
||||
|
||||
|
|
65
connection.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef CONNECTION_H
|
||||
#define CONNECTION_H
|
||||
|
||||
|
@ -51,8 +30,7 @@ namespace clock_sql {
|
|||
static QSqlDatabase db;
|
||||
static bool createConnection()
|
||||
{
|
||||
QString lan = QLocale().name();
|
||||
QString url_filepath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) +"/.config/Clock_database_"+lan+"_sp2.db";
|
||||
QString url_filepath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) +"/.config/Clock_database"+"_sp2.db";
|
||||
//SQLite是一款轻量级的开源的嵌入式数据库
|
||||
db = QSqlDatabase::addDatabase("QSQLITE");
|
||||
db.setDatabaseName(url_filepath);
|
||||
|
@ -66,7 +44,9 @@ static bool createConnection()
|
|||
query.clear();
|
||||
query.exec(QString("create table setup (mute_on int, bell_id QString)"));
|
||||
query.clear();
|
||||
query.exec(QString("create table bell (id QString, bell_cn QString,bell_en QString,"
|
||||
query.exec(QString("create table watch_time (wt_id QString,time_since_epoch QString)"));
|
||||
query.clear();
|
||||
query.exec(QString("create table bell (id QString, bell_cn QString,bell_bo QString,bell_en QString,"
|
||||
"bell_path QString,create_time int,bell_type int)"));
|
||||
return true;
|
||||
}
|
||||
|
@ -98,7 +78,10 @@ static QSqlTableModel * getBellTable(QObject *parent){
|
|||
QSqlTableModel * model = getTableByName(parent,"bell");
|
||||
return model;
|
||||
}
|
||||
|
||||
static QSqlTableModel * getWatchTimeTable(QObject *parent){
|
||||
QSqlTableModel * model = getTableByName(parent,"watch_time");
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef CONSTANTCLASS_H
|
||||
#define CONSTANTCLASS_H
|
||||
|
||||
|
@ -79,4 +58,10 @@ const static int WINDOWN_RADIUS=12;
|
|||
const static int SELECT_DIA_RADIUS=8;
|
||||
const static int SELECT_ITEM_RADIUS=6;
|
||||
const static int COUNTDOWN_TIME=6;
|
||||
#define SSWND_DBUS_SERVICE "org.ukui.ScreenSaverWnd"
|
||||
#define SSWND_DBUS_PATH "/"
|
||||
#define SSWND_DBUS_INTERFACE "org.ukui.ScreenSaverWnd"
|
||||
#define SCREENSAVE_DBUS_SERVICE "org.ukui.ScreenSaver"
|
||||
#define SCREENSAVE_DBUS_PATH "/"
|
||||
#define SCREENSAVE_DBUS_INTERFACE "org.ukui.ScreenSaver"
|
||||
#endif // CONSTANTCLASS_H
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2022 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2022 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "mmediaplayer.h"
|
||||
#include <QDBusMessage>
|
||||
#include <QDBusConnection>
|
||||
|
@ -81,13 +60,15 @@ void MMediaPlayer::truePlay(QString startTime)
|
|||
|
||||
const QByteArray c_filename = filePath.toUtf8();
|
||||
//如果文件名和上次一样,且不是因为拖动进度条播放,说明上次是暂停
|
||||
if (c_filename == filenameBack && m_positionChangeed == false) {
|
||||
if (filenameBack != "") {
|
||||
//切换播放状态为播放
|
||||
pause();
|
||||
}
|
||||
return;
|
||||
}
|
||||
//注释该段代码,改代码致使,未更换铃声重新设置倒计时,没有铃声播放
|
||||
// if (c_filename == filenameBack && m_positionChangeed == false) {
|
||||
// if (filenameBack != "") {
|
||||
// //切换播放状态为播放
|
||||
// pause();
|
||||
// qDebug()<<"--如果文件名和上次一样,且不是因为拖动进度条播放,说明上次是暂停-";
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
//重置参数
|
||||
m_position = 0;
|
||||
m_positionChangeed = false;
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef MMEDIAPLAYER_H
|
||||
#define MMEDIAPLAYER_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2022 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2022 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "mmediaplaylist.h"
|
||||
|
||||
MMediaPlaylist::MMediaPlaylist(QObject *parent)
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef MMediaPlaylist_H
|
||||
#define MMediaPlaylist_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include <QDebug>
|
||||
#include <QDBusConnection>
|
||||
#include "playcontroller.h"
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef PLAYCONTROLLER_H
|
||||
#define PLAYCONTROLLER_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "countdownAnimation.h"
|
||||
#include <QTimer>
|
||||
#include <unistd.h>
|
||||
|
@ -89,7 +68,7 @@ void Countdown_Animation::setupUi(QWidget *TestWidget)
|
|||
//时间滚轮
|
||||
countdownRunRoundBar = new QRoundProgressBar(TestWidget);
|
||||
countdownRunRoundBar->setObjectName(QString::fromUtf8("RoundBar3"));
|
||||
countdownRunRoundBar->setGeometry(QRect(-12, -4, 454, 461));
|
||||
countdownRunRoundBar->setGeometry(QRect(-4, -4, 454, 461));
|
||||
//管理着控件或窗体的所有颜色信息
|
||||
// QPalette palette;
|
||||
// QBrush brush(QColor(255, 255, 255, 0));
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef TESTWIDGET_H
|
||||
#define TESTWIDGET_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "dbusdeleteclockbyidadaptor.h"
|
||||
|
||||
DbusDeleteClockByIdAdaptor::DbusDeleteClockByIdAdaptor(QObject *parent, Clock *currentClock) : QDBusAbstractAdaptor(parent),
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef DBUSDELETECLOCKBYIDADAPTOR_H
|
||||
#define DBUSDELETECLOCKBYIDADAPTOR_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "dbusselectclockbyidadaptor.h"
|
||||
|
||||
DbusSelectClockByIdAdaptor::DbusSelectClockByIdAdaptor(QObject *parent,Clock * currentClock) : QDBusAbstractAdaptor(parent),
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef DBUSSELECTCLOCKBYIDADAPTOR_H
|
||||
#define DBUSSELECTCLOCKBYIDADAPTOR_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "dbusupdateclockadaptor.h"
|
||||
|
||||
DbusUpdateClockAdaptor::DbusUpdateClockAdaptor(QObject *parent,Clock * currentClock) : QDBusAbstractAdaptor(parent),
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef DBUSUPDATECLOCKADAPTOR_H
|
||||
#define DBUSUPDATECLOCKADAPTOR_H
|
||||
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
ukui-clock (3.1.4.0.0k0-0k0.3) v101; urgency=medium
|
||||
|
||||
[ BUG 号 ]
|
||||
* Closes: #
|
||||
- 130009 【闹钟】[wayland]闹钟最小化错误
|
||||
- 136684 【闹钟】添加闹钟后将其关闭,等待到达设定时间闹钟仍会生效
|
||||
[ 任务号]
|
||||
-
|
||||
[ 需求号]
|
||||
-
|
||||
[ 其他改动说明 ]
|
||||
-
|
||||
[ 影响域 ]
|
||||
* 应用本身
|
||||
|
||||
-- daiboqi <daiboqi@kylinos.cn> Wed, 17 Aug 2022 11:24:46 +0800
|
||||
|
||||
ukui-clock (3.1.4.0.0k0-0k0.2) v101; urgency=medium
|
||||
|
||||
[ BUG 号 ]
|
||||
|
|
|
@ -11,6 +11,7 @@ Build-Depends: debhelper (>=11~),
|
|||
libgsettings-qt-dev,
|
||||
libkf5windowsystem-dev,
|
||||
libkysdk-qtwidgets-dev,
|
||||
libkysdk-waylandhelper-dev,
|
||||
libmpv-dev,
|
||||
libqt5svg5-dev,
|
||||
libqt5x11extras5-dev,
|
||||
|
@ -24,7 +25,6 @@ Build-Depends: debhelper (>=11~),
|
|||
qtbase5-dev,
|
||||
qtmultimedia5-dev,
|
||||
qtscript5-dev,
|
||||
libkysdk-waylandhelper-dev,
|
||||
qttools5-dev-tools
|
||||
Standards-Version: 4.1.4
|
||||
Homepage: https://github.com/ukui/ukui-clock
|
||||
|
|
53
debug.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
|
||||
|
|
|
@ -1,47 +1,24 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "deleteMsg.h"
|
||||
#include "ui_deleteMsg.h"
|
||||
#include <X11/Xlib.h>
|
||||
#include "xatom-helper.h"
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
|
||||
extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
|
||||
|
||||
|
|
54
deleteMsg.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef DELETE_MSG_H
|
||||
#define DELETE_MSG_H
|
||||
|
||||
|
@ -44,6 +23,7 @@
|
|||
#include <QPainter>
|
||||
#include <QMouseEvent>
|
||||
#include <QPainterPath>
|
||||
#include "constant_class.h"
|
||||
namespace Ui {
|
||||
class delete_msg;
|
||||
}
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "dotlineDemo.h"
|
||||
#include <QDebug>
|
||||
#include <QStyleOption>
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef DOTLINEDEMO_H
|
||||
#define DOTLINEDEMO_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "fieldvalidutil.h"
|
||||
|
||||
FieldValidUtil::FieldValidUtil(QObject *parent) : QObject(parent)
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef FIELDVALIDUTIL_H
|
||||
#define FIELDVALIDUTIL_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "gsettingsubject.h"
|
||||
#include "theme.h"
|
||||
|
||||
|
@ -83,6 +62,14 @@ void GsettingSubject::iniConnection()
|
|||
}
|
||||
});
|
||||
}
|
||||
if (m_screenSaveInterface->isValid()){
|
||||
QObject::connect(m_screenSaveInterface, SIGNAL(lock()),
|
||||
this, SLOT(emitScreenSaveLock()));
|
||||
}
|
||||
if (m_screenSaveInterface->isValid()){
|
||||
QObject::connect(m_screenSaveInterface, SIGNAL(unlock()),
|
||||
this, SLOT(emitScreenSaveUnlock()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -101,6 +88,18 @@ void GsettingSubject::iniData()
|
|||
if (QGSettings::isSchemaInstalled(mouseId)){
|
||||
m_mouseSettings = new QGSettings(mouseId);
|
||||
}
|
||||
//锁屏接口
|
||||
m_screenSaveInterface = new QDBusInterface(SCREENSAVE_DBUS_SERVICE, SCREENSAVE_DBUS_PATH,
|
||||
SCREENSAVE_DBUS_INTERFACE,
|
||||
QDBusConnection::sessionBus());
|
||||
if (!m_screenSaveInterface->isValid()){
|
||||
qCritical() << qPrintable(QDBusConnection::sessionBus().lastError().message());
|
||||
}
|
||||
}
|
||||
|
||||
bool GsettingSubject::getScreenSaveOn() const
|
||||
{
|
||||
return m_screenSaveOn;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -148,6 +147,19 @@ void GsettingSubject::iniMouseWheel()
|
|||
getWheelSpeed();
|
||||
}
|
||||
}
|
||||
|
||||
void GsettingSubject::iniScreenSaveState()
|
||||
{
|
||||
m_screenSaveIface = new QDBusInterface(SSWND_DBUS_SERVICE,
|
||||
SSWND_DBUS_PATH,
|
||||
SSWND_DBUS_INTERFACE);
|
||||
if ( m_screenSaveIface&& m_screenSaveIface->isValid()) {
|
||||
emit screenSaveLock();
|
||||
}else{
|
||||
emit screenSaveUnlock();
|
||||
}
|
||||
|
||||
}
|
||||
void GsettingSubject::getWheelSpeed()
|
||||
{
|
||||
if (m_mouseSettings->get(WHEEL_KEY_HW).toInt()) {
|
||||
|
@ -160,6 +172,20 @@ void GsettingSubject::getWheelSpeed()
|
|||
}
|
||||
}
|
||||
|
||||
void GsettingSubject::emitScreenSaveLock()
|
||||
{
|
||||
qDebug()<<"dbq-emitScreenSaveLock";
|
||||
m_screenSaveOn = true;
|
||||
emit screenSaveLock();
|
||||
}
|
||||
|
||||
void GsettingSubject::emitScreenSaveUnlock()
|
||||
{
|
||||
qDebug()<<"dbq-emitScreenSaveUnlock";
|
||||
m_screenSaveOn = false;
|
||||
emit screenSaveUnlock();
|
||||
}
|
||||
|
||||
GsettingSubject::~GsettingSubject()
|
||||
{
|
||||
delete m_styleSettings;
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef GSETTINGSUBJECT_H
|
||||
#define GSETTINGSUBJECT_H
|
||||
|
||||
|
@ -43,6 +22,10 @@
|
|||
#include <QGSettings>
|
||||
#include "constant_class.h"
|
||||
#include <QMutex>
|
||||
#include <QDBusMessage>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusReply>
|
||||
#include <QDBusInterface>
|
||||
class GsettingSubject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -58,13 +41,20 @@ public:
|
|||
return &instance;
|
||||
}
|
||||
void iniMouseWheel();
|
||||
void iniScreenSaveState();
|
||||
bool getScreenSaveOn() const;
|
||||
signals:
|
||||
void blackStyle();
|
||||
void blackStyle();
|
||||
void whiteStyle();
|
||||
void iconChnaged();
|
||||
void fontChanged(int size);
|
||||
void mouseWheelChanged(int speed);
|
||||
void timeZoneChanged(QString timeZone);
|
||||
void screenSaveLock();
|
||||
void screenSaveUnlock();
|
||||
private slots:
|
||||
void emitScreenSaveLock();
|
||||
void emitScreenSaveUnlock();
|
||||
private:
|
||||
static void iniConnect();
|
||||
void iniConnection();
|
||||
|
@ -73,6 +63,9 @@ private:
|
|||
QStringList m_stylelist ;
|
||||
QGSettings *m_formatSettings = nullptr;
|
||||
QGSettings *m_mouseSettings = nullptr;
|
||||
QDBusInterface *m_screenSaveInterface = nullptr;
|
||||
QDBusInterface *m_screenSaveIface = nullptr;
|
||||
bool m_screenSaveOn = false;
|
||||
explicit GsettingSubject(QObject *parent = nullptr);
|
||||
void getWheelSpeed();
|
||||
};
|
||||
|
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 133 B |
After Width: | Height: | Size: 355 B |
|
@ -10,13 +10,11 @@
|
|||
|
||||

|
||||
|
||||
In the alarm clock interface, click **"add"** to add an alarm clock and set the time, alarm name, repeating day and ring tone.
|
||||
In the alarm clock interface, click **"add"** to add an alarm clock and set the time, alarm name, repeating day, ring tone and later reminder time.
|
||||
|
||||

|
||||
|
||||
Click  You can open the alarm menu bar. After selecting **"setting"** in the menu bar, a setting window will pop up. You can choose whether to mute, set the time format, later reminder time and default ring tone.
|
||||
Click  You can set alarm mute.
|
||||
|
||||

|
||||
|
||||
In the alarm menu bar, select **"help"** to automatically jump to the user's manual and view the operating instructions of the tool. Select **"about"** to view the current version information, and **"exit"** to close the application.
|
||||
Click  You can open the alarm menu bar. After selecting "setting" in the menu bar, a setting window will pop up. In the alarm menu bar, select **"help"** to automatically jump to the user's manual and view the operating instructions of the tool. Select **"about"** to view the current version information, and **"exit"** to close the application.
|
||||
|
||||
|
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 133 B |
After Width: | Height: | Size: 355 B |
|
@ -10,13 +10,12 @@
|
|||
|
||||

|
||||
|
||||
在闹钟界面中,点击**“添加”**可添加闹钟,并设定时间、闹钟名、重复日及铃声。
|
||||
在闹钟界面中,点击**“添加”**可添加闹钟,并设定时间、闹钟名、重复日、铃声及稍后提醒时间。
|
||||
|
||||

|
||||
|
||||
点击导航栏中的可打开闹钟菜单栏,在菜单栏中选择**“设置”**后将弹出设置窗口,可选择是否静音,设置时间格式、稍后提醒时间和默认铃声。
|
||||
|
||||

|
||||
|
||||
在闹钟菜单栏中,选择**“帮助”**将自动跳转至用户手册中,可查看该工具的操作说明。选择**“关于”**可查看当前版本信息,选择**“退出”**可关闭应用。
|
||||
点击导航栏中的(静音按钮),可以设置静音。
|
||||
|
||||
点击导航栏中的可打开闹钟菜单栏,选择**“帮助”**将自动跳转至用户手册中,可查看该工具的操作说明。选择**“关于”**可查看当前版本信息,选择**“退出”**可关闭应用。
|
||||
|
|
53
integer.cpp
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "integer.h"
|
||||
|
||||
Integer::Integer()
|
||||
|
|
53
integer.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef INTEGER_H
|
||||
#define INTEGER_H
|
||||
|
||||
|
|
58
itemNew.cpp
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "itemNew.h"
|
||||
#include<QApplication>
|
||||
#include <QDebug>
|
||||
|
@ -55,7 +34,7 @@ item_new::item_new(QWidget *parent) :
|
|||
|
||||
alarmLabel_s0 = new QLabel( this);//闹钟重复//Repetition of alarm clock
|
||||
alarmLabel_s0->move(27, 74);
|
||||
alarmLabel_s0->setFixedSize(270, 17);
|
||||
alarmLabel_s0->setFixedSize(270, 23);
|
||||
alarmLabel_s0->setText("工作日");
|
||||
alarmLabel_s0->setVisible(true);
|
||||
|
||||
|
@ -76,7 +55,6 @@ item_new::item_new(QWidget *parent) :
|
|||
alarm_on_off0 = new KSwitchButton(this);//闹钟开关// Alarm switch
|
||||
alarm_on_off0->move(263,43);
|
||||
alarm_on_off0->setFixedSize(50,24);
|
||||
alarm_on_off0->setChecked(true);
|
||||
alarm_on_off0->setFlat(true);
|
||||
alarm_on_off0->setVisible(true);
|
||||
settingsStyle();
|
||||
|
@ -145,7 +123,7 @@ void item_new::commonStyle(int size)
|
|||
alarmLabel_s0->setStyleSheet(getLabelStyleSheet(round(1.1*size)));//重复
|
||||
}
|
||||
/**
|
||||
* @brief 关闭纸灰
|
||||
* @brief 关闭置灰
|
||||
*/
|
||||
void item_new::closeStyle(int size)
|
||||
{
|
||||
|
|
53
itemNew.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef ITEM_NEW_H
|
||||
#define ITEM_NEW_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "kylinqfiledialog.h"
|
||||
#include <QDebug>
|
||||
#include <QCloseEvent>
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef KYLINQFILEDIALOG_H
|
||||
#define KYLINQFILEDIALOG_H
|
||||
|
||||
|
|
59
main.cpp
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "clock.h"
|
||||
#include "singleApplication.h"
|
||||
#include <QApplication>
|
||||
|
@ -50,9 +29,6 @@
|
|||
#include "dbusselectclockbyidadaptor.h"
|
||||
#include "ClockInterface.h"
|
||||
#include <QDBusMetaType>
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
#include "utils.h"
|
||||
/*!
|
||||
* \brief myMessageOutput
|
||||
* 日志打印输出
|
||||
|
@ -191,6 +167,9 @@ int main(int argc, char *argv[])
|
|||
publishDbusDeleteClock(&w,&deleteObj);
|
||||
QObject selectObj;
|
||||
publishDbusSelectClock(&w,&selectObj);
|
||||
// 添加窗管协议。显示的位置
|
||||
// XAtomHelper::setStandardWindowHint(w.winId());
|
||||
// w.show();
|
||||
w.showThisWindow();
|
||||
return a.exec();
|
||||
}
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "mediaplayerpool.h"
|
||||
#include <QDateTime>
|
||||
#include <QApplication>
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef MEDIAPLAYERPOOL_H
|
||||
#define MEDIAPLAYERPOOL_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "mediaplayerthread.h"
|
||||
#include <QTime>
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef MEDIAPLAYERTHREAD_H
|
||||
#define MEDIAPLAYERTHREAD_H
|
||||
|
||||
|
|
BIN
music/drip.wav
330
noticeAlarm.cpp
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "noticeAlarm.h"
|
||||
#include "ui_noticeAlarm.h"
|
||||
#include <QPalette>
|
||||
|
@ -51,8 +30,8 @@
|
|||
#include "gsettingsubject.h"
|
||||
#include <math.h>
|
||||
#include <QThread>
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
#include <QBitmap>
|
||||
#include "theme.h"
|
||||
|
||||
extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed);
|
||||
/**
|
||||
|
@ -73,12 +52,6 @@ Natice_alarm::Natice_alarm(int close_time, int num, QWidget *parent , QString cl
|
|||
m_musicPlayer = new MMediaPlayer(this);
|
||||
m_playList = new MMediaPlaylist(m_musicPlayer);
|
||||
m_playList->setPlaybackMode(MMediaPlaylist::CurrentItemInLoop);
|
||||
Qt::WindowFlags m_flags = windowFlags();
|
||||
this->setWindowFlags(m_flags | Qt::WindowStaysOnTopHint);
|
||||
|
||||
// 添加窗管协议
|
||||
// XAtomHelper::setStandardWindowHint(this->winId());
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
m_selectBtnUtil = new SelectBtnUtil();
|
||||
//响铃提示
|
||||
this->setWindowTitle(tr("Ring prompt"));
|
||||
|
@ -132,6 +105,16 @@ Natice_alarm::Natice_alarm(int close_time, int num, QWidget *parent , QString cl
|
|||
hideRemindBtn();
|
||||
}
|
||||
settingsStyle();
|
||||
//初始化锁屏dbus客户端
|
||||
m_screenSaveIface = new QDBusInterface(SSWND_DBUS_SERVICE,
|
||||
SSWND_DBUS_PATH,
|
||||
SSWND_DBUS_INTERFACE);
|
||||
//初始化使用不锁屏
|
||||
this->setAttribute(Qt::WA_TranslucentBackground);//设置窗口背景透明
|
||||
installEventFilter(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint|Qt::ToolTip); //设置无边框窗口
|
||||
this->setAttribute(Qt::WA_AlwaysShowToolTips);
|
||||
|
||||
}
|
||||
|
||||
void Natice_alarm::settingsStyle()
|
||||
|
@ -146,6 +129,16 @@ void Natice_alarm::settingsStyle()
|
|||
ui->titleIcon->setPixmap(QIcon::fromTheme("kylin-alarm-clock").pixmap(24,24));
|
||||
});
|
||||
subject->iniFontSize();
|
||||
//锁屏绑定screenSaveStyle
|
||||
connect(subject,&GsettingSubject::screenSaveLock, this,[=](){
|
||||
this->m_screenSaveOn = true;
|
||||
screenSaveStyle();
|
||||
});
|
||||
connect(subject,&GsettingSubject::screenSaveUnlock, this,[=](){
|
||||
this->m_screenSaveOn = false;
|
||||
screenSaveStyle();
|
||||
});
|
||||
subject->iniScreenSaveState();
|
||||
|
||||
}
|
||||
|
||||
|
@ -159,6 +152,17 @@ void Natice_alarm::updateFront(int size)
|
|||
QFont tempFont;
|
||||
tempFont.setPixelSize(pointSize);
|
||||
ui->remindLateBtn->setFont(tempFont);
|
||||
//稍后提醒按钮最大号字体省略
|
||||
QString remindbtninfo = tr("Remind later");
|
||||
if(size >= 14){
|
||||
ui->remindLateBtn->setToolTip(remindbtninfo);
|
||||
int limitsize = 8;
|
||||
if(remindbtninfo.length() > limitsize){
|
||||
remindbtninfo = remindbtninfo.left(limitsize);
|
||||
remindbtninfo = remindbtninfo+"...";
|
||||
}
|
||||
}
|
||||
ui->remindLateBtn->setText(remindbtninfo);
|
||||
}
|
||||
void Natice_alarm::updateLabelFront(QLabel *label, int size)
|
||||
{
|
||||
|
@ -242,6 +246,8 @@ void Natice_alarm::refreshMusic()
|
|||
int muteOn = model_setup->index(0, 0).data().toInt();
|
||||
if(muteOn){
|
||||
qDebug()<<"dbq-静音";
|
||||
m_musicPlayer->play();
|
||||
m_musicPlayer->pause();
|
||||
}else{
|
||||
m_musicPlayer->setVolume( 100 );
|
||||
m_musicPlayer->play();
|
||||
|
@ -267,8 +273,124 @@ void Natice_alarm::playMusic()
|
|||
timer_value = timer_value2;
|
||||
m_musicPlayer->setVolume(100);
|
||||
timer->start();
|
||||
show();
|
||||
refreshMusic();
|
||||
}
|
||||
void Natice_alarm::showThisWindow()
|
||||
{
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
this->show();
|
||||
}
|
||||
void Natice_alarm::screenSaveStyle()
|
||||
{
|
||||
if(this->isVisible()){
|
||||
this->hide();
|
||||
qDebug()<<"dbq-m_screenSaveOn"<<m_screenSaveOn;
|
||||
if(m_screenSaveOn){
|
||||
// setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint|Qt::ToolTip); //设置无边框窗口
|
||||
this->setAttribute(Qt::WA_AlwaysShowToolTips);
|
||||
//圆角
|
||||
QBitmap bmp(this->size());
|
||||
bmp.fill();
|
||||
QPainter p(&bmp);
|
||||
p.setRenderHint(QPainter::Antialiasing); // 反锯齿;
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(palette().color(QPalette::Base));
|
||||
p.drawRoundedRect(bmp.rect(),WINDOWN_RADIUS,WINDOWN_RADIUS);
|
||||
setMask(bmp);
|
||||
|
||||
QThread::sleep(1);
|
||||
m_screenSaveIface = new QDBusInterface(SSWND_DBUS_SERVICE,
|
||||
SSWND_DBUS_PATH,
|
||||
SSWND_DBUS_INTERFACE);
|
||||
if ( m_screenSaveIface&& m_screenSaveIface->isValid()) {
|
||||
QDBusReply<int> reply = m_screenSaveIface->call("RegisteSubWnd", this->winId());
|
||||
if(reply.isValid()) {
|
||||
qDebug() << "Result :"<<reply.value();
|
||||
} else {
|
||||
qWarning() << "Result invalid!!";
|
||||
}
|
||||
}else{
|
||||
qDebug()<<"dbq-not lock";
|
||||
}
|
||||
}else{
|
||||
this->setWindowFlags(Qt::WindowStaysOnTopHint);
|
||||
// 添加窗管协议
|
||||
// XAtomHelper::setStandardWindowHint(this->winId());
|
||||
kdk::UkuiStyleHelper::self()->removeHeader(this);
|
||||
}
|
||||
update();
|
||||
this->show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool Natice_alarm::eventFilter(QObject *obj, QEvent *e)
|
||||
{
|
||||
switch (e->type()) {
|
||||
case QEvent::MouseButtonPress: {
|
||||
QMouseEvent *event = static_cast<QMouseEvent*>(e);
|
||||
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
QWidget *w = qobject_cast<QWidget *>(obj);
|
||||
if (w->cursor().shape() != Qt::ArrowCursor)
|
||||
return false;
|
||||
mousePressEvent(event);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
case QEvent::MouseMove: {
|
||||
QMouseEvent *event = static_cast<QMouseEvent*>(e);
|
||||
if (qAbs(event->pos().x() - dragPosition.x()) < 2 ||
|
||||
qAbs(event->pos().y() - dragPosition.y()) < 2) {
|
||||
return true;
|
||||
}
|
||||
//move request
|
||||
mouseMoveEvent( event);
|
||||
return false;
|
||||
}
|
||||
case QEvent::MouseButtonRelease: {
|
||||
QMouseEvent *event = static_cast<QMouseEvent*>(e);
|
||||
mouseReleaseEvent( event);
|
||||
return false;
|
||||
}
|
||||
case QEvent::Move: {
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
void Natice_alarm::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
this->dragPosition = event->globalPos() - frameGeometry().topLeft();
|
||||
this->mousePressed = true;
|
||||
}
|
||||
QWidget::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void Natice_alarm::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
this->mousePressed = false;
|
||||
}
|
||||
this->setCursor(Qt::ArrowCursor);
|
||||
QWidget::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
void Natice_alarm::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
|
||||
if (this->mousePressed) {
|
||||
move(event->globalPos() - this->dragPosition);
|
||||
this->setCursor(Qt::ClosedHandCursor);
|
||||
}
|
||||
QWidget::mouseMoveEvent(event);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//窗口关闭
|
||||
|
@ -310,16 +432,61 @@ void Natice_alarm::close_music()
|
|||
// Draw background
|
||||
void Natice_alarm::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
// if (!full_flag) {
|
||||
// return;
|
||||
// }
|
||||
if(m_screenSaveOn){
|
||||
Q_UNUSED(event);
|
||||
QPainter p(this);
|
||||
p.setRenderHint(QPainter::Antialiasing);
|
||||
QPainterPath rectPath;
|
||||
int SHADOW_RANGE = 1;
|
||||
rectPath.addRoundedRect(this->rect().adjusted(SHADOW_RANGE, SHADOW_RANGE, -SHADOW_RANGE, -SHADOW_RANGE), WINDOWN_RADIUS, WINDOWN_RADIUS);
|
||||
// 画一个黑底
|
||||
|
||||
Q_UNUSED(event);
|
||||
QPainter p(this);
|
||||
p.setRenderHint(QPainter::Antialiasing); // 反锯齿;
|
||||
QPainterPath rectPath;
|
||||
rectPath.addRect(this->rect());
|
||||
p.fillPath(rectPath,palette().color(QPalette::Base));
|
||||
QPixmap pixmap(this->rect().size());
|
||||
pixmap.fill(Qt::transparent);
|
||||
QPainter pixmapPainter(&pixmap);
|
||||
pixmapPainter.setRenderHint(QPainter::Antialiasing);
|
||||
auto shadowColor = palette().text().color();
|
||||
shadowColor.setAlphaF(SHADOWCOLOR_ALPHAF);
|
||||
pixmapPainter.setBrush(shadowColor);
|
||||
pixmapPainter.setPen(Qt::transparent);
|
||||
pixmapPainter.drawPath(rectPath);
|
||||
pixmapPainter.end();
|
||||
// 模糊这个黑底
|
||||
QImage img = pixmap.toImage();
|
||||
qt_blurImage(img, VAGUE_RADIUS, false, false);
|
||||
// 挖掉中心
|
||||
pixmap = QPixmap::fromImage(img);
|
||||
QPainter pixmapPainter2(&pixmap);
|
||||
pixmapPainter2.setRenderHint(QPainter::Antialiasing);
|
||||
pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear);
|
||||
pixmapPainter2.setPen(Qt::transparent);
|
||||
pixmapPainter2.setBrush(Qt::transparent);
|
||||
pixmapPainter2.drawPath(rectPath);
|
||||
// 绘制阴影
|
||||
p.drawPixmap(this->rect(), pixmap, pixmap.rect());
|
||||
QStyleOption opt;
|
||||
opt.init(this);
|
||||
// 绘制一个背景
|
||||
p.save();
|
||||
|
||||
//描边
|
||||
QColor borderColor = palette().text().color();
|
||||
borderColor.setAlphaF(BORDERCOLOR_ALPHAF);
|
||||
p.setPen(borderColor);
|
||||
p.translate(BORDER_RANGE, BORDER_RANGE);
|
||||
p.setBrush(palette().color(QPalette::Base));
|
||||
p.drawPath(rectPath);
|
||||
p.restore();
|
||||
}else{
|
||||
QPainter p(this);
|
||||
p.setRenderHint(QPainter::Antialiasing); // 反锯齿;
|
||||
QPainterPath rectPath;
|
||||
rectPath.addRect(this->rect());
|
||||
p.fillPath(rectPath,palette().color(QPalette::Base));
|
||||
p.setBrush(palette().color(QPalette::Base));
|
||||
p.setPen(Qt::transparent);
|
||||
p.drawPath(rectPath);
|
||||
}
|
||||
|
||||
}
|
||||
//再次弹出
|
||||
|
@ -377,7 +544,8 @@ void Natice_alarm::ring()
|
|||
bool result = ClockEntityDao::checkClockExist(m_clockId);
|
||||
if(result){
|
||||
natice_init();
|
||||
this->show();
|
||||
this->showThisWindow();
|
||||
screenSaveStyle();
|
||||
timer->start();
|
||||
refreshMusic();
|
||||
}else{
|
||||
|
@ -385,7 +553,8 @@ void Natice_alarm::ring()
|
|||
}
|
||||
}else{
|
||||
natice_init();
|
||||
this->show();
|
||||
this->showThisWindow();
|
||||
screenSaveStyle();
|
||||
timer->start();
|
||||
refreshMusic();
|
||||
}
|
||||
|
@ -394,54 +563,7 @@ void Natice_alarm::ring()
|
|||
}
|
||||
|
||||
|
||||
//bool Natice_alarm::eventFilter(QObject *watched, QEvent *event)
|
||||
//{
|
||||
// if(watched == ui->widget && event->type() == QEvent::Paint)
|
||||
// {
|
||||
// showPaint(); //响应函数
|
||||
// }
|
||||
// return QWidget::eventFilter(watched,event);
|
||||
//}
|
||||
|
||||
////实现响应函数
|
||||
//void Natice_alarm::showPaint()
|
||||
//{
|
||||
// QPainter p(ui->widget);
|
||||
// p.setRenderHint(QPainter::Antialiasing); // 反锯齿;
|
||||
// QPainterPath rectPath;
|
||||
// rectPath.addRoundedRect(ui->widget->rect().adjusted(6, 6, -6, -6), 6, 6);
|
||||
|
||||
// // 画一个黑底
|
||||
// QPixmap pixmap(ui->widget->rect().size());
|
||||
// pixmap.fill(Qt::transparent);
|
||||
// QPainter pixmapPainter(&pixmap);
|
||||
// pixmapPainter.setRenderHint(QPainter::Antialiasing);
|
||||
// pixmapPainter.setPen(Qt::transparent);
|
||||
// pixmapPainter.setBrush(Qt::gray);
|
||||
// pixmapPainter.drawPath(rectPath);
|
||||
// pixmapPainter.end();
|
||||
|
||||
// // 模糊这个黑底
|
||||
// QImage img = pixmap.toImage();
|
||||
// qt_blurImage(img, 10, false, false);
|
||||
|
||||
// // 挖掉中心
|
||||
// pixmap = QPixmap::fromImage(img);
|
||||
// QPainter pixmapPainter2(&pixmap);
|
||||
// pixmapPainter2.setRenderHint(QPainter::Antialiasing);
|
||||
// pixmapPainter2.setCompositionMode(QPainter::CompositionMode_Clear);
|
||||
// pixmapPainter2.setPen(Qt::transparent);
|
||||
// pixmapPainter2.setBrush(QColor(0,0,0));
|
||||
// pixmapPainter2.drawPath(rectPath);
|
||||
|
||||
// // 绘制阴影
|
||||
// p.drawPixmap(ui->widget->rect(), pixmap, pixmap.rect());
|
||||
// p.setOpacity(0.9);
|
||||
// // 绘制一个背景
|
||||
// p.save();
|
||||
// p.fillPath(rectPath,palette().color(QPalette::Base));
|
||||
// p.restore();
|
||||
//}
|
||||
|
||||
|
||||
void Natice_alarm::closeEvent(QCloseEvent *event)
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef NATICE_ALARM_H
|
||||
#define NATICE_ALARM_H
|
||||
|
||||
|
@ -53,6 +32,7 @@
|
|||
#include "selectbtnutil.h"
|
||||
#include <QLabel>
|
||||
#include "coreplayer/playcontroller.h"
|
||||
#include <QDBusInterface>
|
||||
namespace Ui {
|
||||
class Natice_alarm;
|
||||
}
|
||||
|
@ -70,7 +50,7 @@ public:
|
|||
|
||||
//bool eventFilter(QObject *watched, QEvent *event);
|
||||
void showPaint();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
QTimer *timer = nullptr;
|
||||
QTimer *timer_xumhuan = nullptr;
|
||||
|
@ -83,11 +63,17 @@ public:
|
|||
void hideRemindBtn();
|
||||
void showRemindBtn();
|
||||
void playMusic();
|
||||
void screenSaveStyle();
|
||||
bool eventFilter(QObject *obj, QEvent *e) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
|
||||
void showThisWindow();
|
||||
protected:
|
||||
//绘制背景
|
||||
// Draw background
|
||||
void paintEvent(QPaintEvent *);
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
|
||||
private slots:
|
||||
//窗口关闭 window closing
|
||||
|
@ -115,7 +101,8 @@ private:
|
|||
QSqlTableModel *model_clock;
|
||||
SelectBtnUtil * m_selectBtnUtil = nullptr;
|
||||
int CURRENT_FONT_SIZE;
|
||||
|
||||
bool m_screenSaveOn = false;
|
||||
QDBusInterface *m_screenSaveIface = nullptr;
|
||||
int getRemindStatusByName(QString name);
|
||||
void settingsStyle();
|
||||
void updateFront(int size);
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef OBJECT_POOL_H
|
||||
#define OBJECT_POOL_H
|
||||
#include<list>
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "primarymanager.h"
|
||||
|
||||
|
||||
|
@ -210,7 +189,8 @@ bool PrimaryManager::checkWayland()
|
|||
{
|
||||
QByteArray byte = qgetenv("DESKTOP_SESSION");
|
||||
QString info =QString::fromLocal8Bit(byte);
|
||||
if("ukui-wayland"==info){
|
||||
qWarning()<<"dbq-info"<<info<<info.contains("wayland");
|
||||
if(info.contains("wayland")){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef PRIMARYMANAGER_H
|
||||
#define PRIMARYMANAGER_H
|
||||
#include <QString>
|
||||
|
|
|
@ -1,41 +1,22 @@
|
|||
/*
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include "qroundProgressBar.h"
|
||||
|
||||
#include <QtGui/QPainter>
|
||||
|
|
|
@ -1,40 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef QROUNDPROGRESSBAR_H
|
||||
#define QROUNDPROGRESSBAR_H
|
||||
|
|
53
roundbtn.cpp
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "roundbtn.h"
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
|
|
53
roundbtn.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef ROUNDBTN_H
|
||||
#define ROUNDBTN_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "selectbtn.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QDebug>
|
||||
|
|
53
selectbtn.h
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef SELECTBTN_H
|
||||
#define SELECTBTN_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "selectbtnutil.h"
|
||||
#include "connection.h"
|
||||
#include <QFileDialog>
|
||||
|
@ -75,15 +54,16 @@ QString SelectBtnUtil::getBellIdByIndex(int index)
|
|||
|
||||
QString SelectBtnUtil::getBellNameById(QString id)
|
||||
{
|
||||
int num = getCurrentLocale();
|
||||
auto sqlQuery = getBellkByPK(id);
|
||||
QString name = sqlQuery.value(1).toString();
|
||||
QString name = sqlQuery.value(num).toString();
|
||||
return name;
|
||||
}
|
||||
|
||||
QString SelectBtnUtil::getBellPathById(QString id)
|
||||
{
|
||||
auto sqlQuery = getBellkByPK(id);
|
||||
QString path = sqlQuery.value(3).toString();
|
||||
QString path = sqlQuery.value(4).toString();
|
||||
return path;
|
||||
}
|
||||
|
||||
|
@ -129,6 +109,20 @@ QList<QString> *SelectBtnUtil::getAllBellItem() const
|
|||
{
|
||||
return allBellItem;
|
||||
}
|
||||
|
||||
int SelectBtnUtil::getCurrentLocale() const
|
||||
{
|
||||
QString lan = QLocale().name();
|
||||
int localeNum;
|
||||
if(QString::compare(lan,"zh_CN",Qt::CaseInsensitive) == 0){
|
||||
localeNum = 1;
|
||||
}else if(QString::compare(lan,"bo_CN",Qt::CaseInsensitive) == 0){
|
||||
localeNum = 2;
|
||||
}else {
|
||||
localeNum = 3;
|
||||
}
|
||||
return localeNum;
|
||||
}
|
||||
void SelectBtnUtil::refreshBellData()
|
||||
{
|
||||
int index=0;
|
||||
|
@ -137,11 +131,12 @@ void SelectBtnUtil::refreshBellData()
|
|||
idIndexMap->clear();
|
||||
indexIdMap->clear();
|
||||
allBellItem->clear();
|
||||
int localeNum = getCurrentLocale();
|
||||
while (sqlQuery.next()) {
|
||||
QString itemId = sqlQuery.value(0).toString();
|
||||
idIndexMap->insert(itemId,index);
|
||||
indexIdMap->insert(index,itemId);
|
||||
QString bellCn = sqlQuery.value(1).toString();
|
||||
QString bellCn = sqlQuery.value(localeNum).toString();
|
||||
allBellItem->append(bellCn);
|
||||
index++;
|
||||
}
|
||||
|
@ -153,7 +148,7 @@ void SelectBtnUtil::refreshBellData()
|
|||
while (sqlQuery.next()) {
|
||||
QString itemId = sqlQuery.value(0).toString();
|
||||
bellIdList->append(itemId);
|
||||
QString bellCn = sqlQuery.value(1).toString();
|
||||
QString bellCn = sqlQuery.value(localeNum).toString();
|
||||
bellNameList->append(bellCn);
|
||||
}
|
||||
//逆序
|
||||
|
@ -204,6 +199,7 @@ QList<QString> *SelectBtnUtil::getDefaultBellTrList()
|
|||
list->append(tr("drip"));
|
||||
return list;
|
||||
}
|
||||
|
||||
bool SelectBtnUtil::mkdir(QString path){
|
||||
bool res=false;
|
||||
QDir targetDir(path);
|
||||
|
@ -269,11 +265,12 @@ QString SelectBtnUtil::saveToBellTable(QString filePath)
|
|||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 0),id);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 1), name);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 2), name);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 3), filePath);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 3), name);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 4), filePath);
|
||||
QDateTime time = QDateTime::currentDateTime(); //获取当前时间
|
||||
qint64 timeT = time.toMSecsSinceEpoch();
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 4), timeT);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 5), 1);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 5), timeT);
|
||||
m_bellQueryModel->setData(m_bellQueryModel->index(i, 6), 1);
|
||||
m_bellQueryModel->submitAll();
|
||||
//排序,暂停1ms
|
||||
QThread::msleep(1);
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef SELECTBTNUTIL_H
|
||||
#define SELECTBTNUTIL_H
|
||||
|
||||
|
@ -73,6 +52,8 @@ public:
|
|||
QSqlQuery getBellkBynameEn(QString nameEn);
|
||||
QList<QString> *getAllBellItem() const;
|
||||
|
||||
int getCurrentLocale() const;
|
||||
|
||||
bool mkdir(QString path);
|
||||
signals:
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "setAlarmRepeatDialog.h"
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef SET_ALARM_REPEAT_DIALOG_H
|
||||
#define SET_ALARM_REPEAT_DIALOG_H
|
||||
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "setupPage.h"
|
||||
#include "ui_setupPage.h"
|
||||
#include "QSlider"
|
||||
|
|
|
@ -1,41 +1,20 @@
|
|||
/*
|
||||
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
|
||||
|
||||
* Copyright 2022 KylinSoft Co., Ltd.
|
||||
|
||||
|
||||
|
||||
*
|
||||
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
|
||||
* Foundation, either version 3 of the License, or (at your option) any later
|
||||
|
||||
* version.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
* Copyright (C) 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#include "singleApplication.h"
|
||||
#include <QtNetwork/QLocalSocket>
|
||||
#include <QFileInfo>
|
||||
|
|