-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmainwindow.h
executable file
·199 lines (186 loc) · 7.06 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/***************************************************************************
* Project created by QtCreator 2018-06-01T17:15:24 *
* *
* goldfinch Copyright (C) 2014 AbouZakaria <yahiaui@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "mycontentmodel.h"
#include "mylistmodel.h"
#include "treeviewcontent.h"
#include "listview.h"
#include "treeviewaudio.h"
#include "mediaupdate.h"
#include "database.h"
#include "listitemdelegate.h"
#include "treeitemdelegate.h"
#include "player.h"
#include "playercontrols.h"
#include "setting.h"
#include "widgetplaylist.h"
//#include "widgetimageinfo.h"
#include "searchbar.h"
#include <QSystemTrayIcon>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
Player *player(){return mPlayer;}
void setUrl(const QString &file);
signals:
// void iconsChanged();
private:
Ui::MainWindow *ui;
//! مراقبة تغير السمة العامة للنظام
void changeEvent(QEvent *event);
//! تغيرر السمة في حال تغيرت سمة النظام
void changeStyleSheet();
//! تكوين ايقونة صينية النظام
void creatTrayIcon();
//! المعلومات العامة عن النوان الحالي للعرض
QVariantMap mMap; //TODO Change to qvariant
//! موديول قائمة النفاصبل
MyContentModel *mMyTreeModel;
//! موديول القائمة الايقونات
MyListModel *mMyListModel;
//! شجرة عرض التفاصبل
TreeViewContent *mTVContent;
//! شجرة عرض الملفات الصوتية
TreeViewAudio *mTVAudio;
//! قائمة عرض ايقونات الالبومات والفنانين
ListView *mListView;
//! حاوي القائمة وادات تجرير القائمة
WidgetPlayList *mWPlayList;
//! تحرير مظهر الايقونات في معرض القائمة
ListItemDelegate *mLIDelegate;
//!تحرير مظهر الايقونات في معرض الشجرة
TreeItemDelegate *mTItemDelegate;
//! وحدة القراءة
Player *mPlayer;
//! واجهة عرض صورة الالبوم والمعلومات
// WidgetImageInfo *mImageInfo;
//! تحديث المقطوعات من الجهاز
MediaUpdate *mMediaUpdate;
//! وحدة التحكم في الاضافة والتحديث
SearchBar *mSearchBar;
//! لوحة البحث
Setting *mSetting;
//! امر تغيير الرض المصغر
// QAction *mActSwich;
//! المتحكم في حجم الايقونات
QSlider *mSliderIconSize;
//! حجم الايقونات
int mIconSize=94;
//! لون العام للبرناج يتم مقارنته في حال تغير السمة
QString mcoloor;
QString mTitle;
//! ايقونة صينية النظام
QSystemTrayIcon *mTrayIcon=nullptr;
//!
bool mShowNotification=false;
QToolButton *tButtonMenu;
private slots:
//! جلب النافذة الى الاعلى
void showRaise(){showNormal();raise();}
//! تغيير العرض بين مصغر وكامل
void switchViewMode(bool mini);
//!
void showHideMenu(bool show);
//! تحميل الاعدادات السابقة
void chargeRecent();
//! تحميل الايقونات
void setupIcons();
//! اعادة التحميل بعد اكتمال التحديث
void rechargeAlbums();
//! عرض نسبة التقدم
void progressShow(int max);
//! نسبة التقدم
void progressSetValue(int value);
//! عرض مسار الالبومات
void changeStatusPathText();
//! تغيير مسار الالبومات
void setAlbumPath(int index);
//! تغيير حجم الايونات
void setIconSize(int value);
//! تغيير عنوان النافذة واخطار في حالة التصغير او الاخفاء
void setwTitle(const QString &title, const QString &info);
//! تحميل قائمة الالبومات او الفنانين او الملفات
void chargeListItemes();
//! البحث عن ملفات
void searchAudios(int col,const QString &text);
//! تغيير عموان القائمة
void setlabelImage();
//! حذف الملفات الغير موجودة
void removeNonExisting();
//! السحب ةالافلات
void dragEnterEvent(QDragEnterEvent *e);
//! السحب ةالافلات
void dropEvent(QDropEvent *e);
//!
void onTreeViewContentActivated(const QModelIndex &index);
//!
void onListViewActivated(const QModelIndex &index);
//!
// void on_tb_paneContent_toggled(bool checked);
// //!
// void on_tb_panePlaylist_toggled(bool checked);
//!
void playlist_toggled(bool checked);
//!
void on_tb_addAlbum_clicked();
//!
void on_tb_playAlbum_clicked();
//!
void onChangeImageAlbum(int row);
//!
void changeImageAlbum(int id ,const QString Name);
//!
void on_tb_imgAlbum_clicked();
//!
void onFavoritAlbum(int row, bool favo);
//!
void onAddAlbum(int row);
//!
void onPlayAlbum(int row);
//!
void on_tb_favoritAlbum_clicked();
//!
void onTreeAudioClicked(const QModelIndex &index);
//!
void onTreeAudioActivated(const QModelIndex &index);
//!
void onActionopentriggered();
//!
void on_tButtonCancelMsg_clicked();
//!
void on_tButtonOkMsg_clicked();
//!
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
void showPropertyDialog(bool isRead, const QString &file);
void toggleHide(){isHidden() ? show() : hide();}
void onQuit();
void saveSettings();
void showSettings();
};
#endif // MAINWINDOW_H