mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-11 19:59:59 +01:00
Wrap code for better readability
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user