Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Runtime
Commits
7614b601
Commit
7614b601
authored
Aug 12, 2021
by
Carl Schwan
🚴
Committed by
Laurent Montel
Aug 16, 2021
Browse files
Port Dav config dialog to QFormLayout when possible
parent
0f7e3a54
Changes
3
Hide whitespace changes
Inline
Side-by-side
resources/dav/resource/configdialog.cpp
View file @
7614b601
...
...
@@ -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
);
...
...
resources/dav/resource/configdialog.ui
View file @
7614b601
...
...
@@ -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=
"t
itle
"
>
<string>
Server Configuration
</string>
<property
name=
"t
ext
"
>
<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>
...
...
resources/dav/resource/urlconfigurationdialog.ui
View file @
7614b601
...
...
@@ -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=
"Q
GroupBox
"
name=
"remoteProtocol"
>
<property
name=
"
locale
"
>
<
locale
language=
"English"
country=
"UnitedStates"
/
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"Q
Label
"
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
&
V
</string>
</property>
<property
name=
"c
urrent"
stdset=
"0
"
>
<
number>
0
</number
>
<property
name=
"c
hecked
"
>
<
bool>
true
</bool
>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QRadioButton"
name=
"caldav"
>
<property
name=
"text"
>
<string>
CalDA
&
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=
"Q
GroupBox"
name=
"groupBox_2
"
>
<property
name=
"
locale
"
>
<
locale
language=
"English"
country=
"UnitedStates"
/
>
<item
row=
"1"
column=
"1"
>
<widget
class=
"Q
RadioButton"
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"
/>
</item>