+ m_expandableFolders = new QCheckBox(i18nc("@option:check", "Expandable"));
+ topLayout->addRow(i18nc("@label:checkbox", "Folders:"), m_expandableFolders);
+
+ // Item activation area
+ m_entireRow = new QRadioButton(i18nc("@option:radio how files/folders are opened", "By clicking anywhere on the row"));
+ m_iconAndNameOnly = new QRadioButton(i18nc("@option:radio how files/folders are opened", "By clicking on icon or name"));
+
+ auto itemActivationAreaGroup = new QButtonGroup(this);
+ itemActivationAreaGroup->addButton(m_entireRow);
+ itemActivationAreaGroup->addButton(m_iconAndNameOnly);
+
+ // clang-format off
+ // i18n: Users can choose here if items are opened by clicking on their name/icon or by clicking in the row.
+ topLayout->addRow(i18nc("@title:group", "Open files and folders:"), m_entireRow);
+ // clang-format on
+ topLayout->addRow(QString(), m_iconAndNameOnly);
+
+#ifndef Q_OS_WIN
+ // Sorting properties
+ m_numberOfItems = new QRadioButton(i18nc("option:radio", "Number of items"));
+ m_sizeOfContents = new QRadioButton(i18nc("option:radio", "Size of contents, up to "));
+
+ QButtonGroup *sortingModeGroup = new QButtonGroup(this);
+ sortingModeGroup->addButton(m_numberOfItems);
+ sortingModeGroup->addButton(m_sizeOfContents);
+
+ m_recursiveDirectorySizeLimit = new QSpinBox();
+ connect(m_recursiveDirectorySizeLimit, &QSpinBox::valueChanged, this, [this](int value) {
+ m_recursiveDirectorySizeLimit->setSuffix(i18np(" level deep", " levels deep", value));
+ });
+ m_recursiveDirectorySizeLimit->setRange(1, 20);
+ m_recursiveDirectorySizeLimit->setSingleStep(1);
+
+ QHBoxLayout *contentsSizeLayout = new QHBoxLayout();
+ contentsSizeLayout->addWidget(m_sizeOfContents);
+ contentsSizeLayout->addWidget(m_recursiveDirectorySizeLimit);
+
+ topLayout->addRow(i18nc("@title:group", "Folder size displays:"), m_numberOfItems);
+ topLayout->addRow(QString(), contentsSizeLayout);
+#endif
+
+ QDateTime thirtyMinutesAgo = QDateTime::currentDateTime().addSecs(-30 * 60);
+ QLocale local;
+ KFormat formatter(local);
+
+ m_useRelatetiveDates = new QRadioButton(
+ i18nc("option:radio as in relative date", "Relative (e.g. '%1')", formatter.formatRelativeDateTime(thirtyMinutesAgo, QLocale::ShortFormat)));
+ m_useShortDates =
+ new QRadioButton(i18nc("option:radio as in absolute date", "Absolute (e.g. '%1')", local.toString(thirtyMinutesAgo, QLocale::ShortFormat)));
+
+ QButtonGroup *dateFormatGroup = new QButtonGroup(this);
+ dateFormatGroup->addButton(m_useRelatetiveDates);
+ dateFormatGroup->addButton(m_useShortDates);
+
+ topLayout->addRow(i18nc("@title:group", "Date style:"), m_useRelatetiveDates);
+ topLayout->addRow(QString(), m_useShortDates);
+
+ m_useSymbolicPermissions = new QRadioButton(i18nc("option:radio as symbolic style ", "Symbolic (e.g. 'drwxr-xr-x')"));
+
+ m_useNumericPermissions = new QRadioButton(i18nc("option:radio as numeric style", "Numeric (Octal) (e.g. '755')"));
+
+ m_useCombinedPermissions = new QRadioButton(i18nc("option:radio as combined style", "Combined (e.g. 'drwxr-xr-x (755)')"));
+
+ topLayout->addRow(i18nc("@title:group", "Permissions style:"), m_useSymbolicPermissions);
+ topLayout->addRow(QString(), m_useNumericPermissions);
+ topLayout->addRow(QString(), m_useCombinedPermissions);
+
+ QButtonGroup *permissionsFormatGroup = new QButtonGroup(this);
+ permissionsFormatGroup->addButton(m_useSymbolicPermissions);
+ permissionsFormatGroup->addButton(m_useNumericPermissions);
+ permissionsFormatGroup->addButton(m_useCombinedPermissions);