Commit 5cda0195 authored by Carl Schwan's avatar Carl Schwan 🚴
Browse files

Port Dav config dialog to QFormLayout when possible

parent ee060de3
Pipeline #75028 failed with stage
in 24 minutes and 51 seconds
......@@ -27,6 +27,7 @@ ConfigDialog::ConfigDialog(QWidget *parent)
: QDialog(parent)
{
setWindowIcon(QIcon::fromTheme(QStringLiteral("folder-remote")));
setWindowTitle(i18nc("@title:window", "Dav resource configuration dialog"));
auto mainLayout = new QVBoxLayout(this);
auto mainWidget = new QWidget(this);
mainLayout->addWidget(mainWidget);
......
......@@ -10,10 +10,7 @@
<height>547</height>
</rect>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<layout class="QFormLayout" name="formLayout">
<property name="leftMargin">
<number>0</number>
</property>
......@@ -26,286 +23,226 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>General Configuration</string>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Display name:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="kcfg_displayName"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Refresh every:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSpinBox" name="kcfg_refreshInterval">
<property name="specialValueText">
<string>Never</string>
</property>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>minutes</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Username:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="2,1">
<item>
<widget class="QLineEdit" name="kcfg_defaultUsername">
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Password:</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>Display name:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="kcfg_displayName"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>Refresh every:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSpinBox" name="kcfg_refreshInterval">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="specialValueText">
<string>Never</string>
</property>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>minutes</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>Username:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="2,1">
<item>
<widget class="QLineEdit" name="kcfg_defaultUsername">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>Password:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="2,1">
<item>
<widget class="KPasswordLineEdit" name="password">
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="locale">
<locale language="English" country="UnitedStates"/>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="2,1">
<item>
<widget class="KPasswordLineEdit" name="password">
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="kcfg_limitSyncRange">
<property name="toolTip">
<string>Select this if your calendars contain a lot of events and the server cannot fulfill the requests</string>
</property>
<property name="title">
<string>Server Configuration</string>
<property name="text">
<string>Limit CalDav retrieval time range</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QTreeView" name="configuredUrls"/>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="addButton">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="searchButton">
<property name="text">
<string>Search</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="removeButton">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="editButton">
<property name="text">
<string>Edit</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Synchronization</string>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_5">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Only sync events more recent than</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="kcfg_syncRangeStartNumber">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="syncRangeStartType">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="6" column="0" colspan="2">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Server Configuration:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="kcfg_limitSyncRange">
<property name="toolTip">
<string>Select this if your calendars contain a lot of events and the server cannot fulfill the requests</string>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>Limit CalDav retrieval time range</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_5">
<property name="enabled">
<bool>false</bool>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>Only sync events more recent than</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="kcfg_syncRangeStartNumber">
<property name="enabled">
<bool>false</bool>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="syncRangeStartType">
<property name="enabled">
<bool>false</bool>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="7" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QTreeView" name="configuredUrls"/>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="addButton">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="searchButton">
<property name="text">
<string>Search</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="removeButton">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="editButton">
<property name="text">
<string>Edit</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>559</width>
<width>800</width>
<height>698</height>
</rect>
</property>
......@@ -16,10 +16,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<layout class="QFormLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
......@@ -32,178 +29,154 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="remoteProtocol">
<property name="locale">
<locale language="English" country="UnitedStates"/>
<item row="0" column="0">
<widget class="QLabel" name="remoteProtocol">
<property name="text">
<string>Access protocol:</string>
</property>
<property name="title">
<string>Remote calendar access protocol</string>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="caldav">
<property name="text">
<string>CalDA&amp;V</string>
</property>
<property name="current" stdset="0">
<number>0</number>
<property name="checked">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="caldav">
<property name="text">
<string>CalDA&amp;V</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="carddav">
<property name="text">
<string>CardDAV</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="groupdav">
<property name="text">
<string>GroupDAV</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="locale">
<locale language="English" country="UnitedStates"/>
<item row="1" column="1">
<widget class="QRadioButton" name="carddav">
<property name="text">
<string>CardDAV</string>
</property>
<property name="title">
<string>Remote calendar access</string>
</widget>
</item>
<item row="2" column="1">
<widget class="QRadioButton" name="groupdav">
<property name="text">
<string>GroupDAV</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="1">
<widget class="QLineEdit" name="remoteUrl"/>