summaryrefslogtreecommitdiffstats
path: root/kommander/editor/formfile.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/editor/formfile.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-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/formfile.cpp')
-rw-r--r--kommander/editor/formfile.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kommander/editor/formfile.cpp b/kommander/editor/formfile.cpp
index 645b04ef..0f5ab63c 100644
--- a/kommander/editor/formfile.cpp
+++ b/kommander/editor/formfile.cpp
@@ -27,10 +27,10 @@
#include "workspace.h"
// Qt includes
-#include <qfile.h>
-#include <qregexp.h>
-#include <qstatusbar.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqstatusbar.h>
+#include <tqtimer.h>
// KDE includes
#include <kdebug.h>
@@ -42,18 +42,18 @@
#include <sys/stat.h>
-FormFile::FormFile(const QString &fn, bool temp)
+FormFile::FormFile(const TQString &fn, bool temp)
: filename(fn), fileNameTemp(temp), fw(0)
{
- QTimer::singleShot(0, this, SLOT(init()));
+ TQTimer::singleShot(0, this, TQT_SLOT(init()));
}
void FormFile::init()
{
- connect(this, SIGNAL(addedFormFile(FormFile *)), MainWindow::self->workspace(),
- SLOT(formFileAdded(FormFile*)));
- connect(this, SIGNAL(removedFormFile(FormFile *)), MainWindow::self->workspace(),
- SLOT(formFileRemoved(FormFile*)));
+ connect(this, TQT_SIGNAL(addedFormFile(FormFile *)), MainWindow::self->workspace(),
+ TQT_SLOT(formFileAdded(FormFile*)));
+ connect(this, TQT_SIGNAL(removedFormFile(FormFile *)), MainWindow::self->workspace(),
+ TQT_SLOT(formFileRemoved(FormFile*)));
emit addedFormFile(this);
}
@@ -74,7 +74,7 @@ void FormFile::setFormWindow(FormWindow *f)
fw->setFormFile(this);
}
-void FormFile::setFileName(const QString &fn)
+void FormFile::setFileName(const TQString &fn)
{
if (fn == filename)
return;
@@ -92,12 +92,12 @@ FormWindow *FormFile::formWindow() const
return fw;
}
-QString FormFile::fileName() const
+TQString FormFile::fileName() const
{
return filename;
}
-QString FormFile::absFileName() const
+TQString FormFile::absFileName() const
{
return filename;
}
@@ -119,7 +119,7 @@ bool FormFile::save(bool withMsgBox)
if (!resource.save(filename, false))
{
if (KMessageBox::questionYesNo(MainWindow::self, i18n("Failed to save file '%1'.\n"
- "Do you want to use another file name?").arg(filename), QString::null, i18n("Try Another"), i18n("Do Not Try")) == KMessageBox::Yes)
+ "Do you want to use another file name?").arg(filename), TQString::null, i18n("Try Another"), i18n("Do Not Try")) == KMessageBox::Yes)
return saveAs();
else
return false;
@@ -132,23 +132,23 @@ bool FormFile::save(bool withMsgBox)
bool FormFile::saveAs()
{
- QString f = fileName();
+ TQString f = fileName();
if(fileNameTemp)
- f = QString(formWindow()->name()).lower() + ".kmdr";
+ f = TQString(formWindow()->name()).lower() + ".kmdr";
bool saved = false;
while (!saved) {
- QString fn = KFileDialog::getSaveFileName(QString::null,
+ TQString fn = KFileDialog::getSaveFileName(TQString::null,
i18n("*.kmdr|Kommander Files"), MainWindow::self,
i18n("Save Form '%1' As").arg(formWindow()->name()));
if (fn.isEmpty())
return false;
- QFileInfo fi(fn);
+ TQFileInfo fi(fn);
if (fi.extension() != "kmdr")
fn += ".kmdr";
fileNameTemp = false;
filename = fn;
- QFileInfo relfi(filename);
+ TQFileInfo relfi(filename);
if (relfi.exists()) {
if (KMessageBox::warningContinueCancel(MainWindow::self,
i18n("The file already exists. Do you wish to overwrite it?"),
@@ -176,7 +176,7 @@ bool FormFile::closeEvent()
if (!isModified())
{
emit removedFormFile(this);
- QFile f(filename + ".backup");
+ TQFile f(filename + ".backup");
f.remove();
return true;
}
@@ -197,7 +197,7 @@ bool FormFile::closeEvent()
emit removedFormFile(this);
setModified(false);
- QFile f(filename + ".backup");
+ TQFile f(filename + ".backup");
f.remove();
return true;
}
@@ -239,12 +239,12 @@ void FormFile::showFormWindow()
static int ui_counter = 0;
-QString FormFile::createUnnamedFileName()
+TQString FormFile::createUnnamedFileName()
{
- return i18n("unnamed") + QString::number(++ui_counter) + QString(".kmdr");
+ return i18n("unnamed") + TQString::number(++ui_counter) + TQString(".kmdr");
}
-QString FormFile::formName() const
+TQString FormFile::formName() const
{
FormFile* that = (FormFile*) this;
if (formWindow()) {
@@ -253,12 +253,12 @@ QString FormFile::formName() const
}
if (!cachedFormName.isNull())
return cachedFormName;
- QFile f(filename);
+ TQFile f(filename);
if (f.open(IO_ReadOnly))
{
- QTextStream ts(&f);
- QString line;
- QString className;
+ TQTextStream ts(&f);
+ TQString line;
+ TQString className;
while (!ts.eof())
{
line = ts.readLine();