Sayonara Player
GUI_MTP.h
1 /* GUI_MTP.h */
2 
3 /* Copyright (C) 2011-2017 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef GUI_MTP_H
22 #define GUI_MTP_H
23 
24 #include "GUI/Helper/SayonaraWidget/SayonaraDialog.h"
25 #include "Components/MTP/MTP_Typedefs.h"
26 #include "Helper/Pimpl.h"
27 
28 class QTreeWidgetItem;
29 
30 namespace Ui { class GUI_MTP; }
31 
32 class MTP_CopyFiles;
33 class MTP;
34 class GUI_MTP :
35  public SayonaraDialog
36 {
37  Q_OBJECT
38 
39 public:
40  explicit GUI_MTP(QWidget* parent=nullptr);
41  virtual ~GUI_MTP();
42 
43  void device_opened(MTP_DevicePtr device);
44 
45 private slots:
46  void scan_thread_finished();
47 
48  void device_idx_changed(int idx);
49  void storage_idx_changed(int idx);
50  void folder_idx_changed(QTreeWidgetItem* item, int column);
51  void folder_idx_expanded(QTreeWidgetItem* item);
52 
53  void refresh_clicked();
54  void delete_clicked();
55 
56  void progress_changed(int progress);
57  void copy_thread_finished();
58 
59 private:
60  PIMPL(GUI_MTP)
61 
62  Ui::GUI_MTP* ui=nullptr;
63 
64 
65 private:
66  void enable_drag_drop(bool b);
67 
68  void dragEnterEvent(QDragEnterEvent* e) override;
69  void dragMoveEvent(QDragMoveEvent* e) override;
70  void dragLeaveEvent(QDragLeaveEvent* e) override;
71  void dropEvent(QDropEvent* e) override;
72 
73  void showEvent(QShowEvent* e) override;
74 };
75 
76 #endif // GUI_MTP_H
Definition: ui_GUI_MTP.h:109
Definition: ui_GUI_SomaFM.h:216
The MTP class.
Definition: MTP.h:38
Definition: GUI_MTP.h:34
std::shared_ptr< MTP_Device > MTP_DevicePtr
MTP_DevicePtr.
Definition: MTP_Typedefs.h:66
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()...
Definition: SayonaraDialog.h:33
The MTP_CopyFiles class.
Definition: MTP_CopyFiles.h:33