From 421cfd9492ec04f5432c81b6cad93ebe45601974 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Mon, 4 Dec 2017 16:07:23 +0100 Subject: [PATCH] Doc: Complete Dynamic Layouts Example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add doc to code - replace old signal/slot syntax - more up-to-date screenshot Task-number: QTBUG-60635 Change-Id: Iec3d2c3d0d8b9c07ccd4446d74d5eca2d88e7e08 Reviewed-by: Paul Wicking Reviewed-by: Topi Reiniƶ --- doc/src/images/dynamiclayouts-example.png | Bin 0 -> 22858 bytes examples/widgets/doc/src/dynamiclayouts.qdoc | 75 ++++++++++++++++++ .../widgets/layouts/dynamiclayouts/dialog.cpp | 54 +++++++------ .../widgets/layouts/dynamiclayouts/dialog.h | 8 +- 4 files changed, 108 insertions(+), 29 deletions(-) create mode 100644 doc/src/images/dynamiclayouts-example.png diff --git a/doc/src/images/dynamiclayouts-example.png b/doc/src/images/dynamiclayouts-example.png new file mode 100644 index 0000000000000000000000000000000000000000..b26d3725cc884a553f0ff0e0ba284df6d20f51b8 GIT binary patch literal 22858 zcmagG1yEc~7%eyif(Q5Dkl^m_?hxGFgF6fmECdhk?(Pl=?(Xh`yM%#(o&UYvw^F;c zRr8JAJ6%`0zdqkNrzcWXS>_Wm5i$S(_#`JQsSW_Z&_lxx@dNZ5N-0k;p_3ATIypyd3kxUEaA}_sbmgqb#9ZD z59p22s`~=rY<@4Nre;2k^J#B&<4oVhBTx*S_9FgB;>D4wf8INM8M^a-o2I4s(e>%Z z^?{?zQk9v3;q3VibaHZH*Q{4MpDy>4TvqNR)jrRt7UYw&-xeAgN~4kkeQs-OLxlU# zKacpMOA5VNuiB`#*JVH4fEgVbdGGE|fmnQNjj^)w6y)XU;|DPl6BA%xB>9Ly(A30) zqP+a=-QB!h^D*gS4 z_HMm;oH}v66A&=^wj%VkalP2u!wNBB?JOT5MEB-yFWN85M3c0dOvT|y#SruCUUvKS z2n%c7!*->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-P$4hS}oCn;Uv&ZW`amdcfS@>n5L!+16hbLjb^WS+&CH)i(Emqx=q}*C^Vr zJG#OsZlO!>AwPxTp1#&9lE|c`8P&+={O#T2A##OBf4c!w14FJncq5YG2Cim5(FUN4 z(?~-`(=Tx?=W*r$I>U$X=pQVb#)5N(?TJ1(g>vzyvHQl< z9`hb(V>5I~SP@?`cBakBn~}dbRi66E&Czz)?4OU`%B~UtAgYeX`h^yc0$c}9Sbn_V zeQkN!qf6WU#yQ&$_6m9Hw)?oBDMQ-T&!xAW2g7Xsne^-1X7I`)b}pXaHgv@F<)Imb z27^F~J?1YSOq}^?f_KpUYMeXcRD8&=@&jHDRt}SQJsT7fbHrT(2a!y-F}8D1{J8-0 zf_-y`+Vvehf6J*m#kIuOx+=8@v_9Xe}SNm@#mv`zwh)5 zX>2u(c3QrxeA6DYhVqp2JA$LLU)3|UES$X0#rQk3K`vweMCJ2KKjPyIv~$$oG<5r1 z`F%&Rfl~jy`K8b?n_v7Bqob;d*Iz$6X)sK@kKXbAf0eY-_>11Upo5{onf~n z0uf~J`OQKvGWcwl{A{@DVglh9CjM8~rYJZrCXfwRz3nLuheHqu!|={n{FD=L9483G z;cz-Fy=@t2m;8EYvv);j`46|GP$>V}{Wvfn2(;@)mX!{>?MarZYHnVRnVC6;W1rZv zgv4LG_6bDf<>s+itj_!mDQHe7Wp9k%ZvW0_|Qi;AnO ztE;N2NF{w4I2;a(#WFH9=(O~h6IU@1eTwl&*$^`e12VBT|+~IP$(3MLaddWidget(rotatableWidgets[i] + \printuntil } + \printuntil } + \include examples-run.qdocinc */ + diff --git a/examples/widgets/layouts/dynamiclayouts/dialog.cpp b/examples/widgets/layouts/dynamiclayouts/dialog.cpp index 080d69204b..f46053372a 100644 --- a/examples/widgets/layouts/dynamiclayouts/dialog.cpp +++ b/examples/widgets/layouts/dynamiclayouts/dialog.cpp @@ -55,12 +55,12 @@ Dialog::Dialog(QWidget *parent) : QDialog(parent) { - createRotableGroupBox(); + createRotatableGroupBox(); createOptionsGroupBox(); createButtonBox(); mainLayout = new QGridLayout; - mainLayout->addWidget(rotableGroupBox, 0, 0); + mainLayout->addWidget(rotatableGroupBox, 0, 0); mainLayout->addWidget(optionsGroupBox, 1, 0); mainLayout->addWidget(buttonBox, 2, 0); setLayout(mainLayout); @@ -102,17 +102,17 @@ void Dialog::buttonsOrientationChanged(int index) void Dialog::rotateWidgets() { - Q_ASSERT(rotableWidgets.count() % 2 == 0); + Q_ASSERT(rotatableWidgets.count() % 2 == 0); - foreach (QWidget *widget, rotableWidgets) - rotableLayout->removeWidget(widget); + foreach (QWidget *widget, rotatableWidgets) + rotatableLayout->removeWidget(widget); - rotableWidgets.enqueue(rotableWidgets.dequeue()); + rotatableWidgets.enqueue(rotatableWidgets.dequeue()); - const int n = rotableWidgets.count(); + const int n = rotatableWidgets.count(); for (int i = 0; i < n / 2; ++i) { - rotableLayout->addWidget(rotableWidgets[n - i - 1], 0, i); - rotableLayout->addWidget(rotableWidgets[i], 1, i); + rotatableLayout->addWidget(rotatableWidgets[n - i - 1], 0, i); + rotatableLayout->addWidget(rotatableWidgets[i], 1, i); } } @@ -123,23 +123,23 @@ void Dialog::help() "dynamically.")); } -void Dialog::createRotableGroupBox() +void Dialog::createRotatableGroupBox() { - rotableGroupBox = new QGroupBox(tr("Rotable Widgets")); + rotatableGroupBox = new QGroupBox(tr("Rotatable Widgets")); - rotableWidgets.enqueue(new QSpinBox); - rotableWidgets.enqueue(new QSlider); - rotableWidgets.enqueue(new QDial); - rotableWidgets.enqueue(new QProgressBar); + rotatableWidgets.enqueue(new QSpinBox); + rotatableWidgets.enqueue(new QSlider); + rotatableWidgets.enqueue(new QDial); + rotatableWidgets.enqueue(new QProgressBar); - int n = rotableWidgets.count(); + int n = rotatableWidgets.count(); for (int i = 0; i < n; ++i) { - connect(rotableWidgets[i], SIGNAL(valueChanged(int)), - rotableWidgets[(i + 1) % n], SLOT(setValue(int))); + connect(rotatableWidgets[i], SIGNAL(valueChanged(int)), + rotatableWidgets[(i + 1) % n], SLOT(setValue(int))); } - rotableLayout = new QGridLayout; - rotableGroupBox->setLayout(rotableLayout); + rotatableLayout = new QGridLayout; + rotatableGroupBox->setLayout(rotatableLayout); rotateWidgets(); } @@ -154,8 +154,10 @@ void Dialog::createOptionsGroupBox() buttonsOrientationComboBox->addItem(tr("Horizontal"), Qt::Horizontal); buttonsOrientationComboBox->addItem(tr("Vertical"), Qt::Vertical); - connect(buttonsOrientationComboBox, SIGNAL(currentIndexChanged(int)), - this, SLOT(buttonsOrientationChanged(int))); + connect(buttonsOrientationComboBox, + QOverload::of(&QComboBox::currentIndexChanged), + this, + &Dialog::buttonsOrientationChanged); optionsLayout = new QGridLayout; optionsLayout->addWidget(buttonsOrientationLabel, 0, 0); @@ -173,7 +175,9 @@ void Dialog::createButtonBox() rotateWidgetsButton = buttonBox->addButton(tr("Rotate &Widgets"), QDialogButtonBox::ActionRole); - connect(rotateWidgetsButton, SIGNAL(clicked()), this, SLOT(rotateWidgets())); - connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); - connect(helpButton, SIGNAL(clicked()), this, SLOT(help())); + connect(rotateWidgetsButton, &QPushButton::clicked, this, &Dialog::rotateWidgets); + connect(closeButton, &QPushButton::clicked, this, &Dialog::close); + connect(helpButton, &QPushButton::clicked, this, &Dialog::help); } + + diff --git a/examples/widgets/layouts/dynamiclayouts/dialog.h b/examples/widgets/layouts/dynamiclayouts/dialog.h index 0ff0c12b38..923a6fe01b 100644 --- a/examples/widgets/layouts/dynamiclayouts/dialog.h +++ b/examples/widgets/layouts/dynamiclayouts/dialog.h @@ -76,12 +76,12 @@ private slots: void help(); private: - void createRotableGroupBox(); + void createRotatableGroupBox(); void createOptionsGroupBox(); void createButtonBox(); - QGroupBox *rotableGroupBox; - QQueue rotableWidgets; + QGroupBox *rotatableGroupBox; + QQueue rotatableWidgets; QGroupBox *optionsGroupBox; QLabel *buttonsOrientationLabel; @@ -93,7 +93,7 @@ private: QPushButton *rotateWidgetsButton; QGridLayout *mainLayout; - QGridLayout *rotableLayout; + QGridLayout *rotatableLayout; QGridLayout *optionsLayout; };