You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdevelop/parts/partexplorer/partexplorer_plugin.cpp

66 lines
2.4 KiB

/***************************************************************************
* Copyright (C) 2003 by Mario Scalas *
* mario.scalas@libero.it *
* *
* 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. *
* *
***************************************************************************/
#include "partexplorer_plugin.h"
#include <kinstance.h>
#include <tdelocale.h>
#include <tdevgenericfactory.h>
#include <kdebug.h>
#include <tdeaction.h>
#include <tdemainwindow.h>
#include <tdevplugininfo.h>
#include <tdevmainwindow.h>
#include "partexplorerform.h"
static const TDevPluginInfo data("tdevpartexplorer");
typedef TDevGenericFactory<PartExplorerPlugin> PartExplorerPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libtdevpartexplorer, PartExplorerPluginFactory( data ) )
PartExplorerPlugin::PartExplorerPlugin( TQObject *parent, const char *name, const TQStringList & )
: TDevPlugin( &data, parent, name ? name : "PartExplorerPlugin" )
{
// we need an instance
setInstance( PartExplorerPluginFactory::instance() );
setXMLFile( "tdevpartexplorer.rc" );
// this should be your custom internal widget
m_widget = new PartExplorerForm( mainWindow()->main() );
// mainWindow()->embedSelectView( m_widget, i18n("PartExplorer"), i18n("Query system services"));
TDEAction *action = new TDEAction( i18n("&Part Explorer"), 0, this, TQT_SLOT(slotShowForm()),
actionCollection(), "show_partexplorerform" );
action->setToolTip(i18n("TDETrader query execution"));
action->setWhatsThis(i18n("<b>Part explorer</b><p>Shows a dialog for TDETrader query execution. Search your TDE documentation for more information about TDE services and TDETrader."));
}
PartExplorerPlugin::~PartExplorerPlugin()
{
/*
if (m_widget)
{
mainWindow()->removeView( m_widget );
}
*/
//delete m_widget;
}
void PartExplorerPlugin::slotShowForm()
{
m_widget->show();
}
#include "partexplorer_plugin.moc"