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
KDE PIM Add-ons
Commits
547833c0
Commit
547833c0
authored
Jul 20, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve plugins
parent
d0ed099c
Pipeline
#27855
failed with stage
in 67 minutes and 17 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
172 additions
and
1 deletion
+172
-1
plugins/messageviewerconfigureplugins/expireaccounttrashfolder/expireaccounttrashfolderconfigdialog.cpp
...counttrashfolder/expireaccounttrashfolderconfigdialog.cpp
+1
-0
plugins/messageviewerconfigureplugins/foldersettings/CMakeLists.txt
...ssageviewerconfigureplugins/foldersettings/CMakeLists.txt
+2
-0
plugins/messageviewerconfigureplugins/foldersettings/folderconfiguresettingsdialog.cpp
...eplugins/foldersettings/folderconfiguresettingsdialog.cpp
+66
-0
plugins/messageviewerconfigureplugins/foldersettings/folderconfiguresettingsdialog.h
...ureplugins/foldersettings/folderconfiguresettingsdialog.h
+37
-0
plugins/messageviewerconfigureplugins/foldersettings/folderconfiguresettingsplugin.cpp
...eplugins/foldersettings/folderconfiguresettingsplugin.cpp
+1
-1
plugins/messageviewerconfigureplugins/foldersettings/folderconfiguresettingswidget.cpp
...eplugins/foldersettings/folderconfiguresettingswidget.cpp
+32
-0
plugins/messageviewerconfigureplugins/foldersettings/folderconfiguresettingswidget.h
...ureplugins/foldersettings/folderconfiguresettingswidget.h
+33
-0
No files found.
plugins/messageviewerconfigureplugins/expireaccounttrashfolder/expireaccounttrashfolderconfigdialog.cpp
View file @
547833c0
...
...
@@ -44,6 +44,7 @@ ExpireAccountTrashFolderConfigDialog::ExpireAccountTrashFolderConfigDialog(QWidg
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Ok
,
this
);
buttonBox
->
setObjectName
(
QStringLiteral
(
"buttonbox"
));
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
ExpireAccountTrashFolderConfigDialog
::
reject
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
ExpireAccountTrashFolderConfigDialog
::
accept
);
mainLayout
->
addWidget
(
buttonBox
);
readConfig
();
}
...
...
plugins/messageviewerconfigureplugins/foldersettings/CMakeLists.txt
View file @
547833c0
set
(
messageviewer_folderconfiguresettingsplugin_SRCS
folderconfiguresettingsplugin.cpp
folderconfiguresettingsdialog.cpp
folderconfiguresettingswidget.cpp
)
kcoreaddons_add_plugin
(
messageviewer_folderconfiguresettingsplugin JSON messageviewer_folderconfiguresettingsplugin.json SOURCES
...
...
plugins/messageviewerconfigureplugins/foldersettings/folderconfiguresettingsdialog.cpp
0 → 100644
View file @
547833c0
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "folderconfiguresettingsdialog.h"
#include <KConfigGroup>
#include <KSharedConfig>
#include <KLocalizedString>
#include <QDialogButtonBox>
#include <QVBoxLayout>
namespace
{
static
const
char
myConfigGroupName
[]
=
"FolderConfigureSettingsDialog"
;
}
FolderConfigureSettingsDialog
::
FolderConfigureSettingsDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
)
{
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainLayout"
));
setWindowTitle
(
i18nc
(
"@title:window"
,
"Configure Expiry Account Trash Folder"
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Ok
,
this
);
buttonBox
->
setObjectName
(
QStringLiteral
(
"buttonbox"
));
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
FolderConfigureSettingsDialog
::
reject
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
FolderConfigureSettingsDialog
::
accept
);
mainLayout
->
addWidget
(
buttonBox
);
readConfig
();
}
FolderConfigureSettingsDialog
::~
FolderConfigureSettingsDialog
()
{
writeConfig
();
}
void
FolderConfigureSettingsDialog
::
readConfig
()
{
KConfigGroup
grp
(
KSharedConfig
::
openConfig
(),
myConfigGroupName
);
const
QSize
size
=
grp
.
readEntry
(
"Size"
,
QSize
(
300
,
200
));
if
(
size
.
isValid
())
{
resize
(
size
);
}
}
void
FolderConfigureSettingsDialog
::
writeConfig
()
{
KConfigGroup
grp
(
KSharedConfig
::
openConfig
(),
myConfigGroupName
);
grp
.
writeEntry
(
"Size"
,
size
());
grp
.
sync
();
}
plugins/messageviewerconfigureplugins/foldersettings/folderconfiguresettingsdialog.h
0 → 100644
View file @
547833c0
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef FOLDERCONFIGURESETTINGSDIALOG_H
#define FOLDERCONFIGURESETTINGSDIALOG_H
#include <QDialog>
class
FolderConfigureSettingsDialog
:
public
QDialog
{
Q_OBJECT
public:
explicit
FolderConfigureSettingsDialog
(
QWidget
*
parent
=
nullptr
);
~
FolderConfigureSettingsDialog
();
private:
void
readConfig
();
void
writeConfig
();
};
#endif // FOLDERCONFIGURESETTINGSDIALOG_H
plugins/messageviewerconfigureplugins/foldersettings/folderconfiguresettingsplugin.cpp
View file @
547833c0
...
...
@@ -34,7 +34,7 @@ FolderConfigureSettingsPlugin::~FolderConfigureSettingsPlugin()
void
FolderConfigureSettingsPlugin
::
showConfigureDialog
(
QWidget
*
parent
)
{
// QPointer<
ExpireAccountTrash
FolderConfigDialog> dlg = new
ExpireAccountTrash
FolderConfigDialog(parent);
// QPointer<FolderConfig
ureSettings
Dialog> dlg = new FolderConfig
ureSettings
Dialog(parent);
// dlg->exec();
// delete dlg;
}
...
...
plugins/messageviewerconfigureplugins/foldersettings/folderconfiguresettingswidget.cpp
0 → 100644
View file @
547833c0
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "folderconfiguresettingswidget.h"
#include <QHBoxLayout>
FolderConfigureSettingsWidget
::
FolderConfigureSettingsWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
}
FolderConfigureSettingsWidget
::~
FolderConfigureSettingsWidget
()
{
}
plugins/messageviewerconfigureplugins/foldersettings/folderconfiguresettingswidget.h
0 → 100644
View file @
547833c0
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef FOLDERCONFIGURESETTINGSWIDGET_H
#define FOLDERCONFIGURESETTINGSWIDGET_H
#include <QWidget>
class
FolderConfigureSettingsWidget
:
public
QWidget
{
Q_OBJECT
public:
explicit
FolderConfigureSettingsWidget
(
QWidget
*
parent
=
nullptr
);
~
FolderConfigureSettingsWidget
();
};
#endif // FOLDERCONFIGURESETTINGSWIDGET_H
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