You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.3 KiB
89 lines
2.3 KiB
6 months ago
|
#ifndef MAINWINDOW_H
|
||
|
#define MAINWINDOW_H
|
||
|
|
||
|
#include <QtNetwork/QNetworkAccessManager>
|
||
|
#include <QtNetwork/QNetworkRequest>
|
||
|
#include <QtNetwork/QNetworkReply>
|
||
|
#include <QJsonParseError>
|
||
|
#include <QJsonObject>
|
||
|
#include <QJsonArray>
|
||
|
#include <QMainWindow>
|
||
|
#include <QHBoxLayout>
|
||
|
#include <QLabel>
|
||
|
#include <QDateTime>
|
||
|
#include <QTextCodec>
|
||
|
#include <QFileInfo>
|
||
|
#include <QGraphicsDropShadowEffect>
|
||
|
#include <QPropertyAnimation>
|
||
|
#include <QTimer>
|
||
|
#include <QPushButton>
|
||
|
#include <QSlider>
|
||
|
#include <QGraphicsScene>
|
||
|
#include <QGraphicsView>
|
||
|
#include <QDir>
|
||
|
|
||
|
namespace Ui {
|
||
|
class MainWindow;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
class MainWindow : public QMainWindow
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
explicit MainWindow(QWidget *parent = 0);
|
||
|
~MainWindow();
|
||
|
void mainWindowInit(); // 主窗体布局初始化
|
||
|
void animationInit(); // 天气显示相关初始化
|
||
|
|
||
|
|
||
|
private:
|
||
|
Ui::MainWindow *ui;
|
||
|
|
||
|
QWidget *mainWidget; // 主Widget
|
||
|
QWidget *appWidgetParent; // 存放app的父窗口
|
||
|
QWidget *appWidget; // 存放app的区域
|
||
|
QWidget *loopWidgetArr[17]; // 循环动画面板arr
|
||
|
QWidget *rightWidget; // 右边隐藏栏
|
||
|
QPushButton *iconPushButton[17]; // app图标按钮
|
||
|
|
||
|
|
||
|
QWidget *pageWidget[4]; // 页面小圆点
|
||
|
QLabel *appNameLabel[17]; // app名字标签
|
||
|
QLabel *appMainInterface; // app主界面label
|
||
|
|
||
|
int loopCount; // 循环次数
|
||
|
|
||
|
|
||
|
QStringList appPathStrList; // app路径定义
|
||
|
QTimer *appExecTimer; // 用于进入程序后过滤误触的点
|
||
|
bool flagAppExec; // 过滤标志位
|
||
|
bool scrollingFlag; // 判断app区域是否在移动
|
||
|
|
||
|
QPropertyAnimation *propertyAnimation;
|
||
|
|
||
|
|
||
|
|
||
|
QLabel *messageLabel; //用于提示当前路径下有没有这个app
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/* 私有方法 */
|
||
|
|
||
|
bool eventFilter(QObject *watched, QEvent *event);
|
||
|
|
||
|
|
||
|
|
||
|
public slots:
|
||
|
|
||
|
void backward();
|
||
|
void forward();
|
||
|
void slotappExecTimertimeout();
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif // MAINWINDOW_H
|