Writing plugins for Kate and enhancing Kate
Upcoming SlideShare
Loading in...5
×
 

Writing plugins for Kate and enhancing Kate

on

  • 3,827 views

My 1st presentation Presentation at Foss.in 2010 on Writing plugins for Kate and enhancing Kate.

My 1st presentation Presentation at Foss.in 2010 on Writing plugins for Kate and enhancing Kate.

Statistics

Views

Total Views
3,827
Views on SlideShare
2,964
Embed Views
863

Actions

Likes
1
Downloads
10
Comments
0

2 Embeds 863

http://thezeroth.net 862
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Writing plugins for Kate and enhancing Kate Writing plugins for Kate and enhancing Kate Presentation Transcript

    • Writing Kate plugins and enhancing Kate
    • About me
      • Abhishek Patil (http://thezeroth.net)
      • Software Engineer
      • Vcreate Logic Pvt. Ltd (http://vcreatelogic.com)
      • @abhishekworld
    • Why me?
      • A Qt/KDE developer
      • Mainly contributes to Kate
      • Tabify Plugin for kate (KDE 4.5)
      • And other features from kate's wishlist (KDE 4.5)
    • Aim of this talk!
      • Understand how kate plugins are written
      • Create Tabify Plugin
    • Kate Application base
      • Plugin Architecture
      • Based on KParts
    • Important classes in KATE
      • Kate::Application
      • Kate::MainWindow
      • Kate::DocumentManager
      • Kate::PluginManager
      • Kate::Plugin
      • Kate::PluginView
      • Kate::PluginConfigPageInterface
    • Bacis of Kate Plugin
      • 3 Important Files in Kate Plugin
        • A desktop file with some information about the plugin
        • An XmlGui rc file named ui.rc
        • A library containing the plugin
    • Desktop File [Desktop Entry] Encoding=UTF-8 X-Kate-Version=2.8 X-KDE-Library=katetabifyplugin ServiceTypes=Kate/Plugin Type=Service Icon=korganizer Name=Tabify X-Kate-MajorProfiles=Kate X-Kate-MinorProfiles=* Name of the files has to be in kate” yourpluginname”.desktop format. katetabify.desktop IMPORTANT
    • XmlGUI file <!DOCTYPE kpartgui> <gui name=&quot;tabifyplugin&quot; library=&quot;katetabifyplugin&quot; version=&quot;1&quot;> <ToolBar> <text>Tabify Plugin</text> <Action name=&quot;tabbar_widget&quot;/> </ToolBar> </gui> The name of this file has to be ui.rc
        • The Library
      class MyPlugin : public Kate::Plugin { Q_OBJECT public: // other methods etc... PluginView *createView(MainWindow *mainWindow) { return new MyPluginView(mainWindow); } };
      class MyPluginView : public Kate::PluginView { Q_OBJECT public: MyPluginView(MainWindow *mainWindow); // possibilities of gui: // - hook into the menus with KXMLGUIClient // - create a toolView and put a widget into it // with MainWindow::createToolView() };
    • Code http://websvn.kde.org/trunk/KDE/kdesdk/kate/plugins/tabify/
    • Compile your plugin CMakeList.txt find_package(KDE4 REQUIRED) include (KDE4Defaults) include_directories(${KDE4_INCLUDES}) kde4_add_plugin(katetabifyplugin tabify.cpp) target_link_libraries(katetabifyplugin ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS} kateinterfaces) install(TARGETS katetabifyplugin DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES ui.rc DESTINATION ${DATA_INSTALL_DIR}/kate/plugins/katetabify) install(FILES katetabifyplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR})
    • Referances
      • http://api.kde.org/4.x-api/kdesdk-apidocs/kate/interfaces/kate/html/index.html
      • http://kate-editor.org/2004/01/06/writing-a-kate-plugin/
      • http://kate-editor.org/featured-articles/
    • Thank You.... Questions??? [email_address] @abhishekworld http://thezeroth.net