diff options
Diffstat (limited to 'krecipes/src/dialogs/dietviewdialog.cpp')
-rw-r--r-- | krecipes/src/dialogs/dietviewdialog.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/krecipes/src/dialogs/dietviewdialog.cpp b/krecipes/src/dialogs/dietviewdialog.cpp index cdb5884..17bfc4a 100644 --- a/krecipes/src/dialogs/dietviewdialog.cpp +++ b/krecipes/src/dialogs/dietviewdialog.cpp @@ -15,20 +15,20 @@ #include <klocale.h> #include <kstandarddirs.h> -DietViewDialog::DietViewDialog( QWidget *parent, const RecipeList &recipeList, int dayNumber, int mealNumber, const QValueList <int> &dishNumbers ) - : KDialogBase( parent, "dietViewDialog", true, QString::null, +DietViewDialog::DietViewDialog( TQWidget *parent, const RecipeList &recipeList, int dayNumber, int mealNumber, const TQValueList <int> &dishNumbers ) + : KDialogBase( parent, "dietViewDialog", true, TQString::null, KDialogBase::User2 | KDialogBase::Close | KDialogBase::User1, KDialogBase::User2, false, KStdGuiItem::print() ) { setButtonText( KDialogBase::User2, i18n( "Create &Shopping List" ) ); // Design the dialog - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); // The html part dietView = new KHTMLPart( page ); - setInitialSize( QSize(350, 450) ); + setInitialSize( TQSize(350, 450) ); setSizeGripEnabled( true ); @@ -43,12 +43,12 @@ DietViewDialog::DietViewDialog( QWidget *parent, const RecipeList &recipeList, i DietViewDialog::~DietViewDialog() {} -void DietViewDialog::showDiet( const RecipeList &recipeList, int dayNumber, int mealNumber, const QValueList <int> &dishNumbers ) +void DietViewDialog::showDiet( const RecipeList &recipeList, int dayNumber, int mealNumber, const TQValueList <int> &dishNumbers ) { // Header - QString htmlCode = QString( "<html><head><title>%1</title>" ).arg( i18n( "Diet" ) ); + TQString htmlCode = TQString( "<html><head><title>%1</title>" ).arg( i18n( "Diet" ) ); // CSS htmlCode += "<STYLE type=\"text/css\">\n"; @@ -63,59 +63,59 @@ void DietViewDialog::showDiet( const RecipeList &recipeList, int dayNumber, int htmlCode += "</head><body>"; // /Header // Calendar border - htmlCode += QString( "<div id=\"calendar\">" ); + htmlCode += TQString( "<div id=\"calendar\">" ); // Title - htmlCode += QString( "<center><div STYLE=\"width: 100%\">" ); - htmlCode += QString( "<h1>%1</h1></div></center>" ).arg( i18n( "Diet" ) ); + htmlCode += TQString( "<center><div STYLE=\"width: 100%\">" ); + htmlCode += TQString( "<h1>%1</h1></div></center>" ).arg( i18n( "Diet" ) ); // Diet table - htmlCode += QString( "<center><div STYLE=\"width: 98%\">" ); - htmlCode += QString( "<table><tbody>" ); + htmlCode += TQString( "<center><div STYLE=\"width: 98%\">" ); + htmlCode += TQString( "<table><tbody>" ); - QValueList <int>::ConstIterator it; + TQValueList <int>::ConstIterator it; it = dishNumbers.begin(); RecipeList::ConstIterator rit; rit = recipeList.begin(); for ( int row = 0, day = 0; row <= ( ( dayNumber - 1 ) / 7 ); row++ ) // New row (week) { - htmlCode += QString( "<tr>" ); + htmlCode += TQString( "<tr>" ); for ( int col = 0; ( col < 7 ) && ( day < dayNumber ); col++, day++ ) // New column (day) { - htmlCode += QString( "<td><div class=\"day\">" ); - htmlCode += QString( "<div class=\"dayheader\"><center>" ); - htmlCode += QString( i18n( "Day %1" ) ).arg( day + 1 ); - htmlCode += QString( "</center></div>" ); + htmlCode += TQString( "<td><div class=\"day\">" ); + htmlCode += TQString( "<div class=\"dayheader\"><center>" ); + htmlCode += TQString( i18n( "Day %1" ) ).arg( day + 1 ); + htmlCode += TQString( "</center></div>" ); for ( int meal = 0;meal < mealNumber;meal++ ) // Meals in each cell { int dishNumber = *it; - htmlCode += QString( "<div class=\"meal\">" ); + htmlCode += TQString( "<div class=\"meal\">" ); for ( int dish = 0; dish < dishNumber;dish++ ) // Dishes in each Meal { - htmlCode += QString( "<div class=\"dish\">" ); + htmlCode += TQString( "<div class=\"dish\">" ); htmlCode += ( *rit ).title; htmlCode += "<br>"; - htmlCode += QString( "</div>" ); + htmlCode += TQString( "</div>" ); rit++; } it++; - htmlCode += QString( "</div>" ); + htmlCode += TQString( "</div>" ); } it = dishNumbers.begin(); // meals have same dish number everyday - htmlCode += QString( "</div></td>" ); + htmlCode += TQString( "</div></td>" ); } - htmlCode += QString( "</tr>" ); + htmlCode += TQString( "</tr>" ); } - htmlCode += QString( "</tbody></table>" ); - htmlCode += QString( "</div></center>" ); - htmlCode += QString( "</div></body></html>" ); + htmlCode += TQString( "</tbody></table>" ); + htmlCode += TQString( "</div></center>" ); + htmlCode += TQString( "</div></body></html>" ); - resize( QSize( 600, 400 ) ); + resize( TQSize( 600, 400 ) ); // Display it dietView->begin( KURL( locateLocal( "tmp", "/" ) ) ); // Initialize to tmp dir, where photos and logos can be stored |