Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent e2385b701b
commit 6adb71382c

@ -47,7 +47,7 @@ void Palette::init() {
TQStringList Palette::kdePalettes() { TQStringList Palette::kdePalettes() {
TQStringList paletteList; TQStringList paletteList;
KGlobal::dirs()->findAllResources("config", palettesDir + "/*", false, true, paletteList); TDEGlobal::dirs()->findAllResources("config", palettesDir + "/*", false, true, paletteList);
return paletteList; return paletteList;
} }

@ -377,7 +377,7 @@ TQString dvifile::convertPDFtoPS(const TQString &PDFFilename)
// Use pdf2ps to do the conversion // Use pdf2ps to do the conversion
KProcIO proc; KProcIO proc;
proc << "pdf2ps" << PDFFilename << convertedFileName; proc << "pdf2ps" << PDFFilename << convertedFileName;
if (proc.start(KProcess::Block) == false) if (proc.start(TDEProcess::Block) == false)
convertedFileName = TQString(); // Indicates that conversion failed, won't try again. convertedFileName = TQString(); // Indicates that conversion failed, won't try again.
if (!TQFile::exists(convertedFileName)) if (!TQFile::exists(convertedFileName))
convertedFileName = TQString(); // Indicates that conversion failed, won't try again. convertedFileName = TQString(); // Indicates that conversion failed, won't try again.

@ -767,8 +767,8 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
// henceforth dimiss the output of the older programm. "If it // henceforth dimiss the output of the older programm. "If it
// hasn't failed until now, we don't care." // hasn't failed until now, we don't care."
if (proc != 0) { if (proc != 0) {
tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), 0, 0);
tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), 0, 0);
proc = 0; proc = 0;
} }
@ -778,9 +778,9 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
kdError(4300) << "Could not allocate ShellProcess for the editor command." << endl; kdError(4300) << "Could not allocate ShellProcess for the editor command." << endl;
return; return;
} }
tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); tqApp->connect(proc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(TDEProcess *, char *, int)));
tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); tqApp->connect(proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(TDEProcess *, char *, int)));
tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(editorCommand_terminated(KProcess *))); tqApp->connect(proc, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(editorCommand_terminated(TDEProcess *)));
// Merge the editor-specific editor message here. // Merge the editor-specific editor message here.
export_errorString = i18n("<qt>The external program<br><br><tt><strong>%1</strong></tt><br/><br/>which was used to call the editor " export_errorString = i18n("<qt>The external program<br><br><tt><strong>%1</strong></tt><br/><br/>which was used to call the editor "
"for inverse search, reported an error. You might wish to look at the <strong>document info " "for inverse search, reported an error. You might wish to look at the <strong>document info "
@ -797,7 +797,7 @@ void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, Docum
proc->clearArguments(); proc->clearArguments();
*proc << command; *proc << command;
proc->closeStdin(); proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) { if (proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput) == false) {
kdError(4300) << "Editor failed to start" << endl; kdError(4300) << "Editor failed to start" << endl;
return; return;
} }

@ -30,7 +30,7 @@ class infoDialog;
class KAction; class KAction;
class KDVIMultiPage; class KDVIMultiPage;
class KPrinter; class KPrinter;
class KProcess; class TDEProcess;
class KProgressDialog; class KProgressDialog;
class KShellProcess; class KShellProcess;
class PreBookmark; class PreBookmark;
@ -145,9 +145,9 @@ public slots:
virtual void getText(RenderedDocumentPage* page); virtual void getText(RenderedDocumentPage* page);
/** Slots used in conjunction with external programs */ /** Slots used in conjunction with external programs */
void dvips_output_receiver(KProcess *, char *buffer, int buflen); void dvips_output_receiver(TDEProcess *, char *buffer, int buflen);
void dvips_terminated(KProcess *); void dvips_terminated(TDEProcess *);
void editorCommand_terminated(KProcess *); void editorCommand_terminated(TDEProcess *);
signals: signals:
/** Passed through to the top-level kpart. */ /** Passed through to the top-level kpart. */

@ -61,8 +61,8 @@ void dviRenderer::exportPDF()
// has been called meanwhile. See also the exportPS method. // has been called meanwhile. See also the exportPS method.
if (proc != 0) { if (proc != 0) {
// Make sure all further output of the programm is ignored // Make sure all further output of the programm is ignored
tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), 0, 0);
tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), 0, 0);
proc = 0; proc = 0;
} }
@ -130,9 +130,9 @@ void dviRenderer::exportPDF()
} }
tqApp->disconnect( this, TQT_SIGNAL(mySignal()), 0, 0 ); tqApp->disconnect( this, TQT_SIGNAL(mySignal()), 0, 0 );
tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); tqApp->connect(proc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(TDEProcess *, char *, int)));
tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); tqApp->connect(proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(TDEProcess *, char *, int)));
tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *))); tqApp->connect(proc, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(dvips_terminated(TDEProcess *)));
export_errorString = i18n("<qt>The external program 'dvipdf', which was used to export the file, reported an error. " export_errorString = i18n("<qt>The external program 'dvipdf', which was used to export the file, reported an error. "
"You might wish to look at the <strong>document info dialog</strong> which you will " "You might wish to look at the <strong>document info dialog</strong> which you will "
@ -145,7 +145,7 @@ void dviRenderer::exportPDF()
*proc << TQString("-o %1").arg(KShellProcess::quote(fileName)); *proc << TQString("-o %1").arg(KShellProcess::quote(fileName));
*proc << KShellProcess::quote(dviFile->filename); *proc << KShellProcess::quote(dviFile->filename);
proc->closeStdin(); proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) { if (proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput) == false) {
kdError(4300) << "dvipdfm failed to start" << endl; kdError(4300) << "dvipdfm failed to start" << endl;
return; return;
} }
@ -167,8 +167,8 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
// enough to ignore the exit status of the editor if another command // enough to ignore the exit status of the editor if another command
// has been called meanwhile. See also the exportPDF method. // has been called meanwhile. See also the exportPDF method.
if (proc != 0) { if (proc != 0) {
tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0); tqApp->disconnect(proc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), 0, 0);
tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0); tqApp->disconnect(proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), 0, 0);
proc = 0; proc = 0;
} }
@ -294,9 +294,9 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
return; return;
} }
tqApp->connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); tqApp->connect(proc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(TDEProcess *, char *, int)));
tqApp->connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(KProcess *, char *, int))); tqApp->connect(proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), this, TQT_SLOT(dvips_output_receiver(TDEProcess *, char *, int)));
tqApp->connect(proc, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(dvips_terminated(KProcess *))); tqApp->connect(proc, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(dvips_terminated(TDEProcess *)));
export_errorString = i18n("<qt>The external program 'dvips', which was used to export the file, reported an error. " export_errorString = i18n("<qt>The external program 'dvips', which was used to export the file, reported an error. "
"You might wish to look at the <strong>document info dialog</strong> which you will " "You might wish to look at the <strong>document info dialog</strong> which you will "
"find in the File-Menu for a precise error report.</qt>") ; "find in the File-Menu for a precise error report.</qt>") ;
@ -312,7 +312,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
*proc << TQString("%1").arg(KShellProcess::quote(sourceFileName)); *proc << TQString("%1").arg(KShellProcess::quote(sourceFileName));
*proc << TQString("-o %1").arg(KShellProcess::quote(fileName)); *proc << TQString("-o %1").arg(KShellProcess::quote(fileName));
proc->closeStdin(); proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::Stderr) == false) { if (proc->start(TDEProcess::NotifyOnExit, TDEProcess::Stderr) == false) {
kdError(4300) << "dvips failed to start" << endl; kdError(4300) << "dvips failed to start" << endl;
return; return;
} }
@ -320,7 +320,7 @@ void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrin
} }
void dviRenderer::dvips_output_receiver(KProcess *, char *buffer, int buflen) void dviRenderer::dvips_output_receiver(TDEProcess *, char *buffer, int buflen)
{ {
// Paranoia. // Paranoia.
if (buflen < 0) if (buflen < 0)
@ -333,7 +333,7 @@ void dviRenderer::dvips_output_receiver(KProcess *, char *buffer, int buflen)
} }
void dviRenderer::dvips_terminated(KProcess *sproc) void dviRenderer::dvips_terminated(TDEProcess *sproc)
{ {
// Give an error message from the message string. However, if the // Give an error message from the message string. However, if the
// sproc is not the "current external process of interest", i.e. not // sproc is not the "current external process of interest", i.e. not
@ -351,7 +351,7 @@ void dviRenderer::dvips_terminated(KProcess *sproc)
} }
void dviRenderer::editorCommand_terminated(KProcess *sproc) void dviRenderer::editorCommand_terminated(TDEProcess *sproc)
{ {
// Give an error message from the message string. However, if the // Give an error message from the message string. However, if the
// sproc is not the "current external process of interest", i.e. not // sproc is not the "current external process of interest", i.e. not
@ -372,7 +372,7 @@ void dviRenderer::editorCommand_terminated(KProcess *sproc)
void dviRenderer::abortExternalProgramm() void dviRenderer::abortExternalProgramm()
{ {
delete proc; // Deleting the KProcess kills the child. delete proc; // Deleting the TDEProcess kills the child.
proc = 0; proc = 0;
if (export_tmpFileName.isEmpty() != true) { if (export_tmpFileName.isEmpty() != true) {

@ -292,7 +292,7 @@ void dviRenderer::prescan_ParsePSHeaderSpecial(const TQString& cp)
// Otherwise, use kpsewhich to find the eps file. // Otherwise, use kpsewhich to find the eps file.
KProcIO proc; KProcIO proc;
proc << "kpsewhich" << cp; proc << "kpsewhich" << cp;
proc.start(KProcess::Block); proc.start(TDEProcess::Block);
proc.readln(_file); proc.readln(_file);
} }

@ -28,7 +28,7 @@ fontEncoding::fontEncoding(const TQString &encName)
KProcIO proc; KProcIO proc;
TQString encFileName; TQString encFileName;
proc << "kpsewhich" << encName; proc << "kpsewhich" << encName;
if (proc.start(KProcess::Block) == false) { if (proc.start(TDEProcess::Block) == false) {
kdError(4300) << "fontEncoding::fontEncoding(...): kpsewhich could not be started." << endl; kdError(4300) << "fontEncoding::fontEncoding(...): kpsewhich could not be started." << endl;
return; return;
} }

@ -33,7 +33,7 @@ fontMap::fontMap()
// teTeX 3.0 format first. // teTeX 3.0 format first.
KProcIO proc; KProcIO proc;
proc << "kpsewhich" << "--format=map" << "ps2pk.map"; proc << "kpsewhich" << "--format=map" << "ps2pk.map";
if (proc.start(KProcess::Block) == false) { if (proc.start(TDEProcess::Block) == false) {
kdError(4700) << "fontMap::fontMap(): kpsewhich could not be started." << endl; kdError(4700) << "fontMap::fontMap(): kpsewhich could not be started." << endl;
return; return;
} }
@ -45,7 +45,7 @@ fontMap::fontMap()
// Map file not found? Then we try the teTeX < 3.0 way of finding // Map file not found? Then we try the teTeX < 3.0 way of finding
// the file. // the file.
proc << "kpsewhich" << "--format=dvips config" << "ps2pk.map"; proc << "kpsewhich" << "--format=dvips config" << "ps2pk.map";
if (proc.start(KProcess::Block) == false) { if (proc.start(TDEProcess::Block) == false) {
kdError(4700) << "fontMap::fontMap(): kpsewhich could not be started." << endl; kdError(4700) << "fontMap::fontMap(): kpsewhich could not be started." << endl;
return; return;
} }

@ -304,8 +304,8 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
// If PK fonts are generated, the kpsewhich command will re-route // If PK fonts are generated, the kpsewhich command will re-route
// the output of MetaFont into its stderr. Here we make sure this // the output of MetaFont into its stderr. Here we make sure this
// output is intercepted and parsed. // output is intercepted and parsed.
tqApp->connect(&kpsewhichIO, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), tqApp->connect(&kpsewhichIO, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)),
this, TQT_SLOT(mf_output_receiver(KProcess *, char *, int))); this, TQT_SLOT(mf_output_receiver(TDEProcess *, char *, int)));
kpsewhichIO.setUseShell(true); kpsewhichIO.setUseShell(true);
@ -357,7 +357,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
kpsewhichIO << shellProcessCmdLine; kpsewhichIO << shellProcessCmdLine;
TQString importanceOfKPSEWHICH = i18n("<p>KDVI relies on the <b>kpsewhich</b> program to locate font files " TQString importanceOfKPSEWHICH = i18n("<p>KDVI relies on the <b>kpsewhich</b> program to locate font files "
"on your hard disc and to generate PK fonts, if necessary.</p>"); "on your hard disc and to generate PK fonts, if necessary.</p>");
if (kpsewhichIO.start(KProcess::NotifyOnExit, false) == false) { if (kpsewhichIO.start(TDEProcess::NotifyOnExit, false) == false) {
TQString msg = i18n( "<p>The shell process for the kpsewhich program could not " TQString msg = i18n( "<p>The shell process for the kpsewhich program could not "
"be started. Consequently, some font files could not be found, " "be started. Consequently, some font files could not be found, "
"and your document might by unreadable. If this error is reproducable " "and your document might by unreadable. If this error is reproducable "
@ -544,7 +544,7 @@ void fontPool::release_fonts()
} }
void fontPool::mf_output_receiver(KProcess *, char *buffer, int buflen) void fontPool::mf_output_receiver(TDEProcess *, char *buffer, int buflen)
{ {
// Paranoia. // Paranoia.
if (buflen < 0) if (buflen < 0)

@ -20,7 +20,7 @@
#include FT_FREETYPE_H #include FT_FREETYPE_H
#endif #endif
class KProcess; class TDEProcess;
class KShellProcess; class KShellProcess;
@ -210,7 +210,7 @@ private slots:
// transmitted to the fontpool via this slot. This method calles // transmitted to the fontpool via this slot. This method calles
// suitable methods in the fontProgres Dialog, and collects the // suitable methods in the fontProgres Dialog, and collects the
// output of MetaFontt int the "MetafontOutput" member // output of MetaFontt int the "MetafontOutput" member
void mf_output_receiver(KProcess *, char *, int); void mf_output_receiver(TDEProcess *, char *, int);
}; };
#endif //ifndef _FONTPOOL_H #endif //ifndef _FONTPOOL_H

@ -224,7 +224,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
#endif #endif
proc << argus; proc << argus;
if (proc.start(KProcess::Block) == false) { if (proc.start(TDEProcess::Block) == false) {
// Starting ghostscript did not work. // Starting ghostscript did not work.
// TODO: Issue error message, switch PS support off. // TODO: Issue error message, switch PS support off.
kdError(4300) << "ghostview could not be started" << endl; kdError(4300) << "ghostview could not be started" << endl;
@ -331,7 +331,7 @@ TQString ghostscript_interface::locateEPSfile(const TQString &filename, const KU
TQString EPSfilename; TQString EPSfilename;
KProcIO proc; KProcIO proc;
proc << "kpsewhich" << filename; proc << "kpsewhich" << filename;
proc.start(KProcess::Block); proc.start(TDEProcess::Block);
proc.readln(EPSfilename); proc.readln(EPSfilename);
return EPSfilename.stripWhiteSpace(); return EPSfilename.stripWhiteSpace();

@ -41,7 +41,7 @@ static const char bigTIFF[] = "\x4d\x4d\x00\x2a";
KFaxImage::KFaxImage( const TQString &filename, TQObject *parent, const char *name ) KFaxImage::KFaxImage( const TQString &filename, TQObject *parent, const char *name )
: TQObject(parent,name) : TQObject(parent,name)
{ {
KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkfaximage") ); TDEGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkfaximage") );
loadImage(filename); loadImage(filename);
} }

@ -82,7 +82,7 @@ KGamma::KGamma(TQWidget *parent, const char *name, const TQStringList&)
} }
xv->setScreen(currentScreen); xv->setScreen(currentScreen);
rootProcess = new KProcess; rootProcess = new TDEProcess;
setupUI(); setupUI();
saved = false; saved = false;

@ -23,7 +23,7 @@ class GammaCtrl;
class TQCheckBox; class TQCheckBox;
class TQComboBox; class TQComboBox;
class XVidExtWrap; class XVidExtWrap;
class KProcess; class TDEProcess;
class KGamma: public KCModule class KGamma: public KCModule
{ {
@ -71,7 +71,7 @@ class KGamma: public KCModule
GammaCtrl *gctrl, *rgctrl, *ggctrl, *bgctrl; GammaCtrl *gctrl, *rgctrl, *ggctrl, *bgctrl;
TQCheckBox *xf86cfgbox, *syncbox; TQCheckBox *xf86cfgbox, *syncbox;
TQComboBox *screenselect; TQComboBox *screenselect;
KProcess *rootProcess; TDEProcess *rootProcess;
XVidExtWrap *xv; XVidExtWrap *xv;
}; };

@ -264,8 +264,8 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*,
for ( TQValueList<double>::iterator first = mags.begin(), last = mags.end(); for ( TQValueList<double>::iterator first = mags.begin(), last = mags.end();
first != last; first != last;
++first ) { ++first ) {
TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( *first * 100.0, 2 )); TQString str = TQString( "%1%" ).arg( TDEGlobal::locale()->formatNumber( *first * 100.0, 2 ));
str.remove( KGlobal::locale()->decimalSymbol() + "00" ); str.remove( TDEGlobal::locale()->decimalSymbol() + "00" );
zooms << str; zooms << str;
if ( *first == 1.0 ) idx = cur; if ( *first == 1.0 ) idx = cur;
++cur; ++cur;
@ -600,8 +600,8 @@ void KGVPart::updateZoomActions()
} }
// Show percentage that isn't predefined // Show percentage that isn't predefined
TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( zoom, 2 )); TQString str = TQString( "%1%" ).arg( TDEGlobal::locale()->formatNumber( zoom, 2 ));
str.remove( KGlobal::locale()->decimalSymbol() + "00" ); str.remove( TDEGlobal::locale()->decimalSymbol() + "00" );
items.insert( items.at(idx), 1, str ); items.insert( items.at(idx), 1, str );
_zoomTo->setItems( items ); _zoomTo->setItems( items );
_zoomTo->setCurrentItem( idx ); _zoomTo->setCurrentItem( idx );
@ -902,7 +902,7 @@ void KGVPart::slotZoom( const TQString& nz )
TQString z = nz; TQString z = nz;
double zoom; double zoom;
z.remove( z.find( '%' ), 1 ); z.remove( z.find( '%' ), 1 );
zoom = KGlobal::locale()->readNumber( z ) / 100; zoom = TDEGlobal::locale()->readNumber( z ) / 100;
kdDebug( 4500 ) << "ZOOM = " << nz << ", setting zoom = " << zoom << endl; kdDebug( 4500 ) << "ZOOM = " << nz << ", setting zoom = " << zoom << endl;
DisplayOptions options = miniWidget()->displayOptions(); DisplayOptions options = miniWidget()->displayOptions();

@ -46,7 +46,7 @@ namespace {
TQString getGSVersion( TQString fullPathToExec ) TQString getGSVersion( TQString fullPathToExec )
{ {
TQString res; TQString res;
TQString chkVersion = KProcess::quote(fullPathToExec) + " --version"; TQString chkVersion = TDEProcess::quote(fullPathToExec) + " --version";
FILE* p = popen( TQFile::encodeName(chkVersion), "r" ); FILE* p = popen( TQFile::encodeName(chkVersion), "r" );
if( p ) { if( p ) {
// FIXME: a badly configured interpreter can hang us // FIXME: a badly configured interpreter can hang us

@ -345,7 +345,7 @@ bool KGVDocument::convertFromPDF( const TQString& saveFileName,
{ {
// TODO -- timeout/fail on this conversion (it can hang on a bad pdf) // TODO -- timeout/fail on this conversion (it can hang on a bad pdf)
// TODO -- use output from gs (leave out -q) to drive a progress bar // TODO -- use output from gs (leave out -q) to drive a progress bar
KProcess process; TDEProcess process;
process << _interpreterPath process << _interpreterPath
<< "-q" << "-q"
<< "-dNOPAUSE" << "-dNOPAUSE"
@ -367,7 +367,7 @@ bool KGVDocument::convertFromPDF( const TQString& saveFileName,
for ( ; it != args.end() ; ++it ) for ( ; it != args.end() ; ++it )
kdDebug(4500) << ( *it ) << endl;*/ kdDebug(4500) << ( *it ) << endl;*/
if( !process.start( KProcess::Block ) ) if( !process.start( TDEProcess::Block ) )
{ {
kdError() << "convertFromPDF: Couldn't start gs process" << endl; kdError() << "convertFromPDF: Couldn't start gs process" << endl;
// TODO -- error message (gs not found?) // TODO -- error message (gs not found?)
@ -771,7 +771,7 @@ bool KGVDocument::psCopyDoc( const TQString& inputFile,
void KGVDocument::runPdf2ps( const TQString& pdfName, void KGVDocument::runPdf2ps( const TQString& pdfName,
const TQString& dscName ) const TQString& dscName )
{ {
KProcess process; TDEProcess process;
process << _interpreterPath process << _interpreterPath
<< "-dNODISPLAY" << "-dNODISPLAY"
<< "-dQUIET" << "-dQUIET"
@ -786,14 +786,14 @@ e=%1" ).arg( dscName )
<< "-c" << "-c"
<< "quit"; << "quit";
connect( &process, TQT_SIGNAL( processExited( KProcess* ) ), connect( &process, TQT_SIGNAL( processExited( TDEProcess* ) ),
this, TQT_SLOT( pdf2psExited( KProcess* ) ) ); this, TQT_SLOT( pdf2psExited( TDEProcess* ) ) );
kdDebug(4500) << "KGVDocument: pdf2ps started" << endl; kdDebug(4500) << "KGVDocument: pdf2ps started" << endl;
process.start( KProcess::NotifyOnExit ); process.start( TDEProcess::NotifyOnExit );
} }
void KGVDocument::pdf2psExited( KProcess* process ) void KGVDocument::pdf2psExited( TDEProcess* process )
{ {
kdDebug(4500) << "KGVDocument: pdf2ps exited" << endl; kdDebug(4500) << "KGVDocument: pdf2ps exited" << endl;
@ -816,7 +816,7 @@ void Pdf2dsc::run( const TQString& pdfName, const TQString& dscName )
{ {
kill(); kill();
_process = new KProcess; _process = new TDEProcess;
*_process << _ghostscriptPath *_process << _ghostscriptPath
<< "-dSAFER" << "-dSAFER"
<< "-dPARANOIDSAFER" << "-dPARANOIDSAFER"
@ -832,11 +832,11 @@ void Pdf2dsc::run( const TQString& pdfName, const TQString& dscName )
<< "-c" << "-c"
<< "quit"; << "quit";
connect( _process, TQT_SIGNAL( processExited( KProcess* ) ), connect( _process, TQT_SIGNAL( processExited( TDEProcess* ) ),
this, TQT_SLOT( processExited() ) ); this, TQT_SLOT( processExited() ) );
kdDebug(4500) << "Pdf2dsc: started" << endl; kdDebug(4500) << "Pdf2dsc: started" << endl;
_process->start( KProcess::NotifyOnExit ); _process->start( TDEProcess::NotifyOnExit );
} }
void Pdf2dsc::kill() void Pdf2dsc::kill()

@ -176,7 +176,7 @@ protected slots:
void processExited(); void processExited();
private: private:
KProcess* _process; TDEProcess* _process;
TQString _ghostscriptPath; TQString _ghostscriptPath;
}; };

@ -193,7 +193,7 @@ KGVShell::saveProperties( KConfig* config )
void void
KGVShell::readSettings() KGVShell::readSettings()
{ {
recent->loadEntries( KGlobal::config() ); recent->loadEntries( TDEGlobal::config() );
TQStringList items = recent->items(); TQStringList items = recent->items();
// Code copied from kviewshell.cpp: // Code copied from kviewshell.cpp:
@ -210,10 +210,10 @@ KGVShell::readSettings()
} }
} }
applyMainWindowSettings(KGlobal::config(), "MainWindow"); applyMainWindowSettings(TDEGlobal::config(), "MainWindow");
KGlobal::config()->setDesktopGroup(); TDEGlobal::config()->setDesktopGroup();
bool fullScreen = KGlobal::config()->readBoolEntry( "FullScreen", false ); bool fullScreen = TDEGlobal::config()->readBoolEntry( "FullScreen", false );
setFullScreen( fullScreen ); setFullScreen( fullScreen );
_showMenuBarAction->setChecked( menuBar()->isVisible() ); _showMenuBarAction->setChecked( menuBar()->isVisible() );
} }
@ -221,14 +221,14 @@ KGVShell::readSettings()
void void
KGVShell::writeSettings() KGVShell::writeSettings()
{ {
saveMainWindowSettings(KGlobal::config(), "MainWindow"); saveMainWindowSettings(TDEGlobal::config(), "MainWindow");
recent->saveEntries( KGlobal::config() ); recent->saveEntries( TDEGlobal::config() );
KGlobal::config()->setDesktopGroup(); TDEGlobal::config()->setDesktopGroup();
KGlobal::config()->writeEntry( "FullScreen", m_fullScreenAction->isChecked()); TDEGlobal::config()->writeEntry( "FullScreen", m_fullScreenAction->isChecked());
KGlobal::config()->sync(); TDEGlobal::config()->sync();
} }
void void
@ -350,7 +350,7 @@ void KGVShell::slotUpdateFullScreen()
void KGVShell::slotConfigureToolbars() void KGVShell::slotConfigureToolbars()
{ {
saveMainWindowSettings( KGlobal::config(), "MainWindow" ); saveMainWindowSettings( TDEGlobal::config(), "MainWindow" );
KEditToolbar dlg( factory() ); KEditToolbar dlg( factory() );
connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
dlg.exec(); dlg.exec();
@ -358,7 +358,7 @@ void KGVShell::slotConfigureToolbars()
void KGVShell::slotNewToolbarConfig() void KGVShell::slotNewToolbarConfig()
{ {
applyMainWindowSettings( KGlobal::config(), "MainWindow" ); applyMainWindowSettings( TDEGlobal::config(), "MainWindow" );
} }
void KGVShell::slotRMBClick() void KGVShell::slotRMBClick()

@ -342,7 +342,7 @@ bool KPSWidget::startInterpreter()
{ {
setupWidget(); setupWidget();
_process = new KProcess; _process = new TDEProcess;
if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", TQString( "%1 %2" ).arg( winId() ).arg( _backgroundPixmap.handle() ) ); if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", TQString( "%1 %2" ).arg( winId() ).arg( _backgroundPixmap.handle() ) );
else _process->setEnvironment( "GHOSTVIEW", TQString::number( winId() ) ); else _process->setEnvironment( "GHOSTVIEW", TQString::number( winId() ) );
@ -358,21 +358,21 @@ bool KPSWidget::startInterpreter()
else else
*_process << _fileName << "-c" << "quit"; *_process << _fileName << "-c" << "quit";
connect( _process, TQT_SIGNAL( processExited( KProcess* ) ), connect( _process, TQT_SIGNAL( processExited( TDEProcess* ) ),
this, TQT_SLOT( slotProcessExited( KProcess* ) ) ); this, TQT_SLOT( slotProcessExited( TDEProcess* ) ) );
connect( _process, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), connect( _process, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ),
this, TQT_SLOT( gs_output( KProcess*, char*, int ) ) ); this, TQT_SLOT( gs_output( TDEProcess*, char*, int ) ) );
connect( _process, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), connect( _process, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ),
this, TQT_SLOT( gs_output( KProcess*, char*, int ) ) ); this, TQT_SLOT( gs_output( TDEProcess*, char*, int ) ) );
connect( _process, TQT_SIGNAL( wroteStdin( KProcess*) ), connect( _process, TQT_SIGNAL( wroteStdin( TDEProcess*) ),
this, TQT_SLOT( gs_input( KProcess* ) ) ); this, TQT_SLOT( gs_input( TDEProcess* ) ) );
kapp->flushX(); kapp->flushX();
// Finally fire up the interpreter. // Finally fire up the interpreter.
kdDebug(4500) << "KPSWidget: starting interpreter" << endl; kdDebug(4500) << "KPSWidget: starting interpreter" << endl;
if( _process->start( KProcess::NotifyOnExit, if( _process->start( TDEProcess::NotifyOnExit,
_usePipe ? KProcess::All : KProcess::AllOutput ) ) _usePipe ? TDEProcess::All : TDEProcess::AllOutput ) )
{ {
_interpreterBusy = true; _interpreterBusy = true;
setCursor( waitCursor ); setCursor( waitCursor );
@ -412,7 +412,7 @@ void KPSWidget::interpreterFailed()
stopInterpreter(); stopInterpreter();
} }
void KPSWidget::slotProcessExited( KProcess* process ) void KPSWidget::slotProcessExited( TDEProcess* process )
{ {
kdDebug(4500) << "KPSWidget: process exited" << endl; kdDebug(4500) << "KPSWidget: process exited" << endl;
@ -430,12 +430,12 @@ void KPSWidget::slotProcessExited( KProcess* process )
} }
} }
void KPSWidget::gs_output( KProcess*, char* buffer, int len ) void KPSWidget::gs_output( TDEProcess*, char* buffer, int len )
{ {
emit output( buffer, len ); emit output( buffer, len );
} }
void KPSWidget::gs_input( KProcess* process ) void KPSWidget::gs_input( TDEProcess* process )
{ {
kdDebug(4500) << "KPSWidget::gs_input" << endl; kdDebug(4500) << "KPSWidget::gs_input" << endl;

@ -30,7 +30,7 @@
#include <X11/X.h> #include <X11/X.h>
class KProcess; class TDEProcess;
class KGVConfigDialog; class KGVConfigDialog;
class MessagesDialog; class MessagesDialog;
@ -201,10 +201,10 @@ protected:
void setPalette( Configuration::EnumPalette::type ); void setPalette( Configuration::EnumPalette::type );
protected slots: protected slots:
void gs_input( KProcess* ); void gs_input( TDEProcess* );
void gs_output( KProcess*, char* buffer, int len ); void gs_output( TDEProcess*, char* buffer, int len );
void interpreterFailed(); void interpreterFailed();
void slotProcessExited( KProcess* ); void slotProcessExited( TDEProcess* );
private: private:
Window _gsWindow; // Destination of ghostscript messages. Window _gsWindow; // Destination of ghostscript messages.
@ -246,7 +246,7 @@ private:
*/ */
bool _widgetDirty; bool _widgetDirty;
KProcess* _process; TDEProcess* _process;
char* _buffer; char* _buffer;
std::queue<Record> _inputQueue; std::queue<Record> _inputQueue;

@ -43,7 +43,7 @@ LogWindow::LogWindow( const TQString& caption,
_logView->setTextFormat( TQt::PlainText ); _logView->setTextFormat( TQt::PlainText );
_logView->setReadOnly( true ); _logView->setReadOnly( true );
_logView->setWordWrap( TQTextEdit::NoWrap ); _logView->setWordWrap( TQTextEdit::NoWrap );
_logView->setFont( KGlobalSettings::fixedFont() ); _logView->setFont( TDEGlobalSettings::fixedFont() );
_logView->setMinimumWidth( 80 * fontMetrics().width( " " ) ); _logView->setMinimumWidth( 80 * fontMetrics().width( " " ) );
connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( clear() ) ); connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( clear() ) );

@ -48,7 +48,7 @@
// little helper: // little helper:
static inline TQPixmap loadIcon( const char * name ) static inline TQPixmap loadIcon( const char * name )
{ {
return KGlobal::instance()->iconLoader() return TDEGlobal::instance()->iconLoader()
->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); ->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium );
} }

@ -37,7 +37,7 @@ KIconTemplateContainer* KIconTemplateContainer::instance = 0;
void createStandardTemplates(KIconTemplateContainer *list) void createStandardTemplates(KIconTemplateContainer *list)
{ {
KIconLoader *kil = KGlobal::iconLoader(); KIconLoader *kil = TDEGlobal::iconLoader();
KIconTemplate it; KIconTemplate it;
it.path = kil->iconPath("standard", KIcon::User); it.path = kil->iconPath("standard", KIcon::User);

@ -8,7 +8,7 @@
#if TDE_VERSION < 306 #if TDE_VERSION < 306
#define QUOTE( x ) x #define QUOTE( x ) x
#else #else
#define QUOTE( x ) KProcess::quote( x ) #define QUOTE( x ) TDEProcess::quote( x )
#endif #endif
using namespace KMrmlConfig; using namespace KMrmlConfig;
@ -39,7 +39,7 @@ void IndexCleaner::start()
startNext(); startNext();
} }
void IndexCleaner::slotExited( KProcess *proc ) void IndexCleaner::slotExited( TDEProcess *proc )
{ {
emit advance( m_stepSize ); emit advance( m_stepSize );
@ -63,11 +63,11 @@ void IndexCleaner::startNext()
#if TDE_VERSION < 306 #if TDE_VERSION < 306
m_process = new KShellProcess(); m_process = new KShellProcess();
#else #else
m_process = new KProcess(); m_process = new TDEProcess();
m_process->setUseShell( true ); m_process->setUseShell( true );
#endif #endif
connect( m_process, TQT_SIGNAL( processExited( KProcess * )), connect( m_process, TQT_SIGNAL( processExited( TDEProcess * )),
TQT_SLOT( slotExited( KProcess * ) )); TQT_SLOT( slotExited( TDEProcess * ) ));
TQString cmd = m_config->removeCollectionCommandLine(); TQString cmd = m_config->removeCollectionCommandLine();

@ -11,7 +11,7 @@
#include <tqobject.h> #include <tqobject.h>
#include <tqstringlist.h> #include <tqstringlist.h>
class KProcess; class TDEProcess;
namespace KMrml namespace KMrml
{ {
@ -37,7 +37,7 @@ namespace KMrmlConfig
void finished(); void finished();
private slots: private slots:
void slotExited( KProcess * ); void slotExited( TDEProcess * );
private: private:
int m_stepSize; int m_stepSize;
@ -45,7 +45,7 @@ namespace KMrmlConfig
TQStringList m_dirs; TQStringList m_dirs;
const KMrml::Config *m_config; const KMrml::Config *m_config;
KProcess *m_process; TDEProcess *m_process;
}; };
} }

@ -30,7 +30,7 @@
#if TDE_VERSION < 306 #if TDE_VERSION < 306
#define QUOTE( x ) x #define QUOTE( x ) x
#else #else
#define QUOTE( x ) KProcess::quote( x ) #define QUOTE( x ) TDEProcess::quote( x )
#endif #endif
using namespace KMrmlConfig; using namespace KMrmlConfig;
@ -46,8 +46,8 @@ Indexer::Indexer( const KMrml::Config* config,
m_process->setUseShell( true ); m_process->setUseShell( true );
#endif #endif
m_process->setEnvironment( "LC_ALL", "C" ); m_process->setEnvironment( "LC_ALL", "C" );
connect( m_process, TQT_SIGNAL( processExited( KProcess * )), connect( m_process, TQT_SIGNAL( processExited( TDEProcess * )),
TQT_SLOT( processFinished( KProcess * ))); TQT_SLOT( processFinished( TDEProcess * )));
connect( m_process, TQT_SIGNAL( readReady( KProcIO * )), connect( m_process, TQT_SIGNAL( readReady( KProcIO * )),
TQT_SLOT( slotCanRead( KProcIO * )) ); TQT_SLOT( slotCanRead( KProcIO * )) );
} }
@ -67,7 +67,7 @@ void Indexer::startIndexing( const TQStringList& dirs )
processNext(); processNext();
} }
void Indexer::processFinished( KProcess *proc ) void Indexer::processFinished( TDEProcess *proc )
{ {
// still more directories to index? // still more directories to index?
if ( !m_dirs.isEmpty() ) if ( !m_dirs.isEmpty() )
@ -118,9 +118,9 @@ void Indexer::processNext()
void Indexer::slotCanRead( KProcIO *proc ) void Indexer::slotCanRead( KProcIO *proc )
{ {
static const TQString& sprogress = KGlobal::staticQString("PROGRESS: "); static const TQString& sprogress = TDEGlobal::staticQString("PROGRESS: ");
static const TQString& r1 = /* PROGRESS: 1 of 6 done (15%) */ static const TQString& r1 = /* PROGRESS: 1 of 6 done (15%) */
KGlobal::staticQString( "(\\d+) of (\\d+) done \\((\\d+)%\\)" ); TDEGlobal::staticQString( "(\\d+) of (\\d+) done \\((\\d+)%\\)" );
TQString line; TQString line;
int bytes = -1; int bytes = -1;

@ -23,7 +23,7 @@
#include <kmrml_config.h> #include <kmrml_config.h>
class KProcess; class TDEProcess;
class KProcIO; class KProcIO;
namespace KMrmlConfig namespace KMrmlConfig
@ -48,7 +48,7 @@ namespace KMrmlConfig
private slots: private slots:
void slotCanRead( KProcIO * ); void slotCanRead( KProcIO * );
void processFinished( KProcess * ); void processFinished( TDEProcess * );
private: private:
void processNext(); void processNext();

@ -10,7 +10,7 @@ using namespace KMrmlConfig;
IndexTest::IndexTest() IndexTest::IndexTest()
{ {
KMrml::Config *config = new KMrml::Config( KGlobal::config() ); KMrml::Config *config = new KMrml::Config( TDEGlobal::config() );
Indexer *indexer = new Indexer( *config, this ); Indexer *indexer = new Indexer( *config, this );
connect( indexer, TQT_SIGNAL( finished( bool )), TQT_SLOT( slotFinished( bool ))); connect( indexer, TQT_SIGNAL( finished( bool )), TQT_SLOT( slotFinished( bool )));
connect( indexer, TQT_SIGNAL( progress( int, const TQString& )), connect( indexer, TQT_SIGNAL( progress( int, const TQString& )),

@ -75,8 +75,8 @@ KCMKMrml::~KCMKMrml()
void KCMKMrml::checkGiftInstallation() void KCMKMrml::checkGiftInstallation()
{ {
TQString giftExe = KGlobal::dirs()->findExe( "gift" ); TQString giftExe = TDEGlobal::dirs()->findExe( "gift" );
TQString giftAddCollectionExe = KGlobal::dirs()->findExe( "gift-add-collection.pl" ); TQString giftAddCollectionExe = TDEGlobal::dirs()->findExe( "gift-add-collection.pl" );
if ( giftExe.isEmpty() || giftAddCollectionExe.isEmpty() ) if ( giftExe.isEmpty() || giftAddCollectionExe.isEmpty() )
{ {

@ -73,7 +73,7 @@ MainPage::MainPage( TQWidget *parent, const char *name )
#if TDE_VERSION >= 306 #if TDE_VERSION >= 306
KURLRequester *requester = new KURLRequester( this, "dir requester" ); KURLRequester *requester = new KURLRequester( this, "dir requester" );
requester->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); requester->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
requester->setURL( KGlobalSettings::documentPath() ); requester->setURL( TDEGlobalSettings::documentPath() );
connect( requester, TQT_SIGNAL( openFileDialog( KURLRequester * )), connect( requester, TQT_SIGNAL( openFileDialog( KURLRequester * )),
TQT_SLOT( slotRequesterClicked( KURLRequester * ))); TQT_SLOT( slotRequesterClicked( KURLRequester * )));

@ -32,7 +32,7 @@
#if TDE_VERSION < 307 #if TDE_VERSION < 307
#define QUOTE( x ) x #define QUOTE( x ) x
#else #else
#define QUOTE( x ) KProcess::quote( x ) #define QUOTE( x ) TDEProcess::quote( x )
#endif #endif
using namespace KMrml; using namespace KMrml;
@ -251,7 +251,7 @@ TQString Config::mrmldCommandline() const
TQString Config::mrmldDataDir() TQString Config::mrmldDataDir()
{ {
TQString dir = KGlobal::dirs()->saveLocation( "data", TQString dir = TDEGlobal::dirs()->saveLocation( "data",
"kmrml/mrmld-data/" ); "kmrml/mrmld-data/" );
if ( dir.isEmpty() ) // fallback if ( dir.isEmpty() ) // fallback
dir = TQDir::homeDirPath() + "/"; dir = TQDir::homeDirPath() + "/";

@ -40,7 +40,7 @@ extern "C" {
{ {
KLocale::setMainCatalogue("tdelibs"); KLocale::setMainCatalogue("tdelibs");
TDEInstance instance( "kio_mrml" ); TDEInstance instance( "kio_mrml" );
KGlobal::locale()->insertCatalogue( "kmrml" ); TDEGlobal::locale()->insertCatalogue( "kmrml" );
kdDebug() << "Starting MRML " << getpid() << endl; kdDebug() << "Starting MRML " << getpid() << endl;
@ -62,7 +62,7 @@ const int Mrml::bufsize = 8192;
Mrml::Mrml( const TQCString& pool_socket, const TQCString& app_socket ) Mrml::Mrml( const TQCString& pool_socket, const TQCString& app_socket )
: TCPSlaveBase( 12789, "mrml", pool_socket, app_socket ), : TCPSlaveBase( 12789, "mrml", pool_socket, app_socket ),
m_config( KGlobal::config() ) m_config( TDEGlobal::config() )
{ {
MrmlShared::ref(); MrmlShared::ref();
} }

@ -85,7 +85,7 @@ TDEInstance * PartFactory::instance()
{ {
if ( !s_instance ) { if ( !s_instance ) {
s_instance = new TDEInstance( "kmrml" ); s_instance = new TDEInstance( "kmrml" );
KGlobal::locale()->insertCatalogue( "kmrml" ); TDEGlobal::locale()->insertCatalogue( "kmrml" );
} }
return s_instance; return s_instance;
} }

@ -405,7 +405,7 @@ void MrmlViewItem::mouseMoveEvent( TQMouseEvent *e )
if ( (e->state() & Qt::LeftButton) && !pressedPos.isNull() ) { if ( (e->state() & Qt::LeftButton) && !pressedPos.isNull() ) {
TQPoint dist = e->pos() - pressedPos; TQPoint dist = e->pos() - pressedPos;
if ( dist.manhattanLength() > KGlobalSettings::dndEventDelay() ) { if ( dist.manhattanLength() > TDEGlobalSettings::dndEventDelay() ) {
// start drag here // start drag here
KURL::List urls; KURL::List urls;
// ### support multiple files? // ### support multiple files?
@ -421,7 +421,7 @@ void MrmlViewItem::mouseReleaseEvent( TQMouseEvent *e )
{ {
if ( hitsPixmap( e->pos() )) { if ( hitsPixmap( e->pos() )) {
TQPoint dist = e->pos() - pressedPos; TQPoint dist = e->pos() - pressedPos;
if ( dist.manhattanLength() < KGlobalSettings::dndEventDelay() ) { if ( dist.manhattanLength() < TDEGlobalSettings::dndEventDelay() ) {
emit view()->activated( m_url, e->button() ); emit view()->activated( m_url, e->button() );
} }
} }

@ -75,7 +75,7 @@ bool Watcher::requireDaemon( const TQCString& clientAppId,
daemon->apps.append( clientAppId ); daemon->apps.append( clientAppId );
#if TDE_VERSION >= 306 #if TDE_VERSION >= 306
daemon->process = new KProcess(); daemon->process = new TDEProcess();
daemon->process->setUseShell( true ); daemon->process->setUseShell( true );
#else #else
daemon->process = new KShellProcess(); daemon->process = new KShellProcess();
@ -84,8 +84,8 @@ bool Watcher::requireDaemon( const TQCString& clientAppId,
daemon->process->setEnvironment( "LANG", "C" ); daemon->process->setEnvironment( "LANG", "C" );
daemon->process->setEnvironment( "LANGUAGE", "C" ); daemon->process->setEnvironment( "LANGUAGE", "C" );
*daemon->process << commandline; *daemon->process << commandline;
connect( daemon->process, TQT_SIGNAL( processExited( KProcess * ) ), connect( daemon->process, TQT_SIGNAL( processExited( TDEProcess * ) ),
TQT_SLOT( slotProcExited( KProcess * ))); TQT_SLOT( slotProcExited( TDEProcess * )));
return startDaemon( daemon ); return startDaemon( daemon );
} }
} }
@ -128,7 +128,7 @@ TQStringList Watcher::runningDaemons() const
return result; return result;
} }
void Watcher::slotProcExited( KProcess *proc ) void Watcher::slotProcExited( TDEProcess *proc )
{ {
DaemonData *daemon = findDaemonFromProcess( proc ); DaemonData *daemon = findDaemonFromProcess( proc );
@ -166,7 +166,7 @@ void Watcher::slotProcExited( KProcess *proc )
bool Watcher::startDaemon( DaemonData *daemon ) bool Watcher::startDaemon( DaemonData *daemon )
{ {
if ( daemon->process->start( KProcess::NotifyOnExit ) ) if ( daemon->process->start( TDEProcess::NotifyOnExit ) )
return true; return true;
else else
@ -194,8 +194,8 @@ void Watcher::slotTimeout()
{ {
if ( daemon->apps.isEmpty() ) if ( daemon->apps.isEmpty() )
{ {
// the daemon and KProcess might get deleted by killing the // the daemon and TDEProcess might get deleted by killing the
// KProcess (through slotProcExited()), so don't dereference // TDEProcess (through slotProcExited()), so don't dereference
// daemon after proc->kill() // daemon after proc->kill()
TQString key = daemon->daemonKey; TQString key = daemon->daemonKey;
@ -208,7 +208,7 @@ void Watcher::slotTimeout()
} }
} }
DaemonData * Watcher::findDaemonFromProcess( KProcess *proc ) DaemonData * Watcher::findDaemonFromProcess( TDEProcess *proc )
{ {
DaemonData *daemon; DaemonData *daemon;
TQDictIterator<DaemonData> it( m_daemons ); TQDictIterator<DaemonData> it( m_daemons );
@ -265,7 +265,7 @@ void Watcher::emitFailure( DaemonData *daemon )
if ( daemon ) if ( daemon )
{ {
daemonDied( daemon->daemonKey, daemon->process->pid() ); daemonDied( daemon->daemonKey, daemon->process->pid() );
m_daemons.remove( daemon->daemonKey ); // deletes daemon + KProcess m_daemons.remove( daemon->daemonKey ); // deletes daemon + TDEProcess
} }
} }

@ -54,7 +54,7 @@ namespace KMrml
uint timeout; uint timeout;
TQStrList apps; TQStrList apps;
int restartOnFailure; int restartOnFailure;
KProcess *process; TDEProcess *process;
TQTimer *timer; TQTimer *timer;
}; };
@ -90,14 +90,14 @@ namespace KMrml
private: private:
void unrequireDaemon( DaemonData *daemon, const TQCString& clientAppId); void unrequireDaemon( DaemonData *daemon, const TQCString& clientAppId);
DaemonData *findDaemonFromProcess( KProcess *proc ); DaemonData *findDaemonFromProcess( TDEProcess *proc );
DaemonData *findDaemonFromTimer( TQTimer *timer ); DaemonData *findDaemonFromTimer( TQTimer *timer );
void emitExited( DaemonData *daemon ); void emitExited( DaemonData *daemon );
void emitFailure( DaemonData *daemon ); void emitFailure( DaemonData *daemon );
private slots: private slots:
void slotProcExited( KProcess *proc ); void slotProcExited( TDEProcess *proc );
void slotAppUnregistered( const TQCString& appId ); void slotAppUnregistered( const TQCString& appId );
TQDict<DaemonData> m_daemons; TQDict<DaemonData> m_daemons;

@ -371,7 +371,7 @@ static TQStringList mimeTypesSupportingProperty (const TQString &property,
{ {
TQStringList mimeTypeList; TQStringList mimeTypeList;
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), KConfigGroupSaver cfgGroupSaver (TDEGlobal::config (),
kpSettingsGroupMimeTypeProperties); kpSettingsGroupMimeTypeProperties);
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();

@ -157,7 +157,7 @@ void kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize (const TQPixmap &p
const TQString alternateText6 = i18n ("%1B (%2%)"); const TQString alternateText6 = i18n ("%1B (%2%)");
const TQString alternateText7 = i18n ("%1B (approx. %2%)"); const TQString alternateText7 = i18n ("%1B (approx. %2%)");
m_fileSizeLabel->setText (i18n ("%1 bytes (approx. %2%)") m_fileSizeLabel->setText (i18n ("%1 bytes (approx. %2%)")
.arg (KGlobal::locale ()->formatLong (m_fileSize)) .arg (TDEGlobal::locale ()->formatLong (m_fileSize))
.arg (percent)); .arg (percent));
} }
@ -742,7 +742,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
this, TQT_SLOT (hidePreview ())); this, TQT_SLOT (hidePreview ()));
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupPreviewSave); KConfigGroupSaver cfgGroupSaver (TDEGlobal::config (), kpSettingsGroupPreviewSave);
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();
if (cfg->hasKey (kpSettingPreviewSaveUpdateDelay)) if (cfg->hasKey (kpSettingPreviewSaveUpdateDelay))
@ -769,7 +769,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET #if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "\tread cfg preview dialog last rel geometry" << endl; kdDebug () << "\tread cfg preview dialog last rel geometry" << endl;
#endif #endif
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupPreviewSave); KConfigGroupSaver cfgGroupSaver (TDEGlobal::config (), kpSettingsGroupPreviewSave);
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();
m_previewDialogLastRelativeGeometry = cfg->readRectEntry ( m_previewDialogLastRelativeGeometry = cfg->readRectEntry (
@ -845,7 +845,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
{ {
m_updatePreviewDialogLastRelativeGeometryTimer->stop (); m_updatePreviewDialogLastRelativeGeometryTimer->stop ();
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupPreviewSave); KConfigGroupSaver cfgGroupSaver (TDEGlobal::config (), kpSettingsGroupPreviewSave);
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();
cfg->writeEntry (kpSettingPreviewSaveGeometry, m_previewDialogLastRelativeGeometry); cfg->writeEntry (kpSettingPreviewSaveGeometry, m_previewDialogLastRelativeGeometry);

@ -997,7 +997,7 @@ static bool shouldPrintImageCenteredOnPage ()
#endif #endif
bool ret; bool ret;
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), KConfigGroupSaver cfgGroupSaver (TDEGlobal::config (),
kpSettingsGroupGeneral); kpSettingsGroupGeneral);
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();

@ -73,7 +73,7 @@ void kpMainWindow::enableHelpMenuDocumentActions (bool /*enable*/)
// SYNC: tdebase/twin/twinbindings.cpp // SYNC: tdebase/twin/twinbindings.cpp
static TQString printScreenShortcutString () static TQString printScreenShortcutString ()
{ {
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), "Global Shortcuts"); KConfigGroupSaver cfgGroupSaver (TDEGlobal::config (), "Global Shortcuts");
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();
// TODO: i18n() entry name? twinbindings.cpp seems to but it doesn't // TODO: i18n() entry name? twinbindings.cpp seems to but it doesn't

@ -137,7 +137,7 @@ kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection,
{ {
if (!s_lastColor1.isValid () || !s_lastColor2.isValid ()) if (!s_lastColor1.isValid () || !s_lastColor2.isValid ())
{ {
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupFlattenEffect); KConfigGroupSaver cfgGroupSaver (TDEGlobal::config (), kpSettingsGroupFlattenEffect);
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();
s_lastColor1 = cfg->readColorEntry (kpSettingFlattenEffectColor1); s_lastColor1 = cfg->readColorEntry (kpSettingFlattenEffectColor1);
@ -183,7 +183,7 @@ kpEffectFlattenWidget::~kpEffectFlattenWidget ()
s_lastColor2 = color2 (); s_lastColor2 = color2 ();
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupFlattenEffect); KConfigGroupSaver cfgGroupSaver (TDEGlobal::config (), kpSettingsGroupFlattenEffect);
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();
cfg->writeEntry (kpSettingFlattenEffectColor1, s_lastColor1); cfg->writeEntry (kpSettingFlattenEffectColor1, s_lastColor1);

@ -492,7 +492,7 @@ TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image,
int configDitherIfNumColorsGreaterThan = 323; int configDitherIfNumColorsGreaterThan = 323;
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), KConfigGroupSaver cfgGroupSaver (TDEGlobal::config (),
kpSettingsGroupGeneral); kpSettingsGroupGeneral);
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();

@ -604,7 +604,7 @@ static TQIconSet toolButtonIconSet (const TQString &iconName)
// No "disabled" pixmap is generated by UserIconSet() so generate it // No "disabled" pixmap is generated by UserIconSet() so generate it
// ourselves: // ourselves:
TQPixmap disabledIcon = KGlobal::iconLoader ()->iconEffect ()->apply ( TQPixmap disabledIcon = TDEGlobal::iconLoader ()->iconEffect ()->apply (
UserIcon (iconName), UserIcon (iconName),
KIcon::Toolbar, KIcon::DisabledState); KIcon::Toolbar, KIcon::DisabledState);

@ -175,7 +175,7 @@ int kpToolToolBar::defaultIconSize ()
#endif #endif
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), KConfigGroupSaver cfgGroupSaver (TDEGlobal::config (),
kpSettingsGroupTools); kpSettingsGroupTools);
KConfigBase *cfg = cfgGroupSaver.config (); KConfigBase *cfg = cfgGroupSaver.config ();
@ -200,7 +200,7 @@ int kpToolToolBar::defaultIconSize ()
if (m_defaultIconSize <= 0) if (m_defaultIconSize <= 0)
{ {
// Adapt according to screen geometry // Adapt according to screen geometry
const TQRect desktopSize = KGlobalSettings::desktopGeometry (this); const TQRect desktopSize = TDEGlobalSettings::desktopGeometry (this);
#if DEBUG_KP_TOOL_TOOL_BAR #if DEBUG_KP_TOOL_TOOL_BAR
kdDebug () << "\tadapting to screen size=" << desktopSize << endl; kdDebug () << "\tadapting to screen size=" << desktopSize << endl;
#endif #endif

@ -335,7 +335,7 @@ ImgSaveStat ImgSaver::saveImage( TQImage *image )
kdDebug(28000) << "saveImage: Directory is " << directory << endl; kdDebug(28000) << "saveImage: Directory is " << directory << endl;
TQString filename = createFilename( format ); TQString filename = createFilename( format );
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
konf->setGroup( OP_FILE_GROUP ); konf->setGroup( OP_FILE_GROUP );
if( konf->readBoolEntry( OP_ASK_FILENAME, false ) ) if( konf->readBoolEntry( OP_ASK_FILENAME, false ) )
@ -425,7 +425,7 @@ ImgSaveStat ImgSaver::saveImage( TQImage *image, const KURL& filename, const TQS
TQString ImgSaver::findFormat( picType type ) TQString ImgSaver::findFormat( picType type )
{ {
TQString format; TQString format;
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
konf->setGroup( OP_FILE_GROUP ); konf->setGroup( OP_FILE_GROUP );
if( type == PT_THUMBNAIL ) if( type == PT_THUMBNAIL )
@ -552,7 +552,7 @@ bool ImgSaver::isRememberedFormat( picType type, TQString format ) const
TQString ImgSaver::getFormatForType( picType type ) const TQString ImgSaver::getFormatForType( picType type ) const
{ {
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
TQ_CHECK_PTR( konf ); TQ_CHECK_PTR( konf );
konf->setGroup( OP_FILE_GROUP ); konf->setGroup( OP_FILE_GROUP );
@ -582,7 +582,7 @@ TQString ImgSaver::getFormatForType( picType type ) const
void ImgSaver::storeFormatForType( picType type, TQString format, bool ask ) void ImgSaver::storeFormatForType( picType type, TQString format, bool ask )
{ {
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
TQ_CHECK_PTR( konf ); TQ_CHECK_PTR( konf );
konf->setGroup( OP_FILE_GROUP ); konf->setGroup( OP_FILE_GROUP );
@ -691,7 +691,7 @@ ImgSaveStat ImgSaver::save( TQImage *image, const TQString &filename,
void ImgSaver::readConfig( void ) void ImgSaver::readConfig( void )
{ {
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
TQ_CHECK_PTR( konf ); TQ_CHECK_PTR( konf );
konf->setGroup( OP_FILE_GROUP ); konf->setGroup( OP_FILE_GROUP );
ask_for_format = konf->readBoolEntry( OP_FILE_ASK_FORMAT, true ); ask_for_format = konf->readBoolEntry( OP_FILE_ASK_FORMAT, true );

@ -81,7 +81,7 @@ KOCRBase::KOCRBase( TQWidget *parent, KSpellConfig *spellConfig,
kdDebug(28000) << "OCR Base Dialog!" << endl; kdDebug(28000) << "OCR Base Dialog!" << endl;
// Layout-Boxes // Layout-Boxes
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
KConfigGroupSaver gs( konf, CFG_OCR_KSPELL ); KConfigGroupSaver gs( konf, CFG_OCR_KSPELL );
m_userWantsSpellCheck = konf->readBoolEntry(CFG_WANT_KSPELL, true); m_userWantsSpellCheck = konf->readBoolEntry(CFG_WANT_KSPELL, true);
@ -359,7 +359,7 @@ void KOCRBase::slWantSpellcheck( bool wantIt )
} }
m_userWantsSpellCheck = wantIt; m_userWantsSpellCheck = wantIt;
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
KConfigGroupSaver gs( konf, CFG_OCR_KSPELL ); KConfigGroupSaver gs( konf, CFG_OCR_KSPELL );
konf->writeEntry( CFG_WANT_KSPELL, wantIt ); konf->writeEntry( CFG_WANT_KSPELL, wantIt );
} }

@ -93,7 +93,7 @@ EngineError KGOCRDialog::setupGui()
TQVBox *page = ocrPage(); TQVBox *page = ocrPage();
TQ_CHECK_PTR( page ); TQ_CHECK_PTR( page );
KConfig *conf = KGlobal::config (); KConfig *conf = TDEGlobal::config ();
conf->setGroup( CFG_GROUP_OCR_DIA ); conf->setGroup( CFG_GROUP_OCR_DIA );
//Qt::Horizontal line //Qt::Horizontal line
@ -179,7 +179,7 @@ KGOCRDialog::~KGOCRDialog()
void KGOCRDialog::writeConfig( void ) void KGOCRDialog::writeConfig( void )
{ {
KConfig *conf = KGlobal::config (); KConfig *conf = TDEGlobal::config ();
conf->setGroup( CFG_GROUP_OCR_DIA ); conf->setGroup( CFG_GROUP_OCR_DIA );
conf->writeEntry( CFG_GOCR_BINARY, TQString(getOCRCmd())); conf->writeEntry( CFG_GOCR_BINARY, TQString(getOCRCmd()));

@ -100,7 +100,7 @@ EngineError KadmosDialog::findClassifiers()
{ {
findClassifierPath(); findClassifierPath();
KLocale *locale = KGlobal::locale(); KLocale *locale = TDEGlobal::locale();
TQStringList allCountries = locale->allLanguagesTwoAlpha (); TQStringList allCountries = locale->allLanguagesTwoAlpha ();
for ( TQStringList::Iterator it = allCountries.begin(); for ( TQStringList::Iterator it = allCountries.begin();
it != allCountries.end(); ++it ) it != allCountries.end(); ++it )
@ -236,7 +236,7 @@ EngineError KadmosDialog::findClassifierPath()
KStandardDirs stdDir; KStandardDirs stdDir;
EngineError err = ENG_OK; EngineError err = ENG_OK;
KConfig *conf = KGlobal::config (); KConfig *conf = TDEGlobal::config ();
KConfigGroupSaver gs( conf, CFG_GROUP_KADMOS ); KConfigGroupSaver gs( conf, CFG_GROUP_KADMOS );
m_customClassifierPath = conf->readPathEntry( CFG_KADMOS_CLASSIFIER_PATH ); m_customClassifierPath = conf->readPathEntry( CFG_KADMOS_CLASSIFIER_PATH );
@ -341,7 +341,7 @@ void KadmosDialog::slFontChanged( int id )
{ {
m_cbLang->clear(); m_cbLang->clear();
KConfig *conf = KGlobal::config (); KConfig *conf = TDEGlobal::config ();
KConfigGroupSaver gs( conf, CFG_GROUP_KADMOS ); KConfigGroupSaver gs( conf, CFG_GROUP_KADMOS );

@ -104,7 +104,7 @@ EngineError ocradDialog::setupGui()
TQVBox *page = ocrPage(); TQVBox *page = ocrPage();
TQ_CHECK_PTR( page ); TQ_CHECK_PTR( page );
KConfig *conf = KGlobal::config (); KConfig *conf = TDEGlobal::config ();
conf->setGroup( CFG_GROUP_OCR_DIA ); conf->setGroup( CFG_GROUP_OCR_DIA );
//Qt::Horizontal line //Qt::Horizontal line
@ -177,7 +177,7 @@ ocradDialog::~ocradDialog()
void ocradDialog::writeConfig( void ) void ocradDialog::writeConfig( void )
{ {
KConfig *conf = KGlobal::config (); KConfig *conf = TDEGlobal::config ();
conf->setGroup( CFG_GROUP_OCR_DIA ); conf->setGroup( CFG_GROUP_OCR_DIA );
conf->writeEntry( CFG_OCRAD_BINARY, TQString(getOCRCmd())); conf->writeEntry( CFG_OCRAD_BINARY, TQString(getOCRCmd()));
@ -207,22 +207,22 @@ void ocradDialog::version( const TQString& exe )
{ {
if( m_proc ) delete m_proc; if( m_proc ) delete m_proc;
m_proc = new KProcess; m_proc = new TDEProcess;
kdDebug(28000) << "Using " << exe << " as command" << endl; kdDebug(28000) << "Using " << exe << " as command" << endl;
*m_proc << exe; *m_proc << exe;
*m_proc << TQString("-V"); *m_proc << TQString("-V");
connect( m_proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )), connect( m_proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int )),
this, TQT_SLOT(slReceiveStdIn(KProcess *, char *, int ))); this, TQT_SLOT(slReceiveStdIn(TDEProcess *, char *, int )));
if( ! m_proc->start( KProcess::NotifyOnExit, KProcess::Stdout ) ) if( ! m_proc->start( TDEProcess::NotifyOnExit, TDEProcess::Stdout ) )
{ {
slReceiveStdIn( 0, (char*) "unknown", 7 ); slReceiveStdIn( 0, (char*) "unknown", 7 );
} }
} }
void ocradDialog::slReceiveStdIn( KProcess*, char *buffer, int buflen) void ocradDialog::slReceiveStdIn( TDEProcess*, char *buffer, int buflen)
{ {
TQString vstr = TQString::fromUtf8(buffer, buflen); TQString vstr = TQString::fromUtf8(buffer, buflen);

@ -48,7 +48,7 @@
class KSpellConfig; class KSpellConfig;
class KURLRequester; class KURLRequester;
class KProcess; class TDEProcess;
class TQLabel; class TQLabel;
class TQComboBox; class TQComboBox;
@ -92,7 +92,7 @@ private:
void version( const TQString& exe ); void version( const TQString& exe );
private slots: private slots:
void slReceiveStdIn( KProcess *proc, char *buffer, int buflen); void slReceiveStdIn( TDEProcess *proc, char *buffer, int buflen);
private: private:
@ -100,7 +100,7 @@ private:
KURLRequester *m_orfUrlRequester; KURLRequester *m_orfUrlRequester;
TQComboBox *m_layoutMode; TQComboBox *m_layoutMode;
TQLabel *m_binaryLabel; TQLabel *m_binaryLabel;
KProcess *m_proc; TDEProcess *m_proc;
int m_version; int m_version;
}; };

@ -75,7 +75,7 @@ Kooka::Kooka( const TQCString& deviceToUse)
setXMLFile( "kookaui.rc", true ); setXMLFile( "kookaui.rc", true );
setAcceptDrops(false); // Waba: Not (yet?) supported setAcceptDrops(false); // Waba: Not (yet?) supported
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
readDockConfig ( konf, DOCK_SIZES ); readDockConfig ( konf, DOCK_SIZES );
// then, setup our actions // then, setup our actions
@ -109,7 +109,7 @@ void Kooka::createMyGUI( KParts::Part *part )
Kooka::~Kooka() Kooka::~Kooka()
{ {
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
m_view->slCloseScanDevice(); m_view->slCloseScanDevice();
writeDockConfig ( konf, DOCK_SIZES ); writeDockConfig ( konf, DOCK_SIZES );
delete m_printer; delete m_printer;
@ -385,7 +385,7 @@ void Kooka::optionsShowPreviewer()
void Kooka::optionsConfigureToolbars() void Kooka::optionsConfigureToolbars()
{ {
// use the standard toolbar editor // use the standard toolbar editor
saveMainWindowSettings(KGlobal::config(), autoSaveGroup()); saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
KEditToolbar dlg(factory()); KEditToolbar dlg(factory());
connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(newToolbarConfig())); connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(newToolbarConfig()));
dlg.exec(); dlg.exec();
@ -394,7 +394,7 @@ void Kooka::optionsConfigureToolbars()
void Kooka::newToolbarConfig() void Kooka::newToolbarConfig()
{ {
// OK/Apply pressed in the toolbar editor // OK/Apply pressed in the toolbar editor
applyMainWindowSettings(KGlobal::config(), autoSaveGroup()); applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
} }
void Kooka::optionsPreferences() void Kooka::optionsPreferences()

@ -62,7 +62,7 @@ KookaPreferences::KookaPreferences()
// this is the base class for your preferences dialog. it is now // this is the base class for your preferences dialog. it is now
// a Treelist dialog.. but there are a number of other // a Treelist dialog.. but there are a number of other
// possibilities (including Tab, Swallow, and just Plain) // possibilities (including Tab, Swallow, and just Plain)
konf = KGlobal::config (); konf = TDEGlobal::config ();
setupStartupPage(); setupStartupPage();
setupSaveFormatPage(); setupSaveFormatPage();
@ -200,7 +200,7 @@ TQString KookaPreferences::tryFindBinary( const TQString& bin, const TQString& c
{ {
/* First check the config files for an entry */ /* First check the config files for an entry */
KConfig *cfg = KGlobal::config(); KConfig *cfg = TDEGlobal::config();
cfg->setGroup(CFG_GROUP_OCR_DIA); cfg->setGroup(CFG_GROUP_OCR_DIA);
TQString res = cfg->readPathEntry( configKey /* CFG_GOCR_BINARY */, "notFound" ); TQString res = cfg->readPathEntry( configKey /* CFG_GOCR_BINARY */, "notFound" );

@ -96,7 +96,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU
m_mainWindow(parent), m_mainWindow(parent),
m_ocrResEdit(0) m_ocrResEdit(0)
{ {
KIconLoader *loader = KGlobal::iconLoader(); KIconLoader *loader = TDEGlobal::iconLoader();
scan_params = 0L; scan_params = 0L;
preview_canvas = 0L; preview_canvas = 0L;
@ -294,7 +294,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToU
KookaView::~KookaView() KookaView::~KookaView()
{ {
saveProperties( KGlobal::config () ); saveProperties( TDEGlobal::config () );
delete preview_canvas; delete preview_canvas;
kdDebug(28000)<< "Finished saving config data" << endl; kdDebug(28000)<< "Finished saving config data" << endl;
@ -438,7 +438,7 @@ void KookaView::loadStartupImage( void )
kdDebug( 28000) << "Starting to load startup image" << endl; kdDebug( 28000) << "Starting to load startup image" << endl;
/* Now set the configured stuff */ /* Now set the configured stuff */
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
if( konf ) if( konf )
{ {
konf->setGroup(GROUP_STARTUP); konf->setGroup(GROUP_STARTUP);
@ -555,7 +555,7 @@ void KookaView::startOCR( KookaImage *img )
{ {
if( ocrFabric == 0L ) if( ocrFabric == 0L )
{ {
ocrFabric = new KSANEOCR( m_mainDock, KGlobal::config() ); ocrFabric = new KSANEOCR( m_mainDock, TDEGlobal::config() );
ocrFabric->setImageCanvas( img_canvas ); ocrFabric->setImageCanvas( img_canvas );
connect( ocrFabric, TQT_SIGNAL( newOCRResultText( const TQString& )), connect( ocrFabric, TQT_SIGNAL( newOCRResultText( const TQString& )),

@ -85,7 +85,7 @@ KSANEOCR::KSANEOCR( TQWidget*, KConfig *cfg ):
m_applyFilter(false), m_applyFilter(false),
m_unlinkORF(true) m_unlinkORF(true)
{ {
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
m_ocrEngine = OCRAD; m_ocrEngine = OCRAD;
m_img = 0L; m_img = 0L;
m_tmpFile = 0L; m_tmpFile = 0L;
@ -393,7 +393,7 @@ void KSANEOCR::startOCRAD( )
daemon = 0; daemon = 0;
} }
daemon = new KProcess; daemon = new TDEProcess;
TQ_CHECK_PTR(daemon); TQ_CHECK_PTR(daemon);
*daemon << cmd; *daemon << cmd;
@ -403,7 +403,7 @@ void KSANEOCR::startOCRAD( )
*daemon << TQString("-l"); *daemon << TQString("-l");
*daemon << TQString::number( ocrDia->layoutDetectionMode()); *daemon << TQString::number( ocrDia->layoutDetectionMode());
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
KConfigGroupSaver( konf, CFG_GROUP_OCRAD ); KConfigGroupSaver( konf, CFG_GROUP_OCRAD );
TQString format = konf->readEntry( CFG_OCRAD_FORMAT, "utf8"); TQString format = konf->readEntry( CFG_OCRAD_FORMAT, "utf8");
@ -425,14 +425,14 @@ void KSANEOCR::startOCRAD( )
m_ocrResultText = ""; m_ocrResultText = "";
connect(daemon, TQT_SIGNAL(processExited(KProcess *)), connect(daemon, TQT_SIGNAL(processExited(TDEProcess *)),
this, TQT_SLOT( ocradExited(KProcess*))); this, TQT_SLOT( ocradExited(TDEProcess*)));
connect(daemon, TQT_SIGNAL(receivedStdout(KProcess *, char*, int)), connect(daemon, TQT_SIGNAL(receivedStdout(TDEProcess *, char*, int)),
this, TQT_SLOT( ocradStdIn(KProcess*, char*, int))); this, TQT_SLOT( ocradStdIn(TDEProcess*, char*, int)));
connect(daemon, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)), connect(daemon, TQT_SIGNAL(receivedStderr(TDEProcess *, char*, int)),
this, TQT_SLOT( ocradStdErr(KProcess*, char*, int))); this, TQT_SLOT( ocradStdErr(TDEProcess*, char*, int)));
if (!daemon->start(KProcess::NotifyOnExit, KProcess::All)) if (!daemon->start(TDEProcess::NotifyOnExit, TDEProcess::All))
{ {
kdDebug(28000) << "Error starting ocrad-daemon!" << endl; kdDebug(28000) << "Error starting ocrad-daemon!" << endl;
} }
@ -445,7 +445,7 @@ void KSANEOCR::startOCRAD( )
} }
void KSANEOCR::ocradExited(KProcess* ) void KSANEOCR::ocradExited(TDEProcess* )
{ {
kdDebug(28000) << "ocrad exit " << endl; kdDebug(28000) << "ocrad exit " << endl;
TQString err; TQString err;
@ -462,14 +462,14 @@ void KSANEOCR::ocradExited(KProcess* )
} }
void KSANEOCR::ocradStdErr(KProcess*, char* buffer, int buflen) void KSANEOCR::ocradStdErr(TDEProcess*, char* buffer, int buflen)
{ {
TQString errorBuffer = TQString::fromLocal8Bit(buffer, buflen); TQString errorBuffer = TQString::fromLocal8Bit(buffer, buflen);
kdDebug(28000) << "ocrad says on stderr: " << errorBuffer << endl; kdDebug(28000) << "ocrad says on stderr: " << errorBuffer << endl;
} }
void KSANEOCR::ocradStdIn(KProcess*, char* buffer, int buflen) void KSANEOCR::ocradStdIn(TDEProcess*, char* buffer, int buflen)
{ {
TQString errorBuffer = TQString::fromLocal8Bit(buffer, buflen); TQString errorBuffer = TQString::fromLocal8Bit(buffer, buflen);
kdDebug(28000) << "ocrad says on stdin: " << errorBuffer << endl; kdDebug(28000) << "ocrad says on stdin: " << errorBuffer << endl;
@ -531,16 +531,16 @@ void KSANEOCR::startOCRProcess( void )
daemon = 0; daemon = 0;
} }
daemon = new KProcess; daemon = new TDEProcess;
TQ_CHECK_PTR(daemon); TQ_CHECK_PTR(daemon);
m_ocrResultText = ""; m_ocrResultText = "";
connect(daemon, TQT_SIGNAL(processExited(KProcess *)), connect(daemon, TQT_SIGNAL(processExited(TDEProcess *)),
this, TQT_SLOT( gocrExited(KProcess*))); this, TQT_SLOT( gocrExited(TDEProcess*)));
connect(daemon, TQT_SIGNAL(receivedStdout(KProcess *, char*, int)), connect(daemon, TQT_SIGNAL(receivedStdout(TDEProcess *, char*, int)),
this, TQT_SLOT( gocrStdIn(KProcess*, char*, int))); this, TQT_SLOT( gocrStdIn(TDEProcess*, char*, int)));
connect(daemon, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)), connect(daemon, TQT_SIGNAL(receivedStderr(TDEProcess *, char*, int)),
this, TQT_SLOT( gocrStdErr(KProcess*, char*, int))); this, TQT_SLOT( gocrStdErr(TDEProcess*, char*, int)));
TQString opt; TQString opt;
*daemon << TQFile::encodeName(cmd).data(); *daemon << TQFile::encodeName(cmd).data();
@ -570,7 +570,7 @@ void KSANEOCR::startOCRProcess( void )
m_ocrCurrLine = 0; // Important in gocrStdIn to store the results m_ocrCurrLine = 0; // Important in gocrStdIn to store the results
if (!daemon->start(KProcess::NotifyOnExit, KProcess::All)) if (!daemon->start(TDEProcess::NotifyOnExit, TDEProcess::All))
{ {
kdDebug(28000) << "Error starting daemon!" << endl; kdDebug(28000) << "Error starting daemon!" << endl;
} }
@ -715,7 +715,7 @@ void KSANEOCR::slotKadmosResult()
/* /*
* *
*/ */
void KSANEOCR::gocrExited(KProcess* d) void KSANEOCR::gocrExited(TDEProcess* d)
{ {
kdDebug(28000) << "daemonExited start !" << endl; kdDebug(28000) << "daemonExited start !" << endl;
@ -1051,7 +1051,7 @@ void KSANEOCR::cleanUpFiles( void )
} }
void KSANEOCR::gocrStdErr(KProcess*, char* buffer, int buflen) void KSANEOCR::gocrStdErr(TDEProcess*, char* buffer, int buflen)
{ {
TQString errorBuffer = TQString::fromLocal8Bit(buffer, buflen); TQString errorBuffer = TQString::fromLocal8Bit(buffer, buflen);
kdDebug(28000) << "gocr says: " << errorBuffer << endl; kdDebug(28000) << "gocr says: " << errorBuffer << endl;
@ -1059,7 +1059,7 @@ void KSANEOCR::gocrStdErr(KProcess*, char* buffer, int buflen)
} }
void KSANEOCR::gocrStdIn(KProcess*, char* buffer, int buflen) void KSANEOCR::gocrStdIn(TDEProcess*, char* buffer, int buflen)
{ {
TQString aux = TQString::fromLocal8Bit(buffer, buflen); TQString aux = TQString::fromLocal8Bit(buffer, buflen);

@ -52,7 +52,7 @@
class KOCRBase; class KOCRBase;
class KookaImage; class KookaImage;
class KTempFile; class KTempFile;
class KProcess; class TDEProcess;
class TQRect; class TQRect;
class TQPixmap; class TQPixmap;
class TQStringList; class TQStringList;
@ -222,13 +222,13 @@ private slots:
void slotKadmosResult(); void slotKadmosResult();
void startOCRProcess( void ); void startOCRProcess( void );
void gocrStdIn(KProcess*, char* buffer, int buflen); void gocrStdIn(TDEProcess*, char* buffer, int buflen);
void gocrStdErr(KProcess*, char* buffer, int buflen); void gocrStdErr(TDEProcess*, char* buffer, int buflen);
void gocrExited(KProcess*); void gocrExited(TDEProcess*);
void ocradStdIn(KProcess*, char* buffer, int buflen); void ocradStdIn(TDEProcess*, char* buffer, int buflen);
void ocradStdErr(KProcess*, char* buffer, int buflen); void ocradStdErr(TDEProcess*, char* buffer, int buflen);
void ocradExited(KProcess*); void ocradExited(TDEProcess*);
/* /*
* reads orf files from a file and fills the result structures * reads orf files from a file and fills the result structures
@ -241,7 +241,7 @@ private:
KOCRBase *m_ocrProcessDia; KOCRBase *m_ocrProcessDia;
KProcess *daemon; TDEProcess *daemon;
bool visibleOCRRunning; bool visibleOCRRunning;
KTempFile *m_tmpFile; KTempFile *m_tmpFile;

@ -85,9 +85,9 @@ int main( int argc, char *argv[] )
TDECmdLineArgs::addCmdLineOptions( options ); // Add my own options. TDECmdLineArgs::addCmdLineOptions( options ); // Add my own options.
TDEApplication app; TDEApplication app;
KGlobal::locale()->insertCatalogue("libkscan"); TDEGlobal::locale()->insertCatalogue("libkscan");
KImageIO::registerFormats(); KImageIO::registerFormats();
KIconLoader *loader = KGlobal::iconLoader(); KIconLoader *loader = TDEGlobal::iconLoader();
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
TQCString devToUse = args->getOption( "d" ); TQCString devToUse = args->getOption( "d" );

@ -117,7 +117,7 @@ ScanPackager::ScanPackager( TQWidget *parent ) : KFileTreeView( parent )
m_currImportDir = m_currCopyDir; m_currImportDir = m_currCopyDir;
/* Preload frequently used icons */ /* Preload frequently used icons */
KIconLoader *loader = KGlobal::iconLoader(); KIconLoader *loader = TDEGlobal::iconLoader();
m_floppyPixmap = loader->loadIcon( "3floppy_unmount", KIcon::Small ); m_floppyPixmap = loader->loadIcon( "3floppy_unmount", KIcon::Small );
m_grayPixmap = loader->loadIcon( "palette_gray", KIcon::Small ); m_grayPixmap = loader->loadIcon( "palette_gray", KIcon::Small );
m_bwPixmap = loader->loadIcon( "palette_lineart", KIcon::Small ); m_bwPixmap = loader->loadIcon( "palette_lineart", KIcon::Small );
@ -145,7 +145,7 @@ void ScanPackager::openRoots()
KFileTreeBranch* ScanPackager::openRoot( const KURL& root, bool ) KFileTreeBranch* ScanPackager::openRoot( const KURL& root, bool )
{ {
KIconLoader *loader = KGlobal::iconLoader(); KIconLoader *loader = TDEGlobal::iconLoader();
/* working on the global branch. FIXME */ /* working on the global branch. FIXME */
m_defaultBranch = addBranch( root, i18n("Kooka Gallery"), m_defaultBranch = addBranch( root, i18n("Kooka Gallery"),
@ -581,7 +581,7 @@ void ScanPackager::loadImageForItem( KFileTreeViewItem *item )
kdDebug(28000) << "subImage-count: " << img->subImagesCount() << endl; kdDebug(28000) << "subImage-count: " << img->subImagesCount() << endl;
if( img->subImagesCount() > 1 ) if( img->subImagesCount() > 1 )
{ {
KIconLoader *loader = KGlobal::iconLoader(); KIconLoader *loader = TDEGlobal::iconLoader();
kdDebug(28000) << "SubImages existing!" << endl; kdDebug(28000) << "SubImages existing!" << endl;
/* Start at the image with index 1, that makes one less than are actually in the /* Start at the image with index 1, that makes one less than are actually in the

@ -86,7 +86,7 @@ ThumbView::~ThumbView()
bool ThumbView::readSettings() bool ThumbView::readSettings()
{ {
KConfig *cfg = KGlobal::config(); KConfig *cfg = TDEGlobal::config();
cfg->setGroup( THUMB_GROUP ); cfg->setGroup( THUMB_GROUP );
bool dirty = false; bool dirty = false;
@ -481,7 +481,7 @@ void ThumbView::clear()
void ThumbView::saveConfig() void ThumbView::saveConfig()
{ {
KConfig *cfg = KGlobal::config(); KConfig *cfg = TDEGlobal::config();
cfg->setGroup( THUMB_GROUP ); cfg->setGroup( THUMB_GROUP );
cfg->writeEntry( MARGIN_COLOR1, m_marginColor1 ); cfg->writeEntry( MARGIN_COLOR1, m_marginColor1 );

@ -842,7 +842,7 @@ TQString PDFGenerator::getDocumentDate( const TQString & data ) const
TQDate d( year, mon, day ); //CHECK: it was mon-1, Jan->0 (??) TQDate d( year, mon, day ); //CHECK: it was mon-1, Jan->0 (??)
TQTime t( hour, min, sec ); TQTime t( hour, min, sec );
if ( d.isValid() && t.isValid() ) if ( d.isValid() && t.isValid() )
result = KGlobal::locale()->formatDateTime( TQDateTime(d, t), false, true ); result = TDEGlobal::locale()->formatDateTime( TQDateTime(d, t), false, true );
else else
result = s; result = s;
} }

@ -127,7 +127,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName,
connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(emitWindowCaption())); connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(emitWindowCaption()));
// load catalog for translation // load catalog for translation
KGlobal::locale()->insertCatalogue("kpdf"); TDEGlobal::locale()->insertCatalogue("kpdf");
// create browser extension (for printing when embedded into browser) // create browser extension (for printing when embedded into browser)
m_bExtension = new BrowserExtension(this); m_bExtension = new BrowserExtension(this);
@ -428,11 +428,11 @@ bool Part::openFile()
tf.close(); tf.close();
m_temporaryLocalFile = tf.name(); m_temporaryLocalFile = tf.name();
KProcess *p = new KProcess; TDEProcess *p = new TDEProcess;
*p << app; *p << app;
*p << m_file << m_temporaryLocalFile; *p << m_file << m_temporaryLocalFile;
m_pageView->showText(i18n("Converting from ps to pdf..."), 0); m_pageView->showText(i18n("Converting from ps to pdf..."), 0);
connect(p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(psTransformEnded())); connect(p, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(psTransformEnded()));
p -> start(); p -> start();
return true; return true;
} }

@ -92,7 +92,7 @@ void Shell::init()
connect( m_part, TQT_SIGNAL( enablePrintAction(bool) ), m_printAction, TQT_SLOT( setEnabled(bool))); connect( m_part, TQT_SIGNAL( enablePrintAction(bool) ), m_printAction, TQT_SLOT( setEnabled(bool)));
readSettings(); readSettings();
if (!KGlobal::config()->hasGroup("MainWindow")) if (!TDEGlobal::config()->hasGroup("MainWindow"))
{ {
KMainWindowInterface kmwi(this); KMainWindowInterface kmwi(this);
kmwi.maximize(); kmwi.maximize();
@ -127,21 +127,21 @@ void Shell::openURL( const KURL & url )
void Shell::readSettings() void Shell::readSettings()
{ {
m_recent->loadEntries( KGlobal::config() ); m_recent->loadEntries( TDEGlobal::config() );
m_recent->setEnabled( true ); // force enabling m_recent->setEnabled( true ); // force enabling
m_recent->setToolTip( i18n("Click to open a file\nClick and hold to open a recent file") ); m_recent->setToolTip( i18n("Click to open a file\nClick and hold to open a recent file") );
KGlobal::config()->setDesktopGroup(); TDEGlobal::config()->setDesktopGroup();
bool fullScreen = KGlobal::config()->readBoolEntry( "FullScreen", false ); bool fullScreen = TDEGlobal::config()->readBoolEntry( "FullScreen", false );
setFullScreen( fullScreen ); setFullScreen( fullScreen );
} }
void Shell::writeSettings() void Shell::writeSettings()
{ {
m_recent->saveEntries( KGlobal::config() ); m_recent->saveEntries( TDEGlobal::config() );
KGlobal::config()->setDesktopGroup(); TDEGlobal::config()->setDesktopGroup();
KGlobal::config()->writeEntry( "FullScreen", m_fullScreenAction->isChecked()); TDEGlobal::config()->writeEntry( "FullScreen", m_fullScreenAction->isChecked());
KGlobal::config()->sync(); TDEGlobal::config()->sync();
} }
void Shell::setupActions() void Shell::setupActions()
@ -204,7 +204,7 @@ Shell::optionsConfigureToolbars()
void void
Shell::applyNewToolbarConfig() Shell::applyNewToolbarConfig()
{ {
applyMainWindowSettings(KGlobal::config(), "MainWindow"); applyMainWindowSettings(TDEGlobal::config(), "MainWindow");
} }
void Shell::slotQuit() void Shell::slotQuit()

@ -1513,7 +1513,7 @@ void PageView::updateZoom( ZoomMode newZoomMode )
{ {
case ZoomFixed:{ //ZoomFixed case case ZoomFixed:{ //ZoomFixed case
TQString z = d->aZoom->currentText(); TQString z = d->aZoom->currentText();
newFactor = KGlobal::locale()->readNumber( z.remove( z.find( '%' ), 1 ) ) / 100.0; newFactor = TDEGlobal::locale()->readNumber( z.remove( z.find( '%' ), 1 ) ) / 100.0;
}break; }break;
case ZoomIn: case ZoomIn:
newFactor += (newFactor > 0.99) ? ( newFactor > 1.99 ? 0.5 : 0.2 ) : 0.1; newFactor += (newFactor > 0.99) ? ( newFactor > 1.99 ? 0.5 : 0.2 ) : 0.1;
@ -1597,8 +1597,8 @@ void PageView::updateZoomText()
inserted = true; inserted = true;
if ( !inserted ) if ( !inserted )
selIdx++; selIdx++;
TQString localValue( KGlobal::locale()->formatNumber( value * 100.0, 2 ) ); TQString localValue( TDEGlobal::locale()->formatNumber( value * 100.0, 2 ) );
localValue.remove( KGlobal::locale()->decimalSymbol() + double_oh ); localValue.remove( TDEGlobal::locale()->decimalSymbol() + double_oh );
translated << TQString( "%1%" ).arg( localValue ); translated << TQString( "%1%" ).arg( localValue );
} }
d->aZoom->setItems( translated ); d->aZoom->setItems( translated );

@ -299,7 +299,7 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe )
{ {
if (m_width == -1) if (m_width == -1)
{ {
TQRect d = KGlobalSettings::desktopGeometry(this); TQRect d = TDEGlobalSettings::desktopGeometry(this);
m_width = d.width(); m_width = d.width();
m_height = d.height(); m_height = d.height();

@ -88,7 +88,7 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc)
width = TQMAX( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 ); width = TQMAX( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 );
} }
// stay inside the 2/3 of the screen width // stay inside the 2/3 of the screen width
TQRect screenContainer = KGlobalSettings::desktopGeometry( this ); TQRect screenContainer = TDEGlobalSettings::desktopGeometry( this );
width = TQMIN( width, 2*screenContainer.width()/3 ); width = TQMIN( width, 2*screenContainer.width()/3 );
resize(width, 1); resize(width, 1);
} }

@ -36,7 +36,7 @@ void PMCommentEdit::createTopWidgets( )
m_pEdit = new TQMultiLineEdit( this ); m_pEdit = new TQMultiLineEdit( this );
m_pEdit->setTextFormat( TQt::PlainText ); m_pEdit->setTextFormat( TQt::PlainText );
m_pEdit->setWordWrap( TQTextEdit::NoWrap ); m_pEdit->setWordWrap( TQTextEdit::NoWrap );
m_pEdit->setFont( KGlobalSettings::fixedFont( ) ); m_pEdit->setFont( TDEGlobalSettings::fixedFont( ) );
topLayout( )->addWidget( m_pEdit, 2 ); topLayout( )->addWidget( m_pEdit, 2 );
connect( m_pEdit, TQT_SIGNAL( textChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pEdit, TQT_SIGNAL( textChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );

@ -281,7 +281,7 @@ void PMDialogView::slotHelp( )
{ {
// Instead of calling invokeBrowser run konqueror directly. // Instead of calling invokeBrowser run konqueror directly.
// invokeBrowser was ignoring html anchors. // invokeBrowser was ignoring html anchors.
url = "konqueror " + KProcess::quote(url); url = "konqueror " + TDEProcess::quote(url);
KRun::runCommand( url ); KRun::runCommand( url );
} }
} }

@ -179,7 +179,7 @@ void PMDockMainWindow::createGUI( Part * part )
if( !d->m_bShellGUIActivated ) if( !d->m_bShellGUIActivated )
{ {
loadPlugins( TQT_TQOBJECT(this), this, KGlobal::instance() ); loadPlugins( TQT_TQOBJECT(this), this, TDEGlobal::instance() );
createShellGUI(); createShellGUI();
d->m_bShellGUIActivated = true; d->m_bShellGUIActivated = true;
} }
@ -2003,7 +2003,7 @@ void PMDockManager::readConfig(TQDomElement &base)
void PMDockManager::writeConfig( KConfig* c, TQString group ) void PMDockManager::writeConfig( KConfig* c, TQString group )
{ {
//debug("BEGIN Write Config"); //debug("BEGIN Write Config");
if ( !c ) c = KGlobal::config(); if ( !c ) c = TDEGlobal::config();
if ( group.isEmpty() ) group = "dock_setting_default"; if ( group.isEmpty() ) group = "dock_setting_default";
c->setGroup( group ); c->setGroup( group );
@ -2121,7 +2121,7 @@ void PMDockManager::writeConfig( KConfig* c, TQString group )
#include <tqmessagebox.h> #include <tqmessagebox.h>
void PMDockManager::readConfig( KConfig* c, TQString group ) void PMDockManager::readConfig( KConfig* c, TQString group )
{ {
if ( !c ) c = KGlobal::config(); if ( !c ) c = TDEGlobal::config();
if ( group.isEmpty() ) group = "dock_setting_default"; if ( group.isEmpty() ) group = "dock_setting_default";
c->setGroup( group ); c->setGroup( group );

@ -82,7 +82,7 @@ void PMLibraryManager::scanLibraries( )
TQStringList libraryDirectories; TQStringList libraryDirectories;
// Search for sub directories in /usr/share/kpovmodeler/library // Search for sub directories in /usr/share/kpovmodeler/library
libraryDirectories = KGlobal::dirs( )->findDirs( "data", "kpovmodeler/library" ); libraryDirectories = TDEGlobal::dirs( )->findDirs( "data", "kpovmodeler/library" );
for( TQStringList::Iterator i = libraryDirectories.begin( ); i != libraryDirectories.end( ); ++i ) for( TQStringList::Iterator i = libraryDirectories.begin( ); i != libraryDirectories.end( ); ++i )
{ {

@ -62,7 +62,7 @@ class KSelectAction;
class PMComboAction; class PMComboAction;
class PMSpinBoxAction; class PMSpinBoxAction;
class PMLabelAction; class PMLabelAction;
class KProcess; class TDEProcess;
/** /**
* The part for kpovmodeler (povray document) * The part for kpovmodeler (povray document)
@ -1032,7 +1032,7 @@ public:
PMBrowserExtension( PMPart* parent ) PMBrowserExtension( PMPart* parent )
: KParts::BrowserExtension( parent, "PMBrowserExtension" ) : KParts::BrowserExtension( parent, "PMBrowserExtension" )
{ {
KGlobal::locale()->insertCatalogue("kpovmodeler"); TDEGlobal::locale()->insertCatalogue("kpovmodeler");
} }
virtual ~PMBrowserExtension( ) virtual ~PMBrowserExtension( )

@ -37,7 +37,7 @@ PMPovrayOutputWidget::PMPovrayOutputWidget( TQWidget* parent, const char* name )
m_pTextView = new TQTextEdit( this ); m_pTextView = new TQTextEdit( this );
topLayout->addWidget( m_pTextView, 1 ); topLayout->addWidget( m_pTextView, 1 );
m_pTextView->setFont( KGlobalSettings::fixedFont( ) ); m_pTextView->setFont( TDEGlobalSettings::fixedFont( ) );
m_pTextView->setTextFormat( TQt::PlainText ); m_pTextView->setTextFormat( TQt::PlainText );
m_pTextView->setReadOnly( true ); m_pTextView->setReadOnly( true );

@ -86,13 +86,13 @@ bool PMPovrayRenderWidget::render( const TQByteArray& scene,
dstr->writeRawBytes( scene.data( ), scene.size( ) ); dstr->writeRawBytes( scene.data( ), scene.size( ) );
m_pTempFile->close( ); m_pTempFile->close( );
m_pProcess = new KProcess( ); m_pProcess = new TDEProcess( );
connect( m_pProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), connect( m_pProcess, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ),
TQT_SLOT( slotPovrayImage( KProcess*, char*, int ) ) ); TQT_SLOT( slotPovrayImage( TDEProcess*, char*, int ) ) );
connect( m_pProcess, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), connect( m_pProcess, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ),
TQT_SLOT( slotPovrayMessage( KProcess*, char*, int ) ) ); TQT_SLOT( slotPovrayMessage( TDEProcess*, char*, int ) ) );
connect( m_pProcess, TQT_SIGNAL( processExited( KProcess* ) ), connect( m_pProcess, TQT_SIGNAL( processExited( TDEProcess* ) ),
TQT_SLOT( slotRenderingFinished( KProcess* ) ) ); TQT_SLOT( slotRenderingFinished( TDEProcess* ) ) );
*m_pProcess << s_povrayCommand; *m_pProcess << s_povrayCommand;
@ -136,7 +136,7 @@ bool PMPovrayRenderWidget::render( const TQByteArray& scene,
m_bPixmapUpToDate = false; m_bPixmapUpToDate = false;
repaint( ); repaint( );
if( !m_pProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) if( !m_pProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput ) )
{ {
KMessageBox::error( this, i18n( "Couldn't call povray.\n" KMessageBox::error( this, i18n( "Couldn't call povray.\n"
"Please check your installation " "Please check your installation "
@ -179,7 +179,7 @@ void PMPovrayRenderWidget::resumeRendering( )
} }
} }
void PMPovrayRenderWidget::slotPovrayMessage( KProcess*, void PMPovrayRenderWidget::slotPovrayMessage( TDEProcess*,
char* buffer, int buflen ) char* buffer, int buflen )
{ {
TQString str; TQString str;
@ -188,7 +188,7 @@ void PMPovrayRenderWidget::slotPovrayMessage( KProcess*,
emit povrayMessage( str ); emit povrayMessage( str );
} }
void PMPovrayRenderWidget::slotPovrayImage( KProcess*, char* buffer, int buflen ) void PMPovrayRenderWidget::slotPovrayImage( TDEProcess*, char* buffer, int buflen )
{ {
int index = 0; int index = 0;
int i; int i;
@ -349,7 +349,7 @@ void PMPovrayRenderWidget::setPixel( int x, int y, uint c )
} }
/** /**
void PMPovrayRenderWidget::slotWroteStdin( KProcess* ) void PMPovrayRenderWidget::slotWroteStdin( TDEProcess* )
{ {
if( m_pProcess ) if( m_pProcess )
m_pProcess->closeStdin( ); m_pProcess->closeStdin( );
@ -357,7 +357,7 @@ void PMPovrayRenderWidget::slotWroteStdin( KProcess* )
} }
*/ */
void PMPovrayRenderWidget::slotRenderingFinished( KProcess* ) void PMPovrayRenderWidget::slotRenderingFinished( TDEProcess* )
{ {
if( m_pProcess->normalExit( ) ) if( m_pProcess->normalExit( ) )
emit( finished( m_pProcess->exitStatus( ) ) ); emit( finished( m_pProcess->exitStatus( ) ) );

@ -31,7 +31,7 @@
#include "pmrendermode.h" #include "pmrendermode.h"
#include "pmdragwidget.h" #include "pmdragwidget.h"
class KProcess; class TDEProcess;
class KConfig; class KConfig;
class KURL; class KURL;
class KTempFile; class KTempFile;
@ -130,19 +130,19 @@ protected slots:
/** /**
* Receive povray messages * Receive povray messages
*/ */
void slotPovrayMessage( KProcess* proc, char* buffer, int buflen ); void slotPovrayMessage( TDEProcess* proc, char* buffer, int buflen );
/** /**
* Receive rendered image * Receive rendered image
*/ */
void slotPovrayImage( KProcess* proc, char* buffer, int buflen ); void slotPovrayImage( TDEProcess* proc, char* buffer, int buflen );
/** /**
* Called when output has been written to the povray process * Called when output has been written to the povray process
*/ */
//void slotWroteStdin( KProcess* proc ); //void slotWroteStdin( TDEProcess* proc );
/** /**
* Called when the process has finished * Called when the process has finished
*/ */
void slotRenderingFinished( KProcess* proc ); void slotRenderingFinished( TDEProcess* proc );
protected: protected:
virtual void paintEvent( TQPaintEvent* ); virtual void paintEvent( TQPaintEvent* );
@ -151,7 +151,7 @@ private:
void setPixel( int x, int y, uint c ); void setPixel( int x, int y, uint c );
void cleanup( ); void cleanup( );
KProcess* m_pProcess; TDEProcess* m_pProcess;
bool m_bSuspended; bool m_bSuspended;
PMRenderMode m_renderMode; PMRenderMode m_renderMode;
TQImage m_image; TQImage m_image;

@ -158,7 +158,7 @@ bool PMPovrayWidget::render( const TQByteArray& scene, const PMRenderMode& m,
if( h > dw->height( ) ) if( h > dw->height( ) )
h = dw->height( ); h = dw->height( );
#else #else
TQRect dw = KGlobalSettings::desktopGeometry(this); TQRect dw = TDEGlobalSettings::desktopGeometry(this);
if( w > dw.width() ) if( w > dw.width() )
w = dw.width(); w = dw.width();
if( h > dw.height() ) if( h > dw.height() )

@ -39,7 +39,7 @@ void PMRawEdit::createTopWidgets( )
m_pEdit = new TQMultiLineEdit( this ); m_pEdit = new TQMultiLineEdit( this );
m_pEdit->setTextFormat( TQt::PlainText ); m_pEdit->setTextFormat( TQt::PlainText );
m_pEdit->setWordWrap( TQTextEdit::NoWrap ); m_pEdit->setWordWrap( TQTextEdit::NoWrap );
m_pEdit->setFont( KGlobalSettings::fixedFont( ) ); m_pEdit->setFont( TDEGlobalSettings::fixedFont( ) );
topLayout( )->addWidget( m_pEdit, 2 ); topLayout( )->addWidget( m_pEdit, 2 );
connect( m_pEdit, TQT_SIGNAL( textChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); connect( m_pEdit, TQT_SIGNAL( textChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );

@ -531,7 +531,7 @@ void PMShell::slotSettings( )
void PMShell::slotConfigureToolbars( ) void PMShell::slotConfigureToolbars( )
{ {
saveMainWindowSettings( KGlobal::config( ), "Appearance" ); saveMainWindowSettings( TDEGlobal::config( ), "Appearance" );
KEditToolbar dlg( factory( ) ); KEditToolbar dlg( factory( ) );
connect( &dlg, TQT_SIGNAL( newToolbarConfig( ) ), connect( &dlg, TQT_SIGNAL( newToolbarConfig( ) ),
this, TQT_SLOT( slotNewToolbarConfig( ) ) ); this, TQT_SLOT( slotNewToolbarConfig( ) ) );
@ -543,22 +543,22 @@ void PMShell::slotNewToolbarConfig( )
createGUI( 0 ); createGUI( 0 );
createShellGUI( false ); createShellGUI( false );
createGUI( m_pPart ); createGUI( m_pPart );
applyMainWindowSettings( KGlobal::config( ), "Appearance" ); applyMainWindowSettings( TDEGlobal::config( ), "Appearance" );
} }
void PMShell::updateGUI( ) void PMShell::updateGUI( )
{ {
saveMainWindowSettings( KGlobal::config( ), "Appearance" ); saveMainWindowSettings( TDEGlobal::config( ), "Appearance" );
createGUI( 0 ); createGUI( 0 );
createShellGUI( false ); createShellGUI( false );
createGUI( m_pPart ); createGUI( m_pPart );
applyMainWindowSettings( KGlobal::config( ), "Appearance" ); applyMainWindowSettings( TDEGlobal::config( ), "Appearance" );
} }
void PMShell::saveOptions( ) void PMShell::saveOptions( )
{ {
kdDebug( PMArea ) << "Saving configuration" << endl; kdDebug( PMArea ) << "Saving configuration" << endl;
KConfig* config = KGlobal::config( ); KConfig* config = TDEGlobal::config( );
// set group // set group
config->setGroup( "Appearance" ); config->setGroup( "Appearance" );

@ -541,8 +541,8 @@ void PMTreeView::viewportMouseMoveEvent( TQMouseEvent *e )
int y = e->pos( ).y( ); int y = e->pos( ).y( );
//Is it time to start a drag? //Is it time to start a drag?
if( abs( x - m_pressedPos.x( ) ) > KGlobalSettings::dndEventDelay( ) || if( abs( x - m_pressedPos.x( ) ) > TDEGlobalSettings::dndEventDelay( ) ||
abs( y - m_pressedPos.y( ) ) > KGlobalSettings::dndEventDelay( ) ) abs( y - m_pressedPos.y( ) ) > TDEGlobalSettings::dndEventDelay( ) )
{ {
m_selectOnReleaseEvent = false; m_selectOnReleaseEvent = false;

@ -96,7 +96,7 @@ KLineal::KLineal(TQWidget*parent,const char* name):KMainWindow(parent,name){
setMaximumSize(8000,8000); setMaximumSize(8000,8000);
KConfig *cfg = kapp->config(); KConfig *cfg = kapp->config();
TQColor defaultColor = DEFAULT_RULER_COLOR; TQColor defaultColor = DEFAULT_RULER_COLOR;
TQFont defaultFont(KGlobalSettings::generalFont().family(), 8); TQFont defaultFont(TDEGlobalSettings::generalFont().family(), 8);
defaultFont.setPixelSize(8); defaultFont.setPixelSize(8);
if (cfg) { if (cfg) {
cfg->setGroup(CFG_GROUP_SETTINGS); cfg->setGroup(CFG_GROUP_SETTINGS);
@ -114,7 +114,7 @@ KLineal::KLineal(TQWidget*parent,const char* name):KMainWindow(parent,name){
mLabel = new TQLabel(this); mLabel = new TQLabel(this);
mLabel->setGeometry(0,height()-12,32,12); mLabel->setGeometry(0,height()-12,32,12);
mLabel->setBackgroundOrigin(ParentOrigin); mLabel->setBackgroundOrigin(ParentOrigin);
TQFont labelFont(KGlobalSettings::generalFont().family(), 10); TQFont labelFont(TDEGlobalSettings::generalFont().family(), 10);
labelFont.setPixelSize(10); labelFont.setPixelSize(10);
mLabel->setFont(labelFont); mLabel->setFont(labelFont);
TQWhatsThis::add(mLabel, TQWhatsThis::add(mLabel,
@ -125,7 +125,7 @@ KLineal::KLineal(TQWidget*parent,const char* name):KMainWindow(parent,name){
mColorLabel->resize(45,12); mColorLabel->resize(45,12);
mColorLabel->setPaletteBackgroundColor(mColor); mColorLabel->setPaletteBackgroundColor(mColor);
mColorLabel->hide(); mColorLabel->hide();
TQFont colorFont(KGlobalSettings::fixedFont().family(), 10); TQFont colorFont(TDEGlobalSettings::fixedFont().family(), 10);
colorFont.setPixelSize(10); colorFont.setPixelSize(10);
mColorLabel->setFont(colorFont); mColorLabel->setFont(colorFont);
mColorLabel->move(mLabel->pos() + TQPoint(0, 20)); mColorLabel->move(mLabel->pos() + TQPoint(0, 20));
@ -283,7 +283,7 @@ void KLineal::setOrientation(int inOrientation) {
rotateRect(r, center, nineties); rotateRect(r, center, nineties);
TQRect desktop = KGlobalSettings::desktopGeometry(this); TQRect desktop = TDEGlobalSettings::desktopGeometry(this);
if (r.top() < desktop.top()) if (r.top() < desktop.top())
r.moveTop( desktop.top() ); r.moveTop( desktop.top() );
if (r.bottom() > desktop.bottom()) if (r.bottom() > desktop.bottom())
@ -321,7 +321,7 @@ void KLineal::reLength(int percentOfScreen) {
if (percentOfScreen < 10) { if (percentOfScreen < 10) {
return; return;
} }
TQRect r = KGlobalSettings::desktopGeometry(this); TQRect r = TDEGlobalSettings::desktopGeometry(this);
if (mOrientation == North || mOrientation == South) { if (mOrientation == North || mOrientation == South) {
mLongEdgeLen = r.width() * percentOfScreen / 100; mLongEdgeLen = r.width() * percentOfScreen / 100;
@ -351,7 +351,7 @@ void KLineal::setFullLength() {
reLength(100); reLength(100);
} }
void KLineal::choseColor() { void KLineal::choseColor() {
TQRect r = KGlobalSettings::desktopGeometry(this); TQRect r = TDEGlobalSettings::desktopGeometry(this);
TQPoint pos = TQCursor::pos(); TQPoint pos = TQCursor::pos();
if (pos.x() + mColorSelector.width() > r.width()) { if (pos.x() + mColorSelector.width() > r.width()) {

@ -94,7 +94,7 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent)
grabber->releaseMouse(); grabber->releaseMouse();
grabber->hide(); grabber->hide();
KConfig *conf=KGlobal::config(); KConfig *conf=TDEGlobal::config();
conf->setGroup("GENERAL"); conf->setGroup("GENERAL");
mainWidget->setDelay(conf->readNumEntry("delay",0)); mainWidget->setDelay(conf->readNumEntry("delay",0));
mainWidget->setMode( conf->readNumEntry( "mode", 0 ) ); mainWidget->setMode( conf->readNumEntry( "mode", 0 ) );
@ -110,7 +110,7 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent)
connect( &updateTimer, TQT_SIGNAL( timeout() ), TQT_TQOBJECT(this), TQT_SLOT( updatePreview() ) ); connect( &updateTimer, TQT_SIGNAL( timeout() ), TQT_TQOBJECT(this), TQT_SLOT( updatePreview() ) );
TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateCaption() ) ); TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( updateCaption() ) );
KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), false); KHelpMenu *helpMenu = new KHelpMenu(this, TDEGlobal::instance()->aboutData(), false);
TQPushButton *helpButton = actionButton( Help ); TQPushButton *helpButton = actionButton( Help );
helpButton->setPopup(helpMenu->menu()); helpButton->setPopup(helpMenu->menu());
@ -361,7 +361,7 @@ void KSnapshot::slotWindowGrabbed( const TQPixmap &pix )
void KSnapshot::closeEvent( TQCloseEvent * e ) void KSnapshot::closeEvent( TQCloseEvent * e )
{ {
KConfig *conf=KGlobal::config(); KConfig *conf=TDEGlobal::config();
conf->setGroup("GENERAL"); conf->setGroup("GENERAL");
conf->writeEntry("delay",mainWidget->delay()); conf->writeEntry("delay",mainWidget->delay());
conf->writeEntry("mode",mainWidget->mode()); conf->writeEntry("mode",mainWidget->mode());

@ -74,7 +74,7 @@ class KSnapshotPreview : public TQLabel
void mouseMoveEvent(TQMouseEvent * e) void mouseMoveEvent(TQMouseEvent * e)
{ {
if (mClickPt != TQPoint(0, 0) && if (mClickPt != TQPoint(0, 0) &&
(e->pos() - mClickPt).manhattanLength() > KGlobalSettings::dndEventDelay()) (e->pos() - mClickPt).manhattanLength() > TDEGlobalSettings::dndEventDelay())
{ {
mClickPt = TQPoint(0, 0); mClickPt = TQPoint(0, 0);
emit startDrag(); emit startDrag();

@ -57,7 +57,7 @@ void SizeTip::positionTip( const TQRect &rect )
if ( rect.intersects( tipRect ) ) if ( rect.intersects( tipRect ) )
{ {
TQRect deskR = KGlobalSettings::desktopGeometry( TQPoint( 0, 0 ) ); TQRect deskR = TDEGlobalSettings::desktopGeometry( TQPoint( 0, 0 ) );
tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) ); tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) );
if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) ) if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) )

@ -92,7 +92,7 @@ bool SVGTestsImpl::ok()
for(unsigned int i = 0;i < m_systemLanguage->numberOfItems();i++) for(unsigned int i = 0;i < m_systemLanguage->numberOfItems();i++)
{ {
TQString value = m_systemLanguage->getItem(i)->string(); TQString value = m_systemLanguage->getItem(i)->string();
if(value.isEmpty() || value != (KGlobal::locale()->language()).left(2)) if(value.isEmpty() || value != (TDEGlobal::locale()->language()).left(2))
return false; return false;
} }
return true; return true;

@ -35,7 +35,7 @@ extern "C"
{ {
void *init_libksvgplugin() void *init_libksvgplugin()
{ {
KGlobal::locale()->insertCatalogue("ksvgplugin"); TDEGlobal::locale()->insertCatalogue("ksvgplugin");
return new KSVGPluginFactory(); return new KSVGPluginFactory();
} }
} }

@ -68,7 +68,7 @@ TQString FileCache::tempDir()
KTempDir * FileCache::createTempDir() KTempDir * FileCache::createTempDir()
{ {
TQString tmpName = TQString::fromLatin1( KGlobal::instance()->instanceName() ); TQString tmpName = TQString::fromLatin1( TDEGlobal::instance()->instanceName() );
tmpName.append( TQString::number( getpid() ) ); tmpName.append( TQString::number( getpid() ) );
TQString dirName = locateLocal( "tmp", tmpName ); TQString dirName = locateLocal( "tmp", tmpName );
KTempDir *dir = new KTempDir( dirName ); KTempDir *dir = new KTempDir( dirName );

@ -51,16 +51,16 @@ FileFinder::FileFinder( TQWidget *parent, const char *name )
setAutoDeleteCompletionObject( true ); setAutoDeleteCompletionObject( true );
setFocusPolicy( TQ_ClickFocus ); setFocusPolicy( TQ_ClickFocus );
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
KConfigGroupSaver cs( config, "GeneralConfiguration" ); KConfigGroupSaver cs( config, "GeneralConfiguration" );
setCompletionMode( (KGlobalSettings::Completion) setCompletionMode( (TDEGlobalSettings::Completion)
config->readNumEntry( "FileFinderCompletionMode", config->readNumEntry( "FileFinderCompletionMode",
KGlobalSettings::completionMode())); TDEGlobalSettings::completionMode()));
} }
FileFinder::~FileFinder() FileFinder::~FileFinder()
{ {
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
KConfigGroupSaver cs( config, "GeneralConfiguration" ); KConfigGroupSaver cs( config, "GeneralConfiguration" );
config->writeEntry( "FileFinderCompletionMode", completionMode() ); config->writeEntry( "FileFinderCompletionMode", completionMode() );
} }

@ -43,16 +43,16 @@ FileWidget::FileWidget( const KURL& url, TQWidget *parent, const char *name )
setEnableDirHighlighting( true ); setEnableDirHighlighting( true );
#if TDE_VERSION >= 310 #if TDE_VERSION >= 310
setViewConfig( KGlobal::config(), "Filebrowser" ); setViewConfig( TDEGlobal::config(), "Filebrowser" );
#endif #endif
readConfig( KGlobal::config(), "Filebrowser" ); readConfig( TDEGlobal::config(), "Filebrowser" );
setView( KFile::Default ); setView( KFile::Default );
// setOnlyDoubleClickSelectsFiles( true ); // setOnlyDoubleClickSelectsFiles( true );
reloadConfiguration(); reloadConfiguration();
completionObject()->setCompletionMode( KGlobalSettings::CompletionAuto ); completionObject()->setCompletionMode( TDEGlobalSettings::CompletionAuto );
dirCompletionObject()->setCompletionMode( KGlobalSettings::CompletionAuto); dirCompletionObject()->setCompletionMode( TDEGlobalSettings::CompletionAuto);
slotViewChanged(); slotViewChanged();
connect( this, TQT_SIGNAL( viewChanged( KFileView * )), connect( this, TQT_SIGNAL( viewChanged( KFileView * )),
@ -155,8 +155,8 @@ void FileWidget::findCompletion( const TQString& text )
text.find('/') != -1 ) { text.find('/') != -1 ) {
TQString t = m_fileFinder->completion()->makeCompletion( text ); TQString t = m_fileFinder->completion()->makeCompletion( text );
if (m_fileFinder->completionMode() == KGlobalSettings::CompletionPopup || if (m_fileFinder->completionMode() == TDEGlobalSettings::CompletionPopup ||
m_fileFinder->completionMode() == KGlobalSettings::CompletionPopupAuto) m_fileFinder->completionMode() == TDEGlobalSettings::CompletionPopupAuto)
m_fileFinder->setCompletedItems( m_fileFinder->setCompletedItems(
m_fileFinder->completion()->allMatches() ); m_fileFinder->completion()->allMatches() );
else else

@ -321,7 +321,7 @@ void ImageWindow::centerImage()
int w, h; int w, h;
if ( myIsFullscreen ) if ( myIsFullscreen )
{ {
TQRect desktopRect = KGlobalSettings::desktopGeometry( this ); TQRect desktopRect = TDEGlobalSettings::desktopGeometry( this );
w = desktopRect.width(); w = desktopRect.width();
h = desktopRect.height(); h = desktopRect.height();
} }
@ -1128,7 +1128,7 @@ int ImageWindow::desktopWidth( bool totalScreen ) const
{ {
if ( myIsFullscreen || totalScreen ) if ( myIsFullscreen || totalScreen )
{ {
return KGlobalSettings::desktopGeometry(topLevelWidget()).width(); return TDEGlobalSettings::desktopGeometry(topLevelWidget()).width();
} else } else
return Kuick::workArea().width(); return Kuick::workArea().width();
} }
@ -1137,7 +1137,7 @@ int ImageWindow::desktopWidth( bool totalScreen ) const
int ImageWindow::desktopHeight( bool totalScreen ) const int ImageWindow::desktopHeight( bool totalScreen ) const
{ {
if ( myIsFullscreen || totalScreen ) { if ( myIsFullscreen || totalScreen ) {
return KGlobalSettings::desktopGeometry(topLevelWidget()).height(); return TDEGlobalSettings::desktopGeometry(topLevelWidget()).height();
} else { } else {
return Kuick::workArea().height(); return Kuick::workArea().height();
} }
@ -1146,7 +1146,7 @@ int ImageWindow::desktopHeight( bool totalScreen ) const
TQSize ImageWindow::maxImageSize() const TQSize ImageWindow::maxImageSize() const
{ {
if ( myIsFullscreen ) { if ( myIsFullscreen ) {
return KGlobalSettings::desktopGeometry(topLevelWidget()).size(); return TDEGlobalSettings::desktopGeometry(topLevelWidget()).size();
} }
else { else {
return Kuick::workArea().size() - Kuick::frameSize( winId() ); return Kuick::workArea().size() - Kuick::frameSize( winId() );
@ -1193,7 +1193,7 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight )
if ( !ImlibWidget::canZoomTo( newWidth, newHeight ) ) if ( !ImlibWidget::canZoomTo( newWidth, newHeight ) )
return false; return false;
TQSize desktopSize = KGlobalSettings::desktopGeometry(topLevelWidget()).size(); TQSize desktopSize = TDEGlobalSettings::desktopGeometry(topLevelWidget()).size();
int desktopArea = desktopSize.width() * desktopSize.height(); int desktopArea = desktopSize.width() * desktopSize.height();
int imageArea = newWidth * newHeight; int imageArea = newWidth * newHeight;

@ -81,7 +81,7 @@ void KuickConfigDialog::applyConfig()
imageKeyChooser->save(); imageKeyChooser->save();
browserKeyChooser->save(); browserKeyChooser->save();
KGlobal::config()->sync(); TDEGlobal::config()->sync();
} }

@ -70,7 +70,7 @@ KuickData::~KuickData()
void KuickData::load() void KuickData::load()
{ {
KConfig *kc = KGlobal::config(); KConfig *kc = TDEGlobal::config();
KuickData def; KuickData def;
@ -134,7 +134,7 @@ void KuickData::load()
void KuickData::save() void KuickData::save()
{ {
KConfig *kc = KGlobal::config(); KConfig *kc = TDEGlobal::config();
kc->setGroup( "GeneralConfiguration" ); kc->setGroup( "GeneralConfiguration" );
kc->writeEntry( "FileFilter", fileFilter ); kc->writeEntry( "FileFilter", fileFilter );

@ -114,7 +114,7 @@ KuickShow::KuickShow( const char *name )
connect( m_slideTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( nextSlide() )); connect( m_slideTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( nextSlide() ));
KConfig *kc = KGlobal::config(); KConfig *kc = TDEGlobal::config();
bool isDir = false; // true if we get a directory on the commandline bool isDir = false; // true if we get a directory on the commandline
@ -253,7 +253,7 @@ void KuickShow::initGUI( const KURL& startDir )
coll, "kuick_print" ); coll, "kuick_print" );
print->setText( i18n("Print Image...") ); print->setText( i18n("Print Image...") );
KAction *configure = new KAction( i18n("Configure %1...").arg( KGlobal::instance()->aboutData()->programName() ), "configure", KAction *configure = new KAction( i18n("Configure %1...").arg( TDEGlobal::instance()->aboutData()->programName() ), "configure",
KShortcut(), KShortcut(),
TQT_TQOBJECT(this), TQT_SLOT( configuration() ), TQT_TQOBJECT(this), TQT_SLOT( configuration() ),
coll, "kuick_configure" ); coll, "kuick_configure" );
@ -374,7 +374,7 @@ void KuickShow::initGUI( const KURL& startDir )
fileWidget->setFocus(); fileWidget->setFocus();
KConfig *kc = KGlobal::config(); KConfig *kc = TDEGlobal::config();
kc->setGroup("SessionSettings"); kc->setGroup("SessionSettings");
bool oneWindow = kc->readBoolEntry("OpenImagesInActiveWindow", true ); bool oneWindow = kc->readBoolEntry("OpenImagesInActiveWindow", true );
oneWindowAction->setChecked( oneWindow ); oneWindowAction->setChecked( oneWindow );
@ -1197,7 +1197,7 @@ void KuickShow::saveProperties( KConfig *kc )
void KuickShow::saveSettings() void KuickShow::saveSettings()
{ {
KConfig *kc = KGlobal::config(); KConfig *kc = TDEGlobal::config();
kc->setGroup("SessionSettings"); kc->setGroup("SessionSettings");
if ( oneWindowAction ) if ( oneWindowAction )

@ -82,7 +82,7 @@ bool Printing::printImageWithTQt( const TQString& filename, KPrinter& printer,
p.begin( &printer ); p.begin( &printer );
TQPaintDeviceMetrics metrics( &printer ); TQPaintDeviceMetrics metrics( &printer );
p.setFont( KGlobalSettings::generalFont() ); p.setFont( TDEGlobalSettings::generalFont() );
TQFontMetrics fm = p.fontMetrics(); TQFontMetrics fm = p.fontMetrics();
int w = metrics.width(); int w = metrics.width();

@ -57,16 +57,16 @@ KViewGeneralConfig::~KViewGeneralConfig()
void KViewGeneralConfig::save() void KViewGeneralConfig::save()
{ {
KConfigGroup cfgGroup( KGlobal::config(), "KView General" ); KConfigGroup cfgGroup( TDEGlobal::config(), "KView General" );
m_savedPosition = m_pResizeGroup->id( m_pResizeGroup->selected() ); m_savedPosition = m_pResizeGroup->id( m_pResizeGroup->selected() );
cfgGroup.writeEntry( "Resize Mode", m_savedPosition ); cfgGroup.writeEntry( "Resize Mode", m_savedPosition );
emit changed( false ); emit changed( false );
KGlobal::config()->sync(); TDEGlobal::config()->sync();
} }
void KViewGeneralConfig::load() void KViewGeneralConfig::load()
{ {
KConfigGroup cfgGroup( KGlobal::config(), "KView General" ); KConfigGroup cfgGroup( TDEGlobal::config(), "KView General" );
int m_savedPosition = cfgGroup.readNumEntry( "Resize Mode", 2 ); int m_savedPosition = cfgGroup.readNumEntry( "Resize Mode", 2 );
if( m_savedPosition < 0 || m_savedPosition > 3 ) if( m_savedPosition < 0 || m_savedPosition > 3 )
m_savedPosition = 2; m_savedPosition = 2;

@ -105,7 +105,7 @@ KView::KView()
connect( m_pCanvas->widget(), TQT_SIGNAL( cursorPos( const TQPoint & ) ), TQT_SLOT( cursorPos( const TQPoint & ) ) ); connect( m_pCanvas->widget(), TQT_SIGNAL( cursorPos( const TQPoint & ) ), TQT_SLOT( cursorPos( const TQPoint & ) ) );
m_paRecent->loadEntries( KGlobal::config() ); m_paRecent->loadEntries( TDEGlobal::config() );
if (!initialGeometrySet()) if (!initialGeometrySet())
resize(500, 350); resize(500, 350);
readSettings(); readSettings();
@ -151,8 +151,8 @@ KView::KView()
KView::~KView() KView::~KView()
{ {
saveSettings( KGlobal::config() ); saveSettings( TDEGlobal::config() );
KGlobal::config()->sync(); TDEGlobal::config()->sync();
} }
void KView::load( const KURL & url ) void KView::load( const KURL & url )
@ -167,7 +167,7 @@ void KView::load( const KURL & url )
// would do: // would do:
TQString directory = url.directory(); TQString directory = url.directory();
TQString key = TQString::fromLatin1( "load_image" ); TQString key = TQString::fromLatin1( "load_image" );
KConfig * config = KGlobal::config(); KConfig * config = TDEGlobal::config();
config->setGroup( TQString::fromLatin1( "Recent Dirs" ) ); config->setGroup( TQString::fromLatin1( "Recent Dirs" ) );
TQStringList result = config->readPathListEntry( key ); TQStringList result = config->readPathListEntry( key );
@ -243,7 +243,7 @@ void KView::readSettings() // KConfig * config )
{ {
// read settings from config/kviewrc // read settings from config/kviewrc
kdDebug( 4600 ) << k_funcinfo << endl; kdDebug( 4600 ) << k_funcinfo << endl;
KConfigGroup cfgGroup( KGlobal::config(), "KView General" ); KConfigGroup cfgGroup( TDEGlobal::config(), "KView General" );
m_nResizeMode = cfgGroup.readNumEntry( "Resize Mode", 2 ); m_nResizeMode = cfgGroup.readNumEntry( "Resize Mode", 2 );
kdDebug( 4600 ) << "m_nResizeMode = " << m_nResizeMode << endl; kdDebug( 4600 ) << "m_nResizeMode = " << m_nResizeMode << endl;
loadPlugins(); loadPlugins();
@ -346,16 +346,16 @@ void KView::slotUpdateFullScreen( bool set )
m_bFullscreen = set; m_bFullscreen = set;
if( set ) if( set )
{ // switch to FullScreen mode { // switch to FullScreen mode
saveMainWindowSettings( KGlobal::config(), "nonFullScreen MainWindow" ); saveMainWindowSettings( TDEGlobal::config(), "nonFullScreen MainWindow" );
showFullScreen(); showFullScreen();
applyMainWindowSettings( KGlobal::config(), "FullScreen MainWindow" ); applyMainWindowSettings( TDEGlobal::config(), "FullScreen MainWindow" );
m_paShowMenubar->setChecked( ! menuBar()->isHidden() ); m_paShowMenubar->setChecked( ! menuBar()->isHidden() );
} }
else else
{ // leave FullScreen mode { // leave FullScreen mode
saveMainWindowSettings( KGlobal::config(), "FullScreen MainWindow" ); saveMainWindowSettings( TDEGlobal::config(), "FullScreen MainWindow" );
showNormal(); showNormal();
applyMainWindowSettings( KGlobal::config(), "nonFullScreen MainWindow" ); applyMainWindowSettings( TDEGlobal::config(), "nonFullScreen MainWindow" );
m_paShowMenubar->setChecked( ! menuBar()->isHidden() ); m_paShowMenubar->setChecked( ! menuBar()->isHidden() );
handleResize(); handleResize();
} }
@ -378,14 +378,14 @@ void KView::slotPreferences()
{ {
dlg = new KSettings::Dialog( this ); dlg = new KSettings::Dialog( this );
//dlg = new KConfigureDialog( KConfigureDialog::Configurable, this ); //dlg = new KConfigureDialog( KConfigureDialog::Configurable, this );
//dlg->addPluginInfos( KPluginInfo::fromKPartsInstanceName( instance()->instanceName(), KGlobal::config(), "KParts Plugins" ) ); //dlg->addPluginInfos( KPluginInfo::fromKPartsInstanceName( instance()->instanceName(), TDEGlobal::config(), "KParts Plugins" ) );
} }
dlg->show(); dlg->show();
} }
void KView::slotConfigureToolbars() void KView::slotConfigureToolbars()
{ {
saveMainWindowSettings( KGlobal::config(), "MainWindow" ); saveMainWindowSettings( TDEGlobal::config(), "MainWindow" );
KEditToolbar dlg( factory() ); KEditToolbar dlg( factory() );
connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), TQT_SLOT( slotNewToolbarConfig() ) ); connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), TQT_SLOT( slotNewToolbarConfig() ) );
dlg.exec(); dlg.exec();
@ -393,12 +393,12 @@ void KView::slotConfigureToolbars()
void KView::slotNewToolbarConfig() void KView::slotNewToolbarConfig()
{ {
applyMainWindowSettings( KGlobal::config(), "MainWindow" ); applyMainWindowSettings( TDEGlobal::config(), "MainWindow" );
} }
void KView::reloadConfig() void KView::reloadConfig()
{ {
readSettings(); //KGlobal::config() ); readSettings(); //TDEGlobal::config() );
} }
void KView::enableAction( const char * name, bool b ) void KView::enableAction( const char * name, bool b )

@ -38,7 +38,7 @@ KViewKonqExtension::KViewKonqExtension( KImageViewer::Canvas * canvas,
m_pViewer( parent ), m_pViewer( parent ),
m_pCanvas( canvas ) m_pCanvas( canvas )
{ {
KGlobal::locale()->insertCatalogue("kview"); TDEGlobal::locale()->insertCatalogue("kview");
} }
void KViewKonqExtension::setXYOffset( int x, int y ) void KViewKonqExtension::setXYOffset( int x, int y )

@ -649,7 +649,7 @@ void KViewViewer::setZoom( const TQString & newZoom )
if( newZoom == "33%" ) if( newZoom == "33%" )
zoom = 1.0 / 3.0; zoom = 1.0 / 3.0;
else else
zoom = KGlobal::locale()->readNumber( z ) / 100; zoom = TDEGlobal::locale()->readNumber( z ) / 100;
m_pCanvas->setZoom( zoom ); m_pCanvas->setZoom( zoom );
} }

@ -353,7 +353,7 @@ void KViewPresenter::makeCurrent( TQListViewItem * item )
else else
{ {
m_pCurrentItem = static_cast<ImageListItem*>( item ); m_pCurrentItem = static_cast<ImageListItem*>( item );
m_pCurrentItem->setPixmap( 0, KGlobal::iconLoader()->loadIcon( "1rightarrow", KIcon::Small ) ); m_pCurrentItem->setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "1rightarrow", KIcon::Small ) );
m_pImageList->m_pListView->ensureItemVisible( m_pCurrentItem ); m_pImageList->m_pListView->ensureItemVisible( m_pCurrentItem );
} }
} }

@ -86,12 +86,12 @@ void KFloatSpinBox::setValueBlocking( float value )
TQString KFloatSpinBox::mapValueToText( int value ) TQString KFloatSpinBox::mapValueToText( int value )
{ {
return KGlobal::locale()->formatNumber( (float)value / (float)m_factor, 4 ); return TDEGlobal::locale()->formatNumber( (float)value / (float)m_factor, 4 );
} }
int KFloatSpinBox::mapTextToValue( bool * ok ) int KFloatSpinBox::mapTextToValue( bool * ok )
{ {
return (int)( m_factor * KGlobal::locale()->readNumber( text(), ok ) ); return (int)( m_factor * TDEGlobal::locale()->readNumber( text(), ok ) );
} }
void KFloatSpinBox::valueChange() void KFloatSpinBox::valueChange()

@ -90,7 +90,7 @@ DocumentWidget::DocumentWidget(TQWidget *parent, PageView *sv, DocumentPageCache
if (!busyIcon) if (!busyIcon)
{ {
busyIcon = new TQPixmap(KGlobal::iconLoader()->loadIcon("gear", KIcon::NoGroup, KIcon::SizeMedium)); busyIcon = new TQPixmap(TDEGlobal::iconLoader()->loadIcon("gear", KIcon::NoGroup, KIcon::SizeMedium));
URShadow = new TQPixmap(); URShadow = new TQPixmap();
BRShadow = new TQPixmap(); BRShadow = new TQPixmap();
@ -316,7 +316,7 @@ void DocumentWidget::paintEvent(TQPaintEvent *e)
#ifdef DEBUG_DOCUMENTWIDGET #ifdef DEBUG_DOCUMENTWIDGET
kdDebug(1223) << "Underline hyperlink \"" << pageData->hyperLinkList[i].linkText << "\"" << endl; kdDebug(1223) << "Underline hyperlink \"" << pageData->hyperLinkList[i].linkText << "\"" << endl;
#endif #endif
p.fillRect(x, y, w, h, KGlobalSettings::linkColor()); p.fillRect(x, y, w, h, TDEGlobalSettings::linkColor());
} }
} }
} }

@ -61,7 +61,7 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p
: KViewPart_Iface(parent, name), showSidebar(0), saveAction(0), partManager(0), : KViewPart_Iface(parent, name), showSidebar(0), saveAction(0), partManager(0),
multiPageLibrary(TQString()), aboutDialog(0) multiPageLibrary(TQString()), aboutDialog(0)
{ {
KGlobal::locale()->insertCatalogue("kviewshell"); TDEGlobal::locale()->insertCatalogue("kviewshell");
tmpUnzipped = 0L; tmpUnzipped = 0L;
pageChangeIsConnected = false; pageChangeIsConnected = false;
@ -419,7 +419,7 @@ TQString KViewPart::pageSizeDescription()
TQString size = " "; TQString size = " ";
if (s.formatNumber() == -1) { if (s.formatNumber() == -1) {
if (KGlobal::locale()-> measureSystem() == KLocale::Metric) if (TDEGlobal::locale()-> measureSystem() == KLocale::Metric)
size += TQString("%1x%2 mm").arg(s.width().getLength_in_mm(), 0, 'f', 0).arg(s.height().getLength_in_mm(), 0, 'f', 0); size += TQString("%1x%2 mm").arg(s.width().getLength_in_mm(), 0, 'f', 0).arg(s.height().getLength_in_mm(), 0, 'f', 0);
else else
size += TQString("%1x%2 in").arg(s.width().getLength_in_inch(), 0, 'g', 2).arg(s.height().getLength_in_inch(), 0, 'g', 2); size += TQString("%1x%2 in").arg(s.width().getLength_in_inch(), 0, 'g', 2).arg(s.height().getLength_in_inch(), 0, 'g', 2);

@ -288,7 +288,7 @@ void KViewShell::slotConfigureKeys()
void KViewShell::slotEditToolbar() void KViewShell::slotEditToolbar()
{ {
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(factory()); KEditToolbar dlg(factory());
connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), TQT_SLOT( slotNewToolbarConfig() ) ); connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), TQT_SLOT( slotNewToolbarConfig() ) );
dlg.exec(); dlg.exec();
@ -297,7 +297,7 @@ void KViewShell::slotEditToolbar()
void KViewShell::slotNewToolbarConfig() void KViewShell::slotNewToolbarConfig()
{ {
applyMainWindowSettings( KGlobal::config(), autoSaveGroup() ); applyMainWindowSettings( TDEGlobal::config(), autoSaveGroup() );
} }
void KViewShell::dragEnterEvent(TQDragEnterEvent *event) void KViewShell::dragEnterEvent(TQDragEnterEvent *event)

@ -63,7 +63,7 @@ ThumbnailWidget::ThumbnailWidget(MarkListWidget* _parent, const PageNumber& _pag
if (!waitIcon) if (!waitIcon)
{ {
waitIcon = new TQPixmap(KGlobal::iconLoader()->loadIcon("gear", KIcon::NoGroup, KIcon::SizeMedium)); waitIcon = new TQPixmap(TDEGlobal::iconLoader()->loadIcon("gear", KIcon::NoGroup, KIcon::SizeMedium));
} }
} }
@ -188,11 +188,11 @@ MarkListWidget::MarkListWidget(TQWidget* _parent, MarkList* _markList, const Pag
pageLabel = new TQLabel(TQString("%1").arg(pageNumber), this); pageLabel = new TQLabel(TQString("%1").arg(pageNumber), this);
bottomLayout->addWidget(pageLabel, 1); bottomLayout->addWidget(pageLabel, 1);
_backgroundColor = KGlobalSettings::baseColor(); _backgroundColor = TDEGlobalSettings::baseColor();
// Alternate between colors. // Alternate between colors.
if ((pageNumber % 2 == 0) && KGlobalSettings::alternateBackgroundColor().isValid()) if ((pageNumber % 2 == 0) && TDEGlobalSettings::alternateBackgroundColor().isValid())
_backgroundColor = KGlobalSettings::alternateBackgroundColor(); _backgroundColor = TDEGlobalSettings::alternateBackgroundColor();
setPaletteBackgroundColor( _backgroundColor ); setPaletteBackgroundColor( _backgroundColor );

@ -210,7 +210,7 @@ TQString pageSize::preferredUnit() const
return staticList[currentSize].preferredUnit; return staticList[currentSize].preferredUnit;
// User-defined size. Give a preferred unit depening on the locale. // User-defined size. Give a preferred unit depening on the locale.
if (KGlobal::locale()-> measureSystem() == KLocale::Metric) if (TDEGlobal::locale()-> measureSystem() == KLocale::Metric)
return "mm"; return "mm";
else else
return "in"; return "in";
@ -330,10 +330,10 @@ void pageSize::reconstructCurrentSize()
int pageSize::defaultPageSize() int pageSize::defaultPageSize()
{ {
// FIXME: static_cast<TQPrinter::PageSize>(KGlobal::locale()->pageSize()) // FIXME: static_cast<TQPrinter::PageSize>(TDEGlobal::locale()->pageSize())
// is the proper solution here. Then you can determine the values // is the proper solution here. Then you can determine the values
// without using your hardcoded table too! // without using your hardcoded table too!
if (KGlobal::locale()-> measureSystem() == KLocale::Metric) if (TDEGlobal::locale()-> measureSystem() == KLocale::Metric)
return defaultMetricPaperSize; return defaultMetricPaperSize;
else else
return defaultImperialPaperSize; return defaultImperialPaperSize;

@ -46,7 +46,7 @@ SearchWidget::SearchWidget(TQWidget* parent, const char* name, WFlags fl)
layout = new TQHBoxLayout(this, 4, 6, "SearchWidgetLayout"); layout = new TQHBoxLayout(this, 4, 6, "SearchWidgetLayout");
stopButton = new TQPushButton(this, "stopButton"); stopButton = new TQPushButton(this, "stopButton");
stopButton->setPixmap(KGlobal::iconLoader()->loadIcon("stop", KIcon::Small, KIcon::SizeSmall)); stopButton->setPixmap(TDEGlobal::iconLoader()->loadIcon("stop", KIcon::Small, KIcon::SizeSmall));
layout->addWidget(stopButton); layout->addWidget(stopButton);
searchLabel = new TQLabel(this, "searchLabel"); searchLabel = new TQLabel(this, "searchLabel");
@ -59,12 +59,12 @@ SearchWidget::SearchWidget(TQWidget* parent, const char* name, WFlags fl)
searchLabel->setBuddy(searchText); searchLabel->setBuddy(searchText);
findPrevButton = new TQPushButton(this, "findPrevButton"); findPrevButton = new TQPushButton(this, "findPrevButton");
findPrevButton->setPixmap(KGlobal::iconLoader()->loadIcon("back", KIcon::NoGroup, KIcon::SizeSmall)); findPrevButton->setPixmap(TDEGlobal::iconLoader()->loadIcon("back", KIcon::NoGroup, KIcon::SizeSmall));
TQToolTip::add(findPrevButton, i18n("Find previous")); TQToolTip::add(findPrevButton, i18n("Find previous"));
layout->addWidget(findPrevButton); layout->addWidget(findPrevButton);
findNextButton = new TQPushButton(this, "findNextButton"); findNextButton = new TQPushButton(this, "findNextButton");
findNextButton->setPixmap(KGlobal::iconLoader()->loadIcon("forward", KIcon::NoGroup, KIcon::SizeSmall)); findNextButton->setPixmap(TDEGlobal::iconLoader()->loadIcon("forward", KIcon::NoGroup, KIcon::SizeSmall));
TQToolTip::add(findNextButton, i18n("Find next")); TQToolTip::add(findNextButton, i18n("Find next"));
layout->addWidget(findNextButton); layout->addWidget(findNextButton);

@ -69,7 +69,7 @@ DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList,
cbSkipDialog = new TQCheckBox( i18n("&Do not ask on startup again, always use this device"), cbSkipDialog = new TQCheckBox( i18n("&Do not ask on startup again, always use this device"),
page, "CBOX_SKIP_ON_START" ); page, "CBOX_SKIP_ON_START" );
KConfig *gcfg = KGlobal::config(); KConfig *gcfg = TDEGlobal::config();
gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false );
cbSkipDialog->setChecked( skipDialog ); cbSkipDialog->setChecked( skipDialog );
@ -80,7 +80,7 @@ DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList,
TQCString DeviceSelector::getDeviceFromConfig( void ) const TQCString DeviceSelector::getDeviceFromConfig( void ) const
{ {
KConfig *gcfg = KGlobal::config(); KConfig *gcfg = TDEGlobal::config();
gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false );
@ -125,7 +125,7 @@ TQCString DeviceSelector::getSelectedDevice( void ) const
kdDebug(29000) << "The selected device: <" << dev << ">" << endl; kdDebug(29000) << "The selected device: <" << dev << ">" << endl;
/* Store scanner selection settings */ /* Store scanner selection settings */
KConfig *c = KGlobal::config(); KConfig *c = TDEGlobal::config();
c->setGroup(TQString::fromLatin1(GROUP_STARTUP)); c->setGroup(TQString::fromLatin1(GROUP_STARTUP));
/* Write both the scan device and the skip-start-dialog flag global. */ /* Write both the scan device and the skip-start-dialog flag global. */
c->writeEntry( STARTUP_SCANDEV, dev, true, true ); c->writeEntry( STARTUP_SCANDEV, dev, true, true );
@ -140,7 +140,7 @@ void DeviceSelector::setScanSources( const TQStrList& sources,
const TQStringList& hrSources ) const TQStringList& hrSources )
{ {
bool default_ok = false; bool default_ok = false;
KConfig *gcfg = KGlobal::config(); KConfig *gcfg = TDEGlobal::config();
gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
TQCString defstr = gcfg->readEntry( STARTUP_SCANDEV, "" ).local8Bit(); TQCString defstr = gcfg->readEntry( STARTUP_SCANDEV, "" ).local8Bit();

@ -187,7 +187,7 @@ KScanDevice::KScanDevice( TQObject *parent )
pixel_y = 0; pixel_y = 0;
scanner_name = 0L; scanner_name = 0L;
KConfig *konf = KGlobal::config (); KConfig *konf = TDEGlobal::config ();
konf->setGroup( GROUP_STARTUP ); konf->setGroup( GROUP_STARTUP );
bool netaccess = konf->readBoolEntry( STARTUP_ONLY_LOCAL, false ); bool netaccess = konf->readBoolEntry( STARTUP_ONLY_LOCAL, false );
kdDebug(29000) << "Query for network scanners " << (netaccess ? "Not enabled" : "Enabled") << endl; kdDebug(29000) << "Query for network scanners " << (netaccess ? "Not enabled" : "Enabled") << endl;
@ -669,7 +669,7 @@ void KScanDevice::slStopScanning( void )
const TQString KScanDevice::previewFile() const TQString KScanDevice::previewFile()
{ {
TQString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true ); TQString dir = (TDEGlobal::dirs())->saveLocation( "data", "ScanImages", true );
if( !dir.endsWith("/") ) if( !dir.endsWith("/") )
dir += "/"; dir += "/";

@ -44,7 +44,7 @@ KScanSlider::KScanSlider( TQWidget *parent, const TQString& text,
if( haveStdButt ) if( haveStdButt )
{ {
KIconLoader *loader = KGlobal::iconLoader(); KIconLoader *loader = TDEGlobal::iconLoader();
m_stdButt = new TQPushButton( this ); m_stdButt = new TQPushButton( this );
m_stdButt->setPixmap( loader->loadIcon( "undo",KIcon::Small )); m_stdButt->setPixmap( loader->loadIcon( "undo",KIcon::Small ));

@ -125,7 +125,7 @@ Previewer::Previewer(TQWidget *parent, const char *name )
layout->addLayout( left, 2 ); layout->addLayout( left, 2 );
/* Load autoselection values from Config file */ /* Load autoselection values from Config file */
KConfig *cfg = KGlobal::config(); KConfig *cfg = TDEGlobal::config();
cfg->setGroup( GROUP_STARTUP ); cfg->setGroup( GROUP_STARTUP );
/* Units etc. TODO: get from Config */ /* Units etc. TODO: get from Config */
@ -305,7 +305,7 @@ bool Previewer::setPreviewImage( const TQImage &image )
TQString Previewer::galleryRoot() TQString Previewer::galleryRoot()
{ {
TQString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true ); TQString dir = (TDEGlobal::dirs())->saveLocation( "data", "ScanImages", true );
if( !dir.endsWith("/") ) if( !dir.endsWith("/") )
dir += "/"; dir += "/";

@ -55,7 +55,7 @@ ScanDialogFactory::ScanDialogFactory( TQObject *parent, const char *name )
: KScanDialogFactory( parent, name ) : KScanDialogFactory( parent, name )
{ {
setName( "ScanDialogFactory" ); setName( "ScanDialogFactory" );
KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkscan") ); TDEGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkscan") );
} }
KScanDialog * ScanDialogFactory::createDialog( TQWidget *parent, KScanDialog * ScanDialogFactory::createDialog( TQWidget *parent,
@ -129,7 +129,7 @@ void ScanDialog::createOptionsTab( void )
/* Read settings for startup behavior */ /* Read settings for startup behavior */
KConfig *gcfg = KGlobal::config(); KConfig *gcfg = TDEGlobal::config();
gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false );
bool onlyLocal = gcfg->readBoolEntry( STARTUP_ONLY_LOCAL, false ); bool onlyLocal = gcfg->readBoolEntry( STARTUP_ONLY_LOCAL, false );
@ -153,7 +153,7 @@ void ScanDialog::slotNetworkToggle( bool state)
bool writestate = !state; bool writestate = !state;
kdDebug(29000) << "slotNetworkToggle: Writing state " << writestate << endl; kdDebug(29000) << "slotNetworkToggle: Writing state " << writestate << endl;
KConfig *c = KGlobal::config(); KConfig *c = TDEGlobal::config();
c->setGroup(TQString::fromLatin1(GROUP_STARTUP)); c->setGroup(TQString::fromLatin1(GROUP_STARTUP));
c->writeEntry( STARTUP_ONLY_LOCAL, writestate, true, true ); c->writeEntry( STARTUP_ONLY_LOCAL, writestate, true, true );
} }
@ -163,7 +163,7 @@ void ScanDialog::slotAskOnStartToggle(bool state)
bool writestate = !state; bool writestate = !state;
kdDebug(29000) << "slotAskOnStartToggle: Writing state " << writestate << endl; kdDebug(29000) << "slotAskOnStartToggle: Writing state " << writestate << endl;
KConfig *c = KGlobal::config(); KConfig *c = TDEGlobal::config();
c->setGroup(TQString::fromLatin1(GROUP_STARTUP)); c->setGroup(TQString::fromLatin1(GROUP_STARTUP));
c->writeEntry( STARTUP_SKIP_ASK, writestate, true, true ); c->writeEntry( STARTUP_SKIP_ASK, writestate, true, true );
} }
@ -307,10 +307,10 @@ bool ScanDialog::setup()
/* set initial sizes */ /* set initial sizes */
setInitialSize( configDialogSize( GROUP_STARTUP )); setInitialSize( configDialogSize( GROUP_STARTUP ));
KConfig *kfg = KGlobal::config(); KConfig *kfg = TDEGlobal::config();
if( kfg ) if( kfg )
{ {
TQRect r = KGlobalSettings::desktopGeometry(this); TQRect r = TDEGlobalSettings::desktopGeometry(this);
kfg->setGroup( GROUP_STARTUP ); kfg->setGroup( GROUP_STARTUP );
/* Since this is a vertical splitter, only the width is important */ /* Since this is a vertical splitter, only the width is important */
@ -329,10 +329,10 @@ void ScanDialog::slotClose()
if( splitter ) if( splitter )
{ {
KConfig *kfg = KGlobal::config(); KConfig *kfg = TDEGlobal::config();
if( kfg ) if( kfg )
{ {
TQRect r = KGlobalSettings::desktopGeometry(this); TQRect r = TDEGlobalSettings::desktopGeometry(this);
kfg->setGroup( GROUP_STARTUP ); kfg->setGroup( GROUP_STARTUP );
/* Since this is a vertical splitter, only the width is important */ /* Since this is a vertical splitter, only the width is important */

Loading…
Cancel
Save