diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..7f087e5
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,26 @@
+root=true
+# EditorConfig is awesome: https://EditorConfig.org
+
+# top-most EditorConfig file
+
+# Unix-style newlines with a newline ending every file
+[*]
+end_of_line=lf
+insert_final_newline=true
+
+# ReSharper properties
+resharper_enforce_line_ending_style=true
+resharper_use_indent_from_vs=false
+
+[{qmldir}]
+indent_style=space
+indent_size=4
+trim_trailing_whitespace=true
+insert_final_newline=true
+
+[*.{appxmanifest,build,c,c++,cc,config,cp,cpp,csproj,cu,cuh,cxx,dbml,discomap,dtd,h,hh,hpp,hxx,inc,inl,ino,ipp,jsproj,lsproj,mpp,njsproj,nuspec,proj,props,proto,resw,resx,StyleCop,targets,tasks,tpp,vbproj,xaml,xamlx,xml,xoml,xsd,qml,txt,qrc}]
+indent_style=space
+indent_size=4
+tab_width=4
+trim_trailing_whitespace=true
+insert_final_newline=true
diff --git a/.gitignore b/.gitignore
index 58166f1..ebdf430 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,5 +4,5 @@
*.users
# Ignore CLion project files
*.idea
-# For macOs users ^^
+# For macOs users
.DS_Store
\ No newline at end of file
diff --git a/README.md b/README.md
index 020abe8..4f50078 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,10 @@
+
+
+
+
# Qaterial Gallery
-QaterialGallery is a showcase application and contains example for the library Qaterial . It is still under development.
+QaterialGallery is a showcase application and contains example for the library Qaterial . It is still under development. This library is hard fork of previous library QQuickMaterialHelper.
This project also showcase multiplatform deployment with Qt.
@@ -12,15 +16,63 @@ This project also showcase multiplatform deployment with Qt.
## Components
+### Main Page
+
+
+
+### Menu Bar
+
+![screen4](./doc/screen4.png)
+
### Buttons
-![](./doc/screen2.png)
+![screen5](./doc/screen5.png)
+
+### Icons
+
+
+
+### Floating Action Button
+
+![screen7](./doc/screen7.png)
+
+### Controls Buttons
+
+![screen8](./doc/screen8.png)
+
+### Typography
+
+
+
+### Text Field
+
+
+
+### Tab
+
+![screen11](./doc/screen11.png)
+
+### Cards
+
+![screen12](./doc/screen12.png)
+
+### Frame
+
+
+
+### Group Box
+
+
+
+### Snackbars
+
+
+
+### Dialogs
+
+![screen16](./doc/screen16.png)
-* Raised Button
-* Flat Button
-* Outlined Button
-etc ...
DOC TODO
diff --git a/doc/screen10.png b/doc/screen10.png
new file mode 100644
index 0000000..4ad9452
Binary files /dev/null and b/doc/screen10.png differ
diff --git a/doc/screen11.png b/doc/screen11.png
new file mode 100644
index 0000000..892880c
Binary files /dev/null and b/doc/screen11.png differ
diff --git a/doc/screen12.png b/doc/screen12.png
new file mode 100644
index 0000000..c61c53b
Binary files /dev/null and b/doc/screen12.png differ
diff --git a/doc/screen13.png b/doc/screen13.png
new file mode 100644
index 0000000..4ba303b
Binary files /dev/null and b/doc/screen13.png differ
diff --git a/doc/screen14.png b/doc/screen14.png
new file mode 100644
index 0000000..8cae053
Binary files /dev/null and b/doc/screen14.png differ
diff --git a/doc/screen15.png b/doc/screen15.png
new file mode 100644
index 0000000..9a9079c
Binary files /dev/null and b/doc/screen15.png differ
diff --git a/doc/screen16.png b/doc/screen16.png
new file mode 100644
index 0000000..115c4d4
Binary files /dev/null and b/doc/screen16.png differ
diff --git a/doc/screen3.png b/doc/screen3.png
new file mode 100644
index 0000000..2c5db56
Binary files /dev/null and b/doc/screen3.png differ
diff --git a/doc/screen4.png b/doc/screen4.png
new file mode 100644
index 0000000..9f02dfe
Binary files /dev/null and b/doc/screen4.png differ
diff --git a/doc/screen5.png b/doc/screen5.png
new file mode 100644
index 0000000..8203d93
Binary files /dev/null and b/doc/screen5.png differ
diff --git a/doc/screen6.png b/doc/screen6.png
new file mode 100644
index 0000000..9619c53
Binary files /dev/null and b/doc/screen6.png differ
diff --git a/doc/screen7.png b/doc/screen7.png
new file mode 100644
index 0000000..1003d94
Binary files /dev/null and b/doc/screen7.png differ
diff --git a/doc/screen8.png b/doc/screen8.png
new file mode 100644
index 0000000..edce193
Binary files /dev/null and b/doc/screen8.png differ
diff --git a/doc/screen9.png b/doc/screen9.png
new file mode 100644
index 0000000..cf43c36
Binary files /dev/null and b/doc/screen9.png differ
diff --git a/images/images.qrc b/images/images.qrc
index 588a25d..b18b6be 100644
--- a/images/images.qrc
+++ b/images/images.qrc
@@ -1,77 +1,76 @@
-
- icon.png
- icons/back.png
- icons/drawer.png
- icons/menu.png
- icons/plus.svg
- icons/plus-circle-outline.svg
- icons/palette.svg
- icons/arrow-left.svg
- icons/button.svg
- icons/format-letter-case.svg
- icons/tab.svg
- icons/airplane.svg
- icons/briefcase.svg
- icons/compass.svg
+
+ icons/back.png
+ icons/drawer.png
+ icons/menu.png
+ icons/plus.svg
+ icons/plus-circle-outline.svg
+ icons/palette.svg
+ icons/arrow-left.svg
+ icons/button.svg
+ icons/format-letter-case.svg
+ icons/tab.svg
+ icons/airplane.svg
+ icons/briefcase.svg
+ icons/compass.svg
- icons/album.svg
- icons/settings.svg
- icons/music-note.svg
- icons/heart.svg
- icons/thumb-up.svg
+ icons/album.svg
+ icons/settings.svg
+ icons/music-note.svg
+ icons/heart.svg
+ icons/thumb-up.svg
- icons/pencil.svg
- icons/content-copy.svg
- icons/crosshairs-gps.svg
+ icons/pencil.svg
+ icons/content-copy.svg
+ icons/crosshairs-gps.svg
- icons/format-align-right.svg
- icons/format-align-left.svg
- icons/format-align-center.svg
- icons/format-bold.svg
- icons/format-italic.svg
- icons/format-underline.svg
- icons/delegate.svg
- icons/topApp.svg
- icons/bottomApp.svg
- icons/pane.svg
- icons/frame.svg
- icons/groupBox.svg
- icons/dialog.svg
- icons/checkbox-marked.svg
- icons/textbox.svg
- icons/dots-vertical.svg
- icons/menu.svg
- icons/banner.svg
- icons/wifi.svg
- icons/snackbar.svg
- icons/account.svg
- icons/phone.svg
- icons/cake.svg
- icons/alarm.svg
- icons/email.svg
- icons/map-marker.svg
- icons/eye.svg
- icons/eye-off.svg
- icons/close-circle.svg
- icons/alert-circle.svg
- icons/fader.svg
+ icons/format-align-right.svg
+ icons/format-align-left.svg
+ icons/format-align-center.svg
+ icons/format-bold.svg
+ icons/format-italic.svg
+ icons/format-underline.svg
+ icons/delegate.svg
+ icons/topApp.svg
+ icons/bottomApp.svg
+ icons/pane.svg
+ icons/frame.svg
+ icons/groupBox.svg
+ icons/dialog.svg
+ icons/checkbox-marked.svg
+ icons/textbox.svg
+ icons/dots-vertical.svg
+ icons/menu.svg
+ icons/banner.svg
+ icons/wifi.svg
+ icons/snackbar.svg
+ icons/account.svg
+ icons/phone.svg
+ icons/cake.svg
+ icons/alarm.svg
+ icons/email.svg
+ icons/map-marker.svg
+ icons/eye.svg
+ icons/eye-off.svg
+ icons/close-circle.svg
+ icons/alert-circle.svg
+ icons/fader.svg
- delegateLarge.png
- delegateSquare.png
- delegateRound.png
+ delegateLarge.png
+ delegateSquare.png
+ delegateRound.png
- card344x194_1.png
- card344x194_2.png
- card344x194_3.png
- card40x40.png
- card80x80_1.png
- card80x80_2.png
- card168x168_1.png
- card168x168_2.png
- card168x168_3.png
- card168x168_4.png
- card168x168_5.png
+ card344x194_1.png
+ card344x194_2.png
+ card344x194_3.png
+ card40x40.png
+ card80x80_1.png
+ card80x80_2.png
+ card168x168_1.png
+ card168x168_2.png
+ card168x168_3.png
+ card168x168_4.png
+ card168x168_5.png
-
+
\ No newline at end of file
diff --git a/qml/ControlButtonPage.qml b/qml/ControlButtonPage.qml
index 57b6979..4090efb 100644
--- a/qml/ControlButtonPage.qml
+++ b/qml/ControlButtonPage.qml
@@ -3,6 +3,7 @@
import QtQuick 2.12
import QtQuick.Layouts 1.12
+import QtQuick.Controls 2.12
import Qaterial 1.0
diff --git a/qml/DialogDelegatePage.qml b/qml/DialogDelegatePage.qml
index d9edfc8..af07a02 100644
--- a/qml/DialogDelegatePage.qml
+++ b/qml/DialogDelegatePage.qml
@@ -85,6 +85,7 @@ ScrollablePage
}
onRejected: console.log("Cancel")
}
+
EnumDelegate
{
width: parent.width
@@ -94,7 +95,8 @@ ScrollablePage
icon.source: model.get(enumValue).source ? model.get(enumValue).source : ""
onAccepted: enumValue = value
title: "Title"
- model:ListModel
+
+ model: ListModel
{
ListElement{ text: "Choice 1"; secondaryText: "secondary text";source: "qrc:/QaterialGallery/images/icons/cake.svg" }
ListElement{ text: "Choice 2"; secondaryText: "Neque porro quisquam";source: "qrc:/QaterialGallery/images/icons/music-note.svg" }
@@ -108,11 +110,15 @@ ScrollablePage
ListElement{ text: "Element 10"; }
ListElement{ text: "Element 11";source: "qrc:/QaterialGallery/images/icons/account.svg" }
}
- delegate: RadioDialogDelegate
+
+ delegate: Component
{
- text: model.text ? model.text : ""
- secondaryText: model.secondaryText ? model.secondaryText : ""
- icon.source: model.source ? model.source : ""
+ RadioDialogDelegate
+ {
+ text: model.text ? model.text : ""
+ secondaryText: model.secondaryText ? model.secondaryText : ""
+ icon.source: model.source ? model.source : ""
+ }
}
}
} // Column
diff --git a/qml/FixedTabBarPage.qml b/qml/FixedTabBarPage.qml
index d11db12..cc2b312 100644
--- a/qml/FixedTabBarPage.qml
+++ b/qml/FixedTabBarPage.qml
@@ -3,6 +3,7 @@
import QtQuick 2.12
import QtQuick.Layouts 1.12
+import QtQuick.Controls 2.12
import Qaterial 1.0
diff --git a/qml/GroupBoxPage.qml b/qml/GroupBoxPage.qml
index 1916fc1..13d5b56 100644
--- a/qml/GroupBoxPage.qml
+++ b/qml/GroupBoxPage.qml
@@ -52,7 +52,7 @@ ScrollablePage
title: "Caption Inline Title"
columnWidth: page.itemWidth
anchors.horizontalCenter: parent.horizontalCenter
- titleType: Style.TextType.Caption
+ textType: Style.TextType.Caption
inlineTitle: true
} // GroupBoxLayout
@@ -61,7 +61,7 @@ ScrollablePage
title: "Caption Default Title"
columnWidth: page.itemWidth
anchors.horizontalCenter: parent.horizontalCenter
- titleType: Style.TextType.Caption
+ textType: Style.TextType.Caption
} // GroupBoxLayout
}
}
diff --git a/qml/Main.qml b/qml/Main.qml
index 5b2dfe4..0c8f350 100644
--- a/qml/Main.qml
+++ b/qml/Main.qml
@@ -12,7 +12,7 @@ ApplicationWindow
width: 480
height: 750
visible: true
- title: "Qaterial Gallery"
+ title: "Qaterial Gallery"
RobotoFontLoader {}
diff --git a/qml/MaterialPage.qml b/qml/MaterialPage.qml
index 2af9a4f..a959d0f 100644
--- a/qml/MaterialPage.qml
+++ b/qml/MaterialPage.qml
@@ -7,7 +7,7 @@ Page
{
header: ToolBar
{
- AppBarContent { anchors.fill: parent; title: "Qaterial Gallery" }
+ AppBarContent { anchors.fill: parent; title: "Qaterial Gallery "+ Version.readable }
} // ToolBar
ListModel
diff --git a/src/Main.cpp b/src/Main.cpp
index b444bd7..28dc33b 100644
--- a/src/Main.cpp
+++ b/src/Main.cpp
@@ -8,7 +8,7 @@
*/
// ─────────────────────────────────────────────────────────────
-// INCLUDE
+// INCLUDE
// ─────────────────────────────────────────────────────────────
// Qt
@@ -26,7 +26,7 @@
#include
// ─────────────────────────────────────────────────────────────
-// DECLARATION
+// DECLARATION
// ─────────────────────────────────────────────────────────────
#define QATERIALGALLERY_URI "QaterialGallery"
@@ -35,62 +35,62 @@ Q_LOGGING_CATEGORY(QATERIALGALLERY_MAIN_LOGGING_CATEGORY, "QaterialGallery")
int main(int argc, char *argv[])
{
- // It's important to set the high dip support before creating the gui app
- QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
- QGuiApplication app(argc, argv);
- QQmlApplicationEngine engine;
+ // It's important to set the high dip support before creating the gui app
+ QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QGuiApplication app(argc, argv);
+ QQmlApplicationEngine engine;
- // ────────── REGISTER APPLICATION ──────────────────────────────────────
+ // ────────── REGISTER APPLICATION ──────────────────────────────────────
- QGuiApplication::setOrganizationName("Oliv");
- QGuiApplication::setApplicationName("Qaterial Gallery");
- QGuiApplication::setOrganizationDomain("https://github.com/OlivierLDff/QaterialGallery");
- QGuiApplication::setApplicationVersion(Qqhg::Version::GetVersion());
+ QGuiApplication::setOrganizationName("Oliv");
+ QGuiApplication::setApplicationName("Qaterial Gallery");
+ QGuiApplication::setOrganizationDomain("https://github.com/OlivierLDff/QaterialGallery");
+ QGuiApplication::setApplicationVersion(Qqhg::Version::GetVersion());
- qCDebug(QATERIALGALLERY_MAIN_LOGGING_CATEGORY, "Register Application: "
- "Organization: %s; "
- "Domain: %s; "
- "ApplicationName: %s; "
- "Version: %s",
- qPrintable(QGuiApplication::organizationName()),
- qPrintable(QGuiApplication::organizationDomain()),
- qPrintable(QGuiApplication::applicationName()),
- qPrintable(QGuiApplication::applicationVersion())
- );
+ qCDebug(QATERIALGALLERY_MAIN_LOGGING_CATEGORY, "Register Application: "
+ "Organization: %s; "
+ "Domain: %s; "
+ "ApplicationName: %s; "
+ "Version: %s",
+ qPrintable(QGuiApplication::organizationName()),
+ qPrintable(QGuiApplication::organizationDomain()),
+ qPrintable(QGuiApplication::applicationName()),
+ qPrintable(QGuiApplication::applicationVersion())
+ );
- // ────────── COMMAND PARSER ──────────────────────────────────────
+ // ────────── COMMAND PARSER ──────────────────────────────────────
- QCommandLineParser parser;
- parser.setApplicationDescription("QaterialGallery is a gallery for the QML library Qaterial.");
- parser.addHelpOption();
- parser.addVersionOption();
+ QCommandLineParser parser;
+ parser.setApplicationDescription("QaterialGallery is a gallery for the QML library Qaterial.");
+ parser.addHelpOption();
+ parser.addVersionOption();
- // Process the actual command line arguments given by the user
- parser.process(app);
+ // Process the actual command line arguments given by the user
+ parser.process(app);
- // ────────── PROCESS ARGS ──────────────────────────────────────
+ // ────────── PROCESS ARGS ──────────────────────────────────────
- const QStringList args = parser.positionalArguments();
+ const QStringList args = parser.positionalArguments();
- // ────────── SET QML FONT AND RESSOURCES ──────────
+ // ────────── SET QML FONT AND RESSOURCES ──────────
- QQuickStyle::setStyle(QStringLiteral("Material"));
- engine.addImportPath("qrc:///QaterialGallery/qml");
- engine.addImportPath("qrc:///");
+ QQuickStyle::setStyle(QStringLiteral("Material"));
+ engine.addImportPath("qrc:///QaterialGallery/qml");
+ engine.addImportPath("qrc:///");
- // ────────── REGISTER QML TYPE ────────────
+ // ────────── REGISTER QML TYPE ────────────
- // QSM HELPER
- Qaterial::Utils::loadResources();
- Qaterial::Utils::registerTypes();
+ // QSM HELPER
+ Qaterial::Utils::loadResources();
+ Qaterial::Utils::registerTypes();
- // ────────── LOAD QML MAIN ───────────
+ // ────────── LOAD QML MAIN ───────────
- qCInfo(QATERIALGALLERY_MAIN_LOGGING_CATEGORY, "Qml Engine Load Main.qml");
- engine.load(QUrl("qrc:/QaterialGallery/qml/Main.qml"));
- if (engine.rootObjects().isEmpty())
- return -1;
+ qCInfo(QATERIALGALLERY_MAIN_LOGGING_CATEGORY, "Qml Engine Load Main.qml");
+ engine.load(QUrl("qrc:/QaterialGallery/qml/Main.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
- // ────────── START EVENT LOOP ──────────────────────────────────────
- return app.exec();
+ // ────────── START EVENT LOOP ──────────────────────────────────────
+ return app.exec();
}
diff --git a/src/QaterialGallery.cpp b/src/QaterialGallery.cpp
index 0d9aa5c..63fea42 100644
--- a/src/QaterialGallery.cpp
+++ b/src/QaterialGallery.cpp
@@ -1,5 +1,5 @@
// ─────────────────────────────────────────────────────────────
-// INCLUDE
+// INCLUDE
// ─────────────────────────────────────────────────────────────
// C Header
@@ -14,39 +14,39 @@
#include
// ─────────────────────────────────────────────────────────────
-// DECLARATION
+// DECLARATION
// ─────────────────────────────────────────────────────────────
QATERIALGALLERY_USING_NAMESPACE
// ─────────────────────────────────────────────────────────────
-// FUNCTIONS
+// FUNCTIONS
// ─────────────────────────────────────────────────────────────
uint32_t Version::GetMajor()
{
- return QATERIALGALLERY_VERSION_MAJOR;
+ return QATERIALGALLERY_VERSION_MAJOR;
}
uint32_t Version::GetMinor()
{
- return QATERIALGALLERY_VERSION_MINOR;
+ return QATERIALGALLERY_VERSION_MINOR;
}
uint32_t Version::GetPatch()
{
- return QATERIALGALLERY_VERSION_PATCH;
+ return QATERIALGALLERY_VERSION_PATCH;
}
uint32_t Version::GetTag()
{
- return QATERIALGALLERY_VERSION_TAG_HEX;
+ return QATERIALGALLERY_VERSION_TAG_HEX;
}
QString Version::GetVersion()
{
- return QString::number(GetMajor()) + "." +
- QString::number(GetMinor()) + "." +
- QString::number(GetPatch()) + "." +
- QString::number(GetTag(), 16);
+ return QString::number(GetMajor()) + "." +
+ QString::number(GetMinor()) + "." +
+ QString::number(GetPatch()) + "." +
+ QString::number(GetTag(), 16);
}
diff --git a/src/include/QaterialGallery.hpp b/src/include/QaterialGallery.hpp
index cb0d12e..fd70ff7 100644
--- a/src/include/QaterialGallery.hpp
+++ b/src/include/QaterialGallery.hpp
@@ -2,7 +2,7 @@
#define __QATERIALGALLERY_COMMON_HPP__
// ─────────────────────────────────────────────────────────────
-// INCLUDE
+// INCLUDE
// ─────────────────────────────────────────────────────────────
// C Header
@@ -18,19 +18,19 @@
// Application Header
// ─────────────────────────────────────────────────────────────
-// DECLARATION
+// DECLARATION
// ─────────────────────────────────────────────────────────────
#ifdef WIN32
- #ifdef QATERIALGALLERY_SHARED // Shared build
- #define QATERIALGALLERY_API_ __declspec(dllexport)
- #elif QATERIALGALLERY_STATIC // No decoration when building staticlly
- #define QATERIALGALLERY_API_
- #else // Link to lib
- #define QATERIALGALLERY_API_ __declspec(dllimport)
- #endif
+ #ifdef QATERIALGALLERY_SHARED // Shared build
+ #define QATERIALGALLERY_API_ __declspec(dllexport)
+ #elif QATERIALGALLERY_STATIC // No decoration when building staticlly
+ #define QATERIALGALLERY_API_
+ #else // Link to lib
+ #define QATERIALGALLERY_API_ __declspec(dllimport)
+ #endif
#else
- #define QATERIALGALLERY_API_
+ #define QATERIALGALLERY_API_
#endif
#ifdef QATERIALGALLERY_USE_NAMESPACE
@@ -53,16 +53,16 @@ QATERIALGALLERY_NAMESPACE_START
class QATERIALGALLERY_API_ Version
{
public:
- /** Library Major Version */
- static uint32_t GetMajor();
- /** Library Minor Version */
- static uint32_t GetMinor();
- /** Library Patch Version */
- static uint32_t GetPatch();
- /** Library Tag Version */
- static uint32_t GetTag();
- /** Library Version as major.minor.patch.tag */
- static QString GetVersion();
+ /** Library Major Version */
+ static uint32_t GetMajor();
+ /** Library Minor Version */
+ static uint32_t GetMinor();
+ /** Library Patch Version */
+ static uint32_t GetPatch();
+ /** Library Tag Version */
+ static uint32_t GetTag();
+ /** Library Version as major.minor.patch.tag */
+ static QString GetVersion();
};
QATERIALGALLERY_NAMESPACE_END