Commit 1e919a19 authored by Christoph Cullmann's avatar Christoph Cullmann

start to port sql plugin

parent 475185fe
if(NOT KDE4_FOUND)
find_package(KDE4 REQUIRED)
include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES} )
endif(NOT KDE4_FOUND)
project(katesqlplugin)
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
......@@ -24,15 +21,21 @@ set(katesql_SRCS
outputwidget.cpp
)
kde4_add_plugin(katesqlplugin ${katesql_SRCS})
add_library (katesqlplugin MODULE ${katesql_SRCS})
add_subdirectory(pics)
target_link_libraries(katesqlplugin ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTSQL_LIBRARY} kateinterfaces ktexteditor )
target_link_libraries(katesqlplugin
KF5::TextEditor
KF5::Parts KF5::I18n
Qt5::Script KF5::ItemViews KF5::IconThemes)
install(TARGETS katesqlplugin DESTINATION ${PLUGIN_INSTALL_DIR} )
########### install files ###############
install( FILES ui.rc DESTINATION ${DATA_INSTALL_DIR}/kate/plugins/katesql )
install( FILES ui.rc DESTINATION ${DATA_INSTALL_DIR}/katesql )
kservice_desktop_to_json (katesql.desktop)
install( FILES katesql.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
......@@ -20,9 +20,6 @@
#include "katesqlconfigpage.h"
#include "katesqlview.h"
#include <kate/plugin.h>
#include <kate/mainwindow.h>
#include <kate/documentmanager.h>
#include <ktexteditor/document.h>
#include <kpluginloader.h>
......
......@@ -19,17 +19,15 @@
#ifndef KATESQLPLUGIN_H
#define KATESQLPLUGIN_H
#include <ktexteditor/view.h>
#include <kate/plugin.h>
#include <kate/application.h>
#include <kate/mainwindow.h>
#include <ktexteditor/plugin.h>
#include <ktexteditor/application.h>
#include <ktexteditor/mainwindow.h>
#include <ktexteditor/configpageinterface.h>
#include <kpluginfactory.h>
class KateSQLPlugin : public Kate::Plugin, public KTextEditor::ConfigPageInterface
class KateSQLPlugin : public KTextEditor::Plugin, public KTextEditor::ConfigPageInterface
{
Q_OBJECT
Q_INTERFACES(KTextEditor::ConfigPageInterface)
......@@ -39,21 +37,19 @@ class KateSQLPlugin : public Kate::Plugin, public KTextEditor::ConfigPageInterfa
virtual ~KateSQLPlugin();
Kate::PluginView *createView(Kate::MainWindow *mainWindow);
QObject *createView(KTextEditor::MainWindow *mainWindow);
// PluginConfigPageInterface
uint configPages() const { return 1; };
KTextEditor::ConfigPage *configPage (uint number = 0, QWidget *parent = 0, const char *name = 0);
QString configPageName (uint number = 0) const;
QString configPageFullName (uint number = 0) const;
KIcon configPageIcon (uint number = 0) const;
int configPages() const { return 1; };
KTextEditor::ConfigPage *configPage (int number = 0, QWidget *parent = 0, const char *name = 0);
QString configPageName (int number = 0) const;
QString configPageFullName (int number = 0) const;
KIcon configPageIcon (int number = 0) const;
Q_SIGNALS:
void globalSettingsChanged();
};
K_PLUGIN_FACTORY_DECLARATION(KateSQLFactory)
#endif // KATESQLPLUGIN_H
......@@ -29,15 +29,16 @@ class KComboBox;
class QSqlQuery;
class QActionGroup;
#include <kate/plugin.h>
#include <kate/mainwindow.h>
#include <KXMLGUIClient>
class KateSQLView : public Kate::PluginView, public Kate::XMLGUIClient
#include <ktexteditor/mainwindow.h>
class KateSQLView : public QObject, public KXMLGUIClient
{
Q_OBJECT
public:
explicit KateSQLView(Kate::MainWindow *mw);
explicit KateSQLView(KTextEditor::MainWindow *mw);
~KateSQLView();
void readSessionConfig (KConfigBase* config, const QString& groupPrefix);
......
kde4_install_icons( ${DATA_INSTALL_DIR}/kate/icons )
ecm_install_icons ( ${ICON_INSTALL_DIR} )
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