示例#1
0
void PluginKateHtmlTools::addView(Kate::MainWindow *win)
{
    // TODO: doesn't this have to be deleted?
    PluginView *view = new PluginView ();

     (void)  new KAction ( i18n("HT&ML Tag..."), /*"edit_HTML_tag",*/ ALT + Key_Minus, this,
                                SLOT( slotEditHTMLtag() ), view->actionCollection(), "edit_HTML_tag" );

    view->setInstance (new KInstance("kate"));
    view->setXMLFile( "plugins/katehtmltools/ui.rc" );
    win->guiFactory()->addClient (view);
    view->win = win;

   m_views.append (view);
}
示例#2
0
void KatePluginHelloWorld::addView(Kate::MainWindow *win)
{
    // TODO: doesn't this have to be deleted?
    PluginView *view = new PluginView ();
             
     (void) new KAction ( i18n("Insert Hello World"), 0, this,
                      SLOT( slotInsertHello() ), view->actionCollection(),
                      "edit_insert_helloworld" );
    
    view->setInstance (new KInstance("kate"));
    view->setXMLFile("plugins/katehelloworld/ui.rc");
    win->guiFactory()->addClient (view);
    view->win = win; 
    
   m_views.append (view);
}