/*************************************************************************** * copyright : (C) 2006 Seb Ruiz * **************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ extern "C" { #include //g_type_init } #include "ipodexportdialog.h" #include "plugin_ipodexport.h" #include #include #include #include #include #include #include #include #define debug() kdDebug( 51000 ) typedef KGenericFactory Factory; K_EXPORT_COMPONENT_FACTORY( kipiplugin_ipodexport, Factory("kipiplugin_ipodexport")); Plugin_iPodExport::Plugin_iPodExport( TQObject *parent, const char*, const TQStringList& ) : KIPI::Plugin( Factory::instance(), parent, "iPodExport") { kdDebug( 51001 ) << "Plugin_iPodExport plugin loaded" << endl; g_type_init(); } void Plugin_iPodExport::setup( TQWidget* widget ) { KIPI::Plugin::setup( widget ); // this is our action shown in the menubar/toolbar of the mainwindow m_actionImageUpload = new TDEAction( i18n( "Export to iPod..." ), "multimedia-player", 0, this, TQT_SLOT( slotImageUpload() ), actionCollection(), "connectipod"); addAction( m_actionImageUpload ); m_interface = dynamic_cast< KIPI::Interface* >( parent() ); } KIPI::Category Plugin_iPodExport::category( TDEAction* action ) const { if ( action == m_actionImageUpload ) return KIPI::EXPORTPLUGIN; return KIPI::IMAGESPLUGIN; // no warning from compiler, please } void Plugin_iPodExport::slotImageUpload() { IpodExport::UploadDialog *dlg = new IpodExport::UploadDialog( m_interface, i18n("iPod Export"), TQT_TQWIDGET(kapp->activeWindow()) ); dlg->setMinimumWidth( 460 ); dlg->show(); }