Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 7c140ea1cb
commit 98ed486e2f

@ -864,7 +864,7 @@ void KmagApp::slotFileQuit()
void KmagApp::copyToClipBoard()
{
TQClipboard *cb=KApplication::clipboard();
TQClipboard *cb=TDEApplication::clipboard();
cb->setPixmap(m_zoomView->getPixmap());
}

@ -48,7 +48,7 @@
* KmagApp reimplements the methods that KMainWindow provides for main window handling and supports
* full session management as well as using KActions.
* @see KMainWindow
* @see KApplication
* @see TDEApplication
* @see KConfig
*
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.

@ -133,7 +133,7 @@ KMagZoomView::KMagZoomView(TQWidget *parent, const char *name)
m_invert(false),
m_fitToWindow(true)
{
KApplication::setGlobalMouseTracking(TRUE);
TDEApplication::setGlobalMouseTracking(TRUE);
viewport()->setMouseTracking(TRUE);
viewport()->setBackgroundMode (NoBackground);
viewport()->setFocusPolicy(TQ_StrongFocus);
@ -167,7 +167,7 @@ KMagZoomView::KMagZoomView(TQWidget *parent, const char *name)
KMagZoomView::~KMagZoomView()
{
KApplication::setGlobalMouseTracking(FALSE);
TDEApplication::setGlobalMouseTracking(FALSE);
}
/**
@ -307,7 +307,7 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos)
{
// 3. Actual cursor
// Get the current cursor type
TQWidget *dummy = KApplication::widgetAt(TQCursor::pos(), FALSE);
TQWidget *dummy = TDEApplication::widgetAt(TQCursor::pos(), FALSE);
if(!dummy)
break;
kdDebug() << ">" << dummy->name() << ":" << dummy->cursor().shape() << "-" << endl;

@ -62,7 +62,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init( argc, argv, aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication app;
TDEApplication app;
if (app.isRestored())
{

@ -63,7 +63,7 @@ void ConfigWizard::initCommandPage(KConfig *config) {
}
void ConfigWizard::initBookPage() {
TQString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
TQString standardBook = TDEApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
bool displayBook = (standardBook.isNull() || standardBook.isEmpty());
if (displayBook) {
@ -80,7 +80,7 @@ void ConfigWizard::initBookPage() {
void ConfigWizard::initCompletion (KConfig *config) {
if (!WordCompletion::isConfigured()) {
TQString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", "dictionary.txt");
TQString dictionaryFile = TDEApplication::kApplication()->dirs()->findResource("appdata", "dictionary.txt");
TQFile file(dictionaryFile);
if (file.exists()) {
// If there is a word completion dictionary but no entry in the
@ -138,7 +138,7 @@ bool ConfigWizard::configurationNeeded () {
}
void ConfigWizard::help () {
KApplication::kApplication()->invokeHelp ("Wizard");
TDEApplication::kApplication()->invokeHelp ("Wizard");
}
#include "configwizard.moc"

@ -266,7 +266,7 @@ void KMouthApp::readOptions()
toolBar("mainToolBar")->applySettings (config, "mainToolBar");
toolBar("phrasebookBar")->applySettings (config, "phrasebookBar");
TQString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
TQString standardBook = TDEApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
if (!standardBook.isEmpty()) {
PhraseBook book;
book.open(KURL::fromPathOrURL( standardBook ));
@ -460,7 +460,7 @@ void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) {
phrases = new KActionCollection (this, actionCollection());
book.addToGUI (popup, toolbar, phrases, TQT_TQOBJECT(this), TQT_SLOT(slotPhraseSelected (const TQString &)));
TQString bookLocation = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
TQString bookLocation = TDEApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
if (!bookLocation.isNull() && !bookLocation.isEmpty()) {
book.save (KURL::fromPathOrURL( bookLocation + "standard.phrasebook" ));
}

@ -47,7 +47,7 @@ class PhraseBook;
* KMouthApp reimplements the methods that KMainWindow provides for main window handling and supports
* full session management as well as using KActions.
* @see KMainWindow
* @see KApplication
* @see TDEApplication
* @see KConfig
*
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.

@ -47,7 +47,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
aboutData.addCredit("Olaf Schmidt", I18N_NOOP("Tips, extended phrase books"), 0, 0);
KApplication app;
TDEApplication app;
if (app.isRestored())
{

@ -225,7 +225,7 @@ void InitialPhraseBookWidget::createBook () {
}
}
TQString bookLocation = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
TQString bookLocation = TDEApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
if (!bookLocation.isNull() && !bookLocation.isEmpty()) {
book.save (KURL( bookLocation + "standard.phrasebook" ));
}
@ -264,7 +264,7 @@ PhraseBookDialog::PhraseBookDialog ()
initGUI();
initActions();
initStandardPhraseBooks();
TQString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
TQString standardBook = TDEApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
if (!standardBook.isNull() && !standardBook.isEmpty()) {
PhraseBook book;
book.open(KURL( standardBook ));

@ -222,11 +222,11 @@ TQString DictionaryCreationWizard::createDictionary() {
do {
dictnumber++;
filename = TQString("wordcompletion%1.dict").arg(dictnumber);
dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", filename);
dictionaryFile = TDEApplication::kApplication()->dirs()->findResource("appdata", filename);
}
while (KStandardDirs::exists(dictionaryFile));
dictionaryFile = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/") + filename;
dictionaryFile = TDEApplication::kApplication()->dirs()->saveLocation ("appdata", "/") + filename;
if (WordList::saveWordList (map, dictionaryFile))
return filename;
else
@ -319,7 +319,7 @@ TQMap <TQString, int> MergeWidget::mergeParameters () {
for (; it.current(); ++it) {
if (it.current()->isChecked()) {
TQString name = it.currentKey();
TQString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", name);
TQString dictionaryFile = TDEApplication::kApplication()->dirs()->findResource("appdata", name);
files[dictionaryFile] = weights[name]->value();
}
}
@ -363,7 +363,7 @@ void CompletionWizardWidget::ok (KConfig *config) {
TQString filename;
TQString dictionaryFile;
dictionaryFile = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/") + "wordcompletion1.dict";
dictionaryFile = TDEApplication::kApplication()->dirs()->saveLocation ("appdata", "/") + "wordcompletion1.dict";
if (WordList::saveWordList (map, dictionaryFile)) {
config->setGroup("Dictionary 0");
config->writeEntry ("Filename", "wordcompletion1.dict");

@ -144,7 +144,7 @@ bool WordCompletion::setWordList(const TQString &wordlist) {
d->current = d->dictionaries[0];
TQString filename = d->dictDetails[d->current].filename;
TQString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", filename);
TQString dictionaryFile = TDEApplication::kApplication()->dirs()->findResource("appdata", filename);
TQFile file(dictionaryFile);
if (file.exists() && file.open(IO_ReadOnly)) {
TQTextStream stream(&file);
@ -195,7 +195,7 @@ void WordCompletion::addSentence (const TQString &sentence) {
void WordCompletion::save () {
if (d->wordsToSave) {
TQString filename = d->dictDetails[d->current].filename;
TQString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", filename);
TQString dictionaryFile = TDEApplication::kApplication()->dirs()->findResource("appdata", filename);
TQFile file(dictionaryFile);
if (!file.exists())
return;

@ -292,10 +292,10 @@ WordMap parseKDEDoc (TQString language, KProgressDialog *pdlg) {
pdlg->show();
tqApp->processEvents (20);
TQStringList files = KApplication::kApplication()->dirs()->findAllResources ("html", language + "/*.docbook", true, true);
TQStringList files = TDEApplication::kApplication()->dirs()->findAllResources ("html", language + "/*.docbook", true, true);
if ((files.count() == 0) && (language.length() == 5)) {
language = language.left(2);
files = KApplication::kApplication()->dirs()->findAllResources ("html", language + "/*.docbook", true, true);
files = TDEApplication::kApplication()->dirs()->findAllResources ("html", language + "/*.docbook", true, true);
}
return parseFiles (files, TQTextStream::UnicodeUTF8, 0, pdlg);

@ -62,7 +62,7 @@ TQObject* FreeverbPluginFactory::createObject(TQObject *parent, const char* name
// Plugin Constructor
FreeverbPlugin::FreeverbPlugin(TQObject *parent, const char* name) //, KApplication *Appl)
FreeverbPlugin::FreeverbPlugin(TQObject *parent, const char* name) //, TDEApplication *Appl)
: FXPlugin(parent, name) //, m_Appl(Appl)
{
m_config = new KSimpleConfig("ksayit_freeverbrc");
@ -76,7 +76,7 @@ FreeverbPlugin::~FreeverbPlugin()
/** sets the Main application object
*/
void FreeverbPlugin::setApplication(KApplication *Appl)
void FreeverbPlugin::setApplication(TDEApplication *Appl)
{
m_Appl = Appl;
}

@ -54,14 +54,14 @@ Q_OBJECT
public:
// Constructor
FreeverbPlugin(TQObject *parent=0, const char* name=0); //, KApplication *Appl=0);
FreeverbPlugin(TQObject *parent=0, const char* name=0); //, TDEApplication *Appl=0);
// Destructor
~FreeverbPlugin();
/** sets the Main application object
*/
void setApplication(KApplication *Appl);
void setApplication(TDEApplication *Appl);
/** returns the Name of the Plugin
*/
@ -87,7 +87,7 @@ public:
private:
KApplication *m_Appl;
TDEApplication *m_Appl;
KSimpleConfig *m_config;
};

@ -27,7 +27,7 @@
#include "kttsdlibsetupimpl.h"
KTTSDLib::KTTSDLib(TQObject *parent, const char *name, KApplication *Appl)
KTTSDLib::KTTSDLib(TQObject *parent, const char *name, TDEApplication *Appl)
: TQObject(parent, name), m_Appl(Appl)
{
KGlobal::locale()->insertCatalogue("libKTTSD");

@ -71,7 +71,7 @@ public slots:
void slotTextStarted(const uint job);
public:
KTTSDLib(TQObject *parent=0, const char *name=0, KApplication *Appl=0);
KTTSDLib(TQObject *parent=0, const char *name=0, TDEApplication *Appl=0);
~KTTSDLib();
@ -109,7 +109,7 @@ private slots:
void removeAllJobsFromList();
private:
KApplication *m_Appl;
TDEApplication *m_Appl;
kttsdlibtalker2 *m_talker;
uint m_curJobNum;
typedef queue<uint> jobListType;

@ -46,7 +46,7 @@ kttsdlibtalker2::~kttsdlibtalker2()
}
void kttsdlibtalker2::KTTSD_init(KApplication *Appl)
void kttsdlibtalker2::KTTSD_init(TDEApplication *Appl)
{
kdDebug(100200) << "kttsdlibtalker2::KTTSD_init()" << endl;

@ -43,7 +43,7 @@ public:
/** Intializes the DCOP interface.
*/
void KTTSD_init(KApplication *Appl);
void KTTSD_init(TDEApplication *Appl);
/** See \p KSpeech Class Reference. Returns the job number.
*/
@ -92,7 +92,7 @@ protected:
private:
TQCString m_objID;
KApplication *m_Appl;
TDEApplication *m_Appl;
DCOPClient *m_client;
uint m_jobNum;

@ -125,7 +125,7 @@ void FXPluginHandler::readConfiguration()
if ( factory ){
plugin.p = static_cast<FXPlugin*>( factory->create( (TQObject*)this, (plugin.name).latin1() ) );
if ( plugin.p ){ // Plugin found
plugin.p->setApplication( KApplication::kApplication() );
plugin.p->setApplication( TDEApplication::kApplication() );
plugin.description = plugin.p->getDescription_KS();
// append to list of active plugins
m_lstActivePlugins.append( plugin.name );
@ -158,7 +158,7 @@ void FXPluginHandler::showEffectGUI(const TQString &pname)
if ( factory ){
plugin.p = static_cast<FXPlugin*>( factory->create( (TQObject*)this, (plugin.name).latin1() ) );
if ( plugin.p ){ // Plugin found
plugin.p->setApplication( KApplication::kApplication() );
plugin.p->setApplication( TDEApplication::kApplication() );
plugin.description = plugin.p->getDescription_KS();
// append to list of active plugins
m_lstActivePlugins.append( plugin.name );

@ -60,7 +60,7 @@ class KSayItBookmarkHandler;
* KSayItApp reimplements the methods that KMainWindow provides for main window handling and supports
* full session management as well as using KActions.
* @see KMainWindow
* @see KApplication
* @see TDEApplication
* @see KConfig
*
* @author Robert Vogl

@ -29,7 +29,7 @@ using namespace Arts;
* If you would like to implement a plugin, simply make a class
* derived from FXPlugin, include 'ksayit_fxplugin.h' and reimplement all the
* pure virtual functions provided herein.
* *Appl is a pointer to the main application as delivered by \p KApplication::kApplication().
* *Appl is a pointer to the main application as delivered by \p TDEApplication::kApplication().
* It can be used for any reason i.e. to install a TQt translator.\n
\author Robert Vogl
*/
@ -42,7 +42,7 @@ public:
/** Sets the Main application object. Useful for config objects etc.
*/
virtual void setApplication(KApplication *Appl) = 0;
virtual void setApplication(TDEApplication *Appl) = 0;
/** Returns the name of the plugin. This name is the unique identifier
* for the plugin. A expressive name is recommended because this name

@ -36,14 +36,14 @@
* In addition you must implement two class factories:\n
* \p createPlugin() returns a pointer to an instance of your class.
* The Plugin Handler of KSayIt calls this function with a parameter pointing
* to the main application instance, as delivered by \p KApplication::kApplication().
* to the main application instance, as delivered by \p TDEApplication::kApplication().
* This pointer can be used for any reason i.e. to install a TQt translator.\n
* An instance of your class should be deleted by use of \p destroyPlugin().\n
* Example:
\code
extern "C"
{
TTSPlugin* createPlugin(KApplication *Appl)
TTSPlugin* createPlugin(TDEApplication *Appl)
{
return new MyNewPlugin(Appl);
}
@ -155,7 +155,7 @@ public:
};
// Types of the class factories
typedef TTSPlugin* (*create_ttspi)(KApplication *Appl);
typedef TTSPlugin* (*create_ttspi)(TDEApplication *Appl);
typedef void (*destroy_ttspi)(TTSPlugin *p);

@ -46,7 +46,7 @@ int main(int argc, char *argv[])
aboutData.addAuthor("Robert Vogl",0, "voglrobe@web.de");
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app;
TDEApplication app;
// setup MCOP
KArtsDispatcher dispatcher;

@ -219,7 +219,7 @@
client->attach();
if (!client->isApplicationRegistered("kttsd")) {
TQString error;
if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
if (TDEApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
cout << "Starting KTTSD failed with message " << error << endl;
}
@endverbatim

@ -69,7 +69,7 @@ int main(int argc, char *argv[])
// Tell which options are supported
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app( false, false );
TDEApplication app( false, false );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -1764,7 +1764,7 @@ void KCMKttsMgr::enableKttsdToggled(bool)
{
// kdDebug() << "KCMKttsMgr::enableKttsdToggled:: Starting KTTSD" << endl;
TQString error;
if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
if (TDEApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
{
kdDebug() << "Starting KTTSD failed with message " << error << endl;
m_kttsmgrw->enableKttsdCheckBox->setChecked(false);

@ -284,7 +284,7 @@ void KttsMgrTray::speakClipboardSelected()
if (!isKttsdRunning())
{
TQString error;
if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error) != 0)
if (TDEApplication::startServiceByDesktopName("kttsd", TQStringList(), &error) != 0)
kdError() << "Starting KTTSD failed with message " << error << endl;
}
speakClipboard();

Loading…
Cancel
Save