diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/editor/newformimpl.cpp | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/newformimpl.cpp')
-rw-r--r-- | kommander/editor/newformimpl.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kommander/editor/newformimpl.cpp b/kommander/editor/newformimpl.cpp index 70e7b1df..ee623e48 100644 --- a/kommander/editor/newformimpl.cpp +++ b/kommander/editor/newformimpl.cpp @@ -28,16 +28,16 @@ #include "resource.h" #include "formfile.h" -#include <qiconview.h> -#include <qlabel.h> -#include <qfileinfo.h> -#include <qdir.h> -#include <qregexp.h> -#include <qpushbutton.h> +#include <tqiconview.h> +#include <tqlabel.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqregexp.h> +#include <tqpushbutton.h> #include <stdlib.h> -#include <qcombobox.h> -#include <qworkspace.h> -#include <qmessagebox.h> +#include <tqcombobox.h> +#include <tqworkspace.h> +#include <tqmessagebox.h> #include <klocale.h> #include <kglobal.h> @@ -47,18 +47,18 @@ static int _forms = 0; -FormItem::FormItem(QIconView *view, const QString &text) : NewItem(view, text) +FormItem::FormItem(TQIconView *view, const TQString &text) : NewItem(view, text) { } void FormItem::insert() { - QString n = "Form" + QString::number(++_forms); + TQString n = "Form" + TQString::number(++_forms); FormWindow *fw = 0; FormFile *ff = new FormFile(FormFile::createUnnamedFileName(), true); fw = new FormWindow(ff, MainWindow::self, MainWindow::self->qWorkspace(), n); MetaDataBase::addEntry(fw); - QWidget *w = 0L; + TQWidget *w = 0L; if (fType == Dialog) { w = WidgetFactory::create(WidgetDatabase::idFromClassName("Dialog"), fw, n.latin1()); @@ -87,60 +87,60 @@ void FormItem::insert() -CustomFormItem::CustomFormItem(QIconView *view, const QString &text) +CustomFormItem::CustomFormItem(TQIconView *view, const TQString &text) : NewItem(view, text) { } -static void unifyFormName(FormWindow *fw, QWorkspace *qworkspace) +static void unifyFormName(FormWindow *fw, TQWorkspace *qworkspace) { - QStringList lst; - QWidgetList windows = qworkspace->windowList(); - for (QWidget* w = windows.first(); w; w = windows.next()) + TQStringList lst; + TQWidgetList windows = qworkspace->windowList(); + for (TQWidget* w = windows.first(); w; w = windows.next()) if (w != fw) lst << w->name(); if (lst.findIndex(fw->name()) == -1) return; - QString origName = fw->name(); - QString n = origName; + TQString origName = fw->name(); + TQString n = origName; int i = 1; while (lst.findIndex(n) != -1) - n = origName + QString::number(i++); + n = origName + TQString::number(i++); fw->setName(n); fw->setCaption(n); } void CustomFormItem::insert() { - QString filename = templateFileName(); - if (!filename.isEmpty() && QFile::exists(filename)) + TQString filename = templateFileName(); + if (!filename.isEmpty() && TQFile::exists(filename)) { Resource resource(MainWindow::self); FormFile *ff = new FormFile(filename, true); if (!resource.load(ff)) { - QMessageBox::information(MainWindow::self, i18n("Load Template"), + TQMessageBox::information(MainWindow::self, i18n("Load Template"), i18n("Could not load form description from template '%1'").arg(filename)); delete ff; return; } - ff->setFileName(QString::null); + ff->setFileName(TQString::null); if (MainWindow::self->formWindow()) { - MainWindow::self->formWindow()->setFileName(QString::null); + MainWindow::self->formWindow()->setFileName(TQString::null); unifyFormName(MainWindow::self->formWindow(), MainWindow::self->qWorkspace()); } } } -NewForm::NewForm(QWidget *parent, const QString &templatePath) +NewForm::NewForm(TQWidget *parent, const TQString &templatePath) : NewFormBase(parent, 0, true) { - connect(helpButton, SIGNAL(clicked()), MainWindow::self, SLOT(showDialogHelp())); + connect(helpButton, TQT_SIGNAL(clicked()), MainWindow::self, TQT_SLOT(showDialogHelp())); - QIconViewItem *cur = 0; + TQIconViewItem *cur = 0; FormItem *fi = new FormItem(templateView, i18n("Dialog")); allItems.append(fi); fi->setFormType(FormItem::Dialog); @@ -154,25 +154,25 @@ NewForm::NewForm(QWidget *parent, const QString &templatePath) fi->setDragEnabled(false); - QStringList searchPaths = KGlobal::dirs()->findDirs("data", "kmdr-editor/templates"); + TQStringList searchPaths = KGlobal::dirs()->findDirs("data", "kmdr-editor/templates"); if (!templatePath.isEmpty()) searchPaths.append(templatePath); // search each path - for (QStringList::ConstIterator it = searchPaths.begin(); it != searchPaths.end(); ++it) + for (TQStringList::ConstIterator it = searchPaths.begin(); it != searchPaths.end(); ++it) { - if (!QFile::exists(*it)) + if (!TQFile::exists(*it)) continue; - QDir dir(*it); - const QFileInfoList* fileList = dir.entryInfoList(QDir::DefaultFilter, QDir::DirsFirst | QDir::Name); + TQDir dir(*it); + const QFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name); if (fileList) for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit) { - QFileInfo* fi = fit.current(); + TQFileInfo* fi = fit.current(); if (!fi->isFile() || fi->extension() != "kmdr") continue; - QString name = fi->baseName(); + TQString name = fi->baseName(); name = name.replace("_", " "); CustomFormItem *ci = new CustomFormItem(templateView, name); allItems.append(ci); @@ -194,7 +194,7 @@ void NewForm::accept() } -void NewForm::itemChanged(QIconViewItem *item) +void NewForm::itemChanged(TQIconViewItem *item) { Q_UNUSED(item); } |