From 5d584d44c3311d05a95776037251b9943c2faba9 Mon Sep 17 00:00:00 2001 From: johanneshilden Date: Thu, 5 Oct 2017 11:13:21 +0300 Subject: [PATCH 01/14] Add autoRaise property to Drawer --- components/qtmaterialdrawer.cpp | 52 ++++++++++++++++++++++++++++----- components/qtmaterialdrawer.h | 3 ++ components/qtmaterialdrawer_p.h | 12 +++++--- 3 files changed, 56 insertions(+), 11 deletions(-) diff --git a/components/qtmaterialdrawer.cpp b/components/qtmaterialdrawer.cpp index d19262d..973ce9b 100644 --- a/components/qtmaterialdrawer.cpp +++ b/components/qtmaterialdrawer.cpp @@ -14,13 +14,34 @@ * \internal */ +/*! + * \internal + */ QtMaterialDrawerPrivate::QtMaterialDrawerPrivate(QtMaterialDrawer *q) - : q_ptr(q), - stateMachine(new QtMaterialDrawerStateMachine(q)), - window(new QWidget), - width(250), - clickToClose(false) + : q_ptr(q) { +} + +/*! + * \internal + */ +QtMaterialDrawerPrivate::~QtMaterialDrawerPrivate() +{ +} + +/*! + * \internal + */ +void QtMaterialDrawerPrivate::init() +{ + Q_Q(QtMaterialDrawer); + + stateMachine = new QtMaterialDrawerStateMachine(q); + window = new QWidget; + width = 250; + clickToClose = false; + autoRaise = true; + QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(window); @@ -28,7 +49,6 @@ QtMaterialDrawerPrivate::QtMaterialDrawerPrivate(QtMaterialDrawer *q) q->setFixedWidth(width+16); stateMachine->start(); - QCoreApplication::processEvents(); } @@ -40,6 +60,7 @@ QtMaterialDrawer::QtMaterialDrawer(QWidget *parent) : QtMaterialOverlayWidget(parent), d_ptr(new QtMaterialDrawerPrivate(this)) { + d_func()->init(); } QtMaterialDrawer::~QtMaterialDrawer() @@ -90,12 +111,29 @@ bool QtMaterialDrawer::clickOutsideToClose() const return d->clickToClose; } +void QtMaterialDrawer::setAutoRaise(bool state) +{ + Q_D(QtMaterialDrawer); + + d->autoRaise = state; +} + +bool QtMaterialDrawer::autoRaise() const +{ + Q_D(const QtMaterialDrawer); + + return d->autoRaise; +} + void QtMaterialDrawer::openDrawer() { Q_D(QtMaterialDrawer); emit d->stateMachine->enterOpenedState(); - raise(); + + if (d->autoRaise) { + raise(); + } } void QtMaterialDrawer::closeDrawer() diff --git a/components/qtmaterialdrawer.h b/components/qtmaterialdrawer.h index 2ceb1f9..6dd69e8 100644 --- a/components/qtmaterialdrawer.h +++ b/components/qtmaterialdrawer.h @@ -23,6 +23,9 @@ public: void setClickOutsideToClose(bool state); bool clickOutsideToClose() const; + void setAutoRaise(bool state); + bool autoRaise() const; + public slots: void openDrawer(); void closeDrawer(); diff --git a/components/qtmaterialdrawer_p.h b/components/qtmaterialdrawer_p.h index 671ee3b..1a1247f 100644 --- a/components/qtmaterialdrawer_p.h +++ b/components/qtmaterialdrawer_p.h @@ -13,12 +13,16 @@ class QtMaterialDrawerPrivate public: QtMaterialDrawerPrivate(QtMaterialDrawer *q); + ~QtMaterialDrawerPrivate(); + + void init(); QtMaterialDrawer *const q_ptr; - QtMaterialDrawerStateMachine *const stateMachine; - QWidget *const window; - int width; - bool clickToClose; + QtMaterialDrawerStateMachine *stateMachine; + QWidget *window; + int width; + bool clickToClose; + bool autoRaise; }; #endif // DRAWER_P_H From 7da3d06d963096d443ff41d0fdc92b23ca3d6d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heikki=20Johannes=20Hild=C3=A9n?= Date: Thu, 5 Oct 2017 11:28:40 +0300 Subject: [PATCH 02/14] Update README.md --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index edfcfd7..3c2bf9b 100644 --- a/README.md +++ b/README.md @@ -6,22 +6,39 @@ I finally took the time to go through and clean up this code. The build includes Component | Preview ----------------- | ------------------------------------------------ +x | x Avatar | ![Avatar](gifs/avatar.gif) +x | x Check Box | ![Check Box](gifs/checkbox.gif) +x | x Circular Progress | ![Circular Progressj](gifs/circularprogress.gif) +x | x Dialog | ![Dialog](gifs/dialog.gif) +x | x Drawer | ![Drawer](gifs/drawer.gif) +x | x FAB | ![FAB](gifs/fab.gif) +x | x Flat Button | ![Flat Button](gifs/flatbutton.gif) +x | x Icon Button | ![Icon Button](gifs/iconbutton.gif) +x | x Progress | ![Progress](gifs/progress.gif) +x | x Radio Button | ![Radio Button](gifs/radiobutton.gif) +x | x Raised Button | ![Raised Button](gifs/raisedbutton.gif) +x | x Scroll Bar | ![Scroll Bar](gifs/scrollbar.gif) +x | x Slider | ![Slider](gifs/slider.gif) +x | x Snackbar | ![Snackbar](gifs/snackbar.gif) +x | x Tabs | ![Tabs](gifs/tabs.gif) +x | x Text Field | ![Text Field](gifs/textfield.gif) +x | x Toggle | ![checkbox](gifs/toggle.gif) #### Implemented components From d284619f626ea7680ef78c6fb01fc6c57bbddfa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heikki=20Johannes=20Hild=C3=A9n?= Date: Thu, 5 Oct 2017 11:28:55 +0300 Subject: [PATCH 03/14] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3c2bf9b..8c54ddd 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ I finally took the time to go through and clean up this code. The build includes Component | Preview ----------------- | ------------------------------------------------ x | x +x | x Avatar | ![Avatar](gifs/avatar.gif) x | x Check Box | ![Check Box](gifs/checkbox.gif) From 9e597d6182b84da587b4f3054524ab1c9a3a7675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heikki=20Johannes=20Hild=C3=A9n?= Date: Thu, 5 Oct 2017 11:31:01 +0300 Subject: [PATCH 04/14] Update README.md --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 8c54ddd..d3a369d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,33 @@ I finally took the time to go through and clean up this code. The build includes an executable with a preview, and some settings to play around with for each widget. A YouTube video preview is [available here](http://www.youtube.com/watch?v=21UMeNVBPU4). + + + + + + + + + + + + + +
+ Avatar + + +
+ Avatar + + +
+ Avatar + + +
+ Component | Preview ----------------- | ------------------------------------------------ x | x From e1f88e165b5a8affd964491db2d45adc232d808c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heikki=20Johannes=20Hild=C3=A9n?= Date: Thu, 5 Oct 2017 11:31:54 +0300 Subject: [PATCH 05/14] Update README.md --- README.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d3a369d..eb3569c 100644 --- a/README.md +++ b/README.md @@ -10,22 +10,11 @@ I finally took the time to go through and clean up this code. The build includes Avatar - + QtMaterialAvatar - - Avatar - - - - - - - - Avatar - - + From b55fe02e4d1847fe79d9c8ef778e2445c4fff4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heikki=20Johannes=20Hild=C3=A9n?= Date: Thu, 5 Oct 2017 11:32:39 +0300 Subject: [PATCH 06/14] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eb3569c..2c7490f 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,15 @@ I finally took the time to go through and clean up this code. The build includes an executable with a preview, and some settings to play around with for each widget. A YouTube video preview is [available here](http://www.youtube.com/watch?v=21UMeNVBPU4). + + + From c2ac1948690a1b94c0904235bc335f032dc20686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heikki=20Johannes=20Hild=C3=A9n?= Date: Thu, 5 Oct 2017 11:33:07 +0300 Subject: [PATCH 07/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c7490f..e9466a3 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ I finally took the time to go through and clean up this code. The build includes Avatar From fe9af7448d663858063a28927d22835252d3b1ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heikki=20Johannes=20Hild=C3=A9n?= Date: Thu, 5 Oct 2017 11:33:30 +0300 Subject: [PATCH 08/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e9466a3..88b7d91 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ I finally took the time to go through and clean up this code. The build includes Avatar From a8e9c720a00fab6873a25dde9ca0f4dcc516ba7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heikki=20Johannes=20Hild=C3=A9n?= Date: Thu, 5 Oct 2017 11:41:21 +0300 Subject: [PATCH 09/14] Update README.md --- README.md | 246 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 208 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 88b7d91..0fac37b 100644 --- a/README.md +++ b/README.md @@ -21,46 +21,216 @@ I finally took the time to go through and clean up this code. The build includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Avatar - QtMaterialAvatar + `QtMaterialAvatar`
- `QtMaterialAvatar` +
QtMaterialAvatar
-
QtMaterialAvatar
+ QtMaterialAvatar
+ Check Box + + QtMaterialCheckBox +
+ +
+ Circular Progress + + QtMaterialCircularProgress +
+ +
+ Dialog + + QtMaterialDialog +
+ +
+ Drawer + + QtMaterialDrawer +
+ +
+ FAB + + QtMaterialFloatingActionButton +
+ +
+ Flat Button + + QtMaterialFlatButton +
+ +
+ Icon Button + + QtMaterialIconButton +
+ +
+ Progress + + QtMaterialProgress +
+ +
+ Radio Button + + QtMaterialRadioButton +
+ +
+ Raised Button + + QtMaterialRaisedButton +
+ +
+ Scroll Bar + + QtMaterialScrollBar +
+ +
+ Slider + + QtMaterialSlider +
+ +
+ Snackbar + + QtMaterialSnackBar +
+ +
+ Tabs + + QtMaterialTabs +
+ +
+ Text Field + + QtMaterialTextField +
+ +
+ Toggle + + QtMaterialToggle +
+ +
-Component | Preview ------------------ | ------------------------------------------------ -x | x -x | x -Avatar | ![Avatar](gifs/avatar.gif) -x | x -Check Box | ![Check Box](gifs/checkbox.gif) -x | x -Circular Progress | ![Circular Progressj](gifs/circularprogress.gif) -x | x -Dialog | ![Dialog](gifs/dialog.gif) -x | x -Drawer | ![Drawer](gifs/drawer.gif) -x | x -FAB | ![FAB](gifs/fab.gif) -x | x -Flat Button | ![Flat Button](gifs/flatbutton.gif) -x | x -Icon Button | ![Icon Button](gifs/iconbutton.gif) -x | x -Progress | ![Progress](gifs/progress.gif) -x | x -Radio Button | ![Radio Button](gifs/radiobutton.gif) -x | x -Raised Button | ![Raised Button](gifs/raisedbutton.gif) -x | x -Scroll Bar | ![Scroll Bar](gifs/scrollbar.gif) -x | x -Slider | ![Slider](gifs/slider.gif) -x | x -Snackbar | ![Snackbar](gifs/snackbar.gif) -x | x -Tabs | ![Tabs](gifs/tabs.gif) -x | x -Text Field | ![Text Field](gifs/textfield.gif) -x | x -Toggle | ![checkbox](gifs/toggle.gif) - #### Implemented components - [x] Avatar From 05a27e481327433c4efb80e36f1f5f07ec6155fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heikki=20Johannes=20Hild=C3=A9n?= Date: Thu, 5 Oct 2017 11:42:32 +0300 Subject: [PATCH 10/14] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0fac37b..bfe10d3 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ I finally took the time to go through and clean up this code. The build includes an executable with a preview, and some settings to play around with for each widget. A YouTube video preview is [available here](http://www.youtube.com/watch?v=21UMeNVBPU4). + @@ -229,6 +230,7 @@ I finally took the time to go through and clean up this code. The build includes +
#### Implemented components From 371696ca49bb1aca305f3d32677848d06b63d093 Mon Sep 17 00:00:00 2001 From: johanneshilden Date: Thu, 5 Oct 2017 11:43:03 +0300 Subject: [PATCH 11/14] Fix table markup --- README.md | 452 +++++++++++++++++++++++++++--------------------------- 1 file changed, 226 insertions(+), 226 deletions(-) diff --git a/README.md b/README.md index bfe10d3..d6f2499 100644 --- a/README.md +++ b/README.md @@ -5,232 +5,232 @@ I finally took the time to go through and clean up this code. The build includes an executable with a preview, and some settings to play around with for each widget. A YouTube video preview is [available here](http://www.youtube.com/watch?v=21UMeNVBPU4). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- Avatar - - QtMaterialAvatar -
- -
- Check Box - - QtMaterialCheckBox -
- -
- Circular Progress - - QtMaterialCircularProgress -
- -
- Dialog - - QtMaterialDialog -
- -
- Drawer - - QtMaterialDrawer -
- -
- FAB - - QtMaterialFloatingActionButton -
- -
- Flat Button - - QtMaterialFlatButton -
- -
- Icon Button - - QtMaterialIconButton -
- -
- Progress - - QtMaterialProgress -
- -
- Radio Button - - QtMaterialRadioButton -
- -
- Raised Button - - QtMaterialRaisedButton -
- -
- Scroll Bar - - QtMaterialScrollBar -
- -
- Slider - - QtMaterialSlider -
- -
- Snackbar - - QtMaterialSnackBar -
- -
- Tabs - - QtMaterialTabs -
- -
- Text Field - - QtMaterialTextField -
- -
- Toggle - - QtMaterialToggle -
- -
+ Avatar + + QtMaterialAvatar +
+ +
+ Check Box + + QtMaterialCheckBox +
+ +
+ Circular Progress + + QtMaterialCircularProgress +
+ +
+ Dialog + + QtMaterialDialog +
+ +
+ Drawer + + QtMaterialDrawer +
+ +
+ FAB + + QtMaterialFloatingActionButton +
+ +
+ Flat Button + + QtMaterialFlatButton +
+ +
+ Icon Button + + QtMaterialIconButton +
+ +
+ Progress + + QtMaterialProgress +
+ +
+ Radio Button + + QtMaterialRadioButton +
+ +
+ Raised Button + + QtMaterialRaisedButton +
+ +
+ Scroll Bar + + QtMaterialScrollBar +
+ +
+ Slider + + QtMaterialSlider +
+ +
+ Snackbar + + QtMaterialSnackBar +
+ +
+ Tabs + + QtMaterialTabs +
+ +
+ Text Field + + QtMaterialTextField +
+ +
+ Toggle + + QtMaterialToggle +
+ +
#### Implemented components From 87c56b0906d26db675afdea5085c99f478b85345 Mon Sep 17 00:00:00 2001 From: johanneshilden Date: Thu, 5 Oct 2017 11:48:14 +0300 Subject: [PATCH 12/14] Fix table markup --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index d6f2499..4db4c39 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ I finally took the time to go through and clean up this code. The build includes - + - @@ -31,7 +31,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -44,7 +44,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -57,7 +57,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -70,7 +70,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -83,7 +83,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -96,7 +96,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -109,7 +109,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -122,7 +122,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -135,7 +135,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -148,7 +148,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -161,7 +161,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -174,7 +174,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -187,7 +187,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -200,7 +200,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -213,7 +213,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -226,7 +226,7 @@ I finally took the time to go through and clean up this code. The build includes - From f059149f446a3d1adbdc9278606ad65bb2e8fc63 Mon Sep 17 00:00:00 2001 From: johanneshilden Date: Thu, 5 Oct 2017 11:50:20 +0300 Subject: [PATCH 13/14] Update README --- README.md | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 4db4c39..62b3729 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ I finally took the time to go through and clean up this code. The build includes
@@ -18,7 +18,7 @@ I finally took the time to go through and clean up this code. The build includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- + - @@ -31,8 +31,10 @@ I finally took the time to go through and clean up this code. The build includes - @@ -44,7 +46,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -57,7 +59,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -70,7 +72,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -83,7 +85,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -96,7 +98,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -109,7 +111,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -122,7 +124,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -135,7 +137,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -148,7 +150,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -161,7 +163,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -174,7 +176,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -187,7 +189,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -200,7 +202,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -213,7 +215,7 @@ I finally took the time to go through and clean up this code. The build includes - @@ -226,7 +228,7 @@ I finally took the time to go through and clean up this code. The build includes - From a624aa465342b8c06f12a00149dc2f9b429dff92 Mon Sep 17 00:00:00 2001 From: johanneshilden Date: Thu, 5 Oct 2017 11:51:26 +0300 Subject: [PATCH 14/14] Remove non-working center tag --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 62b3729..d6f2499 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,7 @@ I finally took the time to go through and clean up this code. The build includes
@@ -18,7 +18,7 @@ I finally took the time to go through and clean up this code. The build includes
+
- + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- -
+