22 #include <tdelocale.h>
32 if ( offers.isEmpty() )
35 KService::Ptr ptr = *(offers.begin());
36 KLibFactory *factory = KLibLoader::self()->factory( TQFile::encodeName(ptr->library()) );
42 args << TQString::number( (
int)modal );
44 TQObject *res = factory->create( TQT_TQOBJECT(parent), name,
"KScanDialog", args );
51 TQWidget *parent,
const char *name,
bool modal )
52 : KDialogBase( dialogFace, i18n(
"Acquire Image"), buttonMask, Close,
53 parent, name, modal, true ),
75 if ( offers.isEmpty() )
78 KService::Ptr ptr = *(offers.begin());
79 KLibFactory *factory = KLibLoader::self()->factory( TQFile::encodeName(ptr->library()) );
85 args << TQString::number( (
int)modal );
87 TQObject *res = factory->create( TQT_TQOBJECT(parent), name,
"KOCRDialog", args );
94 TQWidget *parent,
const char *name,
bool modal )
95 : KDialogBase( dialogFace, i18n(
"OCR Image"), buttonMask, Close,
96 parent, name, modal, true ),
102 KOCRDialog::~KOCRDialog()
111 : KLibFactory( parent, name ),
116 KScanDialogFactory::~KScanDialogFactory()
121 TQObject *KScanDialogFactory::createObject( TQObject *parent,
const char *name,
122 const char *classname,
123 const TQStringList &args )
125 if ( strcmp( classname,
"KScanDialog" ) != 0 )
128 if ( parent && !parent->isWidgetType() )
133 if ( args.count() == 1 )
134 modal = (
bool)args[ 0 ].toInt();
136 return TQT_TQOBJECT(
createDialog( TQT_TQWIDGET( parent ), name, modal ));
144 : KLibFactory( parent, name ),
149 KOCRDialogFactory::~KOCRDialogFactory()
154 TQObject *KOCRDialogFactory::createObject( TQObject *parent,
const char *name,
155 const char *classname,
156 const TQStringList &args )
158 if ( strcmp( classname,
"KOCRDialog" ) != 0 )
161 if ( parent && !parent->isWidgetType() )
166 if ( args.count() == 1 )
167 modal = (
bool)args[ 0 ].toInt();
169 return TQT_TQOBJECT(
createDialog( TQT_TQWIDGET( parent ), name, modal ));
172 void KScanDialog::virtual_hook(
int id,
void* data )
173 { KDialogBase::virtual_hook(
id, data ); }
175 void KScanDialogFactory::virtual_hook(
int id,
void* data )
176 { KLibFactory::virtual_hook(
id, data ); }
178 void KOCRDialog::virtual_hook(
int id,
void* data )
179 { KDialogBase::virtual_hook(
id, data ); }
181 void KOCRDialogFactory::virtual_hook(
int id,
void* data )
182 { KLibFactory::virtual_hook(
id, data ); }