From fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 5 Jul 2011 06:00:29 +0000 Subject: TQt4 port kmymoney This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmymoney2/views/kreportsview.cpp | 288 +++++++++++++++++++-------------------- 1 file changed, 144 insertions(+), 144 deletions(-) (limited to 'kmymoney2/views/kreportsview.cpp') diff --git a/kmymoney2/views/kreportsview.cpp b/kmymoney2/views/kreportsview.cpp index 6c7da52..36de4c9 100755 --- a/kmymoney2/views/kreportsview.cpp +++ b/kmymoney2/views/kreportsview.cpp @@ -30,22 +30,22 @@ // ---------------------------------------------------------------------------- // QT Includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // ---------------------------------------------------------------------------- // KDE Includes @@ -86,12 +86,12 @@ using namespace reports; * KReportsView::KReportTab Implementation */ -KReportsView::KReportTab::KReportTab(KTabWidget* parent, const MyMoneyReport& report ): - QWidget( parent, "reporttab" ), +KReportsView::KReportTab::KReportTab(KTabWidget* tqparent, const MyMoneyReport& report ): + TQWidget( tqparent, "reporttab" ), m_part( new KHTMLPart( this, "reporttabpart" ) ), m_chartView( new KReportChartView( this, "reportchart" ) ), m_control( new kMyMoneyReportControlDecl( this, "reportcontrol" ) ), - m_layout( new QVBoxLayout( this, 11, 6, "reporttablayout" ) ), + m_layout( new TQVBoxLayout( this, 11, 6, "reporttabtqlayout" ) ), m_report( report ), m_deleteMe( false ), m_showingChart( false ), @@ -105,20 +105,20 @@ KReportsView::KReportTab::KReportTab(KTabWidget* parent, const MyMoneyReport& re m_control->buttonChart->hide(); } - m_chartView->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); + m_chartView->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); m_chartView->hide(); - m_layout->addWidget( m_control ); //, 0, Qt::AlignTop ); + m_layout->addWidget( m_control ); //, 0, TQt::AlignTop ); m_layout->addWidget( m_part->view() ); m_layout->addWidget( m_chartView ); // I like this icon... - QString icon = KGlobal::dirs()->findResource("icon", "default.kde/16x16/mimetypes/spreadsheet.png"); + TQString icon = KGlobal::dirs()->findResource("icon", "default.kde/16x16/mimetypes/spreadsheet.png"); // but if it's not there, we'll use ye ol' standard icon - if ( icon == QString::null ) + if ( icon == TQString() ) icon = KGlobal::dirs()->findResource("icon", "hicolor/16x16/apps/kmymoney2.png"); - parent->insertTab( this, QIconSet(QPixmap(icon)), report.name() ); - parent->setTabEnabled( this, true ); + tqparent->insertTab( this, TQIconSet(TQPixmap(icon)), report.name() ); + tqparent->setTabEnabled( this, true ); #ifdef HAVE_KDCHART if ( m_report.isChartByDefault() ) @@ -139,29 +139,29 @@ void KReportsView::KReportTab::print(void) void KReportsView::KReportTab::copyToClipboard(void) { - QTextDrag* pdrag = new QTextDrag( createTable() ); + TQTextDrag* pdrag = new TQTextDrag( createTable() ); pdrag->setSubtype("html"); - QApplication::clipboard()->setData(pdrag); + TQApplication::tqclipboard()->setData(pdrag); } -void KReportsView::KReportTab::saveAs( const QString& filename, bool includeCSS ) +void KReportsView::KReportTab::saveAs( const TQString& filename, bool includeCSS ) { - QFile file( filename ); + TQFile file( filename ); if ( file.open( IO_WriteOnly ) ) { - if ( QFileInfo(filename).extension(false).lower() == "csv") + if ( TQFileInfo(filename).extension(false).lower() == "csv") { - QTextStream(&file) << m_table->renderCSV(); + TQTextStream(&file) << m_table->renderCSV(); } else { - QTextStream stream(&file); + TQTextStream stream(&file); - QRegExp exp(QString("(.*)(()(.*)").arg(KGlobal::locale()->encoding())); - QString table = createTable(); + TQRegExp exp(TQString("(.*)(()(.*)").tqarg(KGlobal::locale()->encoding())); + TQString table = createTable(); if(exp.search(table) != -1 && includeCSS) { - QFile cssFile(exp.cap(3)); + TQFile cssFile(exp.cap(3)); if(cssFile.open(IO_ReadOnly)) { - QTextStream cssStream(&cssFile); + TQTextStream cssStream(&cssFile); stream << exp.cap(1); stream << exp.cap(4); stream << endl << "