Commit 199d2ee6 authored by Laurent Montel's avatar Laurent Montel 😁

Add new settings

parent f54510b1
......@@ -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")
/*
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)
/*
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
......@@ -9,4 +9,10 @@
<default>true</default>
</entry>
</group>
<group name="Editor">
<entry name="WrapText" type="bool">
<default>false</default>
</entry>
</group>
</kcfg>
......@@ -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();
......
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment