KOffice – TDE office suite
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.

defaultpaintops_plugin.cc 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * defaultpaintops_plugin.cc -- Part of Chalk
  3. *
  4. * Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. #include <tdelocale.h>
  21. #include <kiconloader.h>
  22. #include <kinstance.h>
  23. #include <kstandarddirs.h>
  24. #include <tdetempfile.h>
  25. #include <kdebug.h>
  26. #include <kgenericfactory.h>
  27. #include <kis_paintop_registry.h>
  28. #include "kis_airbrushop.h"
  29. #include "kis_brushop.h"
  30. #include "kis_duplicateop.h"
  31. #include "kis_eraseop.h"
  32. #include "kis_smudgeop.h"
  33. #include "kis_penop.h"
  34. #include "kis_global.h"
  35. #include "kis_paintop_registry.h"
  36. #include "defaultpaintops_plugin.h"
  37. typedef KGenericFactory<DefaultPaintOpsPlugin> DefaultPaintOpsPluginFactory;
  38. K_EXPORT_COMPONENT_FACTORY( chalkdefaultpaintops, DefaultPaintOpsPluginFactory( "chalkcore" ) )
  39. DefaultPaintOpsPlugin::DefaultPaintOpsPlugin(TQObject *parent, const char *name, const TQStringList &)
  40. : KParts::Plugin(parent, name)
  41. {
  42. setInstance(DefaultPaintOpsPluginFactory::instance());
  43. // This is not a gui plugin; only load it when the doc is created.
  44. if ( parent->inherits("KisPaintOpRegistry") )
  45. {
  46. KisPaintOpRegistry * r = dynamic_cast<KisPaintOpRegistry*>(parent);
  47. // Add hard-coded paint ops. Plugin paintops will add
  48. // themselves in the plugin initialization code.
  49. r->add ( new KisAirbrushOpFactory );
  50. r->add ( new KisBrushOpFactory );
  51. r->add ( new KisDuplicateOpFactory );
  52. r->add ( new KisEraseOpFactory );
  53. r->add ( new KisPenOpFactory );
  54. r->add ( new KisSmudgeOpFactory );
  55. }
  56. }
  57. DefaultPaintOpsPlugin::~DefaultPaintOpsPlugin()
  58. {
  59. }
  60. #include "defaultpaintops_plugin.moc"