Debian Codegraph @

src/album/widgets/statusbar.h

raw
1 /*
2 * Copyright (C) 2020 ~ 2021 Uniontech Software Technology Co., Ltd.
3 *
4 * Author: ZhangYong <[email protected]>
5 *
6 * Maintainer: ZhangYong <[email protected]>
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21 #ifndef STATUSBAR_H
22 #define STATUSBAR_H
23
24 #include <QWidget>
25 #include <DLabel>
26 #include <DSlider>
27 #include <QVBoxLayout>
28 #include <QHBoxLayout>
29 #include <DFontSizeManager>
30 #include <QStackedWidget>
31 #include <DSpinner>
32 #include <DBlurEffectWidget>
33
34 #include "application.h"
35 #include "controller/signalmanager.h"
36 #include "dbmanager/dbmanager.h"
37 #include "thumbnail/thumbnaillistview.h"
38
39 DWIDGET_USE_NAMESPACE
40
41
42 class StatusBar : public DBlurEffectWidget
43 {
44 Q_OBJECT
45
46 public:
47 explicit StatusBar(QWidget *parent = nullptr);
48
49 public:
50 void initUI();
51 void initConnections();
52 void onUpdateAllpicsNumLabel();
53 void resizeEvent(QResizeEvent *e) override;
54 void paintEvent(QPaintEvent *event) override;
55 //根据已选择照片与视频数量刷新提示
56 void resetSelectedStatue(int photosCount, int videosCount);
57 //显示照片与视频总数
58 void resetUnselectedStatue(int photosCount, int videosCount);
59 public:
60 DLabel *m_pAllPicNumLabel;
61 DSlider *m_pSlider;
62 DLabel *m_pstacklabel;
63 DWidget *m_pimporting;
64 DLabel *TextLabel;
65 QStringList imgpaths;
66 QStackedWidget *m_pStackedWidget;
67 DSpinner *loadingicon;
68
69 int m_allPicNum;
70 int interval;
71 int pic_count;
72 private:
73 int m_index;
74 bool m_bcustalbum = false;
75 bool m_baddDuplicatePhotos = false;
76 QString m_alubm;
77
78
79 protected:
80 void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
81
82 };
83
84
85
86 #endif // STATUSBAR_H
87