summaryrefslogtreecommitdiffstats
path: root/knotes/knoteprinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knotes/knoteprinter.cpp')
-rw-r--r--knotes/knoteprinter.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/knotes/knoteprinter.cpp b/knotes/knoteprinter.cpp
index d1e6ffd59..0bd6ef8a7 100644
--- a/knotes/knoteprinter.cpp
+++ b/knotes/knoteprinter.cpp
@@ -5,86 +5,86 @@
#include <klocale.h>
#include <kprinter.h>
-#include <qfont.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qsimplerichtext.h>
-#include <qstring.h>
+#include <tqfont.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqsimplerichtext.h>
+#include <tqstring.h>
KNotePrinter::KNotePrinter() : m_styleSheet( 0 ), m_mimeSourceFactory( 0 )
{
}
-void KNotePrinter::setContext( const QString& context )
+void KNotePrinter::setContext( const TQString& context )
{
m_context = context;
}
-QString KNotePrinter::context() const
+TQString KNotePrinter::context() const
{
return m_context;
}
-void KNotePrinter::setMimeSourceFactory( QMimeSourceFactory* factory )
+void KNotePrinter::setMimeSourceFactory( TQMimeSourceFactory* factory )
{
m_mimeSourceFactory = factory;
}
-QMimeSourceFactory* KNotePrinter::mimeSourceFactory() const
+TQMimeSourceFactory* KNotePrinter::mimeSourceFactory() const
{
return m_mimeSourceFactory;
}
-void KNotePrinter::setFont( const QFont& font )
+void KNotePrinter::setFont( const TQFont& font )
{
m_font = font;
}
-QFont KNotePrinter::font() const
+TQFont KNotePrinter::font() const
{
return m_font;
}
-void KNotePrinter::setColorGroup( const QColorGroup& colorGroup )
+void KNotePrinter::setColorGroup( const TQColorGroup& colorGroup )
{
m_colorGroup = colorGroup;
}
-QColorGroup KNotePrinter::colorGroup() const
+TQColorGroup KNotePrinter::colorGroup() const
{
return m_colorGroup;
}
-void KNotePrinter::setStyleSheet( QStyleSheet* styleSheet )
+void KNotePrinter::setStyleSheet( TQStyleSheet* styleSheet )
{
m_styleSheet = styleSheet;
}
-QStyleSheet* KNotePrinter::styleSheet() const
+TQStyleSheet* KNotePrinter::styleSheet() const
{
return m_styleSheet;
}
-void KNotePrinter::doPrint( KPrinter& printer, QPainter& painter,
- const QString& content ) const
+void KNotePrinter::doPrint( KPrinter& printer, TQPainter& painter,
+ const TQString& content ) const
{
const int margin = 40; // pt
- QPaintDeviceMetrics metrics( painter.device() );
+ TQPaintDeviceMetrics metrics( painter.device() );
int marginX = margin * metrics.logicalDpiX() / 72;
int marginY = margin * metrics.logicalDpiY() / 72;
- QRect body( marginX, marginY,
+ TQRect body( marginX, marginY,
metrics.width() - marginX * 2,
metrics.height() - marginY * 2 );
- QSimpleRichText text( content, m_font, m_context,
+ TQSimpleRichText text( content, m_font, m_context,
m_styleSheet, m_mimeSourceFactory,
body.height() /*, linkColor, linkUnderline? */ );
text.setWidth( &painter, body.width() );
- QRect view( body );
+ TQRect view( body );
int page = 1;
@@ -97,8 +97,8 @@ void KNotePrinter::doPrint( KPrinter& printer, QPainter& painter,
// page numbers
painter.setFont( m_font );
painter.drawText(
- view.right() - painter.fontMetrics().width( QString::number( page ) ),
- view.bottom() + painter.fontMetrics().ascent() + 5, QString::number( page )
+ view.right() - painter.fontMetrics().width( TQString::number( page ) ),
+ view.bottom() + painter.fontMetrics().ascent() + 5, TQString::number( page )
);
if ( view.top() >= text.height() )
@@ -109,20 +109,20 @@ void KNotePrinter::doPrint( KPrinter& printer, QPainter& painter,
}
}
-void KNotePrinter::printNote( const QString& name, const QString& content ) const
+void KNotePrinter::printNote( const TQString& name, const TQString& content ) const
{
KPrinter printer;
printer.setFullPage( true );
if ( !printer.setup( 0, i18n("Print %1").arg(name) ) )
return;
- QPainter painter;
+ TQPainter painter;
painter.begin( &printer );
doPrint( printer, painter, content );
painter.end();
}
-void KNotePrinter::printNotes( const QValueList<KCal::Journal*>& journals ) const
+void KNotePrinter::printNotes( const TQValueList<KCal::Journal*>& journals ) const
{
if ( journals.isEmpty() )
return;
@@ -133,11 +133,11 @@ void KNotePrinter::printNotes( const QValueList<KCal::Journal*>& journals ) cons
if ( !printer.setup( 0, i18n("Print Note", "Print %n notes", journals.count() ) ) )
return;
- QPainter painter;
+ TQPainter painter;
painter.begin( &printer );
- QString content;
- QValueListConstIterator<KCal::Journal*> it( journals.begin() );
- QValueListConstIterator<KCal::Journal*> end( journals.end() );
+ TQString content;
+ TQValueListConstIterator<KCal::Journal*> it( journals.begin() );
+ TQValueListConstIterator<KCal::Journal*> end( journals.end() );
while ( it != end ) {
KCal::Journal *j = *it;
it++;