- sortingBox->setLayout(sortingLayout);
-
- QGridLayout* propsGridLayout = new QGridLayout(propsGrid);
- propsGridLayout->addWidget(viewModeLabel, 0, 0, Qt::AlignRight);
- propsGridLayout->addWidget(m_viewMode, 0, 1);
- propsGridLayout->addWidget(sortingLabel, 1, 0, Qt::AlignRight);
- propsGridLayout->addWidget(sortingBox, 1, 1);
-
- QVBoxLayout* propsBoxLayout = new QVBoxLayout(propsBox);
- propsBoxLayout->addWidget(propsGrid);
- propsBoxLayout->addWidget(m_sortFoldersFirst);
- propsBoxLayout->addWidget(m_previewsShown);
- propsBoxLayout->addWidget(m_showInGroups);
- propsBoxLayout->addWidget(m_showHiddenFiles);
- propsBoxLayout->addWidget(m_additionalInfo);
-
- topLayout->addWidget(propsBox);
-
- connect(m_viewMode, SIGNAL(currentIndexChanged(int)),
- this, SLOT(slotViewModeChanged(int)));
- connect(m_sorting, SIGNAL(currentIndexChanged(int)),
- this, SLOT(slotSortingChanged(int)));
- connect(m_sortOrder, SIGNAL(currentIndexChanged(int)),
- this, SLOT(slotSortOrderChanged(int)));
- connect(m_additionalInfo, SIGNAL(clicked()),
- this, SLOT(configureAdditionalInfo()));
- connect(m_sortFoldersFirst, SIGNAL(clicked()),
- this, SLOT(slotSortFoldersFirstChanged()));
- connect(m_previewsShown, SIGNAL(clicked()),
- this, SLOT(slotShowPreviewChanged()));
- connect(m_showInGroups, SIGNAL(clicked()),
- this, SLOT(slotCategorizedSortingChanged()));
- connect(m_showHiddenFiles, SIGNAL(clicked()),
- this, SLOT(slotShowHiddenFilesChanged()));
-
- connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
- connect(this, SIGNAL(applyClicked()), this, SLOT(slotApply()));
+
+ layout->addRow(i18nc("@label:listbox", "View mode:"), m_viewMode);
+ layout->addRow(i18nc("@label:listbox", "Sorting:"), sortingLayout);
+
+ layout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed));
+
+ layout->addRow(i18n("View options:"), m_sortFoldersFirst);
+ layout->addRow(QString(), m_previewsShown);
+ layout->addRow(QString(), m_showInGroups);
+ layout->addRow(QString(), m_showHiddenFiles);
+
+ connect(m_viewMode, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ this, &ViewPropertiesDialog::slotViewModeChanged);
+ connect(m_sorting, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ this, &ViewPropertiesDialog::slotSortingChanged);
+ connect(m_sortOrder, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ this, &ViewPropertiesDialog::slotSortOrderChanged);
+ connect(m_sortFoldersFirst, &QCheckBox::clicked,
+ this, &ViewPropertiesDialog::slotSortFoldersFirstChanged);
+ connect(m_previewsShown, &QCheckBox::clicked,
+ this, &ViewPropertiesDialog::slotShowPreviewChanged);
+ connect(m_showInGroups, &QCheckBox::clicked,
+ this, &ViewPropertiesDialog::slotGroupedSortingChanged);
+ connect(m_showHiddenFiles, &QCheckBox::clicked,
+ this, &ViewPropertiesDialog::slotShowHiddenFilesChanged);