File indexing completed on 2025-02-16 08:16:03
0001 /* 0002 SPDX-FileCopyrightText: 2021 Michail Vourlakos <mvourlakos@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef SCREENSDIALOG_H 0007 #define SCREENSDIALOG_H 0008 0009 // local 0010 #include "../generic/genericdialog.h" 0011 #include "../settingsdialog/settingsdialog.h" 0012 0013 // Qt 0014 #include <QDialog> 0015 #include <QObject> 0016 #include <QPushButton> 0017 #include <QWindow> 0018 0019 namespace Ui { 0020 class ScreensDialog; 0021 } 0022 0023 namespace Latte { 0024 namespace Settings { 0025 namespace Controller { 0026 class Layouts; 0027 } 0028 namespace Handler { 0029 class ScreensHandler; 0030 } 0031 } 0032 } 0033 0034 0035 namespace Latte { 0036 namespace Settings { 0037 namespace Dialog { 0038 0039 class ScreensDialog : public GenericDialog 0040 { 0041 Q_OBJECT 0042 0043 public: 0044 ScreensDialog(SettingsDialog *parent, Controller::Layouts *controller); 0045 ~ScreensDialog(); 0046 0047 Ui::ScreensDialog *ui() const; 0048 Latte::Corona *corona() const; 0049 Controller::Layouts *layoutsController() const; 0050 0051 QPushButton *removeNowButton() const; 0052 0053 protected: 0054 void accept() override; 0055 0056 private slots: 0057 void onCancel(); 0058 void onDataChanged(); 0059 void onReset(); 0060 0061 void initButtons(); 0062 void initRemoveNowButton(); 0063 void initSignals(); 0064 0065 private: 0066 void init(); 0067 0068 private: 0069 QPushButton *m_removeNowButton{nullptr}; 0070 0071 Latte::Corona *m_corona{nullptr}; 0072 0073 Ui::ScreensDialog *m_ui; 0074 Controller::Layouts *m_layoutsController{nullptr}; 0075 0076 Handler::ScreensHandler *m_handler; 0077 }; 0078 0079 } 0080 } 0081 } 0082 0083 #endif