/*************************************************************************** wqlwriter.cpp - description ------------------- copyright : (C) 2004 by Peter Hedlund email : peter.hedlund@kdemail.net ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "wqlwriter.h" #define winendl "\r\n" WqlWriter::WqlWriter(TQFile *file) { outputFile = file; if(outputFile->open(IO_WriteOnly)) { outputStream.setDevice(TQT_TQIODEVICE(outputFile)); outputStream.setEncoding(TQTextStream::Latin1); outputStream << "WordQuiz" << winendl; outputStream << "5.9.0" << winendl << winendl; } } void WqlWriter::writeFont( const TQFont & font ) { outputStream << "[Font Info]" << winendl; outputStream << "FontName1=\"" << font.family() << "\"" << winendl; outputStream << "FontSize1=" << TQString::number(font.pointSize()) << winendl; outputStream << TQString("FontBold1=%1").arg(font.bold() ? "1" : "0") <close(); }