diff options
Diffstat (limited to 'kmymoney2/views/kreportsview.cpp')
-rwxr-xr-x | kmymoney2/views/kreportsview.cpp | 288 |
1 files changed, 144 insertions, 144 deletions
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 <qlayout.h> -#include <qdatetime.h> -#include <qregexp.h> -#include <qdragobject.h> -#include <qclipboard.h> -#include <qapplication.h> -#include <qprinter.h> -#include <qpainter.h> -#include <qfile.h> -#include <qtimer.h> -#include <qiconset.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qtooltip.h> -#include <qcheckbox.h> -#include <qvbox.h> +#include <tqlayout.h> +#include <tqdatetime.h> +#include <tqregexp.h> +#include <tqdragobject.h> +#include <tqclipboard.h> +#include <tqapplication.h> +#include <tqprinter.h> +#include <tqpainter.h> +#include <tqfile.h> +#include <tqtimer.h> +#include <tqiconset.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> +#include <tqcheckbox.h> +#include <tqvbox.h> // ---------------------------------------------------------------------------- // 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("(.*)(<link.*css\" href=)\"(.*)\">(<meta.*%1\" />)(.*)").arg(KGlobal::locale()->encoding())); - QString table = createTable(); + TQRegExp exp(TQString("(.*)(<link.*css\" href=)\"(.*)\">(<meta.*%1\" />)(.*)").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 << "<style type=\"text/css\">" << endl << "<!--" << endl; @@ -195,7 +195,7 @@ void KReportsView::KReportTab::show(void) m_needReload = false; updateReport(); } - QWidget::show(); + TQWidget::show(); } void KReportsView::KReportTab::updateReport(void) @@ -230,24 +230,24 @@ void KReportsView::KReportTab::updateReport(void) m_chartView->update(); } -QString KReportsView::KReportTab::createTable(const QString& links) +TQString KReportsView::KReportTab::createTable(const TQString& links) { - QString filename; + TQString filename; if(!MyMoneyFile::instance()->value("reportstylesheet").isEmpty()) - filename = KGlobal::dirs()->findResource("appdata", QString("html/%1").arg(MyMoneyFile::instance()->value("reportstylesheet"))); + filename = KGlobal::dirs()->findResource("appdata", TQString("html/%1").tqarg(MyMoneyFile::instance()->value("reportstylesheet"))); if(filename.isEmpty()) filename = KGlobal::dirs()->findResource("appdata", "html/kmymoney2.css"); - QString header = QString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n") + - QString("<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">").arg(filename); + TQString header = TQString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n") + + TQString("<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">").tqarg(filename); - header += QString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\" />").arg(KGlobal::locale()->encoding()); + header += TQString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\" />").tqarg(KGlobal::locale()->encoding()); header += KMyMoneyUtils::variableCSS(); header += "</head><body>\n"; - QString footer = "</body></html>\n"; + TQString footer = "</body></html>\n"; - QString html; + TQString html; try { html += header; html += links; @@ -260,7 +260,7 @@ QString KReportsView::KReportTab::createTable(const QString& links) { kdDebug(2) << "KReportsView::KReportTab::createTable(): ERROR " << e->what() << endl; - QString error = QString(i18n("There was an error creating your report: \"%1\".\nPlease report this error to the developer's list: kmymoney2-developer@lists.sourceforge.net")).arg(e->what()); + TQString error = TQString(i18n("There was an error creating your report: \"%1\".\nPlease report this error to the developer's list: kmymoney2-developer@lists.sourceforge.net")).tqarg(e->what()); KMessageBox::error(this, error, i18n("Critical Error")); @@ -285,7 +285,7 @@ void KReportsView::KReportTab::toggleChart(void) m_chartView->hide(); m_control->buttonChart->setText( i18n( "Chart" ) ); - QToolTip::add( m_control->buttonChart, i18n( "Show the chart version of this report" ) ); + TQToolTip::add( m_control->buttonChart, i18n( "Show the chart version of this report" ) ); } else { @@ -293,7 +293,7 @@ void KReportsView::KReportTab::toggleChart(void) m_chartView->show(); m_control->buttonChart->setText( i18n( "Report" ) ); - QToolTip::add( m_control->buttonChart, i18n( "Show the report version of this chart" ) ); + TQToolTip::add( m_control->buttonChart, i18n( "Show the report version of this chart" ) ); } m_showingChart = ! m_showingChart; } @@ -308,11 +308,11 @@ public: Private() : includeCSS(0) {} - QCheckBox* includeCSS; + TQCheckBox* includeCSS; }; -KReportsView::KReportsView(QWidget *parent, const char *name ) : - KMyMoneyViewBase(parent, name, i18n("Reports")), +KReportsView::KReportsView(TQWidget *tqparent, const char *name ) : + KMyMoneyViewBase(tqparent, name, i18n("Reports")), d(new Private), m_needReload(false) { @@ -320,29 +320,29 @@ KReportsView::KReportsView(QWidget *parent, const char *name ) : addWidget( m_reportTabWidget ); m_reportTabWidget->setHoverCloseButton( true ); - m_listTab = (new QWidget( m_reportTabWidget, "indextab" )); - m_listTabLayout = ( new QVBoxLayout( m_listTab, 11, 6, "indextabLayout") ); + m_listTab = (new TQWidget( m_reportTabWidget, "indextab" )); + m_listTabLayout = ( new TQVBoxLayout( m_listTab, 11, 6, "indextabLayout") ); m_reportListView = new KListView( m_listTab, "m_reportListView" ); m_listTabLayout->addWidget( m_reportListView ); m_reportTabWidget->insertTab( m_listTab, i18n("Reports") ); m_reportListView->addColumn(i18n("Report")); m_reportListView->addColumn(i18n("Comment")); - m_reportListView->setResizeMode(QListView::AllColumns); + m_reportListView->setResizeMode(TQListView::AllColumns); m_reportListView->setAllColumnsShowFocus(true); m_reportListView->setRootIsDecorated(true); m_reportListView->setShadeSortColumn(false); - connect( m_reportTabWidget, SIGNAL(closeRequest(QWidget*)), - this, SLOT(slotClose(QWidget*)) ); - connect(m_reportListView, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotOpenReport(QListViewItem*))); - connect(m_reportListView, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotOpenReport(QListViewItem*))); - connect( m_reportListView, SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint &)), - this, SLOT(slotListContextMenu(KListView*,QListViewItem*,const QPoint &))); + connect( m_reportTabWidget, TQT_SIGNAL(closeRequest(TQWidget*)), + this, TQT_SLOT(slotClose(TQWidget*)) ); + connect(m_reportListView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotOpenReport(TQListViewItem*))); + connect(m_reportListView, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotOpenReport(TQListViewItem*))); + connect( m_reportListView, TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint &)), + this, TQT_SLOT(slotListContextMenu(KListView*,TQListViewItem*,const TQPoint &))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadView())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadView())); } KReportsView::~KReportsView() @@ -376,16 +376,16 @@ void KReportsView::slotLoadView(void) } } -QString KReportsView::KReportGroupListItem::key ( int column, bool ascending ) const +TQString KReportsView::KReportGroupListItem::key ( int column, bool ascending ) const { if (column == 0) - return QString::number(m_nr).rightJustify(3,'0'); + return TQString::number(m_nr).rightJustify(3,'0'); else return KListViewItem::key(column,ascending); } -KReportsView::KReportGroupListItem::KReportGroupListItem(KListView* parent, const int nr, QString name) : - KListViewItem(parent), +KReportsView::KReportGroupListItem::KReportGroupListItem(KListView* tqparent, const int nr, TQString name) : + KListViewItem(tqparent), m_name(name) { setNr(nr); @@ -394,7 +394,7 @@ KReportsView::KReportGroupListItem::KReportGroupListItem(KListView* parent, cons void KReportsView::KReportGroupListItem::setNr(const int nr) { m_nr = nr; - setText(0, QString("%1. %2").arg(nr).arg(m_name)); + setText(0, TQString("%1. %2").tqarg(nr).tqarg(m_name)); } void KReportsView::loadView(void) @@ -403,12 +403,12 @@ void KReportsView::loadView(void) // remember the id of the current selected item and the // items that are shown 'expanded' - QMap<QString, bool> isOpen; - QListViewItem *item = m_reportListView->selectedItem(); - QString selectedPage = (item) ? item->text(0) : QString(); + TQMap<TQString, bool> isOpen; + TQListViewItem *item = m_reportListView->selectedItem(); + TQString selectedPage = (item) ? item->text(0) : TQString(); // keep a map of all 'expanded' accounts - QListViewItemIterator it_lvi(m_reportListView); + TQListViewItemIterator it_lvi(m_reportListView); while(it_lvi.current()) { item = it_lvi.current(); if(item && item->isOpen()) { @@ -418,7 +418,7 @@ void KReportsView::loadView(void) } // remember the upper left corner of the viewport - QPoint startPoint = m_reportListView->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_reportListView->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_reportListView->setUpdatesEnabled(false); @@ -432,18 +432,18 @@ void KReportsView::loadView(void) // Default Reports KReportGroupListItem* chartnode = new KReportGroupListItem(m_reportListView, 10, i18n("Charts")); - QMap<QString,KReportGroupListItem*> groupitems; - QValueList<ReportGroup> defaultreports; + TQMap<TQString,KReportGroupListItem*> groupitems; + TQValueList<ReportGroup> defaultreports; defaultReports(defaultreports); - QValueList<ReportGroup>::const_iterator it_group = defaultreports.begin(); + TQValueList<ReportGroup>::const_iterator it_group = defaultreports.begin(); while ( it_group != defaultreports.end() ) { - QString groupname = (*it_group).name(); + TQString groupname = (*it_group).name(); KReportGroupListItem* curnode = new KReportGroupListItem(m_reportListView, pagenumber++, (*it_group).title()); - curnode->setOpen(isOpen.find(curnode->text(0)) != isOpen.end()); + curnode->setOpen(isOpen.tqfind(curnode->text(0)) != isOpen.end()); groupitems[groupname] = curnode; - QValueList<MyMoneyReport>::const_iterator it_report = (*it_group).begin(); + TQValueList<MyMoneyReport>::const_iterator it_report = (*it_group).begin(); while( it_report != (*it_group).end() ) { MyMoneyReport report = *it_report; @@ -464,16 +464,16 @@ void KReportsView::loadView(void) // Rename the charts item to place it at this point in the list. chartnode->setNr(pagenumber++); - chartnode->setOpen(isOpen.find(chartnode->text(0)) != isOpen.end()); + chartnode->setOpen(isOpen.tqfind(chartnode->text(0)) != isOpen.end()); // Custom reports KReportGroupListItem* favoritenode = new KReportGroupListItem(m_reportListView,pagenumber++, i18n("Favorite Reports")); - favoritenode->setOpen(isOpen.find(favoritenode->text(0)) != isOpen.end()); + favoritenode->setOpen(isOpen.tqfind(favoritenode->text(0)) != isOpen.end()); KReportGroupListItem* orphannode = NULL; - QValueList<MyMoneyReport> customreports = MyMoneyFile::instance()->reportList(); - QValueList<MyMoneyReport>::const_iterator it_report = customreports.begin(); + TQValueList<MyMoneyReport> customreports = MyMoneyFile::instance()->reportList(); + TQValueList<MyMoneyReport>::const_iterator it_report = customreports.begin(); while( it_report != customreports.end() ) { // If this report is in a known group, place it there @@ -504,7 +504,7 @@ void KReportsView::loadView(void) // turn updates back on m_reportListView->setUpdatesEnabled(true); - m_reportListView->repaintContents(); + m_reportListView->tqrepaintContents(); // // Go through the tabs to set their update flag or delete them if needed @@ -529,8 +529,8 @@ void KReportsView::loadView(void) void KReportsView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */) { - QString view = url.fileName(false); - QString command = url.queryItem("command").data(); + TQString view = url.fileName(false); + TQString command = url.queryItem("command"); if(view == VIEW_REPORTS) { @@ -576,28 +576,28 @@ void KReportsView::slotSaveView(void) { KReportTab* tab = dynamic_cast<KReportTab*>(m_reportTabWidget->currentPage()); if(tab) { - QVBox* vbox = new QVBox(); - d->includeCSS = new QCheckBox(i18n("Include Stylesheet"), vbox); + TQVBox* vbox = new TQVBox(); + d->includeCSS = new TQCheckBox(i18n("Include Stylesheet"), vbox); // the following code is copied from KFileDialog::getSaveFileName, // adjust to our local needs (filetypes etc.) and // enhanced to show the m_saveEncrypted combo box KFileDialog dlg( ":kmymoney-export", - QString("%1|%2\n").arg("*.csv").arg(i18n("CSV (Filefilter)", "CSV files")) + - QString("%1|%2\n").arg("*.html").arg(i18n("HTML (Filefilter)", "HTML files")), + TQString("%1|%2\n").tqarg("*.csv").tqarg(i18n("CSV (Filefilter)", "CSV files")) + + TQString("%1|%2\n").tqarg("*.html").tqarg(i18n("HTML (Filefilter)", "HTML files")), this, "filedialog", true, vbox); - connect(&dlg, SIGNAL(filterChanged(const QString&)), this, SLOT(slotSaveFilterChanged(const QString&))); + connect(&dlg, TQT_SIGNAL(filterChanged(const TQString&)), this, TQT_SLOT(slotSaveFilterChanged(const TQString&))); dlg.setOperationMode( KFileDialog::Saving ); dlg.setCaption(i18n("Export as")); slotSaveFilterChanged("*.csv"); // init gui - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { KURL newURL = dlg.selectedURL(); if (!newURL.isEmpty()) { - QString newName = newURL.prettyURL(0, KURL::StripFileProtocol); + TQString newName = newURL.prettyURL(0, KURL::StripFileProtocol); - if(newName.findRev('.') == -1) + if(newName.tqfindRev('.') == -1) newName.append(".html"); tab->saveAs( newName, d->includeCSS->isEnabled() && d->includeCSS->isChecked() ); @@ -606,7 +606,7 @@ void KReportsView::slotSaveView(void) } } -void KReportsView::slotSaveFilterChanged(const QString& filter) +void KReportsView::slotSaveFilterChanged(const TQString& filter) { d->includeCSS->setEnabled(filter == "*.html"); } @@ -657,7 +657,7 @@ void KReportsView::slotDuplicate(void) if(tab) { MyMoneyReport dupe = tab->report(); - dupe.setName( QString(i18n("Copy of %1")).arg(dupe.name()) ); + dupe.setName( TQString(i18n("Copy of %1")).tqarg(dupe.name()) ); if ( dupe.comment() == i18n("Default Report") ) dupe.setComment( i18n("Custom Report") ); dupe.clearId(); @@ -688,7 +688,7 @@ void KReportsView::slotDelete(void) MyMoneyReport report = tab->report(); if ( ! report.id().isEmpty() ) { - if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, QString("<qt>")+i18n("Are you sure you want to delete report <b>%1</b>? There is no way to recover it!").arg(report.name())+QString("</qt>"), i18n("Delete Report?"))) + if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, TQString("<qt>")+i18n("Are you sure you want to delete report <b>%1</b>? There is no way to recover it!").tqarg(report.name())+TQString("</qt>"), i18n("Delete Report?"))) { // close the tab and then remove the report so that it is not // generated again during the following loadView() call @@ -700,11 +700,11 @@ void KReportsView::slotDelete(void) } } else - KMessageBox::information(this, QString("<qt>")+i18n("Sorry, <b>%1</b> is a default report. You may not delete it.").arg(report.name())+QString("</qt>"), i18n("Delete Report?")); + KMessageBox::information(this, TQString("<qt>")+i18n("Sorry, <b>%1</b> is a default report. You may not delete it.").tqarg(report.name())+TQString("</qt>"), i18n("Delete Report?")); } } -void KReportsView::slotOpenReport(const QString& id) +void KReportsView::slotOpenReport(const TQString& id) { if ( ! id.isEmpty() ) { @@ -731,7 +731,7 @@ void KReportsView::slotOpenReport(const QString& id) } } -void KReportsView::slotOpenReport(QListViewItem* item) +void KReportsView::slotOpenReport(TQListViewItem* item) { KReportListItem *reportItem = dynamic_cast<KReportListItem*> (item); @@ -776,7 +776,7 @@ void KReportsView::slotOpenReport(QListViewItem* item) } else if (item) { - // this is not a KReportListItem, so it's a regular QListViewItem, which + // this is not a KReportListItem, so it's a regular TQListViewItem, which // means its a header. // // double-click on a header means toggle the expand/collapse state @@ -825,7 +825,7 @@ void KReportsView::slotCloseCurrent(void) slotClose(m_reportTabWidget->currentPage()); } -void KReportsView::slotClose(QWidget* w) +void KReportsView::slotClose(TQWidget* w) { KReportTab* tab = dynamic_cast<KReportTab*>(w); if(tab) { @@ -850,20 +850,20 @@ void KReportsView::addReportTab(const MyMoneyReport& report) { KReportTab* tab = new KReportTab(m_reportTabWidget,report); - connect( tab->control()->buttonChart, SIGNAL(clicked()), - this, SLOT(slotToggleChart(void ))); - connect( tab->control()->buttonConfigure, SIGNAL(clicked()), - this, SLOT(slotConfigure(void ))); - connect( tab->control()->buttonNew, SIGNAL(clicked()), - this, SLOT(slotDuplicate(void ))); - connect( tab->control()->buttonCopy, SIGNAL(clicked()), - this, SLOT(slotCopyView(void ))); - connect( tab->control()->buttonExport, SIGNAL(clicked()), - this, SLOT(slotSaveView(void ))); - connect( tab->control()->buttonDelete, SIGNAL(clicked()), - this, SLOT(slotDelete(void ))); - connect( tab->control()->buttonClose, SIGNAL(clicked()), - this, SLOT(slotCloseCurrent(void ))); + connect( tab->control()->buttonChart, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotToggleChart(void ))); + connect( tab->control()->buttonConfigure, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotConfigure(void ))); + connect( tab->control()->buttonNew, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDuplicate(void ))); + connect( tab->control()->buttonCopy, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCopyView(void ))); + connect( tab->control()->buttonExport, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSaveView(void ))); + connect( tab->control()->buttonDelete, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDelete(void ))); + connect( tab->control()->buttonClose, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCloseCurrent(void ))); // if this is a default report, then you can't delete it! if ( report.id().isEmpty() ) @@ -875,15 +875,15 @@ void KReportsView::addReportTab(const MyMoneyReport& report) } -void KReportsView::slotListContextMenu(KListView* lv,QListViewItem* item,const QPoint & p) +void KReportsView::slotListContextMenu(KListView* lv,TQListViewItem* item,const TQPoint & p) { if ( lv == m_reportListView && item ) { - QPopupMenu* contextmenu = new QPopupMenu(this); - contextmenu->insertItem( i18n("&Open"), this, SLOT(slotOpenFromList()) ); - contextmenu->insertItem( i18n("&Configure"), this, SLOT(slotConfigureFromList()) ); - contextmenu->insertItem( i18n("&New report"), this, SLOT(slotNewFromList()) ); - contextmenu->insertItem( i18n("&Delete"), this, SLOT(slotDeleteFromList()) ); + TQPopupMenu* contextmenu = new TQPopupMenu(this); + contextmenu->insertItem( i18n("&Open"), this, TQT_SLOT(slotOpenFromList()) ); + contextmenu->insertItem( i18n("&Configure"), this, TQT_SLOT(slotConfigureFromList()) ); + contextmenu->insertItem( i18n("&New report"), this, TQT_SLOT(slotNewFromList()) ); + contextmenu->insertItem( i18n("&Delete"), this, TQT_SLOT(slotDeleteFromList()) ); contextmenu->popup(p); } @@ -929,7 +929,7 @@ void KReportsView::slotDeleteFromList(void) } } -void KReportsView::defaultReports(QValueList<ReportGroup>& groups) +void KReportsView::defaultReports(TQValueList<ReportGroup>& groups) { { ReportGroup list("Income and Expenses", i18n("Income and Expenses")); @@ -1040,7 +1040,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eInstitution, - MyMoneyReport::eQCnone, + MyMoneyReport::eTQCnone, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailTop, i18n("Account Balances by Institution"), @@ -1050,7 +1050,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eAccountType, - MyMoneyReport::eQCnone, + MyMoneyReport::eTQCnone, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailTop, i18n("Account Balances by Type"), @@ -1064,7 +1064,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eAccount, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory|MyMoneyReport::eQCbalance, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCbalance, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Transactions by Account"), @@ -1073,7 +1073,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) //list.back().setConvertCurrency(false); list.push_back(MyMoneyReport( MyMoneyReport::eCategory, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Transactions by Category"), @@ -1081,7 +1081,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) )); list.push_back(MyMoneyReport( MyMoneyReport::ePayee, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCcategory, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCcategory, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Transactions by Payee"), @@ -1089,7 +1089,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) )); list.push_back(MyMoneyReport( MyMoneyReport::eMonth, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Transactions by Month"), @@ -1097,7 +1097,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) )); list.push_back(MyMoneyReport( MyMoneyReport::eWeek, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Transactions by Week"), @@ -1105,7 +1105,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) )); list.push_back(MyMoneyReport( MyMoneyReport::eAccount, - MyMoneyReport::eQCloan, + MyMoneyReport::eTQCloan, MyMoneyTransactionFilter::allDates, MyMoneyReport::eDetailAll, i18n("Loan Transactions"), @@ -1114,10 +1114,10 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.back().setLoansOnly(true); list.push_back(MyMoneyReport( MyMoneyReport::eAccountReconcile, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory|MyMoneyReport::eQCbalance, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCbalance, MyMoneyTransactionFilter::last3Months, MyMoneyReport::eDetailAll, - i18n("Transactions by Reconciliation Status"), + i18n("Transactions by Reconciliation tqStatus"), i18n("Default Report") )); groups.push_back(list); @@ -1126,7 +1126,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) ReportGroup list("CashFlow", i18n("Cash Flow")); list.push_back(MyMoneyReport( MyMoneyReport::eCashFlow, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Cash Flow Transactions This Month"), @@ -1139,7 +1139,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eTopAccount, - MyMoneyReport::eQCaction|MyMoneyReport::eQCshares|MyMoneyReport::eQCprice, + MyMoneyReport::eTQCaction|MyMoneyReport::eTQCshares|MyMoneyReport::eTQCprice, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Investment Transactions"), @@ -1149,7 +1149,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eAccountByTopAccount, - MyMoneyReport::eQCshares|MyMoneyReport::eQCprice, + MyMoneyReport::eTQCshares|MyMoneyReport::eTQCprice, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Investment Holdings by Account"), @@ -1159,7 +1159,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eEquityType, - MyMoneyReport::eQCshares|MyMoneyReport::eQCprice, + MyMoneyReport::eTQCshares|MyMoneyReport::eTQCprice, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Investment Holdings by Type"), @@ -1169,7 +1169,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eAccountByTopAccount, - MyMoneyReport::eQCperformance, + MyMoneyReport::eTQCperformance, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Investment Performance by Account"), @@ -1179,7 +1179,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eEquityType, - MyMoneyReport::eQCperformance, + MyMoneyReport::eTQCperformance, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Investment Performance by Type"), @@ -1289,7 +1289,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eCategory, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Tax Transactions by Category"), @@ -1298,7 +1298,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.back().setTax(true); list.push_back(MyMoneyReport( MyMoneyReport::ePayee, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCcategory|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Tax Transactions by Payee"), @@ -1307,7 +1307,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.back().setTax(true); list.push_back(MyMoneyReport( MyMoneyReport::eCategory, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::lastFiscalYear, MyMoneyReport::eDetailAll, i18n("Tax Transactions by Category Last Fiscal Year"), @@ -1316,7 +1316,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.back().setTax(true); list.push_back(MyMoneyReport( MyMoneyReport::ePayee, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCcategory|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::lastFiscalYear, MyMoneyReport::eDetailAll, i18n("Tax Transactions by Payee Last Fiscal Year"), @@ -1350,7 +1350,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.back().setShowingRowTotals(true); list.back().setBudget("Any",true); // in case we're in January, we show the last year - if(QDate::currentDate().month() == 1) { + if(TQDate::tqcurrentDate().month() == 1) { list.back().setDateFilter(MyMoneyTransactionFilter::lastYear); } |