diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-07-31 17:12:50 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-07-31 17:25:03 +0200 |
commit | bfae40d567282d89db189816d672a5c6af89ca4e (patch) | |
tree | 20d9a16c77474c6062e2a69801b91decd86de78f /krecipes/src/exporters | |
parent | 5f9410ae910e73f8966318d1e1b9be03a5651118 (diff) | |
download | krecipes-bfae40d567282d89db189816d672a5c6af89ca4e.tar.gz krecipes-bfae40d567282d89db189816d672a5c6af89ca4e.zip |
Initial TDE conversion
Diffstat (limited to 'krecipes/src/exporters')
-rw-r--r-- | krecipes/src/exporters/baseexporter.cpp | 10 | ||||
-rw-r--r-- | krecipes/src/exporters/baseexporter.h | 4 | ||||
-rw-r--r-- | krecipes/src/exporters/cookmlexporter.cpp | 10 | ||||
-rw-r--r-- | krecipes/src/exporters/htmlexporter.cpp | 20 | ||||
-rw-r--r-- | krecipes/src/exporters/kreexporter.cpp | 6 | ||||
-rw-r--r-- | krecipes/src/exporters/mmfexporter.cpp | 8 | ||||
-rw-r--r-- | krecipes/src/exporters/plaintextexporter.cpp | 10 | ||||
-rw-r--r-- | krecipes/src/exporters/recipemlexporter.cpp | 2 | ||||
-rw-r--r-- | krecipes/src/exporters/rezkonvexporter.cpp | 8 |
9 files changed, 39 insertions, 39 deletions
diff --git a/krecipes/src/exporters/baseexporter.cpp b/krecipes/src/exporters/baseexporter.cpp index ecac79a..8dcd09a 100644 --- a/krecipes/src/exporters/baseexporter.cpp +++ b/krecipes/src/exporters/baseexporter.cpp @@ -14,11 +14,11 @@ #include <ntqfile.h> #include <ntqfileinfo.h> -#include <kaboutdata.h> +#include <tdeaboutdata.h> #include <kdebug.h> -#include <klocale.h> -#include <kglobal.h> -#include <kmessagebox.h> +#include <tdelocale.h> +#include <tdeglobal.h> +#include <tdemessagebox.h> #include <ktar.h> #include <kstandarddirs.h> @@ -163,7 +163,7 @@ void BaseExporter::saveToFile( const TQValueList<int> &ids, RecipeDB *database ) TQString BaseExporter::krecipes_version() const { - KInstance * this_instance = KGlobal::instance(); + TDEInstance * this_instance = TDEGlobal::instance(); if ( this_instance && this_instance->aboutData() ) return this_instance->aboutData() ->version(); diff --git a/krecipes/src/exporters/baseexporter.h b/krecipes/src/exporters/baseexporter.h index 112add3..c9df070 100644 --- a/krecipes/src/exporters/baseexporter.h +++ b/krecipes/src/exporters/baseexporter.h @@ -14,7 +14,7 @@ #include <ntqstringlist.h> -#include <kapplication.h> +#include <tdeapplication.h> #include <kprogress.h> #include "datablocks/recipelist.h" @@ -76,7 +76,7 @@ protected: void setCompressed( bool ); /** Attempt to return the version of the application via - * KGlobal::instance()->aboutData()->version() + * TDEGlobal::instance()->aboutData()->version() * This can be used by exporters to put the version of the app exporting the file. */ TQString krecipes_version() const; diff --git a/krecipes/src/exporters/cookmlexporter.cpp b/krecipes/src/exporters/cookmlexporter.cpp index 047d586..c744946 100644 --- a/krecipes/src/exporters/cookmlexporter.cpp +++ b/krecipes/src/exporters/cookmlexporter.cpp @@ -16,12 +16,12 @@ #include <ntqpixmap.h> #include <ntqfile.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <kdebug.h> -#include <klocale.h> -#include <ktempfile.h> +#include <tdelocale.h> +#include <tdetempfile.h> #include <kmdcodec.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kstandarddirs.h> #include "backends/recipedb.h" @@ -60,7 +60,7 @@ TQString CookMLExporter::createContent( const RecipeList& recipes ) RecipeList::const_iterator recipe_it; for ( recipe_it = recipes.begin(); recipe_it != recipes.end(); ++recipe_it ) { TQDomElement recipe_tag = doc.createElement( "recipe" ); - recipe_tag.setAttribute( "lang", ( KGlobal::locale() ) ->language() ); + recipe_tag.setAttribute( "lang", ( TDEGlobal::locale() ) ->language() ); //cookml_tag.appendChild( recipe_tag ); diff --git a/krecipes/src/exporters/htmlexporter.cpp b/krecipes/src/exporters/htmlexporter.cpp index 31e8c40..f501acd 100644 --- a/krecipes/src/exporters/htmlexporter.cpp +++ b/krecipes/src/exporters/htmlexporter.cpp @@ -23,12 +23,12 @@ #include <ntqpainter.h> #include <ntqfileinfo.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <kdebug.h> -#include <klocale.h> -#include <kglobal.h> -#include <khtml_part.h> -#include <khtmlview.h> +#include <tdelocale.h> +#include <tdeglobal.h> +#include <tdehtml_part.h> +#include <tdehtmlview.h> #include <kprogress.h> #include <kstandarddirs.h> #include <kurl.h> @@ -45,7 +45,7 @@ HTMLExporter::HTMLExporter( const TQString& filename, const TQString &format ) : BaseExporter( filename, format ) { - KConfig *config = KGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup( "Page Setup" ); //let's do everything we can to be sure at least some layout is loaded @@ -121,7 +121,7 @@ TQString HTMLExporter::createHeader( const RecipeList & ) m_visibilityMap.clear(); m_columnsMap.clear(); - KConfig *config = KGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup( "Page Setup" ); m_error = false; @@ -152,7 +152,7 @@ TQString HTMLExporter::createHeader( const RecipeList & ) RecipeList::const_iterator recipe_it; - KLocale*loc = KGlobal::locale(); + TDELocale*loc = TDEGlobal::locale(); TQString encoding = loc->encoding(); TQString output = "<html>"; @@ -269,7 +269,7 @@ TQString HTMLExporter::HTMLIfVisible( const TQString &name, const TQString &html void HTMLExporter::populateTemplate( const Recipe &recipe, TQString &content ) { - KConfig * config = KGlobal::config(); + TDEConfig * config = TDEGlobal::config(); //=======================TITLE======================// content = content.replace("**TITLE**",HTMLIfVisible("title",recipe.title)); @@ -460,7 +460,7 @@ void HTMLExporter::populateTemplate( const Recipe &recipe, TQString &content ) double prop_amount = (*prop_it).amount; if ( prop_amount > 0 ) { //TODO: make the precision configuratble prop_amount = double( tqRound( prop_amount * 10.0 ) ) / 10.0; //not a "chemistry experiment" ;) Let's only have one decimal place - amount_str = beautify( KGlobal::locale() ->formatNumber( prop_amount, 5 ) ); + amount_str = beautify( TDEGlobal::locale() ->formatNumber( prop_amount, 5 ) ); } else amount_str = "0"; diff --git a/krecipes/src/exporters/kreexporter.cpp b/krecipes/src/exporters/kreexporter.cpp index 70eef9b..1d90ad1 100644 --- a/krecipes/src/exporters/kreexporter.cpp +++ b/krecipes/src/exporters/kreexporter.cpp @@ -19,9 +19,9 @@ #include <ntqimage.h> #include <kdebug.h> -#include <klocale.h> +#include <tdelocale.h> #include <kmdcodec.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kstandarddirs.h> #include "backends/recipedb.h" @@ -55,7 +55,7 @@ TQString KreExporter::createHeader( const RecipeList& recipes ) TQString xml; xml += "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; - xml += "<krecipes version=\"" + krecipes_version() + "\" lang=\"" + ( KGlobal::locale() )->language() + "\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"krecipes.xsd\">\n"; + xml += "<krecipes version=\"" + krecipes_version() + "\" lang=\"" + ( TDEGlobal::locale() )->language() + "\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"krecipes.xsd\">\n"; createCategoryStructure( xml, recipes ); diff --git a/krecipes/src/exporters/mmfexporter.cpp b/krecipes/src/exporters/mmfexporter.cpp index 596111f..8d08c73 100644 --- a/krecipes/src/exporters/mmfexporter.cpp +++ b/krecipes/src/exporters/mmfexporter.cpp @@ -12,10 +12,10 @@ #include <ntqregexp.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <kdebug.h> -#include <klocale.h> -#include <kapplication.h> +#include <tdelocale.h> +#include <tdeapplication.h> #include "backends/recipedb.h" #include "datablocks/mixednumber.h" @@ -134,7 +134,7 @@ void MMFExporter::writeMMFIngredients( TQString &content, const Recipe &recipe ) void MMFExporter::writeSingleIngredient( TQString &content, const Ingredient &ing, bool is_sub ) { - KConfig * config = kapp->config(); + TDEConfig * config = kapp->config(); config->setGroup( "Formatting" ); MixedNumber::Format number_format = ( config->readBoolEntry( "Fraction" ) ) ? MixedNumber::MixedNumberFormat : MixedNumber::DecimalFormat; diff --git a/krecipes/src/exporters/plaintextexporter.cpp b/krecipes/src/exporters/plaintextexporter.cpp index f9be518..db9902e 100644 --- a/krecipes/src/exporters/plaintextexporter.cpp +++ b/krecipes/src/exporters/plaintextexporter.cpp @@ -10,9 +10,9 @@ #include "plaintextexporter.h" -#include <kconfig.h> -#include <kglobal.h> -#include <klocale.h> +#include <tdeconfig.h> +#include <tdeglobal.h> +#include <tdelocale.h> #include "backends/recipedb.h" @@ -31,7 +31,7 @@ int PlainTextExporter::supportedItems() const TQString PlainTextExporter::generateIngredient( const IngredientData &ing, MixedNumber::Format number_format ) { - KConfig *config = KGlobal::config(); + TDEConfig *config = TDEGlobal::config(); TQString content; @@ -63,7 +63,7 @@ TQString PlainTextExporter::generateIngredient( const IngredientData &ing, Mixed TQString PlainTextExporter::createContent( const RecipeList& recipes ) { - KConfig *config = KGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup( "Formatting" ); MixedNumber::Format number_format = ( config->readBoolEntry( "Fraction" ) ) ? MixedNumber::MixedNumberFormat : MixedNumber::DecimalFormat; diff --git a/krecipes/src/exporters/recipemlexporter.cpp b/krecipes/src/exporters/recipemlexporter.cpp index 71fed09..4831004 100644 --- a/krecipes/src/exporters/recipemlexporter.cpp +++ b/krecipes/src/exporters/recipemlexporter.cpp @@ -11,7 +11,7 @@ #include "recipemlexporter.h" #include <kdebug.h> -#include <klocale.h> +#include <tdelocale.h> #include "backends/recipedb.h" diff --git a/krecipes/src/exporters/rezkonvexporter.cpp b/krecipes/src/exporters/rezkonvexporter.cpp index 9e90adb..f9914f4 100644 --- a/krecipes/src/exporters/rezkonvexporter.cpp +++ b/krecipes/src/exporters/rezkonvexporter.cpp @@ -12,10 +12,10 @@ #include <ntqregexp.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <kdebug.h> -#include <klocale.h> -#include <kapplication.h> +#include <tdelocale.h> +#include <tdeapplication.h> #include "backends/recipedb.h" #include "datablocks/mixednumber.h" @@ -214,7 +214,7 @@ void RezkonvExporter::writeIngredients( TQString &content, const Recipe &recipe void RezkonvExporter::writeSingleIngredient( TQString &content, const IngredientData &ing, bool is_sub ) { - KConfig * config = kapp->config(); + TDEConfig * config = kapp->config(); config->setGroup( "Formatting" ); MixedNumber::Format number_format = ( config->readBoolEntry( "Fraction" ) ) ? MixedNumber::MixedNumberFormat : MixedNumber::DecimalFormat; |