From f4e4f100f3dd92b0960caed1eef9279f0a608b54 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Fri, 10 Apr 2020 21:08:29 +0200 Subject: [PATCH 01/15] MenuBar edit, first signals and slots --- src/app/puzzle/puzzlemainwindow.cpp | 113 ++++++++++++++++++++++ src/app/puzzle/puzzlemainwindow.h | 14 +++ src/app/puzzle/puzzlemainwindow.ui | 140 +++++++++++++++++++++++++--- src/app/puzzle/stable.h | 2 +- src/app/puzzle/version.h | 2 +- 5 files changed, 258 insertions(+), 13 deletions(-) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 8e1c556f9..2fec23266 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -34,6 +34,8 @@ PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : ui(new Ui::PuzzleMainWindow) { ui->setupUi(this); + + InitMenuBar(); } //--------------------------------------------------------------------------------------------------------------------- @@ -48,3 +50,114 @@ bool PuzzleMainWindow::LoadFile(const QString &path) Q_UNUSED(path) return true; } + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitMenuBar() +{ + // connects the actions for the file menu + connect(ui->actionNew, &QAction::triggered, this, &PuzzleMainWindow::New); + connect(ui->actionOpen, &QAction::triggered, this, &PuzzleMainWindow::Open); + connect(ui->actionSave, &QAction::triggered, this, &PuzzleMainWindow::Save); + connect(ui->actionSaveAs, &QAction::triggered, this, &PuzzleMainWindow::SaveAs); + connect(ui->actionImportRawLayout, &QAction::triggered, this, &PuzzleMainWindow::ImportRawLayout); + connect(ui->actionExit, &QAction::triggered, this, &PuzzleMainWindow::close); + + // connects the actions for the edit menu + // TODO : initialise the undo / redo + + // connects the actions for the windows menu + // TODO : initialise the entries for the different windows + connect(ui->actionCloseLayout, &QAction::triggered, this, &PuzzleMainWindow::CloseLayout); + + // connects the action for the Help Menu + connect(ui->actionAboutQt, &QAction::triggered, this, &PuzzleMainWindow::AboutQt); + connect(ui->actionAboutPuzzle, &QAction::triggered, this, &PuzzleMainWindow::AboutPuzzle); + +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::New() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::New"); + int ret = msgBox.exec(); + + // TODO + + +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::Open() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::Open"); + int ret = msgBox.exec(); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::Save() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::Save"); + int ret = msgBox.exec(); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::SaveAs() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::SaveAs"); + int ret = msgBox.exec(); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::ImportRawLayout() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::ImportRawLayout"); + int ret = msgBox.exec(); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::CloseLayout() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::CloseLayout"); + int ret = msgBox.exec(); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::AboutQt() +{ + QMessageBox::aboutQt(this, tr("About Qt")); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::AboutPuzzle() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::AboutPuzzle"); + int ret = msgBox.exec(); + + // TODO +} + + diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index 8f489647d..ac1ba0cb6 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -29,6 +29,7 @@ #define PUZZLEMAINWINDOW_H #include +#include namespace Ui { class PuzzleMainWindow; @@ -47,6 +48,19 @@ public: private: Q_DISABLE_COPY(PuzzleMainWindow) Ui::PuzzleMainWindow *ui; + + void InitMenuBar(); + + void New(); + void Open(); + void Save(); + void SaveAs(); + void ImportRawLayout(); + void CloseLayout(); + + void AboutQt(); + void AboutPuzzle(); + }; #endif // PUZZLEMAINWINDOW_H diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 9de7e2667..0dee51b58 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -1,24 +1,142 @@ + PuzzleMainWindow - - + + 0 0 - 400 - 300 + 1427 + 904 - + PuzzleMainWindow - - - - + + + + + 0 + 0 + 1427 + 22 + + + + + &File + + + + + + + + + + + + + &Edit + + + + + + &Windows + + + + + + &Help + + + + + + + + + + + + TopToolBarArea + + + false + + + + + + Open + + + Ctrl+O + + + + + Save + + + Ctrl+S + + + + + Save As + + + Ctrl+Shift+S + + + + + Close Layout + + + + + Import Raw Layout Data + + + + + true + + + + + + E&xit + + + Ctrl+Q + + + + + New + + + Ctrl+N + + + + + About &Qt + + + + + About &Puzzle + + - - + diff --git a/src/app/puzzle/stable.h b/src/app/puzzle/stable.h index 4611a10a7..22e9d4702 100644 --- a/src/app/puzzle/stable.h +++ b/src/app/puzzle/stable.h @@ -30,7 +30,7 @@ #define STABLE_H /* I like to include this pragma too, so the build log indicates if pre-compiled headers were in use. */ -#pragma message("Compiling precompiled headers for tape utility.\n") +#pragma message("Compiling precompiled headers for puzzle utility.\n") /* Add C includes here */ diff --git a/src/app/puzzle/version.h b/src/app/puzzle/version.h index 76e256844..bde0ae5b0 100644 --- a/src/app/puzzle/version.h +++ b/src/app/puzzle/version.h @@ -33,7 +33,7 @@ #define VER_INTERNALNAME_STR "Puzzle" #define VER_ORIGINALFILENAME_STR "puzzle.exe" -#define VER_PRODUCTNAME_STR "Tape" +#define VER_PRODUCTNAME_STR "Puzzle" #define VER_FILEDESCRIPTION_STR "Valentina's manual layout creator." #endif // VERSION_H From 8aff83d2a20895e5a373c85c7b77b5adc0a949a7 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 10:43:47 +0200 Subject: [PATCH 02/15] icons and structure main window --- src/app/puzzle/puzzlemainwindow.h | 1 + src/app/puzzle/puzzlemainwindow.ui | 109 +++++++++++++++++- src/app/puzzle/share/resources/puzzleicon.qrc | 4 + .../puzzleicon/64x64/iconCurrentPiece.png | Bin 0 -> 1355 bytes .../resources/puzzleicon/64x64/iconLayers.png | Bin 0 -> 827 bytes .../resources/puzzleicon/64x64/iconLayout.png | Bin 0 -> 736 bytes .../resources/puzzleicon/64x64/iconTiles.png | Bin 0 -> 899 bytes 7 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLayout.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconTiles.png diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index ac1ba0cb6..6cf5977ee 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -51,6 +51,7 @@ private: void InitMenuBar(); +private slots: void New(); void Open(); void Save(); diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 0dee51b58..55b7f1b95 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -13,7 +13,86 @@ PuzzleMainWindow - + + + true + + + Qt::LeftToRight + + + + QLayout::SetDefaultConstraint + + + + + + + + + 0 + 0 + + + + + 320 + 0 + + + + QTabWidget::Rounded + + + 0 + + + + 32 + 32 + + + + + + :/puzzleicon/64x64/iconCurrentPiece.png:/puzzleicon/64x64/iconCurrentPiece.png + + + + + + + + + :/puzzleicon/64x64/iconLayout.png:/puzzleicon/64x64/iconLayout.png + + + + + + + + + :/puzzleicon/64x64/iconTiles.png:/puzzleicon/64x64/iconTiles.png + + + + + + + + + :/puzzleicon/64x64/iconLayers.png:/puzzleicon/64x64/iconLayers.png + + + + + + + + + @@ -69,6 +148,27 @@ + + + + 160 + 160 + + + + QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable + + + Qt::AllDockWidgetAreas + + + Piece Carrousel + + + 1 + + + Open @@ -108,7 +208,8 @@ true - + + .. E&xit @@ -137,6 +238,8 @@ - + + + diff --git a/src/app/puzzle/share/resources/puzzleicon.qrc b/src/app/puzzle/share/resources/puzzleicon.qrc index 871f678c4..563bb83a4 100644 --- a/src/app/puzzle/share/resources/puzzleicon.qrc +++ b/src/app/puzzle/share/resources/puzzleicon.qrc @@ -1,5 +1,9 @@ puzzleicon/64x64/logo.png + puzzleicon/64x64/iconLayout.png + puzzleicon/64x64/iconCurrentPiece.png + puzzleicon/64x64/iconLayers.png + puzzleicon/64x64/iconTiles.png diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece.png new file mode 100644 index 0000000000000000000000000000000000000000..0e12bb4433f7a051208c296444e31067a8e9b4b0 GIT binary patch literal 1355 zcmV-R1+@B!P)EX>4Tx04R}tkv&MmP!xqv(@Kk09PFUtkfAzR5EXIMDionYs1;guFnQ@8G-*g$ zTpR`0f`dPcRR6lU)^quLz(AA*w-{S;m|sCE>Zg?&0J6U5saW-}`g*syT}RK9P8q8D^DugLrzg zYH;2sj7IPWeK{ zWtH<5XRTagtv>k+!#RCrnd?-;NMI35kRU=q4JDLOMT~Zx6bmUjk9+us9KS>^g4!CxZD8-o($QP9m!86k8{ps& z7%foty2raiopby5PHTQY{daPB$6l&&00006VoOIv0Q3M$08806x7z>!010qNS#tmY z4c7nw4c7reD4Tcy000McNliru~>zvq3wJBS_g$Oha39sw@kGm_{g z@C--;qO^Vhm(Fw1H-M)=s;p?y)YK$eTU)iyOMv4%72O3yfiLAnd%a#UIyx%m=H|rV z;h{*U)1tY#S^NGKpwx5G*MUeW&!1cet!tWfiQ5V6rn4?W#B?-xs5LTF|biy zwA<|#fj~gSVlk1+<;4GLZEa2T_4SGJbN*pHsC4wyO0R*S)9GYzaFAdy$k5ObKA*4Z z6R)nWGCx1h%E}6xo15(H?2yf7IX*rnm&<8~g-Vndrd~k!e7=hAcBL8^7|;j^RdUg_ z?66C~r))Nhs;auVt|&@XwbXjV%mTz>G5xlWHd|G3uC)PifW^f{_V@RtB;YIXu}~ba!`4IR?i8Mn*=k+wIbg z!K=VMMNycTn2_>?$aBCR2n1+vZ`b>Uh~Wf`19x367tv@Gy<`>w?gK9YB9RDfZEd<4 zU^D@K;02%p&atsECMPG+Q$`XnTYBz)2q@ujn3&*c6MTvjEsQ&%mo;tY9psq`&$zkph#(ekr6PP0X8cF76BFkRuhz& z04oAk6V%xNo9sQnR*SuOJ@RK$NL&2d|M~P3?RNVw;%uj N002ovPDHLkV1m+PUVZ=o literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers.png new file mode 100644 index 0000000000000000000000000000000000000000..2f36eba4db6f39e1cc77ec0d51f188d0cd737184 GIT binary patch literal 827 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5h!1NUQ&4ukJ9JHwzw3SZEa~AX<1uOJt$b3el)igUXlkCYc^lF*2;zo0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@WOW9n3(ORsr))&`5c*w4D_`kkFy&lUb+ zSdtlbQu@II0SVoJZ@Z4~cAi`O`@3Iuo&DePqKe~js|tb9!j|Oi?!xee!JEPRrrGw} zKoQOYkH}(R3|H=O_9rad96XlulwCZ5LU%n~978H@y}hl-cgR7Y z_2G6_*6WUn83GpPnw1tN?Bv^*DUiXp`NUkSn47**N4EU;zScW4|F~VIMX$>26T5kJ zcZR5ihHADb^cxy4olaxwnoB{jeU-8{8WVr7=;mK1zpCGL{x@$lwc)I$ztaD0e0s!j-ALRf5 literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconTiles.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconTiles.png new file mode 100644 index 0000000000000000000000000000000000000000..ee3099a77c9a1e3bc9df5cb1dd0a91469f1fe858 GIT binary patch literal 899 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5h!1NUQ&4ukJ9JHwzw3SZEa~AX<1uOJt$b3el)igUXlkCYc^lF*2;zo0{#r zL)pdCV`XDl9Y3%iIeF3ZqN~>)ea$T$9}hmQo%8+N!+pOQ76zux5|v;#*_*XYsL*h7 ztZ4Ikjs@(Bs~l%W9-E`0`f%sIcMl)`j_paWy#KrS>nh7`M!Sg>(sZO$sV zr{1?=(Hf!o!u>O^D121DE;{|bg}97ZMcNUc<g~_hHN0)S0hC4tpdBdQVVra^zK=66o4fHdlmO)2hGvN4v~^7roXP zRf8g(1x&n~9<%>%zQ1|vr^&*3K^A-^dvAO@&LMDzbyn%^e|Fp6KI42)&$jN%w*8kF z((F9fZ{PYt@WOW9n3(ORsr))&`5c*w4D_`kkFy&lUb+ zSdtlbQu@II0SVoJZ@Z4~cAi`O`@3Iuo&DePqKe~js|tb9!j|Oi?!xee!JEPRrrGw} zKoQOYkH}(R3|H=O_9rad9I|ZHbG%Z3G1=hh;uunK>+S80S%(~C zj(=Q#QNcoE*Hpfy3+*p1H2n&&^3djGt7ST9URbcwIXrw}z=i~KR~hL^e7P&P+-ja< zzU5zCK}*3&)$cneJmhC@zsx$R{?a=>U!!)#dCw=FOeqlj|M*AOY!y!@nd2+pzi09k zVCmd^pt^WU-1_uCOg4TtOacuIED8*a91aXfOm*>O-w#DrtzJjpM!%7^?@HLcRqETS ziyPQKEatfOddmIj>`Q}AEj{VDGlx~+=RVs5wR_KfO?i~|)PD8Z)l(-wls_bJEcq`p zrnw+1%97V`%+;N4ASL^KWg*Y(v)6wnJV+^e-rZ_@;Ajos;f1$TGq%s=iOx2A%Q$a! zXvWsMG7+u`=jGEM{jJ;edvm0Q7=M}lxwM28=~9gIvP@r;+*$X>?t$_XRi3ZHBG~-G z^kd%rGS~9P=;^bU$EK%$E@8OyX7{lOq0KjI|B8QNoBG7Cl Date: Sat, 11 Apr 2020 11:17:53 +0200 Subject: [PATCH 03/15] remove tab nos needed for mvp --- src/app/puzzle/puzzlemainwindow.cpp | 14 ++++++++++++++ src/app/puzzle/puzzlemainwindow.h | 1 + src/app/puzzle/puzzlemainwindow.ui | 26 +++++++++++++++++++------- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 2fec23266..a647d528d 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -36,6 +36,9 @@ PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : ui->setupUi(this); InitMenuBar(); + + InitPropertyTabs(); + } //--------------------------------------------------------------------------------------------------------------------- @@ -75,6 +78,17 @@ void PuzzleMainWindow::InitMenuBar() } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPropertyTabs() +{ + // for the MVP we don't want the tiles and current layer tabs. + // we remove them. As soon as we need them, delete / update this code + ui->tabWidgetProperties->removeTab(3); // remove layers + ui->tabWidgetProperties->removeTab(2); // remove tiles + +} + + //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::New() { diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index 6cf5977ee..73167d585 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -50,6 +50,7 @@ private: Ui::PuzzleMainWindow *ui; void InitMenuBar(); + void InitPropertyTabs(); private slots: void New(); diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 55b7f1b95..818dc3928 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -45,7 +45,7 @@ QTabWidget::Rounded - 0 + 1 @@ -61,6 +61,9 @@ + + Current piece properties + @@ -70,6 +73,9 @@ + + Layout properties + @@ -79,6 +85,9 @@ + + Tiles properties + @@ -88,6 +97,9 @@ + + Layers properties + @@ -171,7 +183,7 @@ - Open + &Open Ctrl+O @@ -179,7 +191,7 @@ - Save + &Save Ctrl+S @@ -187,7 +199,7 @@ - Save As + Save &As Ctrl+Shift+S @@ -195,12 +207,12 @@ - Close Layout + &Close Layout - Import Raw Layout Data + &Import Raw Layout Data @@ -220,7 +232,7 @@ - New + &New Ctrl+N From 234529f398146aa5cfba6ff13654d750f60d0445 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 11:40:02 +0200 Subject: [PATCH 04/15] about puzzle dialog --- Valentina.pro | 3 + src/app/puzzle/dialogs/dialogaboutpuzzle.cpp | 141 +++++++++ src/app/puzzle/dialogs/dialogaboutpuzzle.h | 61 ++++ src/app/puzzle/dialogs/dialogaboutpuzzle.ui | 296 +++++++++++++++++++ src/app/puzzle/puzzle.pri | 9 +- src/app/puzzle/puzzle.pro | 2 + src/app/puzzle/puzzlemainwindow.cpp | 10 +- 7 files changed, 513 insertions(+), 9 deletions(-) create mode 100644 src/app/puzzle/dialogs/dialogaboutpuzzle.cpp create mode 100644 src/app/puzzle/dialogs/dialogaboutpuzzle.h create mode 100644 src/app/puzzle/dialogs/dialogaboutpuzzle.ui diff --git a/Valentina.pro b/Valentina.pro index 81ed324c7..d78671c57 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -53,3 +53,6 @@ unix { TEMPLATE = subdirs SUBDIRS = src + +RESOURCES += \ + src/app/puzzle/share/resources/tapeicon.qrc diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp new file mode 100644 index 000000000..f4a19caa9 --- /dev/null +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp @@ -0,0 +1,141 @@ +/************************************************************************ + ** + ** @file dialogaboutpuzzle.cpp + ** @author Roman Telezhynskyi + ** @date 11 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "dialogaboutpuzzle.h" +#include "ui_dialogaboutpuzzle.h" +#include "../version.h" +#include "../vmisc/def.h" +#include "../fervor/fvupdater.h" + +#include +#include +#include +#include +#include +#include + +//--------------------------------------------------------------------------------------------------------------------- +DialogAboutPuzzle::DialogAboutPuzzle(QWidget *parent) + :QDialog(parent), + ui(new Ui::DialogAboutPuzzle), + isInitialized(false) +{ + ui->setupUi(this); + + //mApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c()); + + RetranslateUi(); + connect(ui->pushButton_Web_Site, &QPushButton::clicked, this, []() + { + if ( not QDesktopServices::openUrl(QUrl(VER_COMPANYDOMAIN_STR))) + { + qWarning() << tr("Cannot open your default browser"); + } + }); + connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &DialogAboutPuzzle::close); + connect(ui->pushButtonCheckUpdate, &QPushButton::clicked, []() + { + // Set feed URL before doing anything else + FvUpdater::sharedUpdater()->SetFeedURL(FvUpdater::CurrentFeedURL()); + FvUpdater::sharedUpdater()->CheckForUpdatesNotSilent(); + }); + + // By default on Windows font point size 8 points we need 11 like on Linux. + FontPointSize(ui->label_Legal_Stuff, 11); + FontPointSize(ui->label_Puzzle_Built, 11); + FontPointSize(ui->label_QT_Version, 11); +} + +//--------------------------------------------------------------------------------------------------------------------- +DialogAboutPuzzle::~DialogAboutPuzzle() +{ + delete ui; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogAboutPuzzle::changeEvent(QEvent *event) +{ + if (event->type() == QEvent::LanguageChange) + { + // retranslate designer form (single inheritance approach) + ui->retranslateUi(this); + RetranslateUi(); + } + + // remember to call base class implementation + QDialog::changeEvent(event); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogAboutPuzzle::showEvent(QShowEvent *event) +{ + QDialog::showEvent( event ); + if ( event->spontaneous() ) + { + return; + } + + if (isInitialized) + { + return; + } + // do your init stuff here + + setMaximumSize(size()); + setMinimumSize(size()); + + isInitialized = true;//first show windows are held +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogAboutPuzzle::FontPointSize(QWidget *w, int pointSize) +{ + SCASSERT(w != nullptr) + + QFont font = w->font(); + font.setPointSize(pointSize); + w->setFont(font); +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogAboutPuzzle::RetranslateUi() +{ + ui->label_Puzzle_Version->setText(QString("Tape %1").arg(APP_VERSION_STR)); + ui->labelBuildRevision->setText(tr("Build revision: %1").arg(BUILD_REVISION)); + ui->label_QT_Version->setText(buildCompatibilityString()); + + const QDate date = QLocale::c().toDate(QString(__DATE__).simplified(), QLatin1String("MMM d yyyy")); + ui->label_Puzzle_Built->setText(tr("Built on %1 at %2").arg(date.toString(), __TIME__)); + + ui->label_Legal_Stuff->setText(QApplication::translate("InternalStrings", + "The program is provided AS IS with NO WARRANTY OF ANY " + "KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY " + "AND FITNESS FOR A PARTICULAR PURPOSE.")); + + ui->pushButton_Web_Site->setText(tr("Web site : %1").arg(VER_COMPANYDOMAIN_STR)); +} diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.h b/src/app/puzzle/dialogs/dialogaboutpuzzle.h new file mode 100644 index 000000000..0367c5ace --- /dev/null +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.h @@ -0,0 +1,61 @@ +/************************************************************************ + ** + ** @file dialogaboutpuzzle.h + ** @author Roman Telezhynskyi + ** @date 11 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef DIALOGABOUTPUZZLE_H +#define DIALOGABOUTPUZZLE_H + +#include + +namespace Ui +{ + class DialogAboutPuzzle; +} + +class DialogAboutPuzzle : public QDialog +{ + Q_OBJECT + +public: + explicit DialogAboutPuzzle(QWidget *parent = nullptr); + virtual ~DialogAboutPuzzle(); + +protected: + virtual void changeEvent(QEvent* event) override; + virtual void showEvent(QShowEvent *event) override; + +private: + Q_DISABLE_COPY(DialogAboutPuzzle) + Ui::DialogAboutPuzzle *ui; + bool isInitialized; + + void FontPointSize(QWidget *w, int pointSize); + + void RetranslateUi(); +}; + +#endif // DIALOGABOUTPUZZLE_H diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.ui b/src/app/puzzle/dialogs/dialogaboutpuzzle.ui new file mode 100644 index 000000000..fdcb86428 --- /dev/null +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.ui @@ -0,0 +1,296 @@ + + + DialogAboutPuzzle + + + + 0 + 0 + 462 + 320 + + + + + 0 + 0 + + + + + 0 + 0 + + + + About Tape + + + + :/tapeicon/64x64/logo.png:/tapeicon/64x64/logo.png + + + + + + 4 + + + 0 + + + 9 + + + + + + 0 + 0 + + + + + + + :/puzzleicon/64x64/logo.png + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + 15 + 75 + true + + + + Puzzle version + + + Qt::AlignCenter + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 75 + true + + + + Build revision: + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + This program is part of Valentina project. + + + + + + + + + + + + 0 + 0 + 255 + + + + + + + + + 0 + 0 + 255 + + + + + + + + + 120 + 120 + 120 + + + + + + + + + true + + + + PointingHandCursor + + + pushButton_Web_Site + + + false + + + true + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + label_Tape_Built + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + label_QT_Version + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + label_Legal_Stuff + + + true + + + + + + + + + + + + + Check For Updates + + + + + + + true + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + false + + + + + + + + + + + + + diff --git a/src/app/puzzle/puzzle.pri b/src/app/puzzle/puzzle.pri index 101fff4e3..a4db72756 100644 --- a/src/app/puzzle/puzzle.pri +++ b/src/app/puzzle/puzzle.pri @@ -4,14 +4,17 @@ SOURCES += \ $$PWD/main.cpp \ $$PWD/puzzlemainwindow.cpp \ - $$PWD/puzzleapplication.cpp + $$PWD/puzzleapplication.cpp \ + $$PWD/dialogs/dialogaboutpuzzle.cpp *msvc*:SOURCES += $$PWD/stable.cpp HEADERS += \ $$PWD/puzzlemainwindow.h \ $$PWD/stable.h \ - $$PWD/puzzleapplication.h + $$PWD/puzzleapplication.h \ + $$PWD/dialogs/dialogaboutpuzzle.h FORMS += \ - $$PWD/puzzlemainwindow.ui + $$PWD/puzzlemainwindow.ui \ + $$PWD/dialogs/dialogaboutpuzzle.ui diff --git a/src/app/puzzle/puzzle.pro b/src/app/puzzle/puzzle.pro index 7463ba832..1a471e46a 100644 --- a/src/app/puzzle/puzzle.pro +++ b/src/app/puzzle/puzzle.pro @@ -333,3 +333,5 @@ CONFIG(release, debug|release){ QMAKE_POST_LINK += $$[QT_INSTALL_BINS]/macdeployqt $${OUT_PWD}/$${DESTDIR}/$${TARGET}.app } } + +FORMS += diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index a647d528d..560fcb1b1 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -27,6 +27,7 @@ *************************************************************************/ #include "puzzlemainwindow.h" #include "ui_puzzlemainwindow.h" +#include "dialogs/dialogaboutpuzzle.h" //--------------------------------------------------------------------------------------------------------------------- PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : @@ -166,12 +167,9 @@ void PuzzleMainWindow::AboutQt() //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::AboutPuzzle() { - // just for test purpuses, to be removed: - QMessageBox msgBox; - msgBox.setText("TODO PuzzleMainWindow::AboutPuzzle"); - int ret = msgBox.exec(); - - // TODO + auto *aboutDialog = new DialogAboutPuzzle(this); + aboutDialog->setAttribute(Qt::WA_DeleteOnClose, true); + aboutDialog->show(); } From 3f9822d271b8c66f4c3f70d31e6ce3e2b24b26f8 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 12:52:26 +0200 Subject: [PATCH 05/15] property tabs and tab layout --- src/app/puzzle/puzzlemainwindow.ui | 382 +++++++++++++++++++++++++++++ 1 file changed, 382 insertions(+) diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 818dc3928..e26640467 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -54,6 +54,9 @@ + + + :/puzzleicon/64x64/iconCurrentPiece.png:/puzzleicon/64x64/iconCurrentPiece.png @@ -64,6 +67,80 @@ Current piece properties + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 316 + 779 + + + + + + + font-weight:bold; + + + Current piece + + + Qt::AutoText + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + @@ -76,6 +153,175 @@ Layout properties + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 316 + 779 + + + + + + + font-weight: bold; + + + Layout + + + Qt::AlignCenter + + + + + + + Format + + + + + + + Margins + + + + + + 0.100000000000000 + + + + + + + 0.100000000000000 + + + + + + + Left: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Right: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + 0.100000000000000 + + + + + + + Top: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 0.100000000000000 + + + + + + + Bottom: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Control + + + + + + + Export + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + @@ -88,6 +334,74 @@ Tiles properties + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 316 + 779 + + + + + + + font-weight: bold; + + + Tiles + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + @@ -100,6 +414,74 @@ Layers properties + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 316 + 779 + + + + + + + font-weight:bold; + + + Layers + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + From 3b96605ef9a47476dcee1b9d3238cbf36ba2e122 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 13:28:01 +0200 Subject: [PATCH 06/15] layout property and icons --- src/app/puzzle/puzzlemainwindow.ui | 168 +++++++++++++++--- src/app/puzzle/share/resources/puzzleicon.qrc | 2 + .../puzzleicon/64x64/iconLandscape.png | Bin 0 -> 1042 bytes .../puzzleicon/64x64/iconPortrait.png | Bin 0 -> 980 bytes .../puzzleicon/svg/icon_current_piece.svg | 72 ++++++++ .../puzzleicon/svg/icon_landscape.svg | 75 ++++++++ .../resources/puzzleicon/svg/icon_layers.svg | 82 +++++++++ .../resources/puzzleicon/svg/icon_layout.svg | 75 ++++++++ .../puzzleicon/svg/icon_portrait.svg | 75 ++++++++ .../resources/puzzleicon/svg/icon_tiles.svg | 91 ++++++++++ 10 files changed, 612 insertions(+), 28 deletions(-) create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLandscape.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconPortrait.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_current_piece.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_landscape.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_layers.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_layout.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_portrait.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_tiles.svg diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index e26640467..9f991ae41 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -102,8 +102,8 @@ 0 0 - 316 - 779 + 115 + 41 @@ -208,6 +208,106 @@ Format + + + + + + + Unit + + + + + + + + + + Templates + + + + + + + + + + Width + + + + + + + + + + + + + Length + + + + + + + Orientation + + + + + + + + + Portrait + + + + + + + :/puzzleicon/64x64/iconPortrait.png:/puzzleicon/64x64/iconPortrait.png + + + + 32 + 32 + + + + true + + + + + + + Landscape + + + + + + + :/puzzleicon/64x64/iconLandscape.png:/puzzleicon/64x64/iconLandscape.png + + + + 32 + 32 + + + + + + + + + @@ -216,6 +316,26 @@ Margins + + + + Right: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Top: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + @@ -231,7 +351,7 @@ - + Left: @@ -240,16 +360,6 @@ - - - - Right: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - @@ -260,16 +370,6 @@ - - - - Top: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - @@ -278,7 +378,7 @@ - + Bottom: @@ -366,8 +466,8 @@ 0 0 - 316 - 779 + 98 + 41 @@ -446,8 +546,8 @@ 0 0 - 316 - 779 + 98 + 41 @@ -632,6 +732,18 @@ + + graphicsView + tabWidgetProperties + scrollAreaLayout + doubleSpinBoxLayoutMarginTop + doubleSpinBoxLayoutMarginLeft + doubleSpinBoxLayoutMarginRight + doubleSpinBoxLayoutMarginBottom + scrollAreaCurrentPiece + scrollAreaLayers + scrollAreaTiles + diff --git a/src/app/puzzle/share/resources/puzzleicon.qrc b/src/app/puzzle/share/resources/puzzleicon.qrc index 563bb83a4..0eb2506df 100644 --- a/src/app/puzzle/share/resources/puzzleicon.qrc +++ b/src/app/puzzle/share/resources/puzzleicon.qrc @@ -5,5 +5,7 @@ puzzleicon/64x64/iconCurrentPiece.png puzzleicon/64x64/iconLayers.png puzzleicon/64x64/iconTiles.png + puzzleicon/64x64/iconLandscape.png + puzzleicon/64x64/iconPortrait.png diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconLandscape.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconLandscape.png new file mode 100644 index 0000000000000000000000000000000000000000..666d96fa7fcaf8f1b96eff2c442839d362b8e6b6 GIT binary patch literal 1042 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5h!1NUQ&4ukJ9JHwzw3SZEa~AX<1uOJt$b3el)igUXlkCYc^lF*2;zo0{#r zL)pdCV`XDl9Y3%iIeF3ZqN~>)ea$T$9}hmQo%8+N!+pOQ76zux5|v;#*_*XYsL*h7 ztZ4Ikjs@(Bs~l%W9-E`0`f%sIcMl)`j_paWy#KrS>nh7`M!Sg>(sZO$sV zr{1?=(Hf!o!u>O^D121DE;{|bg}97ZMcNUc<g~_hHN0)S0hC4tpdBdQVVra^zK=66o4fHdlmO)2hGvN4v~^7roXP zRf8g(1x&n~9<%>%zQ1|vr^&*3K^A-^dvAO@&LMDzbyn%^e|Fp6KI42)&$jN%w*8kF z((F9fZ{PYt@WOW9n3(ORsr))&`5c*w4D_`kkFy&lUb+ zSdtlbQu@II0SVoJZ@Z4~cAi`O`@3Iuo&DePqKe~js|tb9!j|Oi?!xee!JEPRrrGw} zKoQOYkH}(R3|H=O_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c>G z8PXJ95vRd$N&62P!w^X6n5Iq%CR2cvB?MHsf+&Sht359fIQVMhSN zg_k8gZptV74^`V}i7=Gxj{W`nx1PR-{D%!dxz}IcynP$H_c{xI-8Id%Ob3o0ZM}T? za{Q~D+}ubVv9`mBZRe*;v}^Mk%s+1`)jL~e;zQwm4_}{ROo?0;w%YS@$kwR8Z~rB2 zEU2rCJG6Hy%Zlr-&z(D$cSoMD{ny`r^&eedoD*VT6d)hDo>}+wXZ0Wd=czddOn>r; X`^rbUe&3w{jBf@{S3j3^P6 + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_landscape.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_landscape.svg new file mode 100644 index 000000000..444a54033 --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_landscape.svg @@ -0,0 +1,75 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_layers.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_layers.svg new file mode 100644 index 000000000..ab1385c2d --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_layers.svg @@ -0,0 +1,82 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_layout.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_layout.svg new file mode 100644 index 000000000..993a50de8 --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_layout.svg @@ -0,0 +1,75 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_portrait.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_portrait.svg new file mode 100644 index 000000000..cf7971065 --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_portrait.svg @@ -0,0 +1,75 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_tiles.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_tiles.svg new file mode 100644 index 000000000..5ee9a5d0d --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_tiles.svg @@ -0,0 +1,91 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + From 132bc819b3cfb998c1ddf0af25c33f814f101322 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 14:23:17 +0200 Subject: [PATCH 07/15] grainline icons and layout property --- src/app/puzzle/puzzlemainwindow.ui | 165 +++++++++++++++--- src/app/puzzle/share/resources/puzzleicon.qrc | 2 + .../64x64/iconGrainlineHorizontal.png | Bin 0 -> 979 bytes .../64x64/iconGrainlineVertical.png | Bin 0 -> 984 bytes .../svg/icon_grainline_horizontal.svg | 64 +++++++ .../svg/icon_grainline_vertical.svg | 64 +++++++ 6 files changed, 275 insertions(+), 20 deletions(-) create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineVertical.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_grainline_horizontal.svg create mode 100644 src/app/puzzle/share/resources/puzzleicon/svg/icon_grainline_vertical.svg diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 9f991ae41..30bb49096 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -37,7 +37,7 @@ - 320 + 360 0 @@ -102,8 +102,8 @@ 0 0 - 115 - 41 + 356 + 779 @@ -185,7 +185,7 @@ 0 0 - 316 + 356 779 @@ -212,47 +212,47 @@ - + Unit - + - + - Templates + Template - + - + Width - + - + - + Length - + Orientation @@ -261,7 +261,7 @@ - + Portrait @@ -284,7 +284,7 @@ - + Landscape @@ -307,6 +307,13 @@ + + + + Remove unused length + + + @@ -395,6 +402,101 @@ Control + + + + + + + Follow grainline + + + + + + + + + No + + + + + + + Vertical grainline + + + + + + + :/puzzleicon/64x64/iconGrainlineVertical.png:/puzzleicon/64x64/iconGrainlineVertical.png + + + + 28 + 28 + + + + + + + + Horizontal grainline + + + + + + + :/puzzleicon/64x64/iconGrainlineHorizontal.png:/puzzleicon/64x64/iconGrainlineHorizontal.png + + + + 28 + 28 + + + + + + + + + + Pieces gap + + + + + + + + + + + + Wargnin superposition of pieces + + + + + + + Warning pieces out of bound + + + + + + + Sticky edges + + + + @@ -402,6 +504,29 @@ Export + + + + + + + Format + + + + + + + + + + + + Export Layout + + + + @@ -466,8 +591,8 @@ 0 0 - 98 - 41 + 356 + 779 @@ -546,8 +671,8 @@ 0 0 - 98 - 41 + 356 + 779 diff --git a/src/app/puzzle/share/resources/puzzleicon.qrc b/src/app/puzzle/share/resources/puzzleicon.qrc index 0eb2506df..fb33ba546 100644 --- a/src/app/puzzle/share/resources/puzzleicon.qrc +++ b/src/app/puzzle/share/resources/puzzleicon.qrc @@ -7,5 +7,7 @@ puzzleicon/64x64/iconTiles.png puzzleicon/64x64/iconLandscape.png puzzleicon/64x64/iconPortrait.png + puzzleicon/64x64/iconGrainlineVertical.png + puzzleicon/64x64/iconGrainlineHorizontal.png diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal.png new file mode 100644 index 0000000000000000000000000000000000000000..394d48fc0f3253915d3bc2d7afed89fec1d5d295 GIT binary patch literal 979 zcmV;^11$WBP)EX>4Tx04R}tkv&MmP!xqv(@Kk09PFUtkfAzR5EXIMDionYs1;guFnQ@8G-*g$ zTpR`0f`dPcRR6lU)^quLz(AA*w-{S;m|sCE>Zg?&0J6U5saW-}`g*syT}RK9P8q8D^DugLrzg zYH;2sj7IPWeK{ zWtH<5XRTagtv>k+!#RCrnd?-;NMI35kRU=q4JDLOMT~Zx6bmUjk9+us9KS>^g4!CxZD8-o($QP9m!86k8{ps& z7%foty2raiopby5PHTQY{daPB$6l&&00006VoOIv0Q3M$08806x7z>!010qNS#tmY z4c7nw4c7reD4Tcy000McNliruN@X!1~ z8bV4*QI=AYC1pX%pR%IZ*ibgg#%?HUB@04RBE?3Nl(AqZE3vS_f{lfmQlut{c{b$ zHA%o_ti_wz23mpUKu?df`f101m ze9_nPdlGlCqSpj$FC)Ke2J6LqOF+|cJjD8`5^xZYv1J;wr49*zJ$QnxRh>G4d!4eh z0A@hbwlcuG+ba&^JeGC|`T_4t(gxe^Ei0wfud)!$MQ7UIH;CnJ*P4qStShC;7o5fe zxLO`;EV43zGyQmuuZ!?xJAhTqPhc-@V?&n*#!LC%jjB4@cDmQ7_{>&gWtaDS!`ag3 zzjoklmnn0tMx%SbOFus2K&M^cRoMn#PV>+-A5|^B?@AxXsyg)%hw!ZC+u&q}YcH@5 zucsQ-aU90z0-6D%EX>4Tx04R}tkv&MmP!xqv(@Kk09PFUtkfAzR5EXIMDionYs1;guFnQ@8G-*g$ zTpR`0f`dPcRR6lU)^quLz(AA*w-{S;m|sCE>Zg?&0J6U5saW-}`g*syT}RK9P8q8D^DugLrzg zYH;2sj7IPWeK{ zWtH<5XRTagtv>k+!#RCrnd?-;NMI35kRU=q4JDLOMT~Zx6bmUjk9+us9KS>^g4!CxZD8-o($QP9m!86k8{ps& z7%foty2raiopby5PHTQY{daPB$6l&&00006VoOIv0Q3M$08806x7z>!010qNS#tmY z4c7nw4c7reD4Tcy000McNlirulixY#cf)-Th?;{ukBf!{8AM$&5p zACG|F!NXh}=yiOnz#m{LHyeHjn?(X% + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/src/app/puzzle/share/resources/puzzleicon/svg/icon_grainline_vertical.svg b/src/app/puzzle/share/resources/puzzleicon/svg/icon_grainline_vertical.svg new file mode 100644 index 000000000..22c7e42f6 --- /dev/null +++ b/src/app/puzzle/share/resources/puzzleicon/svg/icon_grainline_vertical.svg @@ -0,0 +1,64 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + From 44bf83a089936a3dc40c8225f4aee7a349fffef4 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 16:25:23 +0200 Subject: [PATCH 08/15] slots for the layout properties --- src/app/puzzle/puzzlemainwindow.cpp | 243 +++++++++++++++++++++++++++- src/app/puzzle/puzzlemainwindow.h | 20 +++ src/app/puzzle/puzzlemainwindow.ui | 7 +- 3 files changed, 264 insertions(+), 6 deletions(-) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 560fcb1b1..b3d36e74d 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -82,14 +82,87 @@ void PuzzleMainWindow::InitMenuBar() //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::InitPropertyTabs() { - // for the MVP we don't want the tiles and current layer tabs. - // we remove them. As soon as we need them, delete / update this code - ui->tabWidgetProperties->removeTab(3); // remove layers - ui->tabWidgetProperties->removeTab(2); // remove tiles + InitPropertyTabCurrentPiece(); + InitPropertyTabLayout(); + InitPropertyTabLayers(); + InitPropertyTabTiles(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPropertyTabCurrentPiece() +{ } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPropertyTabLayout() +{ + // -------------------- init the unit combobox --------------------- + ui->comboBoxLayoutUnit->addItem(tr("Centimeters"), QVariant(UnitsToStr(Unit::Cm))); + ui->comboBoxLayoutUnit->addItem(tr("Millimiters"), QVariant(UnitsToStr(Unit::Mm))); + ui->comboBoxLayoutUnit->addItem(tr("Inches"), QVariant(UnitsToStr(Unit::Inch))); + + // set default unit - TODO when we have the setting for the unit + const qint32 indexUnit = -1;//ui->comboBoxLayoutUnit->findData(qApp->ValentinaSettings()->GetUnit()); + if (indexUnit != -1) + { + ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit); + } + + connect(ui->comboBoxLayoutUnit, QOverload::of(&QComboBox::currentIndexChanged), this, &PuzzleMainWindow::LayoutUnitChanged); + + + // -------------------- init the template combobox --------------------- + + // TODO + + connect(ui->comboBoxLayoutTemplate, QOverload::of(&QComboBox::currentIndexChanged), this, &PuzzleMainWindow::LayoutTemplateChanged); + + // -------------------- layout width, length, orientation ------------------------ + connect(ui->doubleSpinBoxLayoutWidth, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutSizeChanged); + connect(ui->doubleSpinBoxLayoutLength, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutSizeChanged); + connect(ui->radioButtonLayoutPortrait, QOverload::of(&QRadioButton::toggled), this, &PuzzleMainWindow::LayoutOrientationChanged); + connect(ui->radioButtonLayoutLandscape, QOverload::of(&QRadioButton::toggled), this, &PuzzleMainWindow::LayoutOrientationChanged); + connect(ui->pushButtonLayoutRemoveUnusedLength, QOverload::of(&QPushButton::clicked), this, &PuzzleMainWindow::LayoutRemoveUnusedLength); + + // -------------------- margins ------------------------ + connect(ui->doubleSpinBoxLayoutMarginTop, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginRight, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginBottom, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginLeft, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); + + // ------------------- follow grainline ----------------------- + connect(ui->radioButtonLayoutFollowGrainlineNo, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); + connect(ui->radioButtonLayoutFollowGrainlineVertical, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); + connect(ui->radioButtonLayoutFollowGrainlineHorizontal, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); + + // -------------------- pieces gap and checkboxes --------------- + connect(ui->doubleSpinBoxLayoutPiecesGap, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutPiecesGapChanged); + connect(ui->checkBoxLayoutWarningPiecesSuperposition, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged); + connect(ui->checkBoxLayoutWarningPiecesOutOfBound, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged); + connect(ui->checkBoxLayoutStickyEdges, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutStickyEdgesChanged); + + // -------------------- export --------------------------- + connect(ui->pushButtonLayoutExport, QOverload::of(&QPushButton::clicked), this, &PuzzleMainWindow::LayoutExport); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPropertyTabTiles() +{ + // for the MVP we don't want the tiles tab. + // we remove it. As soon as we need it, update this code + ui->tabWidgetProperties->removeTab(2); // remove tiles +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPropertyTabLayers() +{ + // for the MVP we don't want the layers tab. + // we remove it. As soon as we need it, update this code + ui->tabWidgetProperties->removeTab(3); // remove layers +} + //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::New() { @@ -98,6 +171,8 @@ void PuzzleMainWindow::New() msgBox.setText("TODO PuzzleMainWindow::New"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO @@ -111,6 +186,8 @@ void PuzzleMainWindow::Open() msgBox.setText("TODO PuzzleMainWindow::Open"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO } @@ -122,6 +199,8 @@ void PuzzleMainWindow::Save() msgBox.setText("TODO PuzzleMainWindow::Save"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO } @@ -133,6 +212,8 @@ void PuzzleMainWindow::SaveAs() msgBox.setText("TODO PuzzleMainWindow::SaveAs"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO } @@ -144,6 +225,8 @@ void PuzzleMainWindow::ImportRawLayout() msgBox.setText("TODO PuzzleMainWindow::ImportRawLayout"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO } @@ -155,6 +238,8 @@ void PuzzleMainWindow::CloseLayout() msgBox.setText("TODO PuzzleMainWindow::CloseLayout"); int ret = msgBox.exec(); + Q_UNUSED(ret); + // TODO } @@ -172,4 +257,154 @@ void PuzzleMainWindow::AboutPuzzle() aboutDialog->show(); } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutUnitChanged(int index) +{ + + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutUnitChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(index); + Q_UNUSED(ret); + + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutTemplateChanged(int index) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutTemplateChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(index); + Q_UNUSED(ret); + + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutSizeChanged() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutSizeChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutOrientationChanged() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutOrientationChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutRemoveUnusedLength() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutRemoveUnusedLength"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} + + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutMarginChanged() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutMarginChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} + + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutFollowGrainlineChanged() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutFollowGrainlineChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} + + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutPiecesGapChanged(double value) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutPieceGapChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(value); + Q_UNUSED(ret); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged(bool checked) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(checked); + Q_UNUSED(ret); +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged(bool checked) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(checked); + Q_UNUSED(ret); + +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutStickyEdgesChanged(bool checked) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutStickyEdgesChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(checked); + Q_UNUSED(ret); +} + + + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::LayoutExport() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::LayoutExport"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); +} diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index 73167d585..6eb86aaed 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -28,6 +28,8 @@ #ifndef PUZZLEMAINWINDOW_H #define PUZZLEMAINWINDOW_H +#include "../vmisc/def.h" + #include #include @@ -51,6 +53,11 @@ private: void InitMenuBar(); void InitPropertyTabs(); + void InitPropertyTabCurrentPiece(); + void InitPropertyTabLayout(); + void InitPropertyTabTiles(); + void InitPropertyTabLayers(); + private slots: void New(); @@ -63,6 +70,19 @@ private slots: void AboutQt(); void AboutPuzzle(); + void LayoutUnitChanged(int index); + void LayoutTemplateChanged(int index); + void LayoutSizeChanged(); + void LayoutOrientationChanged(); + void LayoutRemoveUnusedLength(); + void LayoutMarginChanged(); + void LayoutFollowGrainlineChanged(); + void LayoutPiecesGapChanged(double value); + void LayoutWarningPiecesSuperpositionChanged(bool checked); + void LayoutWarningPiecesOutOfBoundChanged(bool checked); + void LayoutStickyEdgesChanged(bool checked); + void LayoutExport(); + }; #endif // PUZZLEMAINWINDOW_H diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index 30bb49096..f98fe7ec3 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -419,6 +419,9 @@ No + + true + @@ -471,14 +474,14 @@ - + - Wargnin superposition of pieces + Warning superposition of pieces From e35e80a242a9edf379dcef3aad00f1c902078893 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 16:32:49 +0200 Subject: [PATCH 09/15] some comments --- src/app/puzzle/puzzlemainwindow.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index b3d36e74d..e2ee73152 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -144,6 +144,9 @@ void PuzzleMainWindow::InitPropertyTabLayout() connect(ui->checkBoxLayoutStickyEdges, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutStickyEdgesChanged); // -------------------- export --------------------------- + + // TODO init the file format export combobox + connect(ui->pushButtonLayoutExport, QOverload::of(&QPushButton::clicked), this, &PuzzleMainWindow::LayoutExport); } @@ -297,6 +300,8 @@ void PuzzleMainWindow::LayoutSizeChanged() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO } //--------------------------------------------------------------------------------------------------------------------- @@ -308,6 +313,8 @@ void PuzzleMainWindow::LayoutOrientationChanged() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO } //--------------------------------------------------------------------------------------------------------------------- @@ -319,6 +326,8 @@ void PuzzleMainWindow::LayoutRemoveUnusedLength() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO } @@ -331,6 +340,8 @@ void PuzzleMainWindow::LayoutMarginChanged() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO } @@ -343,6 +354,8 @@ void PuzzleMainWindow::LayoutFollowGrainlineChanged() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO } @@ -356,6 +369,8 @@ void PuzzleMainWindow::LayoutPiecesGapChanged(double value) Q_UNUSED(value); Q_UNUSED(ret); + + // TODO } //--------------------------------------------------------------------------------------------------------------------- @@ -368,6 +383,8 @@ void PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged(bool checked) Q_UNUSED(checked); Q_UNUSED(ret); + + // TODO } //--------------------------------------------------------------------------------------------------------------------- @@ -381,6 +398,8 @@ void PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged(bool checked) Q_UNUSED(checked); Q_UNUSED(ret); + // TODO + } //--------------------------------------------------------------------------------------------------------------------- @@ -393,6 +412,10 @@ void PuzzleMainWindow::LayoutStickyEdgesChanged(bool checked) Q_UNUSED(checked); Q_UNUSED(ret); + + + // TODO + } @@ -406,5 +429,8 @@ void PuzzleMainWindow::LayoutExport() int ret = msgBox.exec(); Q_UNUSED(ret); + + // TODO + } From 1b0b30eb7744f6830cfb9e05eec183f4d74efbbe Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 17:04:44 +0200 Subject: [PATCH 10/15] current piece property, slot and code format --- src/app/puzzle/puzzlemainwindow.cpp | 129 +++++++++++++++++++++++---- src/app/puzzle/puzzlemainwindow.h | 5 ++ src/app/puzzle/puzzlemainwindow.ui | 131 +++++++++++++++++++++++++++- 3 files changed, 245 insertions(+), 20 deletions(-) diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index e2ee73152..4fc6ab236 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -91,6 +91,23 @@ void PuzzleMainWindow::InitPropertyTabs() //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::InitPropertyTabCurrentPiece() { + // ------------------------------ seamline ------------------------------------ + connect(ui->checkBoxCurrentPieceShowSeamline, QOverload::of(&QCheckBox::toggled), this, + &PuzzleMainWindow::CurrentPieceShowSeamlineChanged); + + // ------------------------------ geometry ------------------------------------ + connect(ui->checkBoxCurrentPieceMirrorPiece, QOverload::of(&QCheckBox::toggled), this, + &PuzzleMainWindow::CurrentPieceMirrorPieceChanged); + + // ------------------------------ rotation ------------------------------------ + connect(ui->doubleSpinBoxCurrentPieceAngle, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::CurrentPieceAngleChanged); + + // ------------------------------ placement ----------------------------------- + connect(ui->doubleSpinBoxCurrentPieceBoxPositionX, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::CurrentPiecePositionChanged); + connect(ui->doubleSpinBoxCurrentPieceBoxPositionY, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::CurrentPiecePositionChanged); } @@ -110,44 +127,63 @@ void PuzzleMainWindow::InitPropertyTabLayout() ui->comboBoxLayoutUnit->setCurrentIndex(indexUnit); } - connect(ui->comboBoxLayoutUnit, QOverload::of(&QComboBox::currentIndexChanged), this, &PuzzleMainWindow::LayoutUnitChanged); + connect(ui->comboBoxLayoutUnit, QOverload::of(&QComboBox::currentIndexChanged), this, + &PuzzleMainWindow::LayoutUnitChanged); // -------------------- init the template combobox --------------------- // TODO - connect(ui->comboBoxLayoutTemplate, QOverload::of(&QComboBox::currentIndexChanged), this, &PuzzleMainWindow::LayoutTemplateChanged); + connect(ui->comboBoxLayoutTemplate, QOverload::of(&QComboBox::currentIndexChanged), this, + &PuzzleMainWindow::LayoutTemplateChanged); // -------------------- layout width, length, orientation ------------------------ - connect(ui->doubleSpinBoxLayoutWidth, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutSizeChanged); - connect(ui->doubleSpinBoxLayoutLength, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutSizeChanged); - connect(ui->radioButtonLayoutPortrait, QOverload::of(&QRadioButton::toggled), this, &PuzzleMainWindow::LayoutOrientationChanged); - connect(ui->radioButtonLayoutLandscape, QOverload::of(&QRadioButton::toggled), this, &PuzzleMainWindow::LayoutOrientationChanged); - connect(ui->pushButtonLayoutRemoveUnusedLength, QOverload::of(&QPushButton::clicked), this, &PuzzleMainWindow::LayoutRemoveUnusedLength); + connect(ui->doubleSpinBoxLayoutWidth, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutSizeChanged); + connect(ui->doubleSpinBoxLayoutLength, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutSizeChanged); + connect(ui->radioButtonLayoutPortrait, QOverload::of(&QRadioButton::clicked), this, + &PuzzleMainWindow::LayoutOrientationChanged); + connect(ui->radioButtonLayoutLandscape, QOverload::of(&QRadioButton::clicked), this, + &PuzzleMainWindow::LayoutOrientationChanged); + connect(ui->pushButtonLayoutRemoveUnusedLength, QOverload::of(&QPushButton::clicked), this, + &PuzzleMainWindow::LayoutRemoveUnusedLength); // -------------------- margins ------------------------ - connect(ui->doubleSpinBoxLayoutMarginTop, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); - connect(ui->doubleSpinBoxLayoutMarginRight, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); - connect(ui->doubleSpinBoxLayoutMarginBottom, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); - connect(ui->doubleSpinBoxLayoutMarginLeft, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginTop, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginRight, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginBottom, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutMarginChanged); + connect(ui->doubleSpinBoxLayoutMarginLeft, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutMarginChanged); // ------------------- follow grainline ----------------------- - connect(ui->radioButtonLayoutFollowGrainlineNo, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); - connect(ui->radioButtonLayoutFollowGrainlineVertical, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); - connect(ui->radioButtonLayoutFollowGrainlineHorizontal, QOverload::of(&QRadioButton::clicked), this, &PuzzleMainWindow::LayoutFollowGrainlineChanged); + connect(ui->radioButtonLayoutFollowGrainlineNo, QOverload::of(&QRadioButton::clicked), this, + &PuzzleMainWindow::LayoutFollowGrainlineChanged); + connect(ui->radioButtonLayoutFollowGrainlineVertical, QOverload::of(&QRadioButton::clicked), this, + &PuzzleMainWindow::LayoutFollowGrainlineChanged); + connect(ui->radioButtonLayoutFollowGrainlineHorizontal, QOverload::of(&QRadioButton::clicked), this, + &PuzzleMainWindow::LayoutFollowGrainlineChanged); // -------------------- pieces gap and checkboxes --------------- - connect(ui->doubleSpinBoxLayoutPiecesGap, QOverload::of(&QDoubleSpinBox::valueChanged), this, &PuzzleMainWindow::LayoutPiecesGapChanged); - connect(ui->checkBoxLayoutWarningPiecesSuperposition, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged); - connect(ui->checkBoxLayoutWarningPiecesOutOfBound, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged); - connect(ui->checkBoxLayoutStickyEdges, QOverload::of(&QCheckBox::toggled), this, &PuzzleMainWindow::LayoutStickyEdgesChanged); + connect(ui->doubleSpinBoxLayoutPiecesGap, QOverload::of(&QDoubleSpinBox::valueChanged), this, + &PuzzleMainWindow::LayoutPiecesGapChanged); + connect(ui->checkBoxLayoutWarningPiecesSuperposition, QOverload::of(&QCheckBox::toggled), this, + &PuzzleMainWindow::LayoutWarningPiecesSuperpositionChanged); + connect(ui->checkBoxLayoutWarningPiecesOutOfBound, QOverload::of(&QCheckBox::toggled), this, + &PuzzleMainWindow::LayoutWarningPiecesOutOfBoundChanged); + connect(ui->checkBoxLayoutStickyEdges, QOverload::of(&QCheckBox::toggled), this, + &PuzzleMainWindow::LayoutStickyEdgesChanged); // -------------------- export --------------------------- // TODO init the file format export combobox - connect(ui->pushButtonLayoutExport, QOverload::of(&QPushButton::clicked), this, &PuzzleMainWindow::LayoutExport); + connect(ui->pushButtonLayoutExport, QOverload::of(&QPushButton::clicked), this, + &PuzzleMainWindow::LayoutExport); } //--------------------------------------------------------------------------------------------------------------------- @@ -434,3 +470,58 @@ void PuzzleMainWindow::LayoutExport() } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::CurrentPieceShowSeamlineChanged(bool checked) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::CurrentPieceShowSeamlineChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(checked); + Q_UNUSED(ret); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::CurrentPieceMirrorPieceChanged(bool checked) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::CurrentPieceMirrorPieceChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(checked); + Q_UNUSED(ret); + + // TODO +} + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::CurrentPieceAngleChanged(double value) +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::CurrentPieceAngleChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(value); + Q_UNUSED(ret); + + // TODO +} + + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::CurrentPiecePositionChanged() +{ + // just for test purpuses, to be removed: + QMessageBox msgBox; + msgBox.setText("TODO PuzzleMainWindow::CurrentPiecePositionChanged"); + int ret = msgBox.exec(); + + Q_UNUSED(ret); + + // TODO +} diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index 6eb86aaed..b54bc0abd 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -83,6 +83,11 @@ private slots: void LayoutStickyEdgesChanged(bool checked); void LayoutExport(); + void CurrentPieceShowSeamlineChanged(bool checked); + void CurrentPieceMirrorPieceChanged(bool checked); + void CurrentPieceAngleChanged(double value); + void CurrentPiecePositionChanged(); + }; #endif // PUZZLEMAINWINDOW_H diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index f98fe7ec3..e36180443 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -123,6 +123,136 @@ + + + + Infos + + + + + + DummyName + + + true + + + + + + + Name: + + + + + + + + + + Seamline + + + + + + Show Seamline + + + true + + + + + + + + + + Geometry + + + + + + Mirror piece + + + + + + + + + + Rotation + + + + + + Angle: + + + + + + + 360.000000000000000 + + + 0.100000000000000 + + + + + + + + + + Placement + + + + + + X: + + + + + + + 10000.000000000000000 + + + 0.100000000000000 + + + + + + + Y: + + + + + + + 10000.000000000000000 + + + 0.100000000000000 + + + + + + @@ -868,7 +998,6 @@ doubleSpinBoxLayoutMarginLeft doubleSpinBoxLayoutMarginRight doubleSpinBoxLayoutMarginBottom - scrollAreaCurrentPiece scrollAreaLayers scrollAreaTiles From ed6cc7f5d963df80a09a5c9dee54486ea4071577 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Sat, 11 Apr 2020 23:34:58 +0200 Subject: [PATCH 11/15] corrections about puzzle dialog --- src/app/puzzle/dialogs/dialogaboutpuzzle.cpp | 2 +- src/app/puzzle/dialogs/dialogaboutpuzzle.ui | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp index f4a19caa9..bb60c9c6f 100644 --- a/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp @@ -125,7 +125,7 @@ void DialogAboutPuzzle::FontPointSize(QWidget *w, int pointSize) //--------------------------------------------------------------------------------------------------------------------- void DialogAboutPuzzle::RetranslateUi() { - ui->label_Puzzle_Version->setText(QString("Tape %1").arg(APP_VERSION_STR)); + ui->label_Puzzle_Version->setText(QString("Puzzle %1").arg(APP_VERSION_STR)); ui->labelBuildRevision->setText(tr("Build revision: %1").arg(BUILD_REVISION)); ui->label_QT_Version->setText(buildCompatibilityString()); diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.ui b/src/app/puzzle/dialogs/dialogaboutpuzzle.ui index fdcb86428..9b4344117 100644 --- a/src/app/puzzle/dialogs/dialogaboutpuzzle.ui +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.ui @@ -7,7 +7,7 @@ 0 0 462 - 320 + 338 @@ -23,11 +23,11 @@ - About Tape + About Puzzle - - :/tapeicon/64x64/logo.png:/tapeicon/64x64/logo.png + + :/puzzleicon/64x64/logo.png:/puzzleicon/64x64/logo.png @@ -41,6 +41,9 @@ 9 + + 16 + @@ -261,6 +264,9 @@ + + 0 + @@ -290,7 +296,6 @@ - From 95101b6ac3717b84b0308edfeda2c58aea2a818d Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Mon, 13 Apr 2020 12:24:26 +0200 Subject: [PATCH 12/15] Piece carrousel --- src/app/puzzle/puzzlemainwindow.cpp | 51 +- src/app/puzzle/puzzlemainwindow.h | 8 +- src/app/puzzle/puzzlemainwindow.ui | 1705 ++++++++++++++------------- src/app/puzzle/vpiececarrousel.cpp | 128 ++ src/app/puzzle/vpiececarrousel.h | 31 + 5 files changed, 1091 insertions(+), 832 deletions(-) create mode 100644 src/app/puzzle/vpiececarrousel.cpp create mode 100644 src/app/puzzle/vpiececarrousel.h diff --git a/src/app/puzzle/puzzlemainwindow.cpp b/src/app/puzzle/puzzlemainwindow.cpp index 4fc6ab236..84bfc2a66 100644 --- a/src/app/puzzle/puzzlemainwindow.cpp +++ b/src/app/puzzle/puzzlemainwindow.cpp @@ -32,20 +32,21 @@ //--------------------------------------------------------------------------------------------------------------------- PuzzleMainWindow::PuzzleMainWindow(QWidget *parent) : QMainWindow(parent), - ui(new Ui::PuzzleMainWindow) + ui(new Ui::PuzzleMainWindow), + pieceCarrousel(new VPieceCarrousel) { ui->setupUi(this); InitMenuBar(); - - InitPropertyTabs(); - + InitProperties(); + InitPieceCarrousel(); } //--------------------------------------------------------------------------------------------------------------------- PuzzleMainWindow::~PuzzleMainWindow() { delete ui; + delete pieceCarrousel; } //--------------------------------------------------------------------------------------------------------------------- @@ -58,7 +59,7 @@ bool PuzzleMainWindow::LoadFile(const QString &path) //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::InitMenuBar() { - // connects the actions for the file menu + // -------------------- connects the actions for the file menu connect(ui->actionNew, &QAction::triggered, this, &PuzzleMainWindow::New); connect(ui->actionOpen, &QAction::triggered, this, &PuzzleMainWindow::Open); connect(ui->actionSave, &QAction::triggered, this, &PuzzleMainWindow::Save); @@ -66,13 +67,17 @@ void PuzzleMainWindow::InitMenuBar() connect(ui->actionImportRawLayout, &QAction::triggered, this, &PuzzleMainWindow::ImportRawLayout); connect(ui->actionExit, &QAction::triggered, this, &PuzzleMainWindow::close); - // connects the actions for the edit menu + // -------------------- connects the actions for the edit menu // TODO : initialise the undo / redo - // connects the actions for the windows menu + // -------------------- connects the actions for the windows menu // TODO : initialise the entries for the different windows connect(ui->actionCloseLayout, &QAction::triggered, this, &PuzzleMainWindow::CloseLayout); + // Add dock properties action + QAction* actionDockWidgetToolOptions = ui->dockWidgetProperties->toggleViewAction(); + ui->menuWindows->addAction(actionDockWidgetToolOptions); + // connects the action for the Help Menu connect(ui->actionAboutQt, &QAction::triggered, this, &PuzzleMainWindow::AboutQt); connect(ui->actionAboutPuzzle, &QAction::triggered, this, &PuzzleMainWindow::AboutPuzzle); @@ -80,7 +85,7 @@ void PuzzleMainWindow::InitMenuBar() } //--------------------------------------------------------------------------------------------------------------------- -void PuzzleMainWindow::InitPropertyTabs() +void PuzzleMainWindow::InitProperties() { InitPropertyTabCurrentPiece(); InitPropertyTabLayout(); @@ -202,6 +207,18 @@ void PuzzleMainWindow::InitPropertyTabLayers() ui->tabWidgetProperties->removeTab(3); // remove layers } +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::InitPieceCarrousel() +{ + ui->dockWidgetPieceCarrousel->setWidget(pieceCarrousel); + + connect(ui->dockWidgetPieceCarrousel, QOverload::of(&QDockWidget::dockLocationChanged), this, + &PuzzleMainWindow::PieceCarrouselLocationChanged); +} + + + + //--------------------------------------------------------------------------------------------------------------------- void PuzzleMainWindow::New() { @@ -525,3 +542,21 @@ void PuzzleMainWindow::CurrentPiecePositionChanged() // TODO } + +//--------------------------------------------------------------------------------------------------------------------- +void PuzzleMainWindow::PieceCarrouselLocationChanged(Qt::DockWidgetArea area) +{ + if(area == Qt::BottomDockWidgetArea || area == Qt::TopDockWidgetArea) + { + pieceCarrousel->setOrientation(Qt::Horizontal); + ui->dockWidgetPieceCarrousel->setMaximumHeight(208); + ui->dockWidgetPieceCarrousel->setMaximumWidth(10000); + } + else if (area == Qt::LeftDockWidgetArea || area == Qt::RightDockWidgetArea) + { + pieceCarrousel->setOrientation(Qt::Vertical); + ui->dockWidgetPieceCarrousel->setMaximumHeight(10000); + ui->dockWidgetPieceCarrousel->setMaximumWidth(160); + } +} + diff --git a/src/app/puzzle/puzzlemainwindow.h b/src/app/puzzle/puzzlemainwindow.h index b54bc0abd..9d2bdf70e 100644 --- a/src/app/puzzle/puzzlemainwindow.h +++ b/src/app/puzzle/puzzlemainwindow.h @@ -32,6 +32,7 @@ #include #include +#include "vpiececarrousel.h" namespace Ui { class PuzzleMainWindow; @@ -50,14 +51,15 @@ public: private: Q_DISABLE_COPY(PuzzleMainWindow) Ui::PuzzleMainWindow *ui; + VPieceCarrousel *pieceCarrousel; void InitMenuBar(); - void InitPropertyTabs(); + void InitProperties(); void InitPropertyTabCurrentPiece(); void InitPropertyTabLayout(); void InitPropertyTabTiles(); void InitPropertyTabLayers(); - + void InitPieceCarrousel(); private slots: void New(); @@ -88,6 +90,8 @@ private slots: void CurrentPieceAngleChanged(double value); void CurrentPiecePositionChanged(); + void PieceCarrouselLocationChanged(Qt::DockWidgetArea area); + }; #endif // PUZZLEMAINWINDOW_H diff --git a/src/app/puzzle/puzzlemainwindow.ui b/src/app/puzzle/puzzlemainwindow.ui index e36180443..7855f9b00 100644 --- a/src/app/puzzle/puzzlemainwindow.ui +++ b/src/app/puzzle/puzzlemainwindow.ui @@ -20,829 +20,13 @@ Qt::LeftToRight - + QLayout::SetDefaultConstraint - - - - - 0 - 0 - - - - - 360 - 0 - - - - QTabWidget::Rounded - - - 1 - - - - 32 - 32 - - - - - - - - - :/puzzleicon/64x64/iconCurrentPiece.png:/puzzleicon/64x64/iconCurrentPiece.png - - - - - - Current piece properties - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - true - - - - - 0 - 0 - 356 - 779 - - - - - - - font-weight:bold; - - - Current piece - - - Qt::AutoText - - - Qt::AlignCenter - - - - - - - Infos - - - - - - DummyName - - - true - - - - - - - Name: - - - - - - - - - - Seamline - - - - - - Show Seamline - - - true - - - - - - - - - - Geometry - - - - - - Mirror piece - - - - - - - - - - Rotation - - - - - - Angle: - - - - - - - 360.000000000000000 - - - 0.100000000000000 - - - - - - - - - - Placement - - - - - - X: - - - - - - - 10000.000000000000000 - - - 0.100000000000000 - - - - - - - Y: - - - - - - - 10000.000000000000000 - - - 0.100000000000000 - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - :/puzzleicon/64x64/iconLayout.png:/puzzleicon/64x64/iconLayout.png - - - - - - Layout properties - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - true - - - - - 0 - 0 - 356 - 779 - - - - - - - font-weight: bold; - - - Layout - - - Qt::AlignCenter - - - - - - - Format - - - - - - - - Unit - - - - - - - - - - Template - - - - - - - - - - Width - - - - - - - - - - - - - Length - - - - - - - Orientation - - - - - - - - - Portrait - - - - - - - :/puzzleicon/64x64/iconPortrait.png:/puzzleicon/64x64/iconPortrait.png - - - - 32 - 32 - - - - true - - - - - - - Landscape - - - - - - - :/puzzleicon/64x64/iconLandscape.png:/puzzleicon/64x64/iconLandscape.png - - - - 32 - 32 - - - - - - - - - - - - Remove unused length - - - - - - - - - - Margins - - - - - - Right: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Top: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 0.100000000000000 - - - - - - - 0.100000000000000 - - - - - - - Left: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - 0.100000000000000 - - - - - - - 0.100000000000000 - - - - - - - Bottom: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Control - - - - - - - - Follow grainline - - - - - - - - - No - - - true - - - - - - - Vertical grainline - - - - - - - :/puzzleicon/64x64/iconGrainlineVertical.png:/puzzleicon/64x64/iconGrainlineVertical.png - - - - 28 - 28 - - - - - - - - Horizontal grainline - - - - - - - :/puzzleicon/64x64/iconGrainlineHorizontal.png:/puzzleicon/64x64/iconGrainlineHorizontal.png - - - - 28 - 28 - - - - - - - - - - Pieces gap - - - - - - - - - - - - Warning superposition of pieces - - - - - - - Warning pieces out of bound - - - - - - - Sticky edges - - - - - - - - - - Export - - - - - - - - Format - - - - - - - - - - - - Export Layout - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - :/puzzleicon/64x64/iconTiles.png:/puzzleicon/64x64/iconTiles.png - - - - - - Tiles properties - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - true - - - - - 0 - 0 - 356 - 779 - - - - - - - font-weight: bold; - - - Tiles - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - :/puzzleicon/64x64/iconLayers.png:/puzzleicon/64x64/iconLayers.png - - - - - - Layers properties - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - true - - - - - 0 - 0 - 356 - 779 - - - - - - - font-weight:bold; - - - Layers - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - @@ -878,6 +62,7 @@ &Windows + @@ -900,15 +85,24 @@ - + + + + 0 + 0 + + 160 - 160 + 208 + + + - QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable + QDockWidget::DockWidgetMovable Qt::AllDockWidgetAreas @@ -919,7 +113,864 @@ 1 - + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + 378 + 524287 + + + + QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetMovable + + + Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea + + + Properties + + + 2 + + + + + 4 + + + + + + 0 + 0 + + + + + 360 + 0 + + + + QTabWidget::Rounded + + + 1 + + + + 32 + 32 + + + + + + + + + :/puzzleicon/64x64/iconCurrentPiece.png:/puzzleicon/64x64/iconCurrentPiece.png + + + + + + Current piece properties + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 356 + 760 + + + + + + + font-weight:bold; + + + Current piece + + + Qt::AutoText + + + Qt::AlignCenter + + + + + + + Infos + + + + + + DummyName + + + true + + + + + + + Name: + + + + + + + + + + Seamline + + + + + + Show Seamline + + + true + + + + + + + + + + Geometry + + + + + + Mirror piece + + + + + + + + + + Rotation + + + + + + Angle: + + + + + + + 360.000000000000000 + + + 0.100000000000000 + + + + + + + + + + Placement + + + + + + X: + + + + + + + 10000.000000000000000 + + + 0.100000000000000 + + + + + + + Y: + + + + + + + 10000.000000000000000 + + + 0.100000000000000 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + :/puzzleicon/64x64/iconLayout.png:/puzzleicon/64x64/iconLayout.png + + + + + + Layout properties + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 356 + 760 + + + + + + + font-weight: bold; + + + Layout + + + Qt::AlignCenter + + + + + + + Format + + + + + + + + Unit + + + + + + + + + + Template + + + + + + + + + + Width + + + + + + + + + + + + + Length + + + + + + + Orientation + + + + + + + + + Portrait + + + + + + + :/puzzleicon/64x64/iconPortrait.png:/puzzleicon/64x64/iconPortrait.png + + + + 32 + 32 + + + + true + + + + + + + Landscape + + + + + + + :/puzzleicon/64x64/iconLandscape.png:/puzzleicon/64x64/iconLandscape.png + + + + 32 + 32 + + + + + + + + + + + + Remove unused length + + + + + + + + + + Margins + + + + + + Right: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Top: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 0.100000000000000 + + + + + + + 0.100000000000000 + + + + + + + Left: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + 0.100000000000000 + + + + + + + 0.100000000000000 + + + + + + + Bottom: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Control + + + + + + + + Follow grainline + + + + + + + + + No + + + true + + + + + + + Vertical grainline + + + + + + + :/puzzleicon/64x64/iconGrainlineVertical.png:/puzzleicon/64x64/iconGrainlineVertical.png + + + + 28 + 28 + + + + + + + + Horizontal grainline + + + + + + + :/puzzleicon/64x64/iconGrainlineHorizontal.png:/puzzleicon/64x64/iconGrainlineHorizontal.png + + + + 28 + 28 + + + + + + + + + + Pieces gap + + + + + + + + + + + + Warning superposition of pieces + + + + + + + Warning pieces out of bound + + + + + + + Sticky edges + + + + + + + + + + Export + + + + + + + + Format + + + + + + + + + + + + Export Layout + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + :/puzzleicon/64x64/iconTiles.png:/puzzleicon/64x64/iconTiles.png + + + + + + Tiles properties + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 356 + 760 + + + + + + + font-weight: bold; + + + Tiles + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + :/puzzleicon/64x64/iconLayers.png:/puzzleicon/64x64/iconLayers.png + + + + + + Layers properties + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 356 + 760 + + + + + + + font-weight:bold; + + + Layers + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + @@ -988,11 +1039,21 @@ About &Puzzle + + + true + + + true + + + Properties + + graphicsView - tabWidgetProperties scrollAreaLayout doubleSpinBoxLayoutMarginTop doubleSpinBoxLayoutMarginLeft diff --git a/src/app/puzzle/vpiececarrousel.cpp b/src/app/puzzle/vpiececarrousel.cpp new file mode 100644 index 000000000..11e90d577 --- /dev/null +++ b/src/app/puzzle/vpiececarrousel.cpp @@ -0,0 +1,128 @@ +#include "vpiececarrousel.h" +#include +#include +#include + +//--------------------------------------------------------------------------------------------------------------------- +VPieceCarrousel::VPieceCarrousel(QWidget *parent) : + QWidget(parent), + comboBoxLayer(new QComboBox), + mainScrollArea(new QScrollArea(this)), + layers(QList()) +{ + + QVBoxLayout *mainLayout = new QVBoxLayout(); + setLayout(mainLayout); + + setMinimumSize(140,140); + + mainLayout->addWidget(comboBoxLayer); + comboBoxLayer->addItem(tr("Unplaced pieces")); + comboBoxLayer->addItem(tr("Layout")); + comboBoxLayer->setCurrentIndex(0); + connect(comboBoxLayer, QOverload::of(&QComboBox::currentIndexChanged), this, + &VPieceCarrousel::ActiveLayerChanged); + + QWidget *widget = new QWidget(); + QVBoxLayout *mainScrollAreaLayout = new QVBoxLayout(); + mainScrollAreaLayout->setMargin(0); + widget->setLayout(mainScrollAreaLayout); + mainScrollArea->setWidget(widget); + + mainLayout->addWidget(mainScrollArea); +// mainScrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn ); + mainScrollArea->setWidgetResizable( true ); + + + // this code is for test purpuses, it needs to be updated when we have proper data! + + QWidget *unplacedPieces = new QWidget(); + QVBoxLayout *unplacedPiecesLayout = new QVBoxLayout(); + unplacedPiecesLayout->setMargin(0); + unplacedPieces->setLayout(unplacedPiecesLayout); + for(int i=0; i<=10; ++i) + { + QLabel *myLabel = new QLabel(); + myLabel->setText(QString ("Element A.%1").arg(i)); + myLabel->setFixedSize(120,120); + myLabel->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter); + if(i%2 ==0) + { + myLabel->setStyleSheet("background-color:white"); + } + else { + myLabel->setStyleSheet("background-color:red"); + } + unplacedPiecesLayout->addWidget(myLabel); + } + mainScrollAreaLayout->addWidget(unplacedPieces); + layers.append(unplacedPieces); + + QWidget *layoutPieces = new QWidget(); + QVBoxLayout *layoutPiecesLayout = new QVBoxLayout(); + layoutPiecesLayout->setMargin(0); + layoutPieces->setLayout(layoutPiecesLayout); + for(int i=0; i<=5; ++i) + { + QLabel *myLabel = new QLabel(); + myLabel->setText(QString ("Element B.%1").arg(i)); + myLabel->setFixedSize(120,120); + myLabel->sizePolicy(); + myLabel->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter); + myLabel->setStyleSheet("background-color:cornflowerblue"); + layoutPiecesLayout->addWidget(myLabel); + } + mainScrollAreaLayout->addWidget(layoutPieces); + layers.append(layoutPieces); + + QSpacerItem *spacer = new QSpacerItem(10, 10, QSizePolicy::Expanding, QSizePolicy::Expanding); + mainScrollAreaLayout->addSpacerItem(spacer); + + // -------------------- init the layers combobox --------------------- + ActiveLayerChanged(0); +} + +//--------------------------------------------------------------------------------------------------------------------- +VPieceCarrousel::~VPieceCarrousel() +{ + delete comboBoxLayer; + delete mainScrollArea; +} + + +//--------------------------------------------------------------------------------------------------------------------- +void VPieceCarrousel::ActiveLayerChanged(int index) +{ + int j=0; + for (QWidget *widget: layers) { + widget->setVisible(j == index); + j++; + } +} + +//--------------------------------------------------------------------------------------------------------------------- +void VPieceCarrousel::setOrientation(Qt::Orientation orientation) +{ + QBoxLayout::Direction direction = QBoxLayout::LeftToRight; + + if(orientation == Qt::Horizontal) + { + comboBoxLayer->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + } + else // Qt::Vertical + { + direction = QBoxLayout::TopToBottom; + comboBoxLayer->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); + } + + QBoxLayout* mainScrollAreaLayout = qobject_cast(mainScrollArea->widget()->layout()); + mainScrollAreaLayout->setDirection(direction); + + for (QWidget *widget: layers) { + QBoxLayout* layerLayout = qobject_cast(widget->layout()); + layerLayout->setDirection(direction); + } +} + diff --git a/src/app/puzzle/vpiececarrousel.h b/src/app/puzzle/vpiececarrousel.h new file mode 100644 index 000000000..1de797ad2 --- /dev/null +++ b/src/app/puzzle/vpiececarrousel.h @@ -0,0 +1,31 @@ +#ifndef VPIECECARROUSEL_H +#define VPIECECARROUSEL_H + +#include +#include +#include + +class VPieceCarrousel : public QWidget +{ + Q_OBJECT +public: + explicit VPieceCarrousel(QWidget *parent = nullptr); + virtual ~VPieceCarrousel(); + + void setOrientation(Qt::Orientation orientation); +signals: + +public slots: + +private: + QComboBox *comboBoxLayer; + QScrollArea *mainScrollArea; + QList layers; + +private slots: + void ActiveLayerChanged(int index); + + +}; + +#endif // VPIECECARROUSEL_H From ee98cfb05fd6e60543f54a0b3b93994f71928513 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Mon, 13 Apr 2020 12:43:27 +0200 Subject: [PATCH 13/15] Updated class comment --- src/app/puzzle/dialogs/dialogaboutpuzzle.cpp | 2 +- src/app/puzzle/dialogs/dialogaboutpuzzle.h | 2 +- src/app/puzzle/puzzle.pri | 6 +++-- src/app/puzzle/vpiececarrousel.cpp | 27 +++++++++++++++++++ src/app/puzzle/vpiececarrousel.h | 28 ++++++++++++++++++++ 5 files changed, 61 insertions(+), 4 deletions(-) diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp index bb60c9c6f..89328bfab 100644 --- a/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.cpp @@ -1,7 +1,7 @@ /************************************************************************ ** ** @file dialogaboutpuzzle.cpp - ** @author Roman Telezhynskyi + ** @author Ronan Le Tiec ** @date 11 4, 2020 ** ** @brief diff --git a/src/app/puzzle/dialogs/dialogaboutpuzzle.h b/src/app/puzzle/dialogs/dialogaboutpuzzle.h index 0367c5ace..62d0d2498 100644 --- a/src/app/puzzle/dialogs/dialogaboutpuzzle.h +++ b/src/app/puzzle/dialogs/dialogaboutpuzzle.h @@ -1,7 +1,7 @@ /************************************************************************ ** ** @file dialogaboutpuzzle.h - ** @author Roman Telezhynskyi + ** @author Ronan Le Tiec ** @date 11 4, 2020 ** ** @brief diff --git a/src/app/puzzle/puzzle.pri b/src/app/puzzle/puzzle.pri index a4db72756..c05dc0d69 100644 --- a/src/app/puzzle/puzzle.pri +++ b/src/app/puzzle/puzzle.pri @@ -5,7 +5,8 @@ SOURCES += \ $$PWD/main.cpp \ $$PWD/puzzlemainwindow.cpp \ $$PWD/puzzleapplication.cpp \ - $$PWD/dialogs/dialogaboutpuzzle.cpp + $$PWD/dialogs/dialogaboutpuzzle.cpp \ + $$PWD/vpiececarrousel.cpp *msvc*:SOURCES += $$PWD/stable.cpp @@ -13,7 +14,8 @@ HEADERS += \ $$PWD/puzzlemainwindow.h \ $$PWD/stable.h \ $$PWD/puzzleapplication.h \ - $$PWD/dialogs/dialogaboutpuzzle.h + $$PWD/dialogs/dialogaboutpuzzle.h \ + $$PWD/vpiececarrousel.h FORMS += \ $$PWD/puzzlemainwindow.ui \ diff --git a/src/app/puzzle/vpiececarrousel.cpp b/src/app/puzzle/vpiececarrousel.cpp index 11e90d577..3ef1962f3 100644 --- a/src/app/puzzle/vpiececarrousel.cpp +++ b/src/app/puzzle/vpiececarrousel.cpp @@ -1,3 +1,30 @@ +/************************************************************************ + ** + ** @file vpiececarrousel.cpp + ** @author Ronan Le Tiec + ** @date 13 4, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ #include "vpiececarrousel.h" #include #include diff --git a/src/app/puzzle/vpiececarrousel.h b/src/app/puzzle/vpiececarrousel.h index 1de797ad2..bb6a248f8 100644 --- a/src/app/puzzle/vpiececarrousel.h +++ b/src/app/puzzle/vpiececarrousel.h @@ -1,3 +1,31 @@ +/************************************************************************ + ** + ** @file vpiececarrousel.h + ** @author Ronan Le Tiec + ** @date 13 04, 2020 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2020 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + #ifndef VPIECECARROUSEL_H #define VPIECECARROUSEL_H From 096f913d33f46be5aec4414499569f16313972e1 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Mon, 13 Apr 2020 12:49:33 +0200 Subject: [PATCH 14/15] Corrections of .pro --- Valentina.pro | 2 +- src/app/puzzle/puzzle.pro | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index d78671c57..78c5ed24e 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -55,4 +55,4 @@ TEMPLATE = subdirs SUBDIRS = src RESOURCES += \ - src/app/puzzle/share/resources/tapeicon.qrc + src/app/puzzle/share/resources/puzzleicon.qrc diff --git a/src/app/puzzle/puzzle.pro b/src/app/puzzle/puzzle.pro index 1a471e46a..7463ba832 100644 --- a/src/app/puzzle/puzzle.pro +++ b/src/app/puzzle/puzzle.pro @@ -333,5 +333,3 @@ CONFIG(release, debug|release){ QMAKE_POST_LINK += $$[QT_INSTALL_BINS]/macdeployqt $${OUT_PWD}/$${DESTDIR}/$${TARGET}.app } } - -FORMS += From e8b119a9598737fe49f7ccdbd992b0657a6a773f Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Mon, 13 Apr 2020 12:56:25 +0200 Subject: [PATCH 15/15] Icons in high definition --- .../puzzleicon/64x64/iconCurrentPiece@2x.png | Bin 0 -> 2312 bytes .../64x64/iconGrainlineHorizontal@2x.png | Bin 0 -> 1498 bytes .../64x64/iconGrainlineVertical@2x.png | Bin 0 -> 1516 bytes .../puzzleicon/64x64/iconLandscape@2x.png | Bin 0 -> 1491 bytes .../resources/puzzleicon/64x64/iconLayers@2x.png | Bin 0 -> 1013 bytes .../resources/puzzleicon/64x64/iconLayout@2x.png | Bin 0 -> 872 bytes .../puzzleicon/64x64/iconPortrait@2x.png | Bin 0 -> 1505 bytes .../resources/puzzleicon/64x64/iconTiles@2x.png | Bin 0 -> 1008 bytes 8 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineVertical@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLandscape@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconLayout@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconPortrait@2x.png create mode 100644 src/app/puzzle/share/resources/puzzleicon/64x64/iconTiles@2x.png diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconCurrentPiece@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c2df932453797a521ced866c2d6273a3bf0cf422 GIT binary patch literal 2312 zcmXw43pmr=A3wj1(QHD*TpA*`+(x=!h6!QzqP%oLMP%;gl2=A=MHf~`Zc9o^nnH+S zQm8~i#f-U>3b_`Q%lp&+`JdKNTCi_S~(eeGsp8Gmci z9}PS&rQLnz`pnR#S99n_gvT)FxyOTd9=}=3XNQxj%G>EV&2~PL4iYM)y-G4}J}Q*^ zdoQG5rZmi#ty8_!vK-lHx!s$oXV5QZ&#W~~2fsdg^sN(GBatP`Ta^<&6`gpXxvDWO zsE&>hVkPQ47%kh8nC<*lK}k1CXdwhC`(DXu5UCfuwskqMOW(#{{>JmIpSjyl+q!2)mq z4t*xoJXo?J)XpOUuHgH1f~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&`$Uj13Dw5LesNzb^{AlbBaSmF z-O^(!dDikKH14%F;5r^3QtamDM)mRv!2$wz>>e1LV|^(16|=FiF;O6anDR}X*n*Lf zqg6q?b531^&=HO(XWaZz?7W|jNy2f)WVmSO%G%YdQl6fk4|TN>MkjP;Y8RjVnBrwy zBs9>$SgmM#E5~ZYwW$SP_|Urv5i#DOq=T0W`~J0eL1gdpXgPF5b+(e}Ql`2QPjvL~ z$j+<`#4Q=@;BF-C%X~jDKKKw=&IiY2Z3Yg2lZnxG1H*CKx_9=xe;+aV!O*Xh71X#& zKnf~;u9*#|TZ*C4ju8`XXIpgAk$vyDIdG8=#bxr{F#D?!middgmrR1mA!wq$H??BmjW{s90rCiT=Yf zAtA;E5>%kYl>#oo(|xC_on09iWuz#;k>GhjkWdo96NLs&5Q5~&fU773Yr(ck21ZaL ze0<%gh6W%(4P*?D6M|$@Pz3&79MhLcOv}nxtZy9+gS+N`U^Rz?(4aLd@eianLU{dJ z!6#|voMm#091ixx6ljr9Oz0128^}TYVeX1b!x0w&|E+fG7OK?$2en%daWNdr6$q4X zQriN+UR&Gw;iq|3k%T7eTalOWA$yF3HJ>QSLd;_NO*rg3>T8I)f(A*17W`Mj%ie}U JW?OkD{Re_E0UH1S literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineHorizontal@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..10620e97ac23fb6e21e9e86188483c36c2c46583 GIT binary patch literal 1498 zcmaKr`7_%I7{TKB9*ek- z#S)8EbyHN`t&(<~O-hi;rvE@^-sgR1p7)3Mo%zi3z`@Q!045Ft06@UX((F2C5`X9v zH>dX+`VRpB=w1j0<6wos$lz{A1cihJ0st~6AqQ>QYb@FCYh;GHC>SFgNp^UuLWW1a zRXSU4`V#JeSNn^>SEwbAQhk^l+S8NW|7S`@BSnysEW-qSSff?YuA%usucbLq0#D@FQ#)+gz zrJn{>QFu&av5u@uexZBuDcvwKH%}pzSxi_c<2!A1+dJkkD{9c+Xe?8FZrC6)*A0oU zU+Aw6d)epIr*1xtTrQ1rU+wI7ubFW_E@7pvCbu*U;|qH&{Y7kqWsR>&!JYkO?W(S( zKj7a|M6)mtedV8AqrgP<&pD*P2KQ3fJv-QufPhI`m?EhJF@GWojgKY$(%aIV9o~Tl zbCr;kYd+R$lM3u7C8RFKa4{kvh*>GyC5UP)u}9HcL*4>5&Ol^PkHr$4q($4HrlHt~ zt%PDj!2OF-0z^_0d_&=l&jBIUH#UM@5^`_=NwT|LJ+{B?!NI~EU}IqhFaR6CW=^Md zp5yT1EZw6x1ZRH;WQr^za7>ZE(OBHr>lQp@oV;z{|;a1Lch!)A>Z;<&4e#RINC5=sEo}?k;k?FhrWkXKR z!DvFyb@is|+@{Vo+VH-AE#zb5`LV8QbX4JCqF=9C)cU3od-?LlX7j$gjMZcLpH_v) zCurG#j+rjBtz|0XE}SWqAM7)+2-@Vv?(}_VC$^FdS5Dz7EVS(0%6A+X8~|$5S`T8(`GG0U$vFM^QlNu)98f|q*aeN3 zHWDi+j(TqveaqN9q!$6j(WmPwsShLuuF=!CNy%c8&>2_#)sa!>+o@!o*-bavvkXdTl$7578(5R8b9I-8=sSya#IkO zmmr2u#IkV8bFDGxtLu@XZu17>&mS#0Hke#E))Nf^7fexyNZCXl<*w#1Y~fKfqIf3I zcJcAKBniIEs@(-NoRTCSYvlP^Rc(5x5GK?$kc7hB==W-YjDeRYpVJOdG4z2VlW(4` zdwJ}H8Q_ih;Z3U@`EXe1U|^{wcIb literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineVertical@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconGrainlineVertical@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..1493af76fa43b4f452c4e3004d5722b27b8f837b GIT binary patch literal 1516 zcmVEX>4Tx04R}tkv&MmKpe$iKSU`l4t5Z6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JXj%4K|!ih7-Gy|sPJqf$3+z)Hi`5%?a&h|po z9z?pCCCTmFoTLOL9I<#iKc7%gpssslOG3#{#*iKutXic>Rp>XO?<9b;?f{OONuDu5 z+_r=C4Gb!&c1tox=x?qM(ULTuo11Hn$9u0Uu7N%E2}@2SVntj^3a6=QBL>6W5VTSL z-Eb zx3z5!2?^;y`=ES0VDu2E6^T4dO-&t~oUlPPpvIDPG#QQz4aN5L^(C~7u@pw~a}ecE zy}1MX_s26BrAtdoEX5l6ONR6bs1^fYX=O!=jjg|W)zKOU?JH{+A?3P!h`hYKED#E# z=yW_c4e>3h7NTS!(e(QT{5<92wwM?z?mw^$CL%a2Y4;ymFi*jZd2+q8|;njwQnZ>F0 z$vZjj)_2*)ep7+Ni}}!z`?Y%=3BRTn)1Ln1bYk&j!7hvrir%Q zili(yI0G ewOLxOb6C*}RL>je_j=N`bqB!#5fmXguJ~VnK7>~Q literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayers@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..3019f872517b428844176fc2f850fa7741da9270 GIT binary patch literal 1013 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5j~)%+Yvz7foHhGJ(R5fVnyyqJ>wqL>4-&5RED|*!hKfmWhg{USCu8!Grxr zS2cHUUdOktN#O_MqbDzxyiij8r?0uCX$ zUE!3es;xifRNPs>Eo5I5TlTZJ_++B}`5vj8XKV_mL}-+5ymNF-&Wa*lifhBKiNV?P0}GW zbS-NF%MNy|wxL)J;_$D!{+0X8ruLe*_fLQPzzY(3$GGlDwczV5%qKqEtXkz|)UZkC zJd**_9cHl8KS=!eyCPuP)BW>G_Qpm3tma*??)7GORa{ zJ-^+5`Q;bif0wCTWtet)>0JXR0S3>WhFX`JdoN&Mbtj0r42=Q_B!)G(fV;rIU($Br)yK;Y@>=d#Wzp$Pz=A&mq8 literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayout@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconLayout@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..5691b26a976684ea8ca735b3472a212097ff689f GIT binary patch literal 872 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrU~I{Bb`J1#c2+1T%1_J8No8Qr zm{>c}*5j~)%+Yvz7foHhGJ(R5fVnyyqJ>wqL>4-&5RED|*!hKfmWhg{USCu8!Grxr zS2cHUUdOktN#O_MqbDzxyiij8r?0uCX$ zUE!3es;xifRNPs>Eo5I5TlTZJ_++B}`5vj8XKV_mL}-+5ymNF-&WagnPbQgQ3;HOH(&0U~V| z?H9$ojA+qY^gBL4UH8_?9}YgpbKSizEq^j6Q9{p<#Enh zKAZ3N`X>cjnFJV^92htl7!?>;8W`|$@JbSC1~rs5sJvb&f8$t6waE?3Egw0VX1sRY z2=qp<^t(OpkNfXi<+JJd%mrKTPdD?_`!C19|M(fh8isU+X>X)MMdY8^lr!2g0D-5g KpUXO@geCx|tv5md literal 0 HcmV?d00001 diff --git a/src/app/puzzle/share/resources/puzzleicon/64x64/iconPortrait@2x.png b/src/app/puzzle/share/resources/puzzleicon/64x64/iconPortrait@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..95efe95ff96d9a9606db47b3915cc4f529c4c6fa GIT binary patch literal 1505 zcmcIjX;2eZ5PmrbBx=ejcMJ?jKnRCOK$8IB2#CR`v=9^sSkp2pM<9SlAmPv`a*0#{ zIkX2fVh`*C09V83+N70`B zr%Z-=iHT>zaGd7R?uG+3UAwxR{a)b4tCAS6?{qU7Uow^}Kjpm6Y`xLTDH8`o>jY_A zc=?+fghX2e*ZZG5v3kyi^vNeb%IfU4CX|uKT6z}h(fh0~B6(b2Ow0fcWy7yD99c2a zIGoD=PTYF0;NUMDD7=!tp>g8cCVuJm0aJ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