summaryrefslogtreecommitdiffstats
path: root/kmymoney2/dialogs/kstartdlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/dialogs/kstartdlg.cpp')
-rw-r--r--kmymoney2/dialogs/kstartdlg.cpp62
1 files changed, 29 insertions, 33 deletions
diff --git a/kmymoney2/dialogs/kstartdlg.cpp b/kmymoney2/dialogs/kstartdlg.cpp
index d0af8eb..afdef28 100644
--- a/kmymoney2/dialogs/kstartdlg.cpp
+++ b/kmymoney2/dialogs/kstartdlg.cpp
@@ -18,24 +18,20 @@
// ----------------------------------------------------------------------------
// QT Includes
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qabstractlayout.h>
-#include <qpixmap.h>
-#include <qtextview.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqabstractlayout.h>
+#include <tqpixmap.h>
+#include <tqtextview.h>
+#include <tqlabel.h>
// ----------------------------------------------------------------------------
// KDE Includes
#include "kdecompat.h"
-#if QT_VERSION > 300
#include <kstandarddirs.h>
-#else
-#include <kstddirs.h>
-#endif
#include <kiconloader.h>
#include <kconfig.h>
@@ -54,9 +50,9 @@
#include "krecentfileitem.h"
#include "../kmymoney2.h"
-#include <qtooltip.h>
+#include <tqtooltip.h>
-KStartDlg::KStartDlg(QWidget *parent, const char *name, bool modal) : KDialogBase(IconList,i18n("Start Dialog"),Help|Ok|Cancel,Ok, parent, name, modal, true)
+KStartDlg::KStartDlg(TQWidget *tqparent, const char *name, bool modal) : KDialogBase(IconList,i18n("Start Dialog"),Help|Ok|Cancel,Ok, tqparent, name, modal, true)
{
setPage_Template();
setPage_Documents();
@@ -77,41 +73,41 @@ void KStartDlg::setPage_Template()
KIconLoader *ic = KGlobal::iconLoader();
templateMainFrame = addVBoxPage( i18n("Templates"), i18n("Select templates"), DesktopIcon("wizard"));
view_wizard = new KIconView( templateMainFrame, "view_options" );
- (void)new QIconViewItem( view_wizard, i18n("New KMyMoney document"), ic->loadIcon("mime_empty.png", KIcon::Desktop, KIcon::SizeLarge)/*QPixmap( locate("icon","hicolor/48x48/mimetypes/mime_empty.png") )*/ );
- connect(view_wizard, SIGNAL(executed(QIconViewItem *) ), this, SLOT(slotTemplateClicked(QIconViewItem *) ) );
- connect(view_wizard, SIGNAL(selectionChanged(QIconViewItem*)),
- this, SLOT(slotTemplateSelectionChanged(QIconViewItem*)));
- connect(this, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotAboutToShowPage(QWidget*)));
+ (void)new TQIconViewItem( view_wizard, i18n("New KMyMoney document"), ic->loadIcon("mime_empty.png", KIcon::Desktop, KIcon::SizeLarge)/*TQPixmap( locate("icon","hicolor/48x48/mimetypes/mime_empty.png") )*/ );
+ connect(view_wizard, TQT_SIGNAL(executed(TQIconViewItem *) ), this, TQT_SLOT(slotTemplateClicked(TQIconViewItem *) ) );
+ connect(view_wizard, TQT_SIGNAL(selectionChanged(TQIconViewItem*)),
+ this, TQT_SLOT(slotTemplateSelectionChanged(TQIconViewItem*)));
+ connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT(slotAboutToShowPage(TQWidget*)));
}
/** Set the Misc options Page of the preferences dialog */
void KStartDlg::setPage_Documents()
{
recentMainFrame = addPage( i18n("Open"), i18n("Open a KMyMoney document"), DesktopIcon("fileopen"));
- QVBoxLayout *mainLayout = new QVBoxLayout( recentMainFrame );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( recentMainFrame );
kurlrequest = new KURLRequester( recentMainFrame, "kurlrequest" );
//allow user to select either a .kmy file, or any generic file.
- kurlrequest->fileDialog()->setFilter( i18n("%1|KMyMoney files (*.kmy)\n" "%2|All files (*.*)").arg("*.kmy").arg("*.*") );
+ kurlrequest->fileDialog()->setFilter( i18n("%1|KMyMoney files (*.kmy)\n" "%2|All files (*.*)").tqarg("*.kmy").tqarg("*.*") );
kurlrequest->fileDialog()->setMode(KFile::File || KFile::ExistingOnly);
kurlrequest->fileDialog()->setURL(KURL(kmymoney2->readLastUsedDir()));//kurlrequest->fileDialog()->setURL(KURL(KGlobalSettings::documentPath()));
mainLayout->addWidget( kurlrequest );
- QLabel *label1 = new QLabel( recentMainFrame, "label1" );
+ TQLabel *label1 = new TQLabel( recentMainFrame, "label1" );
label1->setText( i18n("Recent Files") );
mainLayout->addWidget( label1 );
view_recent = new KIconView( recentMainFrame, "view_recent" );
- connect( view_recent, SIGNAL( executed(QIconViewItem *) ), this, SLOT( slotRecentClicked(QIconViewItem *) ) );
+ connect( view_recent, TQT_SIGNAL( executed(TQIconViewItem *) ), this, TQT_SLOT( slotRecentClicked(TQIconViewItem *) ) );
mainLayout->addWidget( view_recent );
view_recent->setArrangement(KIconView::LeftToRight/*TopToBottom*/);
view_recent->setItemTextPos(KIconView::Bottom);
- connect(view_recent, SIGNAL(selectionChanged(QIconViewItem*)),
- this, SLOT(slotRecentSelectionChanged(QIconViewItem*)));
+ connect(view_recent, TQT_SIGNAL(selectionChanged(TQIconViewItem*)),
+ this, TQT_SLOT(slotRecentSelectionChanged(TQIconViewItem*)));
}
-void KStartDlg::slotTemplateClicked(QIconViewItem *item)
+void KStartDlg::slotTemplateClicked(TQIconViewItem *item)
{
if(!item) return;
@@ -129,7 +125,7 @@ void KStartDlg::slotTemplateClicked(QIconViewItem *item)
/** Read config window */
void KStartDlg::readConfig()
{
- QString value;
+ TQString value;
unsigned int i = 1;
KConfig *config = KGlobal::config();
@@ -142,17 +138,17 @@ void KStartDlg::readConfig()
// it does not make a difference, if you call setGroup() outside of
// this loop. The first time it does make a difference!
config->setGroup("Recent Files");
- value = config->readEntry( QString( "File%1" ).arg( i ), QString::null );
+ value = config->readEntry( TQString( "File%1" ).tqarg( i ), TQString() );
if( !value.isNull() && fileExists(value) )
{
- QString file_name = value.mid(value.findRev('/')+1);
+ TQString file_name = value.mid(value.tqfindRev('/')+1);
(void)new KRecentFileItem( value, view_recent, file_name, il->loadIcon("kmy", KIcon::Desktop, KIcon::SizeLarge));
}
i++;
} while( !value.isNull() );
config->setGroup("Start Dialog");
- QSize *defaultSize = new QSize(400,300);
+ TQSize *defaultSize = new TQSize(400,300);
this->resize( config->readSizeEntry("Geometry", defaultSize ) );
// Restore the last page viewed
@@ -178,7 +174,7 @@ void KStartDlg::writeConfig()
}
/** slot to recent view */
-void KStartDlg::slotRecentClicked(QIconViewItem *item)
+void KStartDlg::slotRecentClicked(TQIconViewItem *item)
{
KRecentFileItem *kitem = (KRecentFileItem*)item;
if(!kitem) return;
@@ -205,7 +201,7 @@ bool KStartDlg::fileExists(KURL url)
#endif
}
-void KStartDlg::slotTemplateSelectionChanged(QIconViewItem* item)
+void KStartDlg::slotTemplateSelectionChanged(TQIconViewItem* item)
{
if(!item) return;
@@ -222,7 +218,7 @@ void KStartDlg::slotTemplateSelectionChanged(QIconViewItem* item)
isopenfile = false;
}
-void KStartDlg::slotRecentSelectionChanged(QIconViewItem* item)
+void KStartDlg::slotRecentSelectionChanged(TQIconViewItem* item)
{
KRecentFileItem *kitem = (KRecentFileItem*)item;
if(!kitem) return;
@@ -235,7 +231,7 @@ void KStartDlg::slotRecentSelectionChanged(QIconViewItem* item)
kurlrequest->setURL( kitem->fileURL() );
}
-void KStartDlg::slotAboutToShowPage(QWidget* page)
+void KStartDlg::slotAboutToShowPage(TQWidget* page)
{
enableButtonOK(page == recentMainFrame);
}