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
KOrganizer
Commits
c03015bb
Commit
c03015bb
authored
Jul 13, 2020
by
Laurent Montel
😁
Browse files
Prepare to remove KPrefsModule support
parent
5ee9c667
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/prefs/koprefsdialog.cpp
View file @
c03015bb
...
...
@@ -1041,7 +1041,7 @@ Q_DECL_EXPORT KCModule *create_korganizerconfigcolorsandfonts(QWidget *parent, c
////////////////////////////////////////////////////////////////////////////////
KOPrefsDialogGroupScheduling
::
KOPrefsDialogGroupScheduling
(
QWidget
*
parent
)
:
K
PIM
::
KPrefsModule
(
KOPrefs
::
instance
(),
parent
)
:
K
CModule
(
parent
)
{
QBoxLayout
*
topTopLayout
=
new
QVBoxLayout
(
this
);
...
...
@@ -1051,14 +1051,15 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling(QWidget *parent)
QGridLayout
*
topLayout
=
new
QGridLayout
(
topFrame
);
topLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
KPIM
::
KPrefsWidBool
*
useGroupwareBool
=
addWidBool
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
useGroupwareCommunicationItem
(),
topFrame
);
topLayout
->
addWidget
(
useGroupwareBool
->
checkBox
(),
0
,
0
,
1
,
2
);
mUseGroupwareCommunicationCheckBox
=
new
QCheckBox
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
useGroupwareCommunicationItem
()
->
label
(),
this
);
topLayout
->
addWidget
(
mUseGroupwareCommunicationCheckBox
,
0
,
0
,
1
,
2
);
connect
(
mUseGroupwareCommunicationCheckBox
,
&
QCheckBox
::
toggled
,
this
,
&
KOPrefsDialogGroupScheduling
::
slotConfigChanged
);
KPIM
::
KPrefsWidBool
*
bcc
=
addWidBool
(
Akonadi
::
CalendarSettings
::
self
()
->
bccItem
(),
topFrame
);
topLayout
->
addWidget
(
bcc
->
checkBox
(),
1
,
0
,
1
,
2
);
mBccBox
=
new
QCheckBox
(
Akonadi
::
CalendarSettings
::
self
()
->
bccItem
()
->
label
(),
this
);
topLayout
->
addWidget
(
mBccBox
,
1
,
0
,
1
,
2
);
connect
(
mBccBox
,
&
QCheckBox
::
toggled
,
this
,
&
KOPrefsDialogGroupScheduling
::
slotConfigChanged
);
QLabel
*
aTransportLabel
=
new
QLabel
(
i18nc
(
"@label"
,
"Mail transport:"
),
topFrame
);
...
...
@@ -1069,17 +1070,24 @@ KOPrefsDialogGroupScheduling::KOPrefsDialogGroupScheduling(QWidget *parent)
tmw
->
layout
()
->
setContentsMargins
(
0
,
0
,
0
,
0
);
topLayout
->
addWidget
(
tmw
,
3
,
0
,
1
,
2
);
//topLayout->setRowStretch( 2, 1 );
load
();
}
void
KOPrefsDialogGroupScheduling
::
usrReadConfig
()
void
KOPrefsDialogGroupScheduling
::
slotConfigChanged
()
{
Q_EMIT
markAsChanged
();
}
void
KOPrefsDialogGroupScheduling
::
save
()
{
CalendarSupport
::
KCalPrefs
::
instance
()
->
setUseGroupwareCommunication
(
mUseGroupwareCommunicationCheckBox
->
isChecked
());
Akonadi
::
CalendarSettings
::
self
()
->
setBcc
(
mBccBox
->
isChecked
());
}
void
KOPrefsDialogGroupScheduling
::
usrWriteConfig
()
void
KOPrefsDialogGroupScheduling
::
load
()
{
mUseGroupwareCommunicationCheckBox
->
setChecked
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
useGroupwareCommunication
());
mBccBox
->
setChecked
(
Akonadi
::
CalendarSettings
::
self
()
->
bcc
());
}
extern
"C"
...
...
@@ -1094,7 +1102,7 @@ Q_DECL_EXPORT KCModule *create_korganizerconfiggroupscheduling(QWidget *parent,
////////////////////////////////////////////////////////////////////////////////
KOPrefsDialogGroupwareScheduling
::
KOPrefsDialogGroupwareScheduling
(
QWidget
*
parent
)
:
K
Prefs
Module
(
CalendarSupport
::
KCalPrefs
::
instance
(),
parent
)
:
K
C
Module
(
parent
)
{
mGroupwarePage
=
new
Ui
::
KOGroupwarePrefsPage
();
QWidget
*
widget
=
new
QWidget
(
this
);
...
...
@@ -1108,31 +1116,31 @@ KOPrefsDialogGroupwareScheduling::KOPrefsDialogGroupwareScheduling(QWidget *pare
// signals and slots connections
connect
(
mGroupwarePage
->
publishDays
,
qOverload
<
int
>
(
&
QSpinBox
::
valueChanged
),
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
publishUrl
,
&
QLineEdit
::
textChanged
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
publishUser
,
&
QLineEdit
::
textChanged
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
publishPassword
,
&
QLineEdit
::
textChanged
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
publishSavePassword
,
&
QCheckBox
::
toggled
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
retrieveEnable
,
&
QCheckBox
::
toggled
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
retrieveUser
,
&
QLineEdit
::
textChanged
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
retrievePassword
,
&
QLineEdit
::
textChanged
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
retrieveSavePassword
,
&
QCheckBox
::
toggled
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
retrieveUrl
,
&
QLineEdit
::
textChanged
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
publishDelay
,
qOverload
<
int
>
(
&
QSpinBox
::
valueChanged
),
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
fullDomainRetrieval
,
&
QCheckBox
::
toggled
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
connect
(
mGroupwarePage
->
publishEnable
,
&
QCheckBox
::
toggled
,
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Wid
Changed
);
this
,
&
KOPrefsDialogGroupwareScheduling
::
slot
Config
Changed
);
(
new
QVBoxLayout
(
this
))
->
addWidget
(
widget
);
...
...
@@ -1144,7 +1152,12 @@ KOPrefsDialogGroupwareScheduling::~KOPrefsDialogGroupwareScheduling()
delete
mGroupwarePage
;
}
void
KOPrefsDialogGroupwareScheduling
::
usrReadConfig
()
void
KOPrefsDialogGroupwareScheduling
::
slotConfigChanged
()
{
Q_EMIT
changed
(
true
);
}
void
KOPrefsDialogGroupwareScheduling
::
load
()
{
mGroupwarePage
->
publishEnable
->
setChecked
(
Akonadi
::
CalendarSettings
::
self
()
->
freeBusyPublishAuto
());
...
...
@@ -1175,7 +1188,7 @@ void KOPrefsDialogGroupwareScheduling::usrReadConfig()
Akonadi
::
CalendarSettings
::
self
()
->
freeBusyRetrieveSavePassword
());
}
void
KOPrefsDialogGroupwareScheduling
::
usrWriteConfig
()
void
KOPrefsDialogGroupwareScheduling
::
save
()
{
Akonadi
::
CalendarSettings
::
self
()
->
setFreeBusyPublishAuto
(
mGroupwarePage
->
publishEnable
->
isChecked
());
...
...
@@ -1327,8 +1340,7 @@ KOPrefsDialogPlugins::~KOPrefsDialogPlugins()
void
KOPrefsDialogPlugins
::
usrReadConfig
()
{
mTreeWidget
->
clear
();
KService
::
List
plugins
=
KOCore
::
self
()
->
availablePlugins
();
plugins
+=
KOCore
::
self
()
->
availableParts
();
const
KService
::
List
plugins
=
KOCore
::
self
()
->
availablePlugins
()
+
KOCore
::
self
()
->
availableParts
();
EventViews
::
PrefsPtr
viewPrefs
=
KOPrefs
::
instance
()
->
eventViewsPreferences
();
...
...
@@ -1431,7 +1443,7 @@ void KOPrefsDialogPlugins::positioningChanged()
return
;
}
QString
decoration
=
item
->
service
()
->
desktopEntryName
();
const
QString
decoration
=
item
->
service
()
->
desktopEntryName
();
/*if ( mPositionMonthTop->checkState() == Qt::Checked ) {
if ( !mDecorationsAtMonthViewTop.contains( decoration ) ) {
...
...
src/prefs/koprefsdialog.h
View file @
c03015bb
...
...
@@ -48,7 +48,7 @@ class KCM_KORGANIZER_EXPORT KOPrefsDialogMain : public KPIM::KPrefsModule
{
Q_OBJECT
public:
KOPrefsDialogMain
(
QWidget
*
parent
);
explicit
KOPrefsDialogMain
(
QWidget
*
parent
);
protected:
void
usrWriteConfig
()
override
;
...
...
@@ -64,7 +64,7 @@ class KCM_KORGANIZER_EXPORT KOPrefsDialogColorsAndFonts : public KPIM::KPrefsMod
{
Q_OBJECT
public:
KOPrefsDialogColorsAndFonts
(
QWidget
*
parent
);
explicit
KOPrefsDialogColorsAndFonts
(
QWidget
*
parent
);
protected:
void
usrWriteConfig
()
override
;
...
...
@@ -93,31 +93,35 @@ private:
QList
<
KColorButton
*>
mButtonsDisable
;
// button that are disabled when using system color
};
class
KCM_KORGANIZER_EXPORT
KOPrefsDialogGroupScheduling
:
public
K
PIM
::
KPrefs
Module
class
KCM_KORGANIZER_EXPORT
KOPrefsDialogGroupScheduling
:
public
K
C
Module
{
Q_OBJECT
public:
KOPrefsDialogGroupScheduling
(
QWidget
*
parent
);
explicit
KOPrefsDialogGroupScheduling
(
QWidget
*
parent
);
protected:
void
usrWriteConfig
()
override
;
void
usrReadConfig
()
override
;
void
save
()
override
;
void
load
()
override
;
private:
void
slotConfigChanged
();
QCheckBox
*
mUseGroupwareCommunicationCheckBox
=
nullptr
;
QCheckBox
*
mBccBox
=
nullptr
;
};
class
KOGroupwarePrefsPage
;
class
KCM_KORGANIZER_EXPORT
KOPrefsDialogGroupwareScheduling
:
public
K
PIM
::
KPrefs
Module
class
KCM_KORGANIZER_EXPORT
KOPrefsDialogGroupwareScheduling
:
public
K
C
Module
{
Q_OBJECT
public:
KOPrefsDialogGroupwareScheduling
(
QWidget
*
parent
);
explicit
KOPrefsDialogGroupwareScheduling
(
QWidget
*
parent
);
~
KOPrefsDialogGroupwareScheduling
()
override
;
protected:
void
usrWriteConfig
()
override
;
void
usrReadConfig
()
override
;
void
save
()
override
;
void
load
()
override
;
private:
void
slotConfigChanged
();
Ui
::
KOGroupwarePrefsPage
*
mGroupwarePage
=
nullptr
;
};
...
...
@@ -125,7 +129,7 @@ class KCM_KORGANIZER_EXPORT KOPrefsDialogPlugins : public KPIM::KPrefsModule
{
Q_OBJECT
public:
KOPrefsDialogPlugins
(
QWidget
*
parent
);
explicit
KOPrefsDialogPlugins
(
QWidget
*
parent
);
~
KOPrefsDialogPlugins
()
override
;
protected
Q_SLOTS
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment