File indexing completed on 2024-12-22 04:31:06

0001 /*
0002  * Copyright (C) 2021 CutefishOS Team.
0003  *
0004  * Author:     cutefish <cutefishos@foxmail.com>
0005  *
0006  * This program is free software: you can redistribute it and/or modify
0007  * it under the terms of the GNU General Public License as published by
0008  * the Free Software Foundation, either version 3 of the License, or
0009  * any later version.
0010  *
0011  * This program is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014  * GNU General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU General Public License
0017  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0018  */
0019 
0020 #ifndef WINDOWHELPER_H
0021 #define WINDOWHELPER_H
0022 
0023 #include <QObject>
0024 #include <QWindow>
0025 
0026 class WindowHelper : public QObject
0027 {
0028     Q_OBJECT
0029 
0030 public:
0031     explicit WindowHelper(QObject *parent = nullptr);
0032 
0033     Q_INVOKABLE void startSystemMove(QWindow *w);
0034     Q_INVOKABLE void startSystemResize(QWindow *w, Qt::Edges edges);
0035 
0036     Q_INVOKABLE void minimizeWindow(QWindow *w);
0037 
0038 private:
0039     void doStartSystemMoveResize(QWindow *w, int edges);
0040 
0041 private:
0042 };
0043 
0044 #endif // WINDOWHELPER_H