Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
PIM Sieve Editor
Commits
199d2ee6
Commit
199d2ee6
authored
Dec 30, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new settings
parent
f54510b1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
1 deletion
+91
-1
autotests/CMakeLists.txt
autotests/CMakeLists.txt
+1
-0
autotests/sieveeditorconfiguredialogtest.cpp
autotests/sieveeditorconfiguredialogtest.cpp
+32
-0
autotests/sieveeditorconfiguredialogtest.h
autotests/sieveeditorconfiguredialogtest.h
+32
-0
settings/sieveeditorglobalconfig.kcfg
settings/sieveeditorglobalconfig.kcfg
+6
-0
sieveeditorconfiguredialog.cpp
sieveeditorconfiguredialog.cpp
+17
-1
sieveeditorconfiguredialog.h
sieveeditorconfiguredialog.h
+3
-0
No files found.
autotests/CMakeLists.txt
View file @
199d2ee6
...
...
@@ -35,4 +35,5 @@ macro(add_sieveserver_unittest _source _additionalSource)
endmacro
()
add_sieveserver_unittest
(
sieveeditorconfigureserverpagetest.cpp
"../sieveeditorconfigureserverpage.cpp"
)
add_sieveserver_unittest
(
sieveeditorconfiguredialogtest.cpp
""
)
#add_sieveserver_unittest( sieveeditorbookmarkstest.cpp "../sieveeditorbookmarks.cpp")
autotests/sieveeditorconfiguredialogtest.cpp
0 → 100644
View file @
199d2ee6
/*
Copyright (c) 2015 Montel Laurent <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, version 2, as
published by the Free Software Foundation.
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; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "sieveeditorconfiguredialogtest.h"
#include <QTest>
SieveEditorConfigureDialogTest
::
SieveEditorConfigureDialogTest
(
QObject
*
parent
)
:
QObject
(
parent
)
{
}
SieveEditorConfigureDialogTest
::~
SieveEditorConfigureDialogTest
()
{
}
QTEST_MAIN
(
SieveEditorConfigureDialogTest
)
autotests/sieveeditorconfiguredialogtest.h
0 → 100644
View file @
199d2ee6
/*
Copyright (c) 2015 Montel Laurent <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, version 2, as
published by the Free Software Foundation.
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; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef SIEVEEDITORCONFIGUREDIALOGTEST_H
#define SIEVEEDITORCONFIGUREDIALOGTEST_H
#include <QObject>
class
SieveEditorConfigureDialogTest
:
public
QObject
{
Q_OBJECT
public:
explicit
SieveEditorConfigureDialogTest
(
QObject
*
parent
=
Q_NULLPTR
);
~
SieveEditorConfigureDialogTest
();
};
#endif // SIEVEEDITORCONFIGUREDIALOGTEST_H
settings/sieveeditorglobalconfig.kcfg
View file @
199d2ee6
...
...
@@ -9,4 +9,10 @@
<default>
true
</default>
</entry>
</group>
<group
name=
"Editor"
>
<entry
name=
"WrapText"
type=
"bool"
>
<default>
false
</default>
</entry>
</group>
</kcfg>
sieveeditorconfiguredialog.cpp
View file @
199d2ee6
...
...
@@ -46,7 +46,13 @@ SieveEditorConfigureDialog::SieveEditorConfigureDialog(QWidget *parent)
okButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
SieveEditorConfigureDialog
::
accept
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
SieveEditorConfigureDialog
::
reject
);
mTabWidget
=
new
QTabWidget
(
this
);
mTabWidget
->
setObjectName
(
QStringLiteral
(
"tabwidget"
));
//Server page
QGroupBox
*
w
=
new
QGroupBox
(
i18n
(
"Sieve Server"
));
mTabWidget
->
addTab
(
w
,
i18n
(
"Sieve Server"
));
QVBoxLayout
*
layout
=
new
QVBoxLayout
;
w
->
setLayout
(
layout
);
...
...
@@ -56,7 +62,17 @@ SieveEditorConfigureDialog::SieveEditorConfigureDialog(QWidget *parent)
mCloseWallet
=
new
QCheckBox
(
i18n
(
"Close wallet when close application"
));
layout
->
addWidget
(
mCloseWallet
);
mainLayout
->
addWidget
(
w
);
QWidget
*
editorWidget
=
new
QWidget
;
editorWidget
->
setObjectName
(
QStringLiteral
(
"editorwidget"
));
mTabWidget
->
addTab
(
editorWidget
,
i18n
(
"Editor"
));
layout
=
new
QVBoxLayout
;
editorWidget
->
setLayout
(
layout
);
mWrapText
=
new
QCheckBox
(
i18n
(
"Wrap Text"
));
mWrapText
->
setObjectName
(
QStringLiteral
(
"wraptext"
));
layout
->
addWidget
(
mWrapText
);
mainLayout
->
addWidget
(
mTabWidget
);
mainLayout
->
addWidget
(
buttonBox
);
loadServerSieveConfig
();
readConfig
();
...
...
sieveeditorconfiguredialog.h
View file @
199d2ee6
...
...
@@ -23,6 +23,7 @@
#include <QDialog>
class
QCheckBox
;
class
QTabWidget
;
class
SieveEditorConfigureServerWidget
;
class
SieveEditorConfigureDialog
:
public
QDialog
{
...
...
@@ -39,6 +40,8 @@ private:
void
loadServerSieveConfig
();
SieveEditorConfigureServerWidget
*
mServerWidget
;
QCheckBox
*
mCloseWallet
;
QCheckBox
*
mWrapText
;
QTabWidget
*
mTabWidget
;
};
#endif // SIEVEEDITORCONFIGUREDIALOG_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