CCIMXDesktop
 
Loading...
Searching...
No Matches
desktopmainwindow.h
1#ifndef DESKTOPMAINWINDOW_H
2#define DESKTOPMAINWINDOW_H
3
4#include "builtin/window/settings_window/cores/SettingsPack.h"
5#include "library/simple_gerseter/simple_getseter.hpp"
6#include "ui/appwidget.h"
7#include <QMainWindow>
8QT_BEGIN_NAMESPACE
9namespace Ui {
11}
12QT_END_NAMESPACE
13
14class HomePage;
16class QGridLayout;
17class DesktopToast;
19class QStackedWidget;
20class DownDockWidget;
21class AppCardWidget;
22class WallPaperEngine;
23class SettingsWindow;
31class DesktopUserInfo;
33class MouseManager;
39class DesktopMainWindow : public QMainWindow {
40 Q_OBJECT
41
42public:
43 friend class PageFactory;
44 friend class WallPaperEngine;
45 friend class DesktopMainWindowInitHelper;
51 explicit DesktopMainWindow(QWidget* parent = nullptr);
57
58 /* simple property getset */
59 __PROPERTY_GETSET(int, slide_limitive);
60
64 void init(CCIMX_DesktopSplashWindow* splash);
65
70 void showToast(const QString& message);
71
76 DesktopToast* desktop_toast() const { return toast; }
77
82 WallPaperEngine* queryWallpaperEngine() { return wallpaper_engine; }
83
89
94 void install_remote_appwrapper(ApplicationWrapper* wrapper) { app_wrapper << wrapper; }
95
100 QStackedWidget* stackedWidget() const;
101
106 NetAbilityScanner* netAbilityScanner() const { return scanner; }
107
112 GlobalClockSources* clock_src() const { return clock; }
113
119
123 void post_show();
124
125signals:
131 void updateProgress(const QString& message, const int processings);
132
133public slots:
138 void back_home_page();
139
143 void to_next_page();
144
148 void to_prev_page();
154
159
163 void open_launch_window();
164
169 void install_for_new_dynamicpage(AppWidget* appWidgets);
170
176
182
183protected:
189 void mousePressEvent(QMouseEvent* event) override;
195 void mouseReleaseEvent(QMouseEvent* event) override;
201 void resizeEvent(QResizeEvent* event) override;
202
203private:
204 Ui::DesktopMainWindow* ui;
205 DesktopToast* toast;
206 QList<ApplicationWrapper*> app_wrapper;
207 QList<AppWidget*> app_widgets;
208 QList<DesktopServerBase*> servers;
209 QList<DesktopServerHookBase*> hooks;
210 DesktopDirentLocationManager* locationManager;
211 DesktopUserInfo* user_info;
212 std::shared_ptr<MouseManager> mouseManager;
213 QList<AppCardWidget*> app_cards;
214 WallPaperEngine* wallpaper_engine;
215 ApplicationLauncherMainWindow* appLauncherWindow;
216 SettingsWindow* settingsWindow;
217 NetAbilityScanner* scanner;
218 GlobalClockSources* clock;
219 HomePage* homePage;
220 FastSettingsWidget* fastSettingsWidget;
221 int slide_limitive;
222 int tool_settings_bar_slide_limitive;
226 void setup_static_ui();
227
231 void setup_default_dock();
232
236 void invoke_appcards_init();
240 QWidget* centralWidget();
241
245 void initLogger();
246
251 DesktopUserInfo* get_user_info();
252};
253
254#endif // DESKTOPMAINWINDOW_H
AppCardWidget is a lightweight widget used to post messages to a DesktopToast.
Definition appcardwidget.h:18
The AppWidget class represents an application widget placed on the desktop.
Definition appwidget.h:19
AppStatus
Enum representing the application status.
Definition appwidget.h:121
The ApplicationLauncherMainWindow class provides the main UI window for launching applications.
Definition ApplicationLauncherMainWindow.h:20
The ApplicationWrapper class is the process wrapper.
Definition applicationwrapper.h:16
The CCIMX_DesktopSplashWindow class class handles the init stage displays.
Definition CCIMX_DesktopSplashWindow.h:14
Manages the locations and existence of various desktop directory entries and configuration files.
Definition DesktopDirentLocationManager.h:24
Definition DesktopMainWindowInitHelper.h:5
DesktopMainWindow is the main frontend window of the application. For beginners, this is the starting...
Definition desktopmainwindow.h:39
TopSideBarWidget * topSideBar() const
topSideBar fetcher
Definition desktopmainwindow.cpp:149
void install_remote_appwrapper(ApplicationWrapper *wrapper)
Install a remote application wrapper.
Definition desktopmainwindow.h:94
DownDockWidget * downDockWidget() const
Get the global DownDockWidget instance.
Definition desktopmainwindow.cpp:163
void post_show()
Perform initialization after main window is shown.
Definition desktopmainwindow.cpp:153
~DesktopMainWindow()
Destroy the Desktop Main Window object.
Definition desktopmainwindow.cpp:46
WallPaperEngine * queryWallpaperEngine()
queryWallpaperEngine
Definition desktopmainwindow.h:82
void mouseReleaseEvent(QMouseEvent *event) override
mouse release sessions
Definition desktopmainwindow.cpp:182
void open_launch_window()
open_launch_window
Definition desktopmainwindow.cpp:95
void showToast(const QString &message)
Show a toast message on the main window.
Definition desktopmainwindow.cpp:159
void to_prev_page()
Slide to the previous page in UI.
Definition desktopmainwindow.cpp:206
void process_wallpaper_settings(BaseWallPaperSettings *settings)
process_wallpaper_settings
Definition desktopmainwindow.cpp:127
QStackedWidget * stackedWidget() const
Get the QStackedWidget used for page sliding.
Definition desktopmainwindow.cpp:145
void updateProgress(const QString &message, const int processings)
updateProgress
void init(CCIMX_DesktopSplashWindow *splash)
init init the windows sessions
Definition desktopmainwindow.cpp:50
__PROPERTY_GETSET(int, slide_limitive)
slider property setter
void back_home_page()
back_home_page this api is about to lead the desktop to the homepage :)
Definition desktopmainwindow.cpp:167
void to_next_page()
Slide to the next page in UI.
Definition desktopmainwindow.cpp:195
void resizeEvent(QResizeEvent *event) override
resize sessions
Definition desktopmainwindow.cpp:217
void process_set_appwidgets_config(const AppWidgetsSettingsInfoPack &info)
process_set_appwidgets_config
Definition desktopmainwindow.cpp:119
void handle_app_status(AppWidget::AppStatus status)
Handle status changes of applications (like errors)
Definition desktopmainwindow.cpp:76
DesktopToast * desktop_toast() const
Get pointer to DesktopToast handler.
Definition desktopmainwindow.h:76
NetAbilityScanner * netAbilityScanner() const
netAbilityScanner get the netScanner
Definition desktopmainwindow.h:106
void install_for_new_dynamicpage(AppWidget *appWidgets)
install_for_new_dynamicpage for the persistance apps of new
Definition desktopmainwindow.cpp:99
void mousePressEvent(QMouseEvent *event) override
mouse press sessions
Definition desktopmainwindow.cpp:175
void open_settings_window()
open_settings_window catches the signals of open_settings
Definition desktopmainwindow.cpp:91
GlobalClockSources * clock_src() const
clock_src clock src fetcher
Definition desktopmainwindow.h:112
The DesktopServerBase class notifies the backend Server for desktop with eventloop engaged in desktop...
Definition DesktopServerBase.h:12
The DesktopToast class is the toast handle classes using less lock messages queue to display the mess...
Definition DesktopToast.h:15
Manages the retrieval and provision of user-specific information within the desktop environment.
Definition DesktopUserInfo.h:28
The DownDockWidget class holdings the down dock sessions it supports the dynamic sorted according fre...
Definition downdockwidget.h:16
Definition FastSettingsWidget.h:11
The GlobalClockSources class holds the desktop timer sessions, defaulty, we use the QTimer API For th...
Definition GlobalClockSources.h:12
The HomePage class exactly, home page :)
Definition homepage.h:17
Definition MouseManager.h:9
The NetAbilityScanner class check the desktop network status.
Definition NetAbilityScanner.h:11
Page Factory produce pages for helping setup the pages :)
Definition pagefactory.h:12
Main window class for the settings interface.
Definition SettingsWindow.h:18
Top sidebar container widget.
Definition TopSideBarWidget.h:18
Engine managing desktop wallpaper switching and animations.
Definition WallPaperEngine.h:20
The AppWidgetsSettingsInfoPack struct Stores configuration parameters for AppWidget appearance.
Definition SettingsPack.h:13
The BaseWallPaperSettings class Abstract base for wallpaper configuration settings.
Definition SettingsPack.h:23
The DesktopServerHookBase class Allocatable DesktopServerHookBase for server Type.
Definition DesktopServerHookBase.h:8