summaryrefslogtreecommitdiff
path: root/bootstrap.hxx
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-04-06 12:19:31 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-04-06 12:19:31 +0800
commitc7a019ddcd164ecfbf82be6129967c96be2667d5 (patch)
treeced71cb757b69f2806ebed36cd329c8557c4f404 /bootstrap.hxx
parentd7e3915f056c1e78a00aacfa27777e79ef14e62d (diff)
Rename the files
Diffstat (limited to 'bootstrap.hxx')
-rw-r--r--bootstrap.hxx59
1 files changed, 0 insertions, 59 deletions
diff --git a/bootstrap.hxx b/bootstrap.hxx
deleted file mode 100644
index eecbda6..0000000
--- a/bootstrap.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef BOOTSTRAP_HXX
-#define BOOTSTRAP_HXX
-
-#include <QtQml>
-#include <QColor>
-
-class Qootstrap : public QQmlEngineExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid)
-};
-
-class Bootstrap : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(Theme theme READ theme WRITE setTheme NOTIFY themeChanged)
- Q_PROPERTY(bool darkMode READ darkMode WRITE setDarkMode NOTIFY darkModeChanged)
- Q_PROPERTY(QColor bodyBg READ bodyBg NOTIFY bodyBgChanged)
- QML_ELEMENT
- QML_UNCREATABLE("Bootstrap is an attached property")
-
- public:
- explicit Bootstrap(QObject *parent = nullptr);
- static Bootstrap *qmlAttachedProperties(QObject *object);
-
- enum Theme {
- None,
- Primary,
- Secondary,
- Success,
- Danger,
- Warning,
- Info,
- Light,
- Dark,
- Link
- };
- Q_ENUM(Theme)
- Theme theme() const;
- void setTheme(Theme theme);
- bool darkMode() const;
- void setDarkMode(bool darkMode);
- QColor bodyBg() const;
-
- signals:
- void themeChanged();
- void darkModeChanged();
- void bodyBgChanged();
-
- private:
- Theme bsTheme;
- bool bsDarkMode;
- QColor bsLightBodyBg;
- QColor bsDarkBodyBg;
-};
-
-QML_DECLARE_TYPEINFO(Bootstrap, QML_HAS_ATTACHED_PROPERTIES)
-
-#endif