summaryrefslogtreecommitdiffstats
path: root/kommander/editor/newformimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/newformimpl.cpp')
-rw-r--r--kommander/editor/newformimpl.cpp72
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);
}