diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kofficeui/KoTemplateChooseDia.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kofficeui/KoTemplateChooseDia.cpp')
-rw-r--r-- | lib/kofficeui/KoTemplateChooseDia.cpp | 292 |
1 files changed, 146 insertions, 146 deletions
diff --git a/lib/kofficeui/KoTemplateChooseDia.cpp b/lib/kofficeui/KoTemplateChooseDia.cpp index 1c2fd843..bd7a63f8 100644 --- a/lib/kofficeui/KoTemplateChooseDia.cpp +++ b/lib/kofficeui/KoTemplateChooseDia.cpp @@ -46,31 +46,31 @@ #include <kapplication.h> #include <kaboutdata.h> -#include <qapplication.h> -#include <qlayout.h> -#include <qtabwidget.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qpoint.h> -#include <qobjectlist.h> -#include <qvgroupbox.h> -#include <qtooltip.h> +#include <tqapplication.h> +#include <tqlayout.h> +#include <tqtabwidget.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqpoint.h> +#include <tqobjectlist.h> +#include <tqvgroupbox.h> +#include <tqtooltip.h> class MyFileDialog : public KFileDialog { public : MyFileDialog( - const QString& startDir=0, - const QString& filter =0, - QWidget *parent=0, + const TQString& startDir=0, + const TQString& filter =0, + TQWidget *tqparent=0, const char *name=0, bool modal=0) - : KFileDialog (startDir, filter, parent, name, modal), + : KFileDialog (startDir, filter, tqparent, name, modal), m_slotOkCalled( false ) {} KURL currentURL() { - setResult( QDialog::Accepted ); // selectedURL tests for it + setResult( TQDialog::Accepted ); // selectedURL tests for it return KFileDialog::selectedURL(); } @@ -81,10 +81,10 @@ class MyFileDialog : public KFileDialog KURL url = currentURL(); if ( url.isLocalFile() ) { - ok = QFile::exists( url.path() ); + ok = TQFile::exists( url.path() ); if ( !ok ) { // Maybe offer to create a new document with that name? (see alos KoDocument::openFile) - KMessageBox::error( this, i18n( "The file %1 does not exist." ).arg( url.path() ) ); + KMessageBox::error( this, i18n( "The file %1 does not exist." ).tqarg( url.path() ) ); } } return ok; @@ -119,10 +119,10 @@ private: class KoTemplateChooseDiaPrivate { public: - KoTemplateChooseDiaPrivate(const QCString& templateType, KInstance* instance, - const QCString &format, - const QString &nativeName, - const QStringList& extraNativeMimeTypes, + KoTemplateChooseDiaPrivate(const TQCString& templateType, KInstance* instance, + const TQCString &format, + const TQString &nativeName, + const TQStringList& extraNativeMimeTypes, const KoTemplateChooseDia::DialogType &dialogType) : m_templateType(templateType), m_instance(instance), m_format(format), m_nativeName(nativeName), m_extraNativeMimeTypes( extraNativeMimeTypes ), @@ -135,41 +135,41 @@ class KoTemplateChooseDiaPrivate { ~KoTemplateChooseDiaPrivate() {} - QCString m_templateType; + TQCString m_templateType; KInstance* m_instance; - QCString m_format; - QString m_nativeName; - QStringList m_extraNativeMimeTypes; + TQCString m_format; + TQString m_nativeName; + TQStringList m_extraNativeMimeTypes; KoTemplateChooseDia::DialogType m_dialogType; KoTemplateTree *tree; - QString m_templateName; - QString m_fullTemplateName; + TQString m_templateName; + TQString m_fullTemplateName; KoTemplateChooseDia::ReturnType m_returnType; bool m_nostartupdlg; // the main widget - QWidget *m_mainwidget; + TQWidget *m_mainwidget; // do not show this dialog at startup - QCheckBox *m_nodiag; + TQCheckBox *m_nodiag; // choose a template KJanusWidget * m_jwidget; KFileIconView *m_recent; - QVGroupBox * boxdescription; + TQVGroupBox * boxdescription; KTextEdit * textedit; // choose a file MyFileDialog *m_filedialog; - // for the layout - QTabWidget* tabWidget; - QWidget* newTab; - QWidget* existingTab; - QWidget* recentTab; + // for the tqlayout + TQTabWidget* tabWidget; + TQWidget* newTab; + TQWidget* existingTab; + TQWidget* recentTab; }; @@ -178,13 +178,13 @@ class KoTemplateChooseDiaPrivate { /******************************************************************/ /*================================================================*/ -KoTemplateChooseDia::KoTemplateChooseDia(QWidget *parent, const char *name, KInstance* instance, - const QCString &format, - const QString &nativeName, - const QStringList &extraNativeMimeTypes, +KoTemplateChooseDia::KoTemplateChooseDia(TQWidget *tqparent, const char *name, KInstance* instance, + const TQCString &format, + const TQString &nativeName, + const TQStringList &extraNativeMimeTypes, const DialogType &dialogType, - const QCString& templateType) : - KDialogBase(parent, name, true, i18n("Open Document"), KDialogBase::Ok | KDialogBase::Cancel, + const TQCString& templateType) : + KDialogBase(tqparent, name, true, i18n("Open Document"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok) { d = new KoTemplateChooseDiaPrivate( @@ -195,8 +195,8 @@ KoTemplateChooseDia::KoTemplateChooseDia(QWidget *parent, const char *name, KIns extraNativeMimeTypes, dialogType); - QPushButton* ok = actionButton( KDialogBase::Ok ); - QPushButton* cancel = actionButton( KDialogBase::Cancel ); + TQPushButton* ok = actionButton( KDialogBase::Ok ); + TQPushButton* cancel = actionButton( KDialogBase::Cancel ); cancel->setAutoDefault(false); ok->setDefault(true); //enableButtonOK(false); @@ -227,30 +227,30 @@ static bool cancelQuits() { return onlyDoc && onlyMainWindow && kapp->instanceName() != "koshell"; // hack for koshell } -KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose(KInstance* instance, QString &file, +KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose(KInstance* instance, TQString &file, const KoTemplateChooseDia::DialogType &dialogType, - const QCString& templateType, - QWidget* parent) + const TQCString& templateType, + TQWidget* tqparent) { - const QString nativeName = instance->aboutData()->programName(); - const QCString format = KoDocument::readNativeFormatMimeType( instance ); - const QStringList extraNativeMimeTypes = KoDocument::readExtraNativeMimeTypes( instance ); + const TQString nativeName = instance->aboutData()->programName(); + const TQCString format = KoDocument::readNativeFormatMimeType( instance ); + const TQStringList extraNativeMimeTypes = KoDocument::readExtraNativeMimeTypes( instance ); // Maybe the above two can be combined into one call, for speed: //KoDocument::getNativeMimeTypeInfo( instance, nativeName, extraNativeMimeTypes ); return choose( instance, file, format, nativeName, extraNativeMimeTypes, - dialogType, templateType, parent ); + dialogType, templateType, tqparent ); } -KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose(KInstance* instance, QString &file, - const QCString &format, - const QString &nativeName, - const QStringList& extraNativeMimeTypes, +KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose(KInstance* instance, TQString &file, + const TQCString &format, + const TQString &nativeName, + const TQStringList& extraNativeMimeTypes, const DialogType &dialogType, - const QCString& templateType, - QWidget* parent ) + const TQCString& templateType, + TQWidget* tqparent ) { KoTemplateChooseDia *dlg = new KoTemplateChooseDia( - parent, "Choose", instance, format, + tqparent, "Choose", instance, format, nativeName, extraNativeMimeTypes, dialogType, templateType ); KoTemplateChooseDia::ReturnType rt = Cancel; @@ -264,7 +264,7 @@ KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose(KInstance* instance, else { dlg->resize( 700, 480 ); - if ( dlg->exec() == QDialog::Accepted ) + if ( dlg->exec() == TQDialog::Accepted ) { file = dlg->getFullTemplate(); rt = dlg->getReturnType(); @@ -280,11 +280,11 @@ bool KoTemplateChooseDia::noStartupDlg() const { } -QString KoTemplateChooseDia::getTemplate() const{ +TQString KoTemplateChooseDia::getTemplate() const{ return d->m_templateName; } -QString KoTemplateChooseDia::getFullTemplate() const{ +TQString KoTemplateChooseDia::getFullTemplate() const{ return d->m_fullTemplateName; } @@ -298,33 +298,33 @@ KoTemplateChooseDia::DialogType KoTemplateChooseDia::getDialogType() const { /*================================================================*/ // private -void KoTemplateChooseDia::setupRecentDialog(QWidget * widgetbase, QGridLayout * layout) +void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout * tqlayout) { d->m_recent = new KoTCDRecentFilesIconView(widgetbase, "recent files"); // I prefer the icons to be in "most recent first" order (DF) - d->m_recent->setSorting( static_cast<QDir::SortSpec>( QDir::Time | QDir::Reversed ) ); - layout->addWidget(d->m_recent,0,0); + d->m_recent->setSorting( static_cast<TQDir::SortSpec>( TQDir::Time | TQDir::Reversed ) ); + tqlayout->addWidget(d->m_recent,0,0); - QString oldGroup = d->m_instance->config()->group(); + TQString oldGroup = d->m_instance->config()->group(); d->m_instance->config()->setGroup( "RecentFiles" ); int i = 0; - QString value; + TQString value; do { - QString key=QString( "File%1" ).arg( i ); + TQString key=TQString( "File%1" ).tqarg( i ); value=d->m_instance->config()->readPathEntry( key ); if ( !value.isEmpty() ) { // Support for kdelibs-3.5's new RecentFiles format: name[url] - QString s = value; + TQString s = value; if ( s.endsWith("]") ) { - int pos = s.find("["); + int pos = s.tqfind("["); s = s.mid( pos + 1, s.length() - pos - 2); } KURL url(s); - if(!url.isLocalFile() || QFile::exists(url.path())) { + if(!url.isLocalFile() || TQFile::exists(url.path())) { KFileItem *item = new KFileItem( KFileItem::Unknown, KFileItem::Unknown, url ); d->m_recent->insertItem(item); } @@ -335,82 +335,82 @@ void KoTemplateChooseDia::setupRecentDialog(QWidget * widgetbase, QGridLayout * d->m_instance->config()->setGroup( oldGroup ); d->m_recent->showPreviews(); - connect(d->m_recent, SIGNAL( doubleClicked ( QIconViewItem * ) ), - this, SLOT( recentSelected( QIconViewItem * ) ) ); + connect(d->m_recent, TQT_SIGNAL( doubleClicked ( TQIconViewItem * ) ), + this, TQT_SLOT( recentSelected( TQIconViewItem * ) ) ); } /*================================================================*/ // private -void KoTemplateChooseDia::setupFileDialog(QWidget * widgetbase, QGridLayout * layout) +void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * tqlayout) { - QString dir = QString::null; - QPoint point( 0, 0 ); + TQString dir = TQString(); + TQPoint point( 0, 0 ); d->m_filedialog=new MyFileDialog(dir, - QString::null, + TQString(), widgetbase, "file dialog", false); - layout->addWidget(d->m_filedialog,0,0); + tqlayout->addWidget(d->m_filedialog,0,0); d->m_filedialog->reparent( widgetbase , point ); //d->m_filedialog->setOperationMode( KFileDialog::Opening); - QObjectList *l = d->m_filedialog->queryList( "QPushButton" ); - QObjectListIt childit( *l ); - QObject *obj; + TQObjectList *l = d->m_filedialog->queryList( TQPUSHBUTTON_OBJECT_NAME_STRING ); + TQObjectListIt childit( *l ); + TQObject *obj; while ( (obj = childit.current()) != 0 ) { ++childit; - ((QPushButton*)obj)->hide(); + ((TQPushButton*)obj)->hide(); } delete l; d->m_filedialog->setSizeGripEnabled ( FALSE ); - QStringList mimeFilter = KoFilterManager::mimeFilter( d->m_format, KoFilterManager::Import ); - QStringList::Iterator mimeFilterIt = mimeFilter.at( 1 ); - for ( QStringList::ConstIterator it = d->m_extraNativeMimeTypes.begin(); + TQStringList mimeFilter = KoFilterManager::mimeFilter( d->m_format, KoFilterManager::Import ); + TQStringList::Iterator mimeFilterIt = mimeFilter.at( 1 ); + for ( TQStringList::ConstIterator it = d->m_extraNativeMimeTypes.begin(); it != d->m_extraNativeMimeTypes.end(); ++it ) { mimeFilterIt = mimeFilter.insert( mimeFilterIt, *it ); ++mimeFilterIt; } d->m_filedialog->setMimeFilter( mimeFilter ); - connect(d->m_filedialog, SIGNAL( okClicked() ), - this, SLOT ( slotOk() )); + connect(d->m_filedialog, TQT_SIGNAL( okClicked() ), + this, TQT_SLOT ( slotOk() )); - connect(d->m_filedialog, SIGNAL( cancelClicked() ), - this, SLOT ( slotCancel() )); + connect(d->m_filedialog, TQT_SIGNAL( cancelClicked() ), + this, TQT_SLOT ( slotCancel() )); } /*================================================================*/ // private -void KoTemplateChooseDia::setupTemplateDialog(QWidget * widgetbase, QGridLayout * layout) +void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * tqlayout) { d->m_jwidget = new KJanusWidget( widgetbase, "kjanuswidget", KJanusWidget::IconList); - layout->addWidget(d->m_jwidget,0,0); + tqlayout->addWidget(d->m_jwidget,0,0); - d->boxdescription = new QVGroupBox( + d->boxdescription = new TQVGroupBox( i18n("Selected Template"), widgetbase, "boxdescription"); - layout->addWidget(d->boxdescription, 1, 0 ); + tqlayout->addWidget(d->boxdescription, 1, 0 ); // config KConfigGroup grp( d->m_instance->config(), "TemplateChooserDialog" ); int templateNum = grp.readNumEntry( "TemplateTab", -1 ); - QString templateName = grp.readPathEntry( "TemplateName" ); + TQString templateName = grp.readPathEntry( "TemplateName" ); if ( templateName.isEmpty() && d->tree->defaultTemplate() ) templateName = d->tree->defaultTemplate()->name(); //select the default template for the app // item which will be selected initially - QIconViewItem * itemtoselect = 0; + TQIconViewItem * itemtoselect = 0; // count the templates inserted int entriesnumber = 0; @@ -424,32 +424,32 @@ void KoTemplateChooseDia::setupTemplateDialog(QWidget * widgetbase, QGridLayout if ( d->tree->defaultGroup() == group ) defaultTemplateGroup = entriesnumber; //select the default template group for the app - QFrame * frame = d->m_jwidget->addPage ( + TQFrame * frame = d->m_jwidget->addPage ( group->name(), group->name(), group->first()->loadPicture(d->m_instance)); - QGridLayout * layout = new QGridLayout(frame); + TQGridLayout * tqlayout = new TQGridLayout(frame); KoTCDIconCanvas *canvas = new KoTCDIconCanvas( frame ); - layout->addWidget(canvas,0,0); + tqlayout->addWidget(canvas,0,0); - canvas->setBackgroundColor( colorGroup().base() ); - canvas->setResizeMode(QIconView::Adjust); + canvas->setBackgroundColor( tqcolorGroup().base() ); + canvas->setResizeMode(TQIconView::Adjust); canvas->setWordWrapIconText( true ); canvas->show(); - QIconViewItem * tempitem = canvas->load(group, templateName, d->m_instance); + TQIconViewItem * tempitem = canvas->load(group, templateName, d->m_instance); if (tempitem) itemtoselect = tempitem; canvas->sort(); - canvas->setSelectionMode(QIconView::Single); + canvas->setSelectionMode(TQIconView::Single); - connect( canvas, SIGNAL( clicked ( QIconViewItem * ) ), - this, SLOT( currentChanged( QIconViewItem * ) ) ); + connect( canvas, TQT_SIGNAL( clicked ( TQIconViewItem * ) ), + this, TQT_SLOT( currentChanged( TQIconViewItem * ) ) ); - connect( canvas, SIGNAL( doubleClicked( QIconViewItem * ) ), - this, SLOT( chosen(QIconViewItem *) ) ); + connect( canvas, TQT_SIGNAL( doubleClicked( TQIconViewItem * ) ), + this, TQT_SLOT( chosen(TQIconViewItem *) ) ); entriesnumber++; } @@ -478,12 +478,12 @@ void KoTemplateChooseDia::setupTemplateDialog(QWidget * widgetbase, QGridLayout currentChanged(itemtoselect); // setup the checkbox - QString translatedstring = i18n("Always start %1 with the selected template").arg(d->m_nativeName); + TQString translatedstring = i18n("Always start %1 with the selected template").tqarg(d->m_nativeName); - d->m_nodiag = new QCheckBox ( translatedstring , widgetbase); - layout->addWidget(d->m_nodiag, 2, 0); - QString startwithoutdialog = grp.readEntry( "NoStartDlg" ); - bool ischecked = startwithoutdialog == QString("yes"); + d->m_nodiag = new TQCheckBox ( translatedstring , widgetbase); + tqlayout->addWidget(d->m_nodiag, 2, 0); + TQString startwithoutdialog = grp.readEntry( "NoStartDlg" ); + bool ischecked = startwithoutdialog == TQString("yes"); // When not starting up, display a tri-state button telling whether // the user actually choosed the template to start with next times (bug:77542) @@ -503,20 +503,20 @@ void KoTemplateChooseDia::setupTemplateDialog(QWidget * widgetbase, QGridLayout void KoTemplateChooseDia::setupDialog() { - QGridLayout *maingrid=new QGridLayout( d->m_mainwidget, 1, 1, 2, 6); + TQGridLayout *maingrid=new TQGridLayout( d->m_mainwidget, 1, 1, 2, 6); KConfigGroup grp( d->m_instance->config(), "TemplateChooserDialog" ); if (d->m_dialogType == Everything) { // the user may want to start with his favorite template - if (grp.readEntry( "NoStartDlg" ) == QString("yes") ) + if (grp.readEntry( "NoStartDlg" ) == TQString("yes") ) { d->m_nostartupdlg = true; d->m_returnType = Empty; // no default template, just start with an empty document - if (grp.readEntry("LastReturnType") == QString("Empty") ) + if (grp.readEntry("LastReturnType") == TQString("Empty") ) return; // start with the default template @@ -524,7 +524,7 @@ void KoTemplateChooseDia::setupDialog() d->m_fullTemplateName = grp.readPathEntry( "FullTemplateName" ); // be paranoid : invalid template means empty template - if (!QFile::exists(d->m_fullTemplateName)) + if (!TQFile::exists(d->m_fullTemplateName)) return; if (d->m_fullTemplateName.length() < 2) @@ -537,29 +537,29 @@ void KoTemplateChooseDia::setupDialog() if ( cancelQuits() ) setButtonCancel( KStdGuiItem::quit() ); - d->tabWidget = new QTabWidget( d->m_mainwidget, "tabWidget" ); + d->tabWidget = new TQTabWidget( d->m_mainwidget, "tabWidget" ); maingrid->addWidget( d->tabWidget, 0, 0 ); // new document - d->newTab = new QWidget( d->tabWidget, "newTab" ); + d->newTab = new TQWidget( d->tabWidget, "newTab" ); d->tabWidget->insertTab( d->newTab, i18n( "&Create Document" ) ); - QGridLayout * newTabLayout = new QGridLayout( d->newTab, 1, 1, KDialogBase::marginHint(), KDialogBase::spacingHint()); + TQGridLayout * newTabLayout = new TQGridLayout( d->newTab, 1, 1, KDialogBase::marginHint(), KDialogBase::spacingHint()); // existing document - d->existingTab = new QWidget( d->tabWidget, "existingTab" ); + d->existingTab = new TQWidget( d->tabWidget, "existingTab" ); d->tabWidget->insertTab( d->existingTab, i18n( "Open &Existing Document" ) ); - QGridLayout * existingTabLayout = new QGridLayout( d->existingTab, 1, 1, 0, KDialog::spacingHint()); + TQGridLayout * existingTabLayout = new TQGridLayout( d->existingTab, 1, 1, 0, KDialog::spacingHint()); // recent document - d->recentTab = new QWidget( d->tabWidget, "recentTab" ); + d->recentTab = new TQWidget( d->tabWidget, "recentTab" ); d->tabWidget->insertTab( d->recentTab, i18n( "Open &Recent Document" ) ); - QGridLayout * recentTabLayout = new QGridLayout( d->recentTab, 1, 1, KDialogBase::marginHint(), KDialog::spacingHint()); + TQGridLayout * recentTabLayout = new TQGridLayout( d->recentTab, 1, 1, KDialogBase::marginHint(), KDialog::spacingHint()); setupTemplateDialog(d->newTab, newTabLayout); setupFileDialog(d->existingTab, existingTabLayout); setupRecentDialog(d->recentTab, recentTabLayout); - QString tabhighlighted = grp.readEntry("LastReturnType"); + TQString tabhighlighted = grp.readEntry("LastReturnType"); if ( tabhighlighted == "Template" ) d->tabWidget->setCurrentPage(0); // CreateDocument tab else if (tabhighlighted == "File" ) @@ -586,11 +586,11 @@ void KoTemplateChooseDia::setupDialog() /*================================================================*/ // private SLOT -void KoTemplateChooseDia::currentChanged( QIconViewItem * item) +void KoTemplateChooseDia::currentChanged( TQIconViewItem * item) { if (item) { - QIconView* canvas = item->iconView(); + TQIconView* canvas = item->iconView(); // set text in the textarea d->textedit->setText( descriptionText( @@ -610,7 +610,7 @@ void KoTemplateChooseDia::currentChanged( QIconViewItem * item) /*================================================================*/ // private SLOT -void KoTemplateChooseDia::chosen(QIconViewItem * item) +void KoTemplateChooseDia::chosen(TQIconViewItem * item) { // the user double clicked on a template if (item) @@ -622,7 +622,7 @@ void KoTemplateChooseDia::chosen(QIconViewItem * item) /* */ // private SLOT -void KoTemplateChooseDia::recentSelected( QIconViewItem * item) +void KoTemplateChooseDia::recentSelected( TQIconViewItem * item) { if (item) { @@ -642,7 +642,7 @@ void KoTemplateChooseDia::slotOk() static const char* const s_returnTypes[] = { 0 /*Cancel ;)*/, "Template", "File", "Empty" }; if ( d->m_returnType <= Empty ) { - grp.writeEntry( "LastReturnType", QString::fromLatin1(s_returnTypes[d->m_returnType]) ); + grp.writeEntry( "LastReturnType", TQString::tqfromLatin1(s_returnTypes[d->m_returnType]) ); if (d->m_returnType == Template) { grp.writeEntry( "TemplateTab", d->m_jwidget->activePageIndex() ); @@ -654,10 +654,10 @@ void KoTemplateChooseDia::slotOk() { // The checkbox m_nodiag is in tri-state mode for new documents // fixes bug:77542 - if (d->m_nodiag->state() == QButton::On) { + if (d->m_nodiag->state() == TQButton::On) { grp.writeEntry( "NoStartDlg", "yes"); } - else if (d->m_nodiag->state() == QButton::Off) { + else if (d->m_nodiag->state() == TQButton::Off) { grp.writeEntry( "NoStartDlg", "no"); } } @@ -665,7 +665,7 @@ void KoTemplateChooseDia::slotOk() else { kdWarning(30003) << "Unsupported template chooser result: " << d->m_returnType << endl; - grp.writeEntry( "LastReturnType", QString::null ); + grp.writeEntry( "LastReturnType", TQString() ); } KDialogBase::slotOk(); } @@ -704,9 +704,9 @@ bool KoTemplateChooseDia::collectInfo() if (! item) return false; KURL url = item->url(); - if(url.isLocalFile() && !QFile::exists(url.path())) + if(url.isLocalFile() && !TQFile::exists(url.path())) { - KMessageBox::error( this, i18n( "The file %1 does not exist." ).arg( url.path() ) ); + KMessageBox::error( this, i18n( "The file %1 does not exist." ).tqarg( url.path() ) ); return false; } d->m_fullTemplateName = url.url(); @@ -731,9 +731,9 @@ bool KoTemplateChooseDia::collectInfo() /*================================================================*/ //private -QString KoTemplateChooseDia::descriptionText(const QString &name, const QString &description) +TQString KoTemplateChooseDia::descriptionText(const TQString &name, const TQString &description) { - QString descrText(i18n("Name:")); + TQString descrText(i18n("Name:")); descrText += " " + name; descrText += "\n"; descrText += i18n("Description:"); @@ -746,14 +746,14 @@ QString KoTemplateChooseDia::descriptionText(const QString &name, const QString /*================================================================*/ -QIconViewItem * KoTCDIconCanvas::load( KoTemplateGroup *group, const QString& name, KInstance* instance ) +TQIconViewItem * KoTCDIconCanvas::load( KoTemplateGroup *group, const TQString& name, KInstance* instance ) { - QIconViewItem * itemtoreturn = 0; + TQIconViewItem * itemtoreturn = 0; for (KoTemplate *t=group->first(); t!=0L; t=group->next()) { if (t->isHidden()) continue; - QIconViewItem *item = new KoTCDIconViewItem( + TQIconViewItem *item = new KoTCDIconViewItem( this, t->name(), t->loadPicture(instance), @@ -780,7 +780,7 @@ KoTCDRecentFilesIconView::~KoTCDRecentFilesIconView() removeToolTip(); } -void KoTCDRecentFilesIconView::showToolTip( QIconViewItem* item ) +void KoTCDRecentFilesIconView::showToolTip( TQIconViewItem* item ) { removeToolTip(); if ( !item ) @@ -792,25 +792,25 @@ void KoTCDRecentFilesIconView::showToolTip( QIconViewItem* item ) // KFileIconView would need a virtual method for deciding if a tooltip should be shown, // and another one for deciding what's the text of the tooltip... const KFileItem *fi = ( (KFileIconViewItem*)item )->fileInfo(); - QString toolTipText = fi->url().prettyURL( 0, KURL::StripFileProtocol ); - toolTip = new QLabel( QString::fromLatin1(" %1 ").arg(toolTipText), 0, + TQString toolTipText = fi->url().prettyURL( 0, KURL::StripFileProtocol ); + toolTip = new TQLabel( TQString::tqfromLatin1(" %1 ").tqarg(toolTipText), 0, "myToolTip", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ); - toolTip->setFrameStyle( QFrame::Plain | QFrame::Box ); + toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); toolTip->setLineWidth( 1 ); - toolTip->setAlignment( AlignLeft | AlignTop ); - toolTip->move( QCursor::pos() + QPoint( 14, 14 ) ); + toolTip->tqsetAlignment( AlignLeft | AlignTop ); + toolTip->move( TQCursor::pos() + TQPoint( 14, 14 ) ); toolTip->adjustSize(); - QRect screen = QApplication::desktop()->screenGeometry( - QApplication::desktop()->screenNumber(QCursor::pos())); + TQRect screen = TQApplication::desktop()->screenGeometry( + TQApplication::desktop()->screenNumber(TQCursor::pos())); if (toolTip->x()+toolTip->width() > screen.right()) { toolTip->move(toolTip->x()+screen.right()-toolTip->x()-toolTip->width(), toolTip->y()); } if (toolTip->y()+toolTip->height() > screen.bottom()) { toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y()); } - toolTip->setFont( QToolTip::font() ); - toolTip->setPalette( QToolTip::palette(), TRUE ); + toolTip->setFont( TQToolTip::font() ); + toolTip->tqsetPalette( TQToolTip::palette(), TRUE ); toolTip->show(); } @@ -820,7 +820,7 @@ void KoTCDRecentFilesIconView::removeToolTip() toolTip = 0; } -void KoTCDRecentFilesIconView::hideEvent( QHideEvent *ev ) +void KoTCDRecentFilesIconView::hideEvent( TQHideEvent *ev ) { removeToolTip(); KFileIconView::hideEvent( ev ); |