mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-13 12:22:05 +08:00
使主题色依照DDE主题色改变
因为AUTOMOC不会在编译主程序的时候再对插件接口类进行MOC,所以需要在主程序内加一份一模一样的插件接口类定义。
This commit is contained in:
@@ -3,12 +3,17 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class SpkDtkPlugin
|
||||
class SpkDtkPlugin : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
virtual ~SpkDtkPlugin() = default;
|
||||
|
||||
virtual void Initialize() = 0;
|
||||
virtual void addWindow(QWidget* w, QObject* parent) = 0;
|
||||
virtual QColor GetAccentColor() = 0;
|
||||
|
||||
signals:
|
||||
void AccentColorChanged(QColor);
|
||||
};
|
||||
QT_BEGIN_NAMESPACE
|
||||
Q_DECLARE_INTERFACE(SpkDtkPlugin, "org.spark-store.client.dtkplugin")
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <QSize>
|
||||
#include <QColor>
|
||||
|
||||
#include "dtkplugin/spkdtkplugin.h"
|
||||
#include "dtk/spkdtkplugin.h"
|
||||
|
||||
namespace SpkUi
|
||||
{
|
||||
@@ -19,6 +19,19 @@ namespace SpkUi
|
||||
constexpr int StackTraceArraySize = 64;
|
||||
constexpr const char * const StoreIconName = "spark-store";
|
||||
|
||||
class UiMetaObject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
static UiMetaObject *sGlobalInstance;
|
||||
public:
|
||||
UiMetaObject() {}
|
||||
UiMetaObject *Instance() {return nullptr;} //FIXME!!
|
||||
public slots:
|
||||
void SetAccentColor(QColor);
|
||||
};
|
||||
|
||||
extern UiMetaObject SpkUiMetaObject;
|
||||
extern SpkUiStyle CurrentStyle;
|
||||
extern QString StylesheetBase, CurrentStylesheet;
|
||||
extern QColor ColorLine, ColorBack;
|
||||
|
||||
Reference in New Issue
Block a user