- QPushButton* selectHomeUrlButton = new QPushButton(KIcon("folder-open"), QString(), homeUrlBox);
- connect(selectHomeUrlButton, SIGNAL(clicked()),
- this, SLOT(selectHomeUrl()));
-
- KHBox* buttonBox = new KHBox(homeBox);
- buttonBox->setSpacing(spacing);
-
- QPushButton* useCurrentButton = new QPushButton(i18nc("@action:button", "Use Current Location"), buttonBox);
- connect(useCurrentButton, SIGNAL(clicked()),
- this, SLOT(useCurrentLocation()));
- QPushButton* useDefaultButton = new QPushButton(i18nc("@action:button", "Use Default Location"), buttonBox);
- connect(useDefaultButton, SIGNAL(clicked()),
- this, SLOT(useDefaultLocation()));
+ // create 'Home URL' editor
+ m_homeUrlBoxLayoutContainer = new QWidget(this);
+ QHBoxLayout* homeUrlBoxLayout = new QHBoxLayout(m_homeUrlBoxLayoutContainer);
+ homeUrlBoxLayout->setContentsMargins(0, 0, 0, 0);
+
+ m_homeUrl = new QLineEdit();
+ m_homeUrl->setClearButtonEnabled(true);
+ homeUrlBoxLayout->addWidget(m_homeUrl);
+
+ QPushButton* selectHomeUrlButton = new QPushButton(QIcon::fromTheme(QStringLiteral("folder-open")), QString());
+ homeUrlBoxLayout->addWidget(selectHomeUrlButton);
+
+#ifndef QT_NO_ACCESSIBILITY
+ selectHomeUrlButton->setAccessibleName(i18nc("@action:button", "Select Home Location"));
+#endif
+
+ connect(selectHomeUrlButton, &QPushButton::clicked,
+ this, &StartupSettingsPage::selectHomeUrl);
+
+ m_buttonBoxLayoutContainer = new QWidget(this);
+ QHBoxLayout* buttonBoxLayout = new QHBoxLayout(m_buttonBoxLayoutContainer);
+ buttonBoxLayout->setContentsMargins(0, 0, 0, 0);
+
+ QPushButton* useCurrentButton = new QPushButton(i18nc("@action:button", "Use Current Location"));
+ buttonBoxLayout->addWidget(useCurrentButton);
+ connect(useCurrentButton, &QPushButton::clicked,
+ this, &StartupSettingsPage::useCurrentLocation);
+ QPushButton* useDefaultButton = new QPushButton(i18nc("@action:button", "Use Default Location"));
+ buttonBoxLayout->addWidget(useDefaultButton);
+ connect(useDefaultButton, &QPushButton::clicked,
+ this, &StartupSettingsPage::useDefaultLocation);
+
+ QGridLayout* startInLocationLayout = new QGridLayout();
+ startInLocationLayout->setHorizontalSpacing(0);
+ startInLocationLayout->setContentsMargins(0, 0, 0, 0);
+ startInLocationLayout->addWidget(m_homeUrlRadioButton, 0, 0);
+ startInLocationLayout->addWidget(m_homeUrlBoxLayoutContainer, 0, 1);
+ startInLocationLayout->addWidget(m_buttonBoxLayoutContainer, 1, 1);
+
+ topLayout->addRow(i18nc("@label:textbox", "Show on startup:"), m_rememberOpenedTabsRadioButton);
+ topLayout->addRow(QString(), startInLocationLayout);
+
+
+ topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed));
+
+ m_splitView = new QCheckBox(i18nc("@option:check Startup Settings", "Begin in split view mode"));
+ topLayout->addRow(i18n("New windows:"), m_splitView);
+ m_filterBar = new QCheckBox(i18nc("@option:check Startup Settings", "Show filter bar"));
+ topLayout->addRow(QString(), m_filterBar);
+ m_editableUrl = new QCheckBox(i18nc("@option:check Startup Settings", "Make location bar editable"));
+ topLayout->addRow(QString(), m_editableUrl);
+
+ topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed));
+
+ m_openExternallyCalledFolderInNewTab = new QCheckBox(i18nc("@option:check Startup Settings", "Open new folders in tabs"));
+ topLayout->addRow(i18nc("@label:checkbox", "General:"), m_openExternallyCalledFolderInNewTab);
+ m_showFullPath = new QCheckBox(i18nc("@option:check Startup Settings", "Show full path inside location bar"));
+ topLayout->addRow(QString(), m_showFullPath);
+ m_showFullPathInTitlebar = new QCheckBox(i18nc("@option:check Startup Settings", "Show full path in title bar"));
+ topLayout->addRow(QString(), m_showFullPathInTitlebar);