summaryrefslogtreecommitdiffstats
path: root/kugar/lib/mreportviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kugar/lib/mreportviewer.cpp')
-rw-r--r--kugar/lib/mreportviewer.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kugar/lib/mreportviewer.cpp b/kugar/lib/mreportviewer.cpp
index da825f7a..c0e91656 100644
--- a/kugar/lib/mreportviewer.cpp
+++ b/kugar/lib/mreportviewer.cpp
@@ -8,7 +8,7 @@
email : cloudtemple@mksat.net
***************************************************************************/
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kmessagebox.h>
#include <kprinter.h>
#include <klocale.h>
@@ -19,14 +19,14 @@ namespace Kugar
{
/** Constructor */
-MReportViewer::MReportViewer( MReportEngine *engine, QWidget *parent, const char *name ) : QWidget( parent, name ), progress( 0 )
+MReportViewer::MReportViewer( MReportEngine *engine, TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name ), progress( 0 )
{
rptEngine = engine;
rptEngine->addRef();
init();
}
-MReportViewer::MReportViewer( QWidget *parent, const char *name ) : QWidget( parent, name ), progress( 0 )
+MReportViewer::MReportViewer( TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name ), progress( 0 )
{
// Create the scrollview
rptEngine = new MReportEngine();
@@ -35,18 +35,18 @@ MReportViewer::MReportViewer( QWidget *parent, const char *name ) : QWidget( par
void MReportViewer::init()
{
- scroller = new QScrollView( this );
+ scroller = new TQScrollView( this );
// Connect the rendering update signal and slot
- connect( rptEngine, SIGNAL( signalRenderStatus( int ) ),
- SLOT( slotRenderProgress( int ) ) );
+ connect( rptEngine, TQT_SIGNAL( signalRendertqStatus( int ) ),
+ TQT_SLOT( slotRenderProgress( int ) ) );
- connect( rptEngine, SIGNAL( preferedTemplate( const QString & ) ),
- SIGNAL( preferedTemplate( const QString & ) ) );
+ connect( rptEngine, TQT_SIGNAL( preferedTemplate( const TQString & ) ),
+ TQT_SIGNAL( preferedTemplate( const TQString & ) ) );
// Get the current color palette
- QPalette p = palette();
- QColorGroup g = p.active();
+ TQPalette p = palette();
+ TQColorGroup g = p.active();
// Set the scroller's background color
scroller->viewport() ->setBackgroundColor( g.mid() );
@@ -72,18 +72,18 @@ MReportViewer::~MReportViewer()
}
/** Report viewer's paint event */
-void MReportViewer::paintEvent( QPaintEvent* event )
+void MReportViewer::paintEvent( TQPaintEvent* event )
{}
/** Report viewer's resize event */
-void MReportViewer::resizeEvent( QResizeEvent* event )
+void MReportViewer::resizeEvent( TQResizeEvent* event )
{
scroller->resize( event->size() );
}
// Set the report's data from an in-line string.
-bool MReportViewer::setReportData( const QString &data )
+bool MReportViewer::setReportData( const TQString &data )
{
return rptEngine -> setReportData( data );
}
@@ -91,7 +91,7 @@ bool MReportViewer::setReportData( const QString &data )
// Set the report's data from an i/o device.
-bool MReportViewer::setReportData( QIODevice *dev )
+bool MReportViewer::setReportData( TQIODevice *dev )
{
return rptEngine -> setReportData( dev );
}
@@ -99,7 +99,7 @@ bool MReportViewer::setReportData( QIODevice *dev )
// Set the report's template from an in-line string.
-bool MReportViewer::setReportTemplate( const QString &tpl )
+bool MReportViewer::setReportTemplate( const TQString &tpl )
{
return rptEngine -> setReportTemplate( tpl );
}
@@ -107,7 +107,7 @@ bool MReportViewer::setReportTemplate( const QString &tpl )
// Set the report's template from an i/o device.
-bool MReportViewer::setReportTemplate( QIODevice *dev )
+bool MReportViewer::setReportTemplate( TQIODevice *dev )
{
return rptEngine -> setReportTemplate( dev );
}
@@ -167,7 +167,7 @@ void MReportViewer::printReport()
/** Shows the first page in the report */
void MReportViewer::slotFirstPage()
{
- QPicture * page;
+ TQPicture * page;
if ( !report )
return ;
@@ -175,14 +175,14 @@ void MReportViewer::slotFirstPage()
if ( ( page = report->getFirstPage() ) != 0 )
{
display->setPage( page );
- display->repaint();
+ display->tqrepaint();
}
}
/** Shows the next page in the report */
void MReportViewer::slotNextPage()
{
- QPicture * page;
+ TQPicture * page;
if ( !report )
return ;
@@ -192,7 +192,7 @@ void MReportViewer::slotNextPage()
if ( ( page = report->getNextPage() ) != 0 )
{
display->setPage( page );
- display->repaint();
+ display->tqrepaint();
}
else
report->setCurrentPage( index );
@@ -201,7 +201,7 @@ void MReportViewer::slotNextPage()
/** Shows the prevoius page in the report */
void MReportViewer::slotPrevPage()
{
- QPicture * page;
+ TQPicture * page;
if ( !report )
return ;
@@ -211,7 +211,7 @@ void MReportViewer::slotPrevPage()
if ( ( page = report->getPreviousPage() ) != 0 )
{
display->setPage( page );
- display->repaint();
+ display->tqrepaint();
}
else
report->setCurrentPage( index );
@@ -220,7 +220,7 @@ void MReportViewer::slotPrevPage()
/** Shows the last page in the report */
void MReportViewer::slotLastPage()
{
- QPicture * page;
+ TQPicture * page;
if ( !report )
return ;
@@ -228,7 +228,7 @@ void MReportViewer::slotLastPage()
if ( ( page = report->getLastPage() ) != 0 )
{
display->setPage( page );
- display->repaint();
+ display->tqrepaint();
}
}
@@ -246,14 +246,14 @@ void MReportViewer::slotRenderProgress( int p )
if ( progress == 0 )
{
totalSteps = rptEngine->getRenderSteps();
- progress = new QProgressDialog( i18n("Creating report..."), i18n("Cancel"),
+ progress = new TQProgressDialog( i18n("Creating report..."), i18n("Cancel"),
totalSteps, this, "progress", true );
progress->setMinimumDuration( M_PROGRESS_DELAY );
}
// Update the dialog
progress->setProgress( p );
- qApp->processEvents();
+ tqApp->processEvents();
// Check if the action was canceled
if ( progress->wasCancelled() )
@@ -273,9 +273,9 @@ void MReportViewer::slotRenderProgress( int p )
// Return the preferred size.
-QSize MReportViewer::sizeHint() const
+TQSize MReportViewer::tqsizeHint() const
{
- return scroller -> sizeHint();
+ return scroller -> tqsizeHint();
}
void MReportViewer::printReport( KPrinter &printer )
@@ -295,8 +295,8 @@ void MReportViewer::printReport( KPrinter &printer )
}
- QPicture* page;
- QPainter painter;
+ TQPicture* page;
+ TQPainter painter;
bool printRev;
// Save the viewer's page index
@@ -320,13 +320,13 @@ void MReportViewer::printReport( KPrinter &printer )
printer.setNumCopies( 1 );
// Setup the progress dialog
- QProgressDialog progress( i18n( "Printing report..." ),
+ TQProgressDialog progress( i18n( "Printing report..." ),
i18n( "Cancel" ),
totalSteps, this, "progress", true );
progress.setMinimumDuration( M_PROGRESS_DELAY );
- QObject::connect( &progress, SIGNAL( cancelled() ), this, SLOT( slotCancelPrinting() ) );
+ TQObject::connect( &progress, TQT_SIGNAL( cancelled() ), this, TQT_SLOT( slotCancelPrinting() ) );
progress.setProgress( 0 );
- qApp->processEvents();
+ tqApp->processEvents();
// Start the printer
painter.begin( &printer );
@@ -340,7 +340,7 @@ void MReportViewer::printReport( KPrinter &printer )
if ( !printer.aborted() )
{
progress.setProgress( currentStep );
- qApp->processEvents();
+ tqApp->processEvents();
if ( printRev )
report->setCurrentPage( ( printCnt == 1 ) ? i : ( printCnt - 1 ) - i );
@@ -379,7 +379,7 @@ void MReportViewer::setupPrinter( KPrinter &printer )
printer.setFullPage( true );
}
-void MReportViewer::printReportSilent( int printFrom, int printTo, int printCopies, QString printerName )
+void MReportViewer::printReportSilent( int printFrom, int printTo, int printCopies, TQString printerName )
{
int cnt = report->pageCount();
if ( printFrom == -1 )