#ifndef CONTENTPRESENT_H #define CONTENTPRESENT_H #include #include #include "appcore.h" namespace Core { class ConfigHost { public: virtual ~ConfigHost() = default; /** * @brief 获取所有指定的配置端口类型 * @return */ virtual QList configs() const = 0; /** * @brief 载入指定的配置端口实例 * @param configs */ virtual void reload(QList configs) = 0; /** * @brief getPanel 获取配置面板,配置内容 * @param config * @return */ virtual QWidget* getPanel(Config::Configration* config) = 0; }; } namespace ContentPresent { /** * @brief 允许具有多种显示模式的视图组件 */ class ModeView { public: virtual ~ModeView() = default; /** * @brief 获取配置端口 * @return */ virtual Core::ConfigHost* getConfigHost() const = 0; /** * @brief 设置视图显示模式 * @param type */ virtual void modeReset(const QString &type) const = 0; /** * @brief 获取所有视图模式 * @return */ virtual QList modes() const = 0; virtual QString currentMode() const = 0; /** * @brief 标题 * @return */ virtual QString title() const = 0; }; } #endif // CONTENTPRESENT_H