summaryrefslogtreecommitdiffstats
path: root/kugar/part/kugar_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kugar/part/kugar_part.cpp')
-rw-r--r--kugar/part/kugar_part.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kugar/part/kugar_part.cpp b/kugar/part/kugar_part.cpp
index 158f26db..fa6644e2 100644
--- a/kugar/part/kugar_part.cpp
+++ b/kugar/part/kugar_part.cpp
@@ -12,10 +12,10 @@
#include <kstdaction.h>
#include <kmessagebox.h>
#include <kio/netaccess.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <kiconloader.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kfiledialog.h>
#include <kdebug.h>
#include <KoStore.h>
@@ -30,15 +30,15 @@
#include <KoFilterManager.h>
-KugarPart::KugarPart( QWidget *parentWidget, const char *widgetName,
- QObject* parent, const char* name, bool singleViewMode )
- : KoDocument( parentWidget, widgetName, parent, name, singleViewMode ),
+KugarPart::KugarPart( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject* tqparent, const char* name, bool singleViewMode )
+ : KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode ),
m_templateOk( false )
{
setInstance( KugarFactory::global(), false );
m_reportEngine = new Kugar::MReportEngine();
- connect( m_reportEngine, SIGNAL( preferedTemplate( const QString & ) ),
- SLOT( slotPreferredTemplate( const QString & ) ) );
+ connect( m_reportEngine, TQT_SIGNAL( preferedTemplate( const TQString & ) ),
+ TQT_SLOT( slotPreferredTemplate( const TQString & ) ) );
}
KugarPart::~KugarPart()
@@ -47,8 +47,8 @@ KugarPart::~KugarPart()
// closeURL();
}
-bool KugarPart::loadOasis( const QDomDocument&, KoOasisStyles&,
- const QDomDocument&, KoStore* )
+bool KugarPart::loadOasis( const TQDomDocument&, KoOasisStyles&,
+ const TQDomDocument&, KoStore* )
{
return false;
}
@@ -58,14 +58,14 @@ bool KugarPart::saveOasis( KoStore*, KoXmlWriter* )
return false;
}
-bool KugarPart::loadXML( QIODevice *file, const QDomDocument & /*doc*/ )
+bool KugarPart::loadXML( TQIODevice *file, const TQDomDocument & /*doc*/ )
{
m_docURL = url();
bool ok = true;
if ( file )
{
file->reset();
- m_reportData=QString(file->readAll());
+ m_reportData=TQString(file->readAll());
if ( m_reportData.length() != 0 )
{
@@ -76,7 +76,7 @@ bool KugarPart::loadXML( QIODevice *file, const QDomDocument & /*doc*/ )
m_reportEngine->renderReport();
if ( ok )
{
- QPtrList<KoView> vs = views();
+ TQPtrList<KoView> vs = views();
if ( vs.count() )
{
for ( KoView * v = vs.first();v;v = vs.next() )
@@ -89,34 +89,34 @@ bool KugarPart::loadXML( QIODevice *file, const QDomDocument & /*doc*/ )
}
}
if ( !ok )
- KMessageBox::sorry( 0, i18n( "Invalid data file %1" ).arg( m_file ) );
+ KMessageBox::sorry( 0, i18n( "Invalid data file %1" ).tqarg( m_file ) );
}
else
{
ok = false;
- KMessageBox::sorry( 0, i18n( "The zero sized data file %1 can't be rendered" ).arg( m_file ) );
+ KMessageBox::sorry( 0, i18n( "The zero sized data file %1 can't be rendered" ).tqarg( m_file ) );
}
}
else
{
ok = false;
- KMessageBox::sorry( 0, i18n( "Unable to open data file: %1" ).arg( m_file ) );
+ KMessageBox::sorry( 0, i18n( "Unable to open data file: %1" ).tqarg( m_file ) );
}
return ok;
}
-bool KugarPart::initDoc( InitDocFlags /*flags*/, QWidget* /*parentWidget*/ )
+bool KugarPart::initDoc( InitDocFlags /*flags*/, TQWidget* /*tqparentWidget*/ )
{
- QString filename;
+ TQString filename;
bool ok = false;
KFileDialog *dialog =
- new KFileDialog( QString::null, QString::null, 0L, "file dialog", true );
+ new KFileDialog( TQString(), TQString(), 0L, "file dialog", true );
dialog->setMimeFilter( KoFilterManager::mimeFilter( KoDocument::readNativeFormatMimeType(),
KoFilterManager::Import ) );
- if ( dialog->exec() != QDialog::Accepted )
+ if ( dialog->exec() != TQDialog::Accepted )
{
delete dialog;
return false;
@@ -138,25 +138,25 @@ bool KugarPart::initDoc( InitDocFlags /*flags*/, QWidget* /*parentWidget*/ )
return TRUE;
}
-KoView* KugarPart::createViewInstance( QWidget* parent, const char* name )
+KoView* KugarPart::createViewInstance( TQWidget* tqparent, const char* name )
{
- KugarView * v = new KugarView( this, parent, name );
+ KugarView * v = new KugarView( this, tqparent, name );
if ( m_templateOk )
v->renderReport();
return v;
}
-void KugarPart::slotPreferredTemplate( const QString &tpl )
+void KugarPart::slotPreferredTemplate( const TQString &tpl )
{
KURL url( tpl );
- QString localtpl;
+ TQString localtpl;
bool isTemp = false;
if ( !url.isValid() )
{
/* kdDebug() << "mailformed url" << endl;*/
- if ( tpl.find( '/' ) >= 0 )
+ if ( tpl.tqfind( '/' ) >= 0 )
{
if ( tpl.startsWith( "." ) )
{
@@ -166,14 +166,14 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
if ( KIO::NetAccess::download( tmpURL, localtpl ) )
isTemp = true;
else
- KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).arg( url.prettyURL() ) );
+ KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).tqarg( url.prettyURL() ) );
}
else
localtpl = tpl;
}
else
{
- QString former_localtpl = localtpl;
+ TQString former_localtpl = localtpl;
localtpl = kapp -> dirs() -> findResource( "data", "kugar/templates/" + tpl );
if ( localtpl.isEmpty() )
{
@@ -183,7 +183,7 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
if ( KIO::NetAccess::download( tmpURL, localtpl ) )
isTemp = true;
else
- KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).arg( url.prettyURL() ) );
+ KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).tqarg( url.prettyURL() ) );
}
}
}
@@ -192,13 +192,13 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
if ( KIO::NetAccess::download( url, localtpl ) )
isTemp = true;
else
- KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).arg( url.prettyURL() ) );
+ KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).tqarg( url.prettyURL() ) );
}
/* kdDebug() << "localtpl: " << localtpl.latin1() << endl;*/
if ( !localtpl.isEmpty() )
{
- QFile f( localtpl );
+ TQFile f( localtpl );
if ( f.open( IO_ReadOnly ) )
{
@@ -214,8 +214,8 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
{
/* kdDebug() << "RawXML" << endl;*/
f.open( IO_ReadOnly );
- if ( !m_reportEngine -> setReportTemplate( &f ) )
- KMessageBox::sorry( 0, i18n( "Invalid template file: %1" ).arg( localtpl ) );
+ if ( !m_reportEngine -> setReportTemplate( TQT_TQIODEVICE(&f) ) )
+ KMessageBox::sorry( 0, i18n( "Invalid template file: %1" ).tqarg( localtpl ) );
else
{
m_templateOk = true;
@@ -229,13 +229,13 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
if ( tmpStore->open( "maindoc.xml" ) )
{
if ( !m_reportEngine -> setReportTemplate( tmpStore->device() ) )
- KMessageBox::sorry( 0, i18n( "%1 is not a valid Kugar Designer template file." ).arg( localtpl ) );
+ KMessageBox::sorry( 0, i18n( "%1 is not a valid Kugar Designer template file." ).tqarg( localtpl ) );
else
m_templateOk = true;
tmpStore->close();
}
else
- KMessageBox::sorry( 0, i18n( "%1 is not a valid Kugar Designer template file." ).arg( localtpl ) );
+ KMessageBox::sorry( 0, i18n( "%1 is not a valid Kugar Designer template file." ).tqarg( localtpl ) );
delete tmpStore;
}
@@ -244,12 +244,12 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
else
{
f.close();
- KMessageBox::sorry( 0, i18n( "Couldn't read the beginning of the template file: %1" ).arg( localtpl ) );
+ KMessageBox::sorry( 0, i18n( "Couldn't read the beginning of the template file: %1" ).tqarg( localtpl ) );
}
}
else
- KMessageBox::sorry( 0, i18n( "Unable to open template file: %1" ).arg( localtpl ) );
+ KMessageBox::sorry( 0, i18n( "Unable to open template file: %1" ).tqarg( localtpl ) );
if ( isTemp )
KIO::NetAccess::removeTempFile( localtpl );