@startuml
'https://plantuml.com/class-diagram


interface FrameProxyInterface {
        virtual void pushWidget(ModuleInterface *const inter, QWidget *const w) = 0;
        virtual void popWidget() = 0;
        virtual void popWidgetAndDelete() = 0;
        virtual void back() = 0;
        virtual void enableBackWard(bool enable) = 0;
        virtual void enableModule(bool enable) = 0;
        virtual void setModuleVisible(ModuleInterface *const inter, const bool visible) = 0;
        virtual void setCurrentWidget(ModuleInterface *const inter, QWidget *const w) = 0;
        virtual ModuleInterface *getCurrentModule() = 0;
        FrameProxyInterface *m_frameProxy = nullptr;
        ComDeepinDaemonUosrecoveryInterface *m_recoveryInterface = nullptr;
}

interface ModuleInterface {
    virtual void initialize() = 0;
    virtual QString name() const = 0;
    virtual QString icons() const = 0;
    virtual QString text() const = 0;
    virtual void active(int index) = 0;
}

class BackupModule {
     explicit BackupModule(FrameProxyInterface *frame, ComDeepinDaemonUosrecoveryInterface *interface,
                              QObject *parent = nullptr);
        ~BackupModule() override;
        void initialize() override;
        QString name() const override;
        QString icons() const override;
        QString text() const override;
        void active(int index) override;
}

class BackupWidget {

}

class RestoreModule {
     explicit RestoreModule(FrameProxyInterface *frame, ComDeepinDaemonUosrecoveryInterface *interface,
                               QObject *parent = nullptr);
        ~RestoreModule() override;
        void initialize() override;
        QString name() const override;
        QString icons() const override;
        QString text() const override;
        void active(int index) override;
}

class RestoreWidget {

}

class QWidget {

}

BackupWidget --> QWidget
RestoreWidget --> QWidget


class MainWindow {
    *QStack<QPair<ModuleInterface *, QWidget *>> m_contentStack;
    *QList<ModuleInterface*> m_modules;
    *QStringList m_modulesLightIcons;
    *QStringList m_modulesDarkIcons;
    *BackupModule *m_backupModule = nullptr;
    *RestoreModule *m_restoreModule = nullptr;
}

MainWindow --|> FrameProxyInterface
MainWindow --* BackupModule
MainWindow --* RestoreModule
RestoreModule --|> ModuleInterface
RestoreModule --* RestoreWidget
BackupModule  --|> ModuleInterface
BackupModule  --* BackupWidget
ModuleInterface --* FrameProxyInterface




@enduml