Your SlideShare is downloading. ×
0
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Writing plugins for Kate and enhancing Kate

3,311

Published on

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.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,311
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Writing Kate plugins and enhancing Kate
  • 2. About me <ul><li>Abhishek Patil (http://thezeroth.net)
  • 3. Software Engineer
  • 4. Vcreate Logic Pvt. Ltd (http://vcreatelogic.com)
  • 5. @abhishekworld </li></ul>
  • 6. Why me? <ul><li>A Qt/KDE developer
  • 7. Mainly contributes to Kate
  • 8. Tabify Plugin for kate (KDE 4.5)
  • 9. And other features from kate's wishlist (KDE 4.5) </li></ul>
  • 10. Aim of this talk! <ul><li>Understand how kate plugins are written
  • 11. Create Tabify Plugin </li></ul>
  • 12. Kate Application base <ul><li>Plugin Architecture
  • 13. Based on KParts </li></ul>
  • 14. Important classes in KATE <ul><li>Kate::Application
  • 15. Kate::MainWindow
  • 16. Kate::DocumentManager
  • 17. Kate::PluginManager
  • 18. Kate::Plugin
  • 19. Kate::PluginView
  • 20. Kate::PluginConfigPageInterface </li></ul>
  • 21. Bacis of Kate Plugin <ul><li>3 Important Files in Kate Plugin </li><ul><li>A desktop file with some information about the plugin
  • 22. An XmlGui rc file named ui.rc
  • 23. A library containing the plugin </li></ul></ul>
  • 24. 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
  • 25. 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
  • 26. <ul><ul><li>The Library </li></ul></ul>class MyPlugin : public Kate::Plugin { Q_OBJECT public: // other methods etc... PluginView *createView(MainWindow *mainWindow) { return new MyPluginView(mainWindow); } };
  • 27. <ul><ul><li>… </li></ul></ul>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() };
  • 28. Code http://websvn.kde.org/trunk/KDE/kdesdk/kate/plugins/tabify/
  • 29. 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})
  • 30. Referances <ul><li>http://api.kde.org/4.x-api/kdesdk-apidocs/kate/interfaces/kate/html/index.html
  • 31. http://kate-editor.org/2004/01/06/writing-a-kate-plugin/
  • 32. http://kate-editor.org/featured-articles/ </li></ul>
  • 33. Thank You.... Questions??? [email_address] @abhishekworld http://thezeroth.net

×