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

pull/1/head
Timothy Pearson 11 years ago
parent ab801f72ab
commit cee429821a

@ -29,7 +29,7 @@ int main(int argc, char *argv[])
TQFont f("Steve", 12, TQFont::Normal, true);
if (!fontChecker::checkInstalled(f, locate("appdata", "fonts/steve.ttf")))
{
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
for (int i = 0; i < argc; i++) *proc << argv[i];
proc->start();
}

@ -83,9 +83,9 @@ void DetailedGraphicalOverview::paintEvent( TQPaintEvent* )
p.setBrush( TQt::black );
p.setBrush(TQt::NoBrush);
TQFont fA = KGlobalSettings::generalFont();
TQFont fB = KGlobalSettings::generalFont();
TQFont fC = KGlobalSettings::generalFont();
TQFont fA = TDEGlobalSettings::generalFont();
TQFont fB = TDEGlobalSettings::generalFont();
TQFont fC = TDEGlobalSettings::generalFont();
TQString strLocalizedMass = KalziumUtils::localizedValue( m_element->mass(), 6 );

@ -53,11 +53,11 @@ DetailedInfoDlg::DetailedInfoDlg( Element *el , TQWidget *parent, const char *na
{
m_element = el;
m_baseHtml = KGlobal::dirs()->findResourceDir("data", "kalzium/data/" );
m_baseHtml = TDEGlobal::dirs()->findResourceDir("data", "kalzium/data/" );
m_baseHtml.append("kalzium/data/htmlview/");
m_baseHtml.append("style.css");
m_picsdir = KGlobal::dirs()->findResourceDir( "appdata", "elempics/" ) + "elempics/";
m_picsdir = TDEGlobal::dirs()->findResourceDir( "appdata", "elempics/" ) + "elempics/";
( actionButton( KDialogBase::Close ) )->setFocus();
@ -176,7 +176,7 @@ TQString DetailedInfoDlg::getHtml(DATATYPE type)
if ( m_element->abundance() > 0 ){
html.append( "<tr><td><img src=\"abundance.png\" alt=\"icon\"/></td><td>" );
html.append( i18n( "Abundance in crustal rocks: %1 ppm" ).arg( KGlobal::locale()->formatLong( m_element->abundance() ) ) );
html.append( i18n( "Abundance in crustal rocks: %1 ppm" ).arg( TDEGlobal::locale()->formatLong( m_element->abundance() ) ) );
html.append( "</td></tr>" );
}
@ -319,7 +319,7 @@ TQString DetailedInfoDlg::isotopeTable()
html.append( ( *it )->spin() );
html.append( "</td><td>" );
if ( !( *it )->magmoment().isEmpty() ) {
TQString v = KGlobal::locale()->formatNumber( ( *it )->magmoment(), false, 6 );
TQString v = TDEGlobal::locale()->formatNumber( ( *it )->magmoment(), false, 6 );
html.append( i18n( "%1 %2<sub>n</sub>" ).arg( v ).arg( TQChar( 956 ) ) );
}
html.append( "</td></tr>" );

@ -60,7 +60,7 @@ eqchemView::eqchemView(TQWidget *parent) : TQWidget(parent)
l->addWidget(m_eqedit, 1, 1);
l->addWidget(m_eqclear, 1, 0);
m_eqclear->setIconSet( KGlobal::instance()->iconLoader()->loadIconSet("locationbar_erase",
m_eqclear->setIconSet( TDEGlobal::instance()->iconLoader()->loadIconSet("locationbar_erase",
KIcon::NoGroup, 22 /*KIcon::SizeSmallMedium*/) );
connect(m_eqclear, TQT_SIGNAL(clicked()), m_eqedit, TQT_SLOT(clear()) );

@ -85,11 +85,11 @@ Kalzium::Kalzium()
setupActions();
// adding the libtdeedu catalog
KGlobal::locale()->insertCatalogue( "libtdeedu" );
TDEGlobal::locale()->insertCatalogue( "libtdeedu" );
// creating the glossary dialog and loading the glossaries we have
m_glossarydlg = new GlossaryDialog( true, this, "glossary" );
TQString dir = KGlobal::dirs()->findResourceDir( "data", "kalzium/data/" );
TQString dir = TDEGlobal::dirs()->findResourceDir( "data", "kalzium/data/" );
TQString picturepath = dir + "kalzium/data/bg.jpg";
KURL u = dir + "kalzium/data/knowledge.xml";
Glossary *g = Glossary::readFromXML( u );

@ -45,7 +45,7 @@ KalziumTip::KalziumTip( TQWidget * parent, const char * name, WFlags f ) : TQWid
resize(0,0);
hide(); //initailly hide it
m_richText = 0;
m_noElemIcon = KGlobal::iconLoader()->loadIcon( "orbits", KIcon::NoGroup, 64 );
m_noElemIcon = TDEGlobal::iconLoader()->loadIcon( "orbits", KIcon::NoGroup, 64 );
setMouseTracking(true); // receice mouse move events
connect(&m_frameTimer, TQT_SIGNAL(timeout()), TQT_SLOT(internalUpdate()));

@ -76,10 +76,10 @@ double KalziumUtils::strippedValue( double num )
TQString KalziumUtils::localizedValue( double val, int precision, unsigned long options )
{
TQString str = KGlobal::locale()->formatNumber( val, precision );
TQString str = TDEGlobal::locale()->formatNumber( val, precision );
while( str.endsWith("0") )
str.truncate( str.length()-1);
if ( str.endsWith( KGlobal::locale()->decimalSymbol() ) )
if ( str.endsWith( TDEGlobal::locale()->decimalSymbol() ) )
{
// we do not want trailing ',' values so readd trailing 0
str.append( '0' ); //

@ -461,7 +461,7 @@ void PerodicTableView::drawLegendToolTip( TQPainter* p )
static const int padding = 3;
TQFont fB = KGlobalSettings::generalFont();
TQFont fB = TDEGlobalSettings::generalFont();
fB.setPointSize( fB.pointSize() + 4 );
p->setFont( fB );
@ -545,7 +545,7 @@ void PerodicTableView::drawLegend( TQPainter* p )
* does not collide with the elements
*/
TQFont legendFont = KGlobalSettings::generalFont();
TQFont legendFont = TDEGlobalSettings::generalFont();
legendFont.setPointSize( legendFont.pointSize() + 1 );
p->setFont( legendFont );

@ -128,7 +128,7 @@ Kanagram::Kanagram() : TQWidget(0, 0, WStaticContents | WNoAutoErase), m_overNex
m_inputBox->setFont(f);
m_inputBox->show();
m_font = KGlobalSettings::generalFont();
m_font = TDEGlobalSettings::generalFont();
//Initialize the sound server
#ifndef WITHOUT_ARTS
@ -155,7 +155,7 @@ void Kanagram::loadSettings()
if(m_useStandardFonts)
{
m_blackboardFont = KGlobalSettings::generalFont();
m_blackboardFont = TDEGlobalSettings::generalFont();
m_arrow = new TQPixmap(locate("appdata", "images/basicarrow.png"));
m_arrowOver = new TQPixmap(locate("appdata", "images/basicarrowover.png"));
}

@ -78,7 +78,7 @@ void KanagramGame::loadDefaultVocab()
void KanagramGame::refreshVocabList()
{
m_fileList = KGlobal::dirs()->findAllResources("appdata", "data/" + KanagramSettings::dataLanguage() + "/*.kvtml");
m_fileList = TDEGlobal::dirs()->findAllResources("appdata", "data/" + KanagramSettings::dataLanguage() + "/*.kvtml");
//nextVocab();
m_index = findIndex();
}

@ -45,13 +45,13 @@ void LeitnerSystemView::drawSystem(TQPainter* p)
{
if(i == m_highlightedBox)
{
//p->drawPixmap(12 + i * 64 + i*10, m_imageY, KGlobal::iconLoader()->loadIcon("leitnerbox", KIcon::Panel));
//p->drawPixmap(12 + i * 64 + i*10, m_imageY, TDEGlobal::iconLoader()->loadIcon("leitnerbox", KIcon::Panel));
p->drawRect(12 + i * 64 + i*10, m_imageY,64,64);
p->fillRect(12 + i * 64 + i*10, m_imageY,64,64, TQBrush(red));
}
else
{ //for each box 74 = 64(pixmap) + 10(distance between two boxes)
//p->drawPixmap(12 + i * 74, m_imageY, KGlobal::iconLoader()->loadIcon("leitnerbox", KIcon::Panel));
//p->drawPixmap(12 + i * 74, m_imageY, TDEGlobal::iconLoader()->loadIcon("leitnerbox", KIcon::Panel));
p->drawRect(12 + i * 64 + i*10, m_imageY,64,64);
}
}

@ -45,12 +45,12 @@ int main(int argc, char *argv[])
}
if (KanagramSettings::dataLanguage().isEmpty())
{
TQStringList userLanguagesCode = KGlobal::locale()->languageList();
TQStringList userLanguagesCode = TDEGlobal::locale()->languageList();
TQStringList::const_iterator itEnd = userLanguagesCode.end();
TQStringList::const_iterator it = userLanguagesCode.begin();
for ( ; it != itEnd; ++it)
{
TQStringList mdirs = KGlobal::dirs()->findDirs("appdata", "data/" + *it);
TQStringList mdirs = TDEGlobal::dirs()->findDirs("appdata", "data/" + *it);
if (!mdirs.isEmpty()) break;
}
if (it == itEnd) KanagramSettings::setDataLanguage("en");

@ -97,7 +97,7 @@ void MainSettings::setupTranslations()
TQStringList languages, temp_languages;
//the program scans in kdereview/data/ to see what languages data is found
TQStringList mdirs = KGlobal::dirs()->findDirs("appdata", "data/");
TQStringList mdirs = TDEGlobal::dirs()->findDirs("appdata", "data/");
if (mdirs.isEmpty()) return;

@ -26,7 +26,7 @@ TQString NewStuffDialog::downloadDestination(KNS::Entry *entry)
{
TQString fileName = entry->payload().path();
fileName = fileName.section('/', -1);
return KGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + fileName;
return TDEGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + fileName;
}
bool NewStuffDialog::createUploadFile(const TQString &fileName)

@ -94,7 +94,7 @@ void VocabEdit::slotSave()
TQString fileName;
if(m_fileName == "")
{
fileName = KGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + txtVocabName->text().lower().replace(" ", "") + ".kvtml";
fileName = TDEGlobal::dirs()->saveLocation("data", "kanagram/data/" + KanagramSettings::dataLanguage()) + txtVocabName->text().lower().replace(" ", "") + ".kvtml";
}
else
{

@ -34,7 +34,7 @@ void VocabSettings::refreshView()
{
lviewVocab->clear();
m_fileList = KGlobal::dirs()->findAllResources("appdata", "data/" + KanagramSettings::dataLanguage() + "/" + "*.kvtml");
m_fileList = TDEGlobal::dirs()->findAllResources("appdata", "data/" + KanagramSettings::dataLanguage() + "/" + "*.kvtml");
for(uint i = 0; i < m_fileList.size(); i++)
{
KEduVocDocument *doc = new KEduVocDocument(TQT_TQOBJECT(this));

@ -224,98 +224,98 @@ void ExerciseConvert::createTask()
// rational numbers to fractions, but it is not worth the effort here
switch(int((double(rand()) / RAND_MAX) * 18 + 1))
{
case 0 : m_number = KGlobal::locale()->formatNumber(0.5, 1);
case 0 : m_number = TDEGlobal::locale()->formatNumber(0.5, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 2);
break;
case 1 : m_number = KGlobal::locale()->formatNumber(0.3, 1);
case 1 : m_number = TDEGlobal::locale()->formatNumber(0.3, 1);
m_periodStart = 2;
m_periodLength = 1;
m_result = ratio(1, 3);
break;
case 2 : m_number = KGlobal::locale()->formatNumber(0.6, 1);
case 2 : m_number = TDEGlobal::locale()->formatNumber(0.6, 1);
m_periodStart = 2;
m_periodLength = 1;
m_result = ratio(2, 3);
break;
case 3 : m_number = KGlobal::locale()->formatNumber(0.25, 2);
case 3 : m_number = TDEGlobal::locale()->formatNumber(0.25, 2);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 4);
break;
case 4 : m_number = KGlobal::locale()->formatNumber(0.75, 2);
case 4 : m_number = TDEGlobal::locale()->formatNumber(0.75, 2);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(3, 4);
break;
case 5 : m_number = KGlobal::locale()->formatNumber(0.2, 1);
case 5 : m_number = TDEGlobal::locale()->formatNumber(0.2, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 5);
break;
case 6 : m_number = KGlobal::locale()->formatNumber(0.4, 1);
case 6 : m_number = TDEGlobal::locale()->formatNumber(0.4, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(2, 5);
break;
case 7 : m_number = KGlobal::locale()->formatNumber(0.6, 1);
case 7 : m_number = TDEGlobal::locale()->formatNumber(0.6, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(3, 5);
break;
case 8 : m_number = KGlobal::locale()->formatNumber(0.8, 1);
case 8 : m_number = TDEGlobal::locale()->formatNumber(0.8, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(4, 5);
break;
case 9 : m_number = KGlobal::locale()->formatNumber(0.16, 2);
case 9 : m_number = TDEGlobal::locale()->formatNumber(0.16, 2);
m_periodStart = 3;
m_periodLength = 1;
m_result = ratio(1, 6);
break;
case 10 : m_number = KGlobal::locale()->formatNumber(0.142857, 6);
case 10 : m_number = TDEGlobal::locale()->formatNumber(0.142857, 6);
m_periodStart = 2;
m_periodLength = 6;
m_result = ratio(1, 7);
break;
case 11 : m_number = KGlobal::locale()->formatNumber(0.125, 3);
case 11 : m_number = TDEGlobal::locale()->formatNumber(0.125, 3);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 8);
break;
case 12 : m_number = KGlobal::locale()->formatNumber(0.375, 3);
case 12 : m_number = TDEGlobal::locale()->formatNumber(0.375, 3);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(3, 8);
break;
case 13 : m_number = KGlobal::locale()->formatNumber(0.1, 1);
case 13 : m_number = TDEGlobal::locale()->formatNumber(0.1, 1);
m_periodStart = 2;
m_periodLength = 1;
m_result = ratio(1, 9);
break;
case 14 : m_number = KGlobal::locale()->formatNumber(0.1, 1);
case 14 : m_number = TDEGlobal::locale()->formatNumber(0.1, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 10);
break;
case 15 : m_number = KGlobal::locale()->formatNumber(0.05, 2);
case 15 : m_number = TDEGlobal::locale()->formatNumber(0.05, 2);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 20);
break;
case 16 : m_number = KGlobal::locale()->formatNumber(0.01, 2);
case 16 : m_number = TDEGlobal::locale()->formatNumber(0.01, 2);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 100);
break;
case 17 : m_number = KGlobal::locale()->formatNumber(0.83, 2);
case 17 : m_number = TDEGlobal::locale()->formatNumber(0.83, 2);
m_periodStart = 3;
m_periodLength = 1;
m_result = ratio(5, 6);
break;
default :
case 18 : m_number = KGlobal::locale()->formatNumber(0.001, 3);
case 18 : m_number = TDEGlobal::locale()->formatNumber(0.001, 3);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 1000);

@ -68,7 +68,7 @@
<entry type="Font" key="taskFont">
<label>Font used for the task view</label>
<whatsthis>Font used for the task view</whatsthis>
<default code="true">KGlobalSettings::generalFont()</default>
<default code="true">TDEGlobalSettings::generalFont()</default>
</entry>
<entry type="Bool" key="showSpecialRatioNotation">
<label>Enable showing the result also as a mixed number</label>

@ -97,7 +97,7 @@ bool Keduca::queryClose()
void Keduca::configRead()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup( "keduca" );
applyMainWindowSettings( config, "keduca" );
_recentFiles->loadEntries(config);
@ -105,7 +105,7 @@ void Keduca::configRead()
void Keduca::configWrite()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup( "keduca" );
saveMainWindowSettings( config, "keduca" );

@ -82,7 +82,7 @@ void KEducaPrefs::setPageGeneral()
/** Read settings */
void KEducaPrefs::configRead()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("Options");
TQSize defaultSize(500,400);
resize( config->readSizeEntry("Geometry", &defaultSize ) );
@ -94,7 +94,7 @@ void KEducaPrefs::configRead()
/** Write settings */
void KEducaPrefs::configWrite()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("Options");
config->writeEntry("Geometry", size() );
config->writeEntry("ResultFinish", _resultAfterFinish->isChecked() );

@ -225,7 +225,7 @@ void KControlAddEdit::addQuestion()
/** Read config settings */
void KControlAddEdit::configRead()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("AddModify Window");
TQSize defaultSize(500,400);
resize( config->readSizeEntry("Geometry", &defaultSize ) );
@ -234,7 +234,7 @@ void KControlAddEdit::configRead()
/** Write config settings */
void KControlAddEdit::configWrite()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("AddModify Window");
config->writeEntry("Geometry", size() );
config->sync();

@ -226,7 +226,7 @@ void KControlHeader::insertHeader()
TQStringList tmpResult = _defaultCategories.grep( _headerCategory->currentText() );
if( tmpResult.count() == 0 )
{
KConfig *appconfig = KGlobal::config();
KConfig *appconfig = TDEGlobal::config();
_defaultCategories.append( _headerCategory->currentText() );
appconfig->setGroup("General");
appconfig->writeEntry( "Categories", _defaultCategories);
@ -251,7 +251,7 @@ void KControlHeader::loadCountryList(KLanguageCombo *combo)
// clear the list
combo->clear();
TQStringList regionlist = KGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*.desktop"));
TQStringList regionlist = TDEGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*.desktop"));
regionlist.sort();
for ( TQStringList::ConstIterator it = regionlist.begin();
@ -275,7 +275,7 @@ void KControlHeader::loadCountryList(KLanguageCombo *combo)
}
// add all languages to the list
TQStringList countrylist = KGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*/entry.desktop"));
TQStringList countrylist = TDEGlobal::dirs()->findAllResources("locale", sub + TQString::fromLatin1("*/entry.desktop"));
countrylist.sort();
for ( TQStringList::ConstIterator it = countrylist.begin();
@ -307,7 +307,7 @@ void KControlHeader::slotOk()
void KControlHeader::configRead()
{
KConfig *config = new KConfig("emaildefaults");
KConfig *appconfig = KGlobal::config();
KConfig *appconfig = TDEGlobal::config();
config->setGroup("UserInfo");
@ -369,7 +369,7 @@ void KControlHeader::configRead()
/** Write settings */
void KControlHeader::configWrite()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("kcontrolheader");
config->writeEntry("Geometry", size() );
config->sync();

@ -68,7 +68,7 @@ KEducaBuilder::KEducaBuilder(TQWidget* parent, const char *name, WFlags f )
initMenuBar();
init();
configRead();
setIcon( KGlobal::iconLoader()->loadIcon("control.png",
setIcon( TDEGlobal::iconLoader()->loadIcon("control.png",
KIcon::Small) );
_isOpenFile = false;
}
@ -257,7 +257,7 @@ void KEducaBuilder::slotPreview( TQListBoxItem *item )
/** Read config data */
void KEducaBuilder::configRead()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup( "keducacontrol" );
applyMainWindowSettings( config, "keducacontrol" );
@ -268,7 +268,7 @@ void KEducaBuilder::configRead()
/** Write settings */
void KEducaBuilder::configWrite()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup( "keducacontrol" );
saveMainWindowSettings( config, "keducacontrol" );

@ -53,7 +53,7 @@ void KEducaEditorStartDialog::buildRecentFilesList()
TQString key;
TQString value;
TQString oldGroup;
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
oldGroup = config->group();

@ -104,7 +104,7 @@ bool KGalleryDialog::loadFile( const TQString &filename )
/** Read servers */
void KGalleryDialog::configRead()
{
KConfig *appconfig = KGlobal::config();
KConfig *appconfig = TDEGlobal::config();
TQStringList servers;
TQStringList ipservers;
TQStringList::Iterator it_ipservers;
@ -140,7 +140,7 @@ void KGalleryDialog::configWrite()
{
TQStringList servers;
TQStringList ipservers;
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup( "kgallerydialog" );
config->writeEntry("Splitter_size", _split->sizes() );

@ -29,7 +29,7 @@ mapChooser::mapChooser(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Ch
mainHB = new TQHBox(this);
mainHB -> setSpacing(KDialog::spacingHint());
list = KGlobal::dirs() -> findAllResources("appdata", "*.kgm");
list = TDEGlobal::dirs() -> findAllResources("appdata", "*.kgm");
p_listBox = new TQListBox(mainHB);
TQStringList::iterator it;
for(it = list.begin(); it != list.end(); ++it)

@ -191,7 +191,7 @@ void KHangMan::setLanguages()
m_languageNames.clear();
m_sortedNames.clear();
//the program scans in khangman/data/ to see what languages data is found
TQStringList mdirs = KGlobal::dirs()->findDirs("data", "khangman/data/");
TQStringList mdirs = TDEGlobal::dirs()->findDirs("data", "khangman/data/");
if (mdirs.isEmpty()) return;
for (TQStringList::Iterator it =mdirs.begin(); it !=mdirs.end(); ++it ) {
TQDir dir(*it);
@ -284,7 +284,7 @@ void KHangMan::loadLevels()
{
//build the Level combobox menu dynamically depending of the data for each language
levels.clear();//initialize TQStringList levels
KStandardDirs *dirs = KGlobal::dirs();
KStandardDirs *dirs = TDEGlobal::dirs();
TQStringList mfiles = dirs->findAllResources("data","khangman/data/" + Prefs::selectedLanguage() + "/*.kvtml");
bool levelBool = false;
if (!mfiles.isEmpty())

@ -20,7 +20,7 @@
<entry name="SelectedLanguage" type="String">
<label>The language selected by the user</label>
<code>
KConfigBase *globalConf = KGlobal::config();
KConfigBase *globalConf = TDEGlobal::config();
globalConf->setGroup("Locale");
QString userLanguage = globalConf->readEntry("Language", "en");
if (userLanguage.isEmpty())

@ -119,13 +119,13 @@ int main(int argc, char **argv)
TQFont fd("Dustismo Roman", 12, TQFont::Normal, true);
if (!fontChecker::checkInstalled(f, locate("appdata", "fonts/Domestic_Manners.ttf")))
{
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
for (int i = 0; i < argc; i++) *proc << argv[i];
proc->start();
}
else if (!fontChecker::checkInstalled(fd, locate("appdata", "fonts/Dustismo_Roman.ttf")))
{
KProcess *proc = new KProcess;
TDEProcess *proc = new TDEProcess;
for (int i = 0; i < argc; i++) *proc << argv[i];
proc->start();
}

@ -893,7 +893,7 @@
* Improve Kig embedded in Konqueror experience: make translations
and icons work by using the correct instanceName(), and using the
iconLoader we get from our TDEInstance instead of from KGlobal ( so
iconLoader we get from our TDEInstance instead of from TDEGlobal ( so
that the kig specific dirs are checked for icons as well ).
2004-04-10 Dominique Devriese <devriese@kde.org>

@ -120,7 +120,7 @@ KigDocument* KigFilterNative::load( const TQString& file )
// kig file inside it...
iscompressed = true;
TQString tempdir = KGlobal::dirs()->saveLocation( "tmp" );
TQString tempdir = TDEGlobal::dirs()->saveLocation( "tmp" );
if ( tempdir.isEmpty() )
KIG_FILTER_PARSE_ERROR;
@ -688,7 +688,7 @@ bool KigFilterNative::save07( const KigDocument& data, const TQString& outfile )
// the user wants to save a compressed file, so we have to save our kig
// file to a temp file and then compress it...
TQString tempdir = KGlobal::dirs()->saveLocation( "tmp" );
TQString tempdir = TDEGlobal::dirs()->saveLocation( "tmp" );
if ( tempdir.isEmpty() )
return false;

@ -62,7 +62,7 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ )
{
iscompressed = true;
TQString tempdir = KGlobal::dirs()->saveLocation( "tmp" );
TQString tempdir = TDEGlobal::dirs()->saveLocation( "tmp" );
if ( tempdir.isEmpty() )
return false;

@ -199,7 +199,7 @@ void Kig::optionsConfigureKeys()
void Kig::optionsConfigureToolbars()
{
saveMainWindowSettings(KGlobal::config(), "MainWindow");
saveMainWindowSettings(TDEGlobal::config(), "MainWindow");
// use the standard toolbar editor
KEditToolbar dlg(factory());
@ -210,7 +210,7 @@ void Kig::optionsConfigureToolbars()
void Kig::applyNewToolbarConfig()
{
applyMainWindowSettings(KGlobal::config(), "MainWindow");
applyMainWindowSettings(TDEGlobal::config(), "MainWindow");
}
bool Kig::queryClose()

@ -701,7 +701,7 @@ void KigPart::setupMacroTypes()
// the user's saved macro types:
TQStringList dataFiles =
KGlobal::dirs()->findAllResources("appdata", "kig-types/*.kigt",
TDEGlobal::dirs()->findAllResources("appdata", "kig-types/*.kigt",
true, false );
std::vector<Macro*> macros;
for ( TQStringList::iterator file = dataFiles.begin();
@ -728,7 +728,7 @@ void KigPart::setupBuiltinMacros()
// builtin macro types ( we try to make the user think these are
// normal types )..
TQStringList builtinfiles =
KGlobal::dirs()->findAllResources( "appdata", "builtin-macros/*.kigt", true, false );
TDEGlobal::dirs()->findAllResources( "appdata", "builtin-macros/*.kigt", true, false );
for ( TQStringList::iterator file = builtinfiles.begin();
file != builtinfiles.end(); ++file )
{
@ -989,7 +989,7 @@ void KigPart::coordSystemChanged( int id )
void KigPart::saveTypes()
{
TQString typesDir = KGlobal::dirs()->saveLocation( "appdata", "kig-types" );
TQString typesDir = TDEGlobal::dirs()->saveLocation( "appdata", "kig-types" );
if ( typesDir[ typesDir.length() - 1 ] != '/' )
typesDir += '/';
TQString typesFileWithPath = typesDir + typesFile;
@ -1004,7 +1004,7 @@ void KigPart::saveTypes()
void KigPart::loadTypes()
{
TQString typesDir = KGlobal::dirs()->saveLocation( "appdata", "kig-types" );
TQString typesDir = TDEGlobal::dirs()->saveLocation( "appdata", "kig-types" );
if ( typesDir[ typesDir.length() - 1 ] != '/' )
typesDir += '/';
TQString typesFileWithPath = typesDir + typesFile;

@ -356,17 +356,17 @@ double getDoubleFromUser( const TQString& caption, const TQString& label, double
#endif
#if KDE_IS_VERSION( 3, 1, 90 )
TQString input = KInputDialog::getText(
caption, label, KGlobal::locale()->formatNumber( value, decimals ),
caption, label, TDEGlobal::locale()->formatNumber( value, decimals ),
ok, parent, "getDoubleFromUserDialog", &vtor );
#else
TQString input =
KLineEditDlg::getText( caption, label,
KGlobal::locale()->formatNumber( value, decimals ),
TDEGlobal::locale()->formatNumber( value, decimals ),
ok, parent, &vtor );
#endif
bool myok = true;
double ret = KGlobal::locale()->readNumber( input, &myok );
double ret = TDEGlobal::locale()->readNumber( input, &myok );
if ( ! myok )
ret = input.toDouble( & myok );
if ( ok ) *ok = myok;

@ -114,7 +114,7 @@ void CoordinateValidator::fixup( TQString & input ) const
if ( sc == -1 )
{
sc = input.length();
KLocale* l = KGlobal::locale();
KLocale* l = TDEGlobal::locale();
if ( mpolar )
input.append( TQString::fromLatin1( ";" ) + l->positiveSign() +
TQString::fromLatin1( "0ยฐ" ) );
@ -144,8 +144,8 @@ TQString EuclideanCoords::fromScreen( const Coordinate& p, const KigDocument& d
Rect sr = d.suggestedRect();
double m = kigMax( sr.width(), sr.height() );
int l = kigMax( 0, (int) ( 3 - log10( m ) ) );
TQString xs = KGlobal::locale()->formatNumber( p.x, l );
TQString ys = KGlobal::locale()->formatNumber( p.y, l );
TQString xs = TDEGlobal::locale()->formatNumber( p.x, l );
TQString ys = TDEGlobal::locale()->formatNumber( p.y, l );
return TQString::fromLatin1( "( %1; %2 )" ).arg( xs ).arg( ys );
}
@ -157,7 +157,7 @@ Coordinate EuclideanCoords::toScreen(const TQString& s, bool& ok) const
{
TQString xs = r.cap(1);
TQString ys = r.cap(2);
KLocale* l = KGlobal::locale();
KLocale* l = TDEGlobal::locale();
double x = l->readNumber( xs, &ok );
if ( ! ok ) x = xs.toDouble( &ok );
if ( ! ok ) return Coordinate();
@ -272,7 +272,7 @@ void EuclideanCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) co
p.drawText(
Rect( Coordinate( i, 0 ), hd, -2*vd ).normalized(),
KGlobal::locale()->formatNumber( i, hnfrac ),
TDEGlobal::locale()->formatNumber( i, hnfrac ),
AlignLeft | AlignTop
);
};
@ -281,7 +281,7 @@ void EuclideanCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) co
{
if( fabs( i ) < 1e-8 ) continue;
p.drawText ( Rect( Coordinate( 0, i ), 2*hd, vd ).normalized(),
KGlobal::locale()->formatNumber( i, vnfrac ),
TDEGlobal::locale()->formatNumber( i, vnfrac ),
AlignBottom | AlignLeft
);
};
@ -351,8 +351,8 @@ TQString PolarCoords::fromScreen( const Coordinate& pt, const KigDocument& d ) c
double r = pt.length();
double theta = Goniometry::convert( atan2( pt.y, pt.x ), Goniometry::Rad, Goniometry::Deg );
TQString rs = KGlobal::locale()->formatNumber( r, l );
TQString ts = KGlobal::locale()->formatNumber( theta, 0 );
TQString rs = TDEGlobal::locale()->formatNumber( r, l );
TQString ts = TDEGlobal::locale()->formatNumber( theta, 0 );
return TQString::fromLatin1("( %1; %2ยฐ )").arg( rs ).arg( ts );
}
@ -378,11 +378,11 @@ Coordinate PolarCoords::toScreen(const TQString& s, bool& ok) const
if (ok)
{
TQString rs = regexp.cap( 1 );
double r = KGlobal::locale()->readNumber( rs, &ok );
double r = TDEGlobal::locale()->readNumber( rs, &ok );
if ( ! ok ) r = rs.toDouble( &ok );
if ( ! ok ) return Coordinate();
TQString ts = regexp.cap( 2 );
double theta = KGlobal::locale()->readNumber( ts, &ok );
double theta = TDEGlobal::locale()->readNumber( ts, &ok );
if ( ! ok ) theta = ts.toDouble( &ok );
if ( ! ok ) return Coordinate();
theta *= M_PI;
@ -465,7 +465,7 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const
// through the 0 etc. )
if( fabs( i ) < 1e-8 ) continue;
TQString is = KGlobal::locale()->formatNumber( fabs( i ), nfrac );
TQString is = TDEGlobal::locale()->formatNumber( fabs( i ), nfrac );
p.drawText(
Rect( Coordinate( i, 0 ), hd, -2*vd ).normalized(),
is, AlignLeft | AlignTop );
@ -475,7 +475,7 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const
{
if( fabs( i ) < 1e-8 ) continue;
TQString is = KGlobal::locale()->formatNumber( fabs( i ), nfrac );
TQString is = TDEGlobal::locale()->formatNumber( fabs( i ), nfrac );
p.drawText ( Rect( Coordinate( 0, i ), hd, vd ).normalized(),
is, AlignBottom | AlignLeft

@ -70,7 +70,7 @@ NewScriptWizard::NewScriptWizard( TQWidget* parent, ScriptModeBase* mode )
// there is no KDE textditor component installed, so we'll use a
// simplier KTextEdit
textedit = new KTextEdit( mpcode, "textedit" );
textedit->setFont( KGlobalSettings::fixedFont() );
textedit->setFont( TDEGlobalSettings::fixedFont() );
gridLayout->addWidget( textedit, 1, 0 );
}
else

@ -59,7 +59,7 @@ Dict::Index *Asyndeta::retrieveIndex()
void Asyndeta::readKitenConfiguration()
{
KStandardDirs *dirs = KGlobal::dirs();
KStandardDirs *dirs = TDEGlobal::dirs();
KConfig config(dirs->findResource("config", "kitenrc"));
TQString globaledict = dirs->findResource("data", "kiten/edict");
@ -113,6 +113,6 @@ void Asyndeta::readKitenConfiguration()
TQString Asyndeta::personalDictionaryLocation()
{
return KGlobal::dirs()->saveLocation("data", "kiten/dictionaries/", true).append("personal");
return TDEGlobal::dirs()->saveLocation("data", "kiten/dictionaries/", true).append("personal");
}

@ -37,7 +37,7 @@ void Deinf::Index::load()
if (loaded)
return;
KStandardDirs *dirs = KGlobal::dirs();
KStandardDirs *dirs = TDEGlobal::dirs();
TQString vconj = dirs->findResource("data", "kiten/vconj");
if (vconj.isNull())
{

@ -69,7 +69,7 @@ File::File(TQString path, TQString n)
: myName(n)
, dictFile(path)
, dictPtr((const unsigned char *)MAP_FAILED)
, indexFile(KGlobal::dirs()->saveLocation("data", "kiten/xjdx/", true) + TQFileInfo(path).baseName() + ".xjdx")
, indexFile(TDEGlobal::dirs()->saveLocation("data", "kiten/xjdx/", true) + TQFileInfo(path).baseName() + ".xjdx")
, indexPtr((const uint32_t *)MAP_FAILED)
, valid(false)
{
@ -104,10 +104,10 @@ File::File(TQString path, TQString n)
{
//kdDebug() << "creating " << indexFile.name() << endl;
// find the index generator executable
KProcess proc;
TDEProcess proc;
proc << KStandardDirs::findExe("kitengen") << path << indexFile.name();
// TODO: put up a status dialog and event loop instead of blocking
proc.start(KProcess::Block, KProcess::NoCommunication);
proc.start(TDEProcess::Block, TDEProcess::NoCommunication);
}
if (!dictFile.open(IO_ReadOnly))

@ -54,10 +54,10 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) : KMainWindow(parent, nam
config = Config::self();
config->readConfig();
Accel = new KGlobalAccel(TQT_TQOBJECT(this));
Accel = new TDEGlobalAccel(TQT_TQOBJECT(this));
(void) Accel->insert("Lookup Kanji (Kanjidic)", i18n("Lookup Kanji (Kanjidic)"), i18n("Gives detailed information about Kanji currently on clipboard."), CTRL + ALT + Key_K, CTRL + ALT + Key_K, TQT_TQOBJECT(this), TQT_SLOT(kanjiSearchAccel()));
(void) Accel->insert("Lookup English/Japanese word", i18n("Lookup English/Japanese Word"), i18n("Looks up current text on clipboard in the same way as if you used Kiten's regular search."), CTRL + ALT + Key_S, CTRL + ALT + Key_S, TQT_TQOBJECT(this), TQT_SLOT(searchAccel()));
Accel->readSettings(KGlobal::config());
Accel->readSettings(TDEGlobal::config());
Accel->updateConnections();
_ResultView = new ResultView(true, this, "_ResultView");
@ -112,7 +112,7 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) : KMainWindow(parent, nam
createLearn();
resize(600, 400);
applyMainWindowSettings(KGlobal::config(), "TopLevelWindow");
applyMainWindowSettings(TDEGlobal::config(), "TopLevelWindow");
connect(_ResultView, TQT_SIGNAL(linkClicked(const TQString &)), TQT_SLOT(ressearch(const TQString &)));
connect(kapp->clipboard(), TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(autoSearch()));
@ -163,7 +163,7 @@ bool TopLevel::queryClose()
config->setDeinf(deinfCB->isChecked());
config->writeConfig();
saveMainWindowSettings(KGlobal::config(), "TopLevelWindow");
saveMainWindowSettings(TDEGlobal::config(), "TopLevelWindow");
return true;
}
@ -728,7 +728,7 @@ void TopLevel::toggleCom()
void TopLevel::configureToolBars()
{
saveMainWindowSettings(KGlobal::config(), "TopLevelWindow");
saveMainWindowSettings(TDEGlobal::config(), "TopLevelWindow");
KEditToolbar dlg(actionCollection(), "kitenui.rc");
connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(newToolBarConfig()));
dlg.exec();
@ -737,7 +737,7 @@ void TopLevel::configureToolBars()
void TopLevel::newToolBarConfig()
{
createGUI("kitenui.rc");
applyMainWindowSettings(KGlobal::config(), "TopLevelWindow");
applyMainWindowSettings(TDEGlobal::config(), "TopLevelWindow");
}
RadWidget *TopLevel::radicalSearch()

@ -31,7 +31,7 @@
class Config;
class ConfigureDialog;
class EditAction;
class KGlobalAccel;
class TDEGlobalAccel;
class KStatusBar;
class KToggleAction;
class KListAction;
@ -110,7 +110,7 @@ private:
KAction *backAction;
KAction *forwardAction;
KGlobalAccel *Accel;
TDEGlobalAccel *Accel;
void doSearch(const TQString &text, TQRegExp regexp);
void doSearchInResults(const TQString &text, TQRegExp regexp);

@ -33,7 +33,7 @@ KRomajiEdit::KRomajiEdit(TQWidget *parent, const char *name)
{
kana = "unset";
KStandardDirs *dirs = KGlobal::dirs();
KStandardDirs *dirs = TDEGlobal::dirs();
TQString romkana = dirs->findResource("data", "kiten/romkana.cnv");
if (romkana.isNull())
{

@ -51,7 +51,7 @@ void Rad::load()
if (loaded)
return;
KStandardDirs *dirs = KGlobal::dirs();
KStandardDirs *dirs = TDEGlobal::dirs();
TQString radkfile = dirs->findResource("data", "kiten/radkfile");
if (radkfile.isNull())
{

@ -403,10 +403,10 @@ void eEdit::save()
f.flush();
// find the index generator executable
KProcess proc;
proc << KStandardDirs::findExe("kitengen") << filename << KGlobal::dirs()->saveLocation("data", "kiten/xjdx/", true) + TQFileInfo(filename).baseName() + ".xjdx";
TDEProcess proc;
proc << KStandardDirs::findExe("kitengen") << filename << TDEGlobal::dirs()->saveLocation("data", "kiten/xjdx/", true) + TQFileInfo(filename).baseName() + ".xjdx";
// TODO: put up a status dialog and event loop instead of blocking
proc.start(KProcess::Block, KProcess::NoCommunication);
proc.start(TDEProcess::Block, TDEProcess::NoCommunication);
statusBar()->message(i18n("Saved"));
isMod = false;

@ -184,7 +184,7 @@ void KLatin::resetGUI()
// various options that are available to choose
// and setCentralWidget it.
klatinchoose = new KLatinChoose(this);
klatinchoose->QuitButton->setIconSet(KGlobal::iconLoader()->loadIconSet("exit", KIcon::Small));
klatinchoose->QuitButton->setIconSet(TDEGlobal::iconLoader()->loadIconSet("exit", KIcon::Small));
klatinchoose->show();
setCentralWidget(klatinchoose);

@ -8,7 +8,7 @@
<entry name="UserLanguage" type="String">
<label>The language selected by the user</label>
<code>
KConfigBase *globalConf = KGlobal::config();
KConfigBase *globalConf = TDEGlobal::config();
globalConf->setGroup("Locale");
TQString m_language = globalConf->readEntry("Language", "en");
//keep only the first 2 characters

@ -38,8 +38,8 @@ KLatinGrammar::KLatinGrammar(TQWidget* parent, const char *name)
m_totalCorrect = 0;
m_numWrong = 0;
OKButton->setIconSet(KGlobal::iconLoader()->loadIconSet("button_ok", KIcon::Small));
BackButton->setIconSet(KGlobal::iconLoader()->loadIconSet("back", KIcon::Small));
OKButton->setIconSet(TDEGlobal::iconLoader()->loadIconSet("button_ok", KIcon::Small));
BackButton->setIconSet(TDEGlobal::iconLoader()->loadIconSet("back", KIcon::Small));
// Set connections
connect(BackButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(goBack()));

@ -33,9 +33,9 @@
KLatinVerbs::KLatinVerbs(TQWidget* parent, const char *name)
: KLatinVerbsWidget(parent, name)
{
OKButton->setIconSet(KGlobal::iconLoader()->loadIconSet("button_ok", KIcon::Small));
BackButton->setIconSet(KGlobal::iconLoader()->loadIconSet("back", KIcon::Small));
ChangeButton->setIconSet(KGlobal::iconLoader()->loadIconSet("apply", KIcon::Small));
OKButton-