summaryrefslogtreecommitdiffstats
path: root/languages/python/pythonimplementationwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/python/pythonimplementationwidget.cpp')
-rw-r--r--languages/python/pythonimplementationwidget.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/languages/python/pythonimplementationwidget.cpp b/languages/python/pythonimplementationwidget.cpp
index 439c7706..9aba5441 100644
--- a/languages/python/pythonimplementationwidget.cpp
+++ b/languages/python/pythonimplementationwidget.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
#include "pythonimplementationwidget.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
#include <klineedit.h>
#include <klocale.h>
@@ -34,7 +34,7 @@
#include <kdevproject.h>
PythonImplementationWidget::PythonImplementationWidget(KDevLanguageSupport* part,
- QWidget* parent, const char* name, bool modal)
+ TQWidget* parent, const char* name, bool modal)
: ImplementationWidget(part, parent, name, modal)
{
}
@@ -45,31 +45,31 @@ PythonImplementationWidget::~PythonImplementationWidget()
}
-QStringList PythonImplementationWidget::createClassFiles()
+TQStringList PythonImplementationWidget::createClassFiles()
{
-// QString template_py = "require '$BASEFILENAME$'\n\nclass $CLASSNAME$ < $BASECLASSNAME$\n\n def initialize(*k)\n super(*k)\n end\n\nend\n";
- QString template_py = "from qt import *\nfrom $BASEFILENAME$ import *\nclass $CLASSNAME$($BASECLASSNAME$):\n\n def __init__(self,parent,name):\n $BASECLASSNAME$.__init__(self,parent,name)\n \n\n\n";
+// TQString template_py = "require '$BASEFILENAME$'\n\nclass $CLASSNAME$ < $BASECLASSNAME$\n\n def initialize(*k)\n super(*k)\n end\n\nend\n";
+ TQString template_py = "from qt import *\nfrom $BASEFILENAME$ import *\nclass $CLASSNAME$($BASECLASSNAME$):\n\n def __init__(self,parent,name):\n $BASECLASSNAME$.__init__(self,parent,name)\n \n\n\n";
- QFileInfo formInfo(m_formName);
- template_py.replace(QRegExp("\\$BASEFILENAME\\$"), formInfo.baseName()+".py");
- template_py.replace(QRegExp("\\$CLASSNAME\\$"), classNameEdit->text());
- template_py.replace(QRegExp("\\$BASECLASSNAME\\$"), m_baseClassName);
+ TQFileInfo formInfo(m_formName);
+ template_py.replace(TQRegExp("\\$BASEFILENAME\\$"), formInfo.baseName()+".py");
+ template_py.replace(TQRegExp("\\$CLASSNAME\\$"), classNameEdit->text());
+ template_py.replace(TQRegExp("\\$BASECLASSNAME\\$"), m_baseClassName);
template_py = FileTemplate::read(m_part, "py") + template_py;
- QString file_py = fileNameEdit->text() + ".py";
+ TQString file_py = fileNameEdit->text() + ".py";
if (!m_part->project()->activeDirectory().isEmpty())
file_py = m_part->project()->activeDirectory() + "/" + file_py;
- QFile file(QDir::cleanDirPath(m_part->project()->projectDirectory() + "/" + file_py));
+ TQFile file(TQDir::cleanDirPath(m_part->project()->projectDirectory() + "/" + file_py));
if (!file.open(IO_WriteOnly)) {
KMessageBox::error(0, i18n("Cannot write to file"));
- return QStringList();
+ return TQStringList();
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << template_py;
file.close();
- QStringList files;
+ TQStringList files;
files.append(file_py);
return files;
}