Commit 28c1b395 authored by Alexander Semke's avatar Alexander Semke
Browse files

Fixed the layout in qalculate settings widget to look the same like the...

Fixed the layout in qalculate settings widget to look the same like the settings widgets for all other backends,
moved the autorun options to a new tab and added a tab for the documentation.
parent 7db0d041
......@@ -16,6 +16,8 @@ set( QalculateBackend_SRCS
qalculateextensions.cpp
qalculatecompletionobject.cpp
qalculateextensions.cpp
qalculatesettingswidget.cpp
../backendsettingswidget.cpp
)
kconfig_add_kcfg_files(QalculateBackend_SRCS settings.kcfgc)
......@@ -26,9 +28,9 @@ ki18n_wrap_ui(QalculateBackend_SRCS settings.ui)
add_backend(qalculatebackend ${QalculateBackend_SRCS})
if (QALCULATE_VERSION VERSION_LESS 2.0.0)
target_link_libraries( cantor_qalculatebackend cantorlibs ${QALCULATE_LIBRARIES} ${CLN_LIBRARIES})
target_link_libraries( cantor_qalculatebackend cantorlibs cantor_help ${QALCULATE_LIBRARIES} ${CLN_LIBRARIES})
else()
target_link_libraries( cantor_qalculatebackend cantorlibs ${QALCULATE_LIBRARIES})
target_link_libraries( cantor_qalculatebackend cantorlibs cantor_help ${QALCULATE_LIBRARIES})
endif()
install( FILES cantor_qalculate.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR} )
......@@ -6,13 +6,10 @@
*/
#include "qalculatebackend.h"
// settings.h must be included before qalculatesession.h
#include "ui_settings.h"
#include "settings.h"
#include "settings.h" // settings.h must be included before qalculatesession.h
#include "qalculatesession.h"
#include "qalculateextensions.h"
#include "qalculatesettingswidget.h"
#include <KLocalizedString>
......@@ -75,11 +72,7 @@ KConfigSkeleton* QalculateBackend::config() const
QWidget* QalculateBackend::settingsWidget(QWidget* parent) const
{
QWidget* widget = new QWidget(parent);
Ui::QalculateSettingsBase s;
s.setupUi(widget);
return widget;
return new QalculateSettingsWidget(parent, id());
}
K_PLUGIN_FACTORY_WITH_JSON(qalculatebackend, "qalculatebackend.json", registerPlugin<QalculateBackend>();)
......
/*
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; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
---
Copyright (C) 2021 Alexander Semke <alexander.semke@web.de>
*/
#include "qalculatesettingswidget.h"
QalculateSettingsWidget::QalculateSettingsWidget(QWidget* parent, const QString& id) : BackendSettingsWidget(parent, id)
{
setupUi(this);
m_tabWidget = tabWidget;
m_tabDocumentation = tabDocumentation;
connect(tabWidget, &QTabWidget::currentChanged, this, &BackendSettingsWidget::tabChanged);
}
/*
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; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
---
Copyright (C) 2021 Alexander Semke <alexander.semke@web.de>
*/
#ifndef QALCULATESETTINGSWIDGET_H
#define QALCULATESETTINGSWIDGET_H
#include "ui_settings.h"
#include "../backendsettingswidget.h"
class QalculateSettingsWidget : public BackendSettingsWidget, public Ui::QalculateSettingsBase
{
Q_OBJECT
public:
explicit QalculateSettingsWidget(QWidget* parent = nullptr, const QString& id = QString());
};
#endif
This diff is collapsed.
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