|
|
@ -62,7 +62,7 @@ KOCore::~KOCore()
|
|
|
|
mSelf = 0;
|
|
|
|
mSelf = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KTrader::OfferList KOCore::availablePlugins( const TQString &type, int version )
|
|
|
|
TDETrader::OfferList KOCore::availablePlugins( const TQString &type, int version )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString constraint;
|
|
|
|
TQString constraint;
|
|
|
|
if ( version >= 0 ) {
|
|
|
|
if ( version >= 0 ) {
|
|
|
@ -70,28 +70,28 @@ KTrader::OfferList KOCore::availablePlugins( const TQString &type, int version )
|
|
|
|
.arg( TQString::number( version ) );
|
|
|
|
.arg( TQString::number( version ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return KTrader::self()->query( type, constraint );
|
|
|
|
return TDETrader::self()->query( type, constraint );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KTrader::OfferList KOCore::availablePlugins()
|
|
|
|
TDETrader::OfferList KOCore::availablePlugins()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return availablePlugins( KOrg::Plugin::serviceType(),
|
|
|
|
return availablePlugins( KOrg::Plugin::serviceType(),
|
|
|
|
KOrg::Plugin::interfaceVersion() );
|
|
|
|
KOrg::Plugin::interfaceVersion() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KTrader::OfferList KOCore::availableCalendarDecorations()
|
|
|
|
TDETrader::OfferList KOCore::availableCalendarDecorations()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return availablePlugins( KOrg::CalendarDecoration::serviceType(),
|
|
|
|
return availablePlugins( KOrg::CalendarDecoration::serviceType(),
|
|
|
|
KOrg::CalendarDecoration::interfaceVersion() );
|
|
|
|
KOrg::CalendarDecoration::interfaceVersion() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KTrader::OfferList KOCore::availableParts()
|
|
|
|
TDETrader::OfferList KOCore::availableParts()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return availablePlugins( KOrg::Part::serviceType(),
|
|
|
|
return availablePlugins( KOrg::Part::serviceType(),
|
|
|
|
KOrg::Part::interfaceVersion() );
|
|
|
|
KOrg::Part::interfaceVersion() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KTrader::OfferList KOCore::availablePrintPlugins()
|
|
|
|
TDETrader::OfferList KOCore::availablePrintPlugins()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return availablePlugins( KOrg::PrintPlugin::serviceType(),
|
|
|
|
return availablePlugins( KOrg::PrintPlugin::serviceType(),
|
|
|
|
KOrg::PrintPlugin::interfaceVersion() );
|
|
|
|
KOrg::PrintPlugin::interfaceVersion() );
|
|
|
@ -126,8 +126,8 @@ KOrg::Plugin *KOCore::loadPlugin( KService::Ptr service )
|
|
|
|
|
|
|
|
|
|
|
|
KOrg::Plugin *KOCore::loadPlugin( const TQString &name )
|
|
|
|
KOrg::Plugin *KOCore::loadPlugin( const TQString &name )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KTrader::OfferList list = availablePlugins();
|
|
|
|
TDETrader::OfferList list = availablePlugins();
|
|
|
|
KTrader::OfferList::ConstIterator it;
|
|
|
|
TDETrader::OfferList::ConstIterator it;
|
|
|
|
for( it = list.begin(); it != list.end(); ++it ) {
|
|
|
|
for( it = list.begin(); it != list.end(); ++it ) {
|
|
|
|
if ( (*it)->desktopEntryName() == name ) {
|
|
|
|
if ( (*it)->desktopEntryName() == name ) {
|
|
|
|
return loadPlugin( *it );
|
|
|
|
return loadPlugin( *it );
|
|
|
@ -160,8 +160,8 @@ KOrg::CalendarDecoration *KOCore::loadCalendarDecoration(KService::Ptr service)
|
|
|
|
|
|
|
|
|
|
|
|
KOrg::CalendarDecoration *KOCore::loadCalendarDecoration( const TQString &name )
|
|
|
|
KOrg::CalendarDecoration *KOCore::loadCalendarDecoration( const TQString &name )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KTrader::OfferList list = availableCalendarDecorations();
|
|
|
|
TDETrader::OfferList list = availableCalendarDecorations();
|
|
|
|
KTrader::OfferList::ConstIterator it;
|
|
|
|
TDETrader::OfferList::ConstIterator it;
|
|
|
|
for( it = list.begin(); it != list.end(); ++it ) {
|
|
|
|
for( it = list.begin(); it != list.end(); ++it ) {
|
|
|
|
if ( (*it)->desktopEntryName() == name ) {
|
|
|
|
if ( (*it)->desktopEntryName() == name ) {
|
|
|
|
return loadCalendarDecoration( *it );
|
|
|
|
return loadCalendarDecoration( *it );
|
|
|
@ -246,8 +246,8 @@ KXMLGUIClient* KOCore::xmlguiClient( TQWidget *wdg ) const
|
|
|
|
|
|
|
|
|
|
|
|
KOrg::Part *KOCore::loadPart( const TQString &name, KOrg::MainWindow *parent )
|
|
|
|
KOrg::Part *KOCore::loadPart( const TQString &name, KOrg::MainWindow *parent )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KTrader::OfferList list = availableParts();
|
|
|
|
TDETrader::OfferList list = availableParts();
|
|
|
|
KTrader::OfferList::ConstIterator it;
|
|
|
|
TDETrader::OfferList::ConstIterator it;
|
|
|
|
for( it = list.begin(); it != list.end(); ++it ) {
|
|
|
|
for( it = list.begin(); it != list.end(); ++it ) {
|
|
|
|
if ( (*it)->desktopEntryName() == name ) {
|
|
|
|
if ( (*it)->desktopEntryName() == name ) {
|
|
|
|
return loadPart( *it, parent );
|
|
|
|
return loadPart( *it, parent );
|
|
|
@ -258,8 +258,8 @@ KOrg::Part *KOCore::loadPart( const TQString &name, KOrg::MainWindow *parent )
|
|
|
|
|
|
|
|
|
|
|
|
KOrg::PrintPlugin *KOCore::loadPrintPlugin( const TQString &name )
|
|
|
|
KOrg::PrintPlugin *KOCore::loadPrintPlugin( const TQString &name )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
KTrader::OfferList list = availablePrintPlugins();
|
|
|
|
TDETrader::OfferList list = availablePrintPlugins();
|
|
|
|
KTrader::OfferList::ConstIterator it;
|
|
|
|
TDETrader::OfferList::ConstIterator it;
|
|
|
|
for( it = list.begin(); it != list.end(); ++it ) {
|
|
|
|
for( it = list.begin(); it != list.end(); ++it ) {
|
|
|
|
if ( (*it)->desktopEntryName() == name ) {
|
|
|
|
if ( (*it)->desktopEntryName() == name ) {
|
|
|
|
return loadPrintPlugin( *it );
|
|
|
|
return loadPrintPlugin( *it );
|
|
|
@ -274,8 +274,8 @@ KOrg::CalendarDecoration::List KOCore::calendarDecorations()
|
|
|
|
TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
|
|
|
|
TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
|
|
|
|
|
|
|
|
|
|
|
|
mCalendarDecorations.clear();
|
|
|
|
mCalendarDecorations.clear();
|
|
|
|
KTrader::OfferList plugins = availableCalendarDecorations();
|
|
|
|
TDETrader::OfferList plugins = availableCalendarDecorations();
|
|
|
|
KTrader::OfferList::ConstIterator it;
|
|
|
|
TDETrader::OfferList::ConstIterator it;
|
|
|
|
for( it = plugins.begin(); it != plugins.end(); ++it ) {
|
|
|
|
for( it = plugins.begin(); it != plugins.end(); ++it ) {
|
|
|
|
if ( (*it)->hasServiceType("Calendar/Decoration") ) {
|
|
|
|
if ( (*it)->hasServiceType("Calendar/Decoration") ) {
|
|
|
|
TQString name = (*it)->desktopEntryName();
|
|
|
|
TQString name = (*it)->desktopEntryName();
|
|
|
@ -297,8 +297,8 @@ KOrg::Part::List KOCore::loadParts( KOrg::MainWindow *parent )
|
|
|
|
|
|
|
|
|
|
|
|
TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
|
|
|
|
TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
|
|
|
|
|
|
|
|
|
|
|
|
KTrader::OfferList plugins = availableParts();
|
|
|
|
TDETrader::OfferList plugins = availableParts();
|
|
|
|
KTrader::OfferList::ConstIterator it;
|
|
|
|
TDETrader::OfferList::ConstIterator it;
|
|
|
|
for( it = plugins.begin(); it != plugins.end(); ++it ) {
|
|
|
|
for( it = plugins.begin(); it != plugins.end(); ++it ) {
|
|
|
|
if ( selectedPlugins.find( (*it)->desktopEntryName() ) !=
|
|
|
|
if ( selectedPlugins.find( (*it)->desktopEntryName() ) !=
|
|
|
|
selectedPlugins.end() ) {
|
|
|
|
selectedPlugins.end() ) {
|
|
|
@ -323,8 +323,8 @@ KOrg::PrintPlugin::List KOCore::loadPrintPlugins()
|
|
|
|
|
|
|
|
|
|
|
|
TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
|
|
|
|
TQStringList selectedPlugins = KOPrefs::instance()->mSelectedPlugins;
|
|
|
|
|
|
|
|
|
|
|
|
KTrader::OfferList plugins = availablePrintPlugins();
|
|
|
|
TDETrader::OfferList plugins = availablePrintPlugins();
|
|
|
|
KTrader::OfferList::ConstIterator it;
|
|
|
|
TDETrader::OfferList::ConstIterator it;
|
|
|
|
for( it = plugins.begin(); it != plugins.end(); ++it ) {
|
|
|
|
for( it = plugins.begin(); it != plugins.end(); ++it ) {
|
|
|
|
if ( selectedPlugins.find( (*it)->desktopEntryName() ) !=
|
|
|
|
if ( selectedPlugins.find( (*it)->desktopEntryName() ) !=
|
|
|
|
selectedPlugins.end() ) {
|
|
|
|
selectedPlugins.end() ) {
|
|
|
|