23#include <tdemessagebox.h>
25#include <KoFilterChain.h>
27#include <kgenericfactory.h>
28#include <KoDocument.h>
31#include "exportsizedia.h"
33typedef KGenericFactory<PngExport, KoFilter> PngExportFactory;
34K_EXPORT_COMPONENT_FACTORY( libkchartpngexport, PngExportFactory( "pngexport" ) )
36PngExport::PngExport(KoFilter *fil, const char *name, const TQStringList&lst)
37 : ImageExport(fil,name,lst)
41PngExport::~PngExport()
45void PngExport::extraImageAttribute()
47 ExportSizeDia *exportDialog = new ExportSizeDia( width, height,
49 if (exportDialog->exec()) {
50 width = exportDialog->width();
51 height = exportDialog->height();
53 kdDebug() << "PNG Export: size = [" << width << "," << height << "]" << endl;
58const char * PngExport::exportFormat()
63bool PngExport::saveImage( TQString fileName)
65 bool ret = pixmap.save( fileName, "PNG" );
68 KMessageBox::error( 0, i18n( "Failed to write file." ),
69 i18n( "PNG Export Error" ) );
75#include "pngexport.moc"
|