code moved to QskRgbValueQml
This commit is contained in:
parent
2fe846fa17
commit
b8867dcd76
|
@ -7,6 +7,7 @@
|
||||||
#include "QskLayoutQml.h"
|
#include "QskLayoutQml.h"
|
||||||
#include "QskShortcutQml.h"
|
#include "QskShortcutQml.h"
|
||||||
#include "QskMainQml.h"
|
#include "QskMainQml.h"
|
||||||
|
#include "QskRgbValueQml.h"
|
||||||
|
|
||||||
#include <QskCorner.h>
|
#include <QskCorner.h>
|
||||||
#include <QskDialog.h>
|
#include <QskDialog.h>
|
||||||
|
@ -24,7 +25,6 @@
|
||||||
#include <QskPopup.h>
|
#include <QskPopup.h>
|
||||||
#include <QskProgressBar.h>
|
#include <QskProgressBar.h>
|
||||||
#include <QskPushButton.h>
|
#include <QskPushButton.h>
|
||||||
#include <QskRgbValue.h>
|
|
||||||
#include <QskScrollArea.h>
|
#include <QskScrollArea.h>
|
||||||
#include <QskScrollView.h>
|
#include <QskScrollView.h>
|
||||||
#include <QskSelectionWindow.h>
|
#include <QskSelectionWindow.h>
|
||||||
|
@ -70,21 +70,6 @@ QSK_QT_PRIVATE_END
|
||||||
qmlRegisterSingletonType< className >( QSK_MODULE_NAME, 1, 0, typeName, \
|
qmlRegisterSingletonType< className >( QSK_MODULE_NAME, 1, 0, typeName, \
|
||||||
[] ( QQmlEngine*, QJSEngine* ) { return dynamic_cast< QObject* >( singleton ); } )
|
[] ( QQmlEngine*, QJSEngine* ) { return dynamic_cast< QObject* >( singleton ); } )
|
||||||
|
|
||||||
// Expose values in QskRgbValue to QML
|
|
||||||
struct QskRgbValue_Gadget
|
|
||||||
{
|
|
||||||
enum Enum
|
|
||||||
{
|
|
||||||
#define RGB( name, value ) name = value,
|
|
||||||
QSK_RGB_VALUES
|
|
||||||
#undef RGB
|
|
||||||
};
|
|
||||||
|
|
||||||
Q_ENUM( Enum )
|
|
||||||
Q_GADGET
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
|
#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
|
||||||
|
|
||||||
#include <qloggingcategory.h>
|
#include <qloggingcategory.h>
|
||||||
|
@ -127,7 +112,11 @@ namespace
|
||||||
|
|
||||||
void QskQml::registerTypes()
|
void QskQml::registerTypes()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
|
||||||
qmlRegisterRevision< QQuickItem, 6 >( QSK_MODULE_NAME, 1, 0 );
|
qmlRegisterRevision< QQuickItem, 6 >( QSK_MODULE_NAME, 1, 0 );
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
qmlRegisterUncreatableType< QskSetup >( QSK_MODULE_NAME, 1, 0, "Setup", QString() );
|
qmlRegisterUncreatableType< QskSetup >( QSK_MODULE_NAME, 1, 0, "Setup", QString() );
|
||||||
qmlRegisterUncreatableType< QskSkin >( QSK_MODULE_NAME, 1, 0, "Skin", QString() );
|
qmlRegisterUncreatableType< QskSkin >( QSK_MODULE_NAME, 1, 0, "Skin", QString() );
|
||||||
|
@ -196,7 +185,7 @@ void QskQml::registerTypes()
|
||||||
WarningBlocker warningBlocker;
|
WarningBlocker warningBlocker;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QSK_REGISTER_GADGET( QskRgbValue_Gadget, "RgbValue" );
|
QSK_REGISTER_GADGET( QskRgbValueQml, "RgbValue" );
|
||||||
QSK_REGISTER_GADGET( QskStandardSymbol, "StandardSymbol" );
|
QSK_REGISTER_GADGET( QskStandardSymbol, "StandardSymbol" );
|
||||||
QSK_REGISTER_GADGET( QskCorner, "Corner" );
|
QSK_REGISTER_GADGET( QskCorner, "Corner" );
|
||||||
QSK_REGISTER_GADGET( QskGradient, "Gradient" );
|
QSK_REGISTER_GADGET( QskGradient, "Gradient" );
|
||||||
|
@ -271,5 +260,3 @@ void QskQml::registerTypes()
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "QskQml.moc"
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||||
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef QSK_RGBVALUE_QML_H
|
||||||
|
#define QSK_RGBVALUE_QML_H
|
||||||
|
|
||||||
|
#include "QskQmlGlobal.h"
|
||||||
|
#include <QskRgbValue.h>
|
||||||
|
#include <qmetatype.h>
|
||||||
|
|
||||||
|
class QskRgbValueQml
|
||||||
|
{
|
||||||
|
Q_GADGET
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum Enum
|
||||||
|
{
|
||||||
|
#define RGB( name, value ) name = value,
|
||||||
|
QSK_RGB_VALUES
|
||||||
|
#undef RGB
|
||||||
|
};
|
||||||
|
|
||||||
|
Q_ENUM( Enum )
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -10,6 +10,7 @@ HEADERS += \
|
||||||
QskQmlGlobal.h \
|
QskQmlGlobal.h \
|
||||||
QskShortcutQml.h \
|
QskShortcutQml.h \
|
||||||
QskLayoutQml.h \
|
QskLayoutQml.h \
|
||||||
|
QskRgbValueQml.h \
|
||||||
QskMainQml.h \
|
QskMainQml.h \
|
||||||
QskQml.h
|
QskQml.h
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue