Wrap code for better readability

This commit is contained in:
Simon De Backer
2020-08-18 20:08:32 +02:00
parent 790cdc5229
commit 99abc165d6
17 changed files with 274 additions and 119 deletions

View File

@@ -55,11 +55,18 @@ class PropertiesEditorDialog : public QDialog
//Build the dialog
QVBoxLayout *vlayout = new QVBoxLayout(this);
vlayout->addWidget(editor);
QDialogButtonBox *button_box = new QDialogButtonBox (QDialogButtonBox::Apply | QDialogButtonBox::Cancel | QDialogButtonBox::Reset, this);
QDialogButtonBox *button_box = new QDialogButtonBox (
QDialogButtonBox::Apply
| QDialogButtonBox::Cancel
| QDialogButtonBox::Reset,
this);
vlayout->addWidget(button_box);
//Setup connection between button box and the editor
connect(button_box, &QDialogButtonBox::clicked, [editor, button_box, this](QAbstractButton *button)
//Setup connection between button box and the editor
connect(button_box,
&QDialogButtonBox::clicked,
[editor, button_box, this]
(QAbstractButton *button)
{
switch(button_box->buttonRole(button))
{

View File

@@ -88,7 +88,8 @@ void PropertiesEditorDockWidget::reset()
@return true if was added (or already add)
or false if can't be add (editor = nullptr)
*/
bool PropertiesEditorDockWidget::addEditor(PropertiesEditorWidget *editor, int index)
bool PropertiesEditorDockWidget::addEditor(PropertiesEditorWidget *editor,
int index)
{
if (!editor) return false;
if (m_editor_list.contains(editor)) return true;