diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /languages/python/pythonimplementationwidget.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/python/pythonimplementationwidget.cpp')
-rw-r--r-- | languages/python/pythonimplementationwidget.cpp | 36 |
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; } |