Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KOrganizer
Commits
47e3a516
Commit
47e3a516
authored
Jul 13, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port KOPrefsDialogPlugins to KCModule
parent
c03015bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
src/prefs/koprefsdialog.cpp
src/prefs/koprefsdialog.cpp
+12
-7
src/prefs/koprefsdialog.h
src/prefs/koprefsdialog.h
+5
-3
No files found.
src/prefs/koprefsdialog.cpp
View file @
47e3a516
...
...
@@ -1266,7 +1266,7 @@ private:
Dialog for selecting and configuring KOrganizer plugins
*/
KOPrefsDialogPlugins
::
KOPrefsDialogPlugins
(
QWidget
*
parent
)
:
K
Prefs
Module
(
KOPrefs
::
instance
(),
parent
)
:
K
C
Module
(
parent
)
{
QBoxLayout
*
topTopLayout
=
new
QVBoxLayout
(
this
);
mTreeWidget
=
new
QTreeWidget
(
this
);
...
...
@@ -1324,7 +1324,7 @@ KOPrefsDialogPlugins::KOPrefsDialogPlugins(QWidget *parent)
connect
(
mTreeWidget
,
&
QTreeWidget
::
itemSelectionChanged
,
this
,
&
KOPrefsDialogPlugins
::
selectionChanged
);
connect
(
mTreeWidget
,
&
QTreeWidget
::
itemChanged
,
this
,
&
KOPrefsDialogPlugins
::
selectionChanged
);
connect
(
mTreeWidget
,
&
QTreeWidget
::
itemClicked
,
this
,
&
KOPrefsDialogPlugins
::
slot
Wid
Changed
);
connect
(
mTreeWidget
,
&
QTreeWidget
::
itemClicked
,
this
,
&
KOPrefsDialogPlugins
::
slot
Config
Changed
);
load
();
...
...
@@ -1337,7 +1337,12 @@ KOPrefsDialogPlugins::~KOPrefsDialogPlugins()
delete
mOthers
;
}
void
KOPrefsDialogPlugins
::
usrReadConfig
()
void
KOPrefsDialogPlugins
::
slotConfigChanged
()
{
Q_EMIT
markAsChanged
();
}
void
KOPrefsDialogPlugins
::
load
()
{
mTreeWidget
->
clear
();
const
KService
::
List
plugins
=
KOCore
::
self
()
->
availablePlugins
()
+
KOCore
::
self
()
->
availableParts
();
...
...
@@ -1386,7 +1391,7 @@ void KOPrefsDialogPlugins::usrReadConfig()
#endif
}
void
KOPrefsDialogPlugins
::
usrWriteConfig
()
void
KOPrefsDialogPlugins
::
save
()
{
QStringList
selectedPlugins
;
...
...
@@ -1424,7 +1429,7 @@ void KOPrefsDialogPlugins::configure()
plugin
->
configure
(
this
);
delete
plugin
;
slot
Wid
Changed
();
slot
Config
Changed
();
}
else
{
KMessageBox
::
sorry
(
this
,
i18nc
(
"@info"
,
"Unable to configure this plugin"
),
...
...
@@ -1469,7 +1474,7 @@ void KOPrefsDialogPlugins::positioningChanged()
mDecorationsAtAgendaViewBottom
.
remove
(
decoration
);
}
slot
Wid
Changed
();
slot
Config
Changed
();
}
void
KOPrefsDialogPlugins
::
selectionChanged
()
...
...
@@ -1535,7 +1540,7 @@ void KOPrefsDialogPlugins::selectionChanged()
mPositioningGroupBox
->
show
();
}
slot
Wid
Changed
();
slot
Config
Changed
();
}
extern
"C"
...
...
src/prefs/koprefsdialog.h
View file @
47e3a516
...
...
@@ -125,21 +125,23 @@ private:
Ui
::
KOGroupwarePrefsPage
*
mGroupwarePage
=
nullptr
;
};
class
KCM_KORGANIZER_EXPORT
KOPrefsDialogPlugins
:
public
K
PIM
::
KPrefs
Module
class
KCM_KORGANIZER_EXPORT
KOPrefsDialogPlugins
:
public
K
C
Module
{
Q_OBJECT
public:
explicit
KOPrefsDialogPlugins
(
QWidget
*
parent
);
~
KOPrefsDialogPlugins
()
override
;
void
save
()
override
;
void
load
()
override
;
protected
Q_SLOTS
:
void
usrWriteConfig
()
override
;
void
usrReadConfig
()
override
;
void
configure
();
void
selectionChanged
();
void
positioningChanged
();
private:
void
slotConfigChanged
();
void
buildList
();
QTreeWidget
*
mTreeWidget
=
nullptr
;
QLabel
*
mDescription
=
nullptr
;
...
...
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