Debian Codegraph @

src/album/widgets/albumlefttabitem.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 ALBUMLEFTTABITEM_H
22 #define ALBUMLEFTTABITEM_H
23
24 #include <QWidget>
25 #include <DLabel>
26 #include <DLineEdit>
27 #include <DApplicationHelper>
28 #include <DIconButton>
29 #include "albumview/leftlistwidget.h"
30 #include "mountexternalbtn.h"
31 #include "widgets/ddlabel.h"
32
33 DWIDGET_USE_NAMESPACE
34
35 class AlbumLeftTabItem : public QWidget
36 {
37 Q_OBJECT
38 public:
39 AlbumLeftTabItem(QString str, QString strAlbumType = "");
40 ~AlbumLeftTabItem();
41 void editAlbumEdit();
42 void oriAlbumStatus();
43 void newAlbumStatus();
44 void setExternalDevicesMountPath(QString strPath);
45 QString getalbumname();
46
47 private:
48 void initConnections();
49 void initUI();
50 void unMountBtnClicked();
51 signals:
52 void editingFinished();
53 void unMountExternalDevices(const QString &mountName);
54 public slots:
55 void onCheckNameValid();
56 public:
57 QString m_albumNameStr;
58 QString m_albumTypeStr;
59 int m_opeMode;
60 DLineEdit *m_pLineEdit;
61 DLineEdit *m_pNewLineEdit;
62 QString m_mountPath;
63 private:
64 DDlabel *m_nameLabel;
65 DLabel *pImageLabel;
66 MountExternalBtn *m_unMountBtn;
67 LeftListWidget *m_pListWidget;
68 QListWidgetItem *m_pListWidgetItem;
69 };
70
71 #endif // ALBUMLEFTTABITEM_H