diff options
Diffstat (limited to 'buildtools/script/scriptnewfiledlg.cpp')
-rw-r--r-- | buildtools/script/scriptnewfiledlg.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/buildtools/script/scriptnewfiledlg.cpp b/buildtools/script/scriptnewfiledlg.cpp index 336187d3..3bfeeee7 100644 --- a/buildtools/script/scriptnewfiledlg.cpp +++ b/buildtools/script/scriptnewfiledlg.cpp @@ -11,13 +11,13 @@ #include "scriptnewfiledlg.h" -#include <qcheckbox.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qpushbutton.h> +#include <tqpushbutton.h> #include <kbuttonbox.h> #include <kdebug.h> #include <klocale.h> @@ -30,35 +30,35 @@ ScriptNewFileDialog::ScriptNewFileDialog(ScriptProjectPart *part, - QWidget *parent, const char *name) - : QDialog(parent, name, true) + TQWidget *parent, const char *name) + : TQDialog(parent, name, true) { setCaption(i18n("New File")); - QLabel *filename_label = new QLabel(i18n("&File name:"), this); + TQLabel *filename_label = new TQLabel(i18n("&File name:"), this); filename_edit = new KLineEdit(this); filename_edit->setFocus(); filename_label->setBuddy(this); - QFontMetrics fm(filename_edit->fontMetrics()); + TQFontMetrics fm(filename_edit->fontMetrics()); filename_edit->setMinimumWidth(fm.width('X')*35); - usetemplate_box = new QCheckBox(i18n("&Use file template"), this); + usetemplate_box = new TQCheckBox(i18n("&Use file template"), this); usetemplate_box->setChecked(true); - QFrame *frame = new QFrame(this); - frame->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *frame = new TQFrame(this); + frame->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); KButtonBox *buttonbox = new KButtonBox(this); buttonbox->addStretch(); - QPushButton *ok_button = buttonbox->addButton(KStdGuiItem::ok()); - QPushButton *cancel_button = buttonbox->addButton(KStdGuiItem::cancel()); + TQPushButton *ok_button = buttonbox->addButton(KStdGuiItem::ok()); + TQPushButton *cancel_button = buttonbox->addButton(KStdGuiItem::cancel()); ok_button->setDefault(true); - connect( ok_button, SIGNAL(clicked()), this, SLOT(accept()) ); - connect( cancel_button, SIGNAL(clicked()), this, SLOT(reject()) ); + connect( ok_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()) ); + connect( cancel_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()) ); buttonbox->layout(); - QVBoxLayout *layout = new QVBoxLayout(this, 10, 4); + TQVBoxLayout *layout = new TQVBoxLayout(this, 10, 4); layout->addWidget(filename_label); layout->addWidget(filename_edit); layout->addWidget(usetemplate_box); @@ -75,7 +75,7 @@ ScriptNewFileDialog::~ScriptNewFileDialog() void ScriptNewFileDialog::accept() { - QString fileName = filename_edit->text(); + TQString fileName = filename_edit->text(); if (fileName.find('/') != -1) { KMessageBox::sorry(this, i18n("Please enter the file name without '/' and so on.")); return; @@ -84,9 +84,9 @@ void ScriptNewFileDialog::accept() KDevProject *project = m_part->project(); if (!project->activeDirectory().isEmpty()) fileName.prepend(project->activeDirectory() + "/"); - QString destpath = project->projectDirectory() + "/" + fileName; + TQString destpath = project->projectDirectory() + "/" + fileName; - if (QFileInfo(destpath).exists()) { + if (TQFileInfo(destpath).exists()) { KMessageBox::sorry(this, i18n("A file with this name already exists.")); return; } @@ -94,14 +94,14 @@ void ScriptNewFileDialog::accept() bool success = false; if (usetemplate_box->isChecked()) { - QString extension = QFileInfo(destpath).extension(); + TQString extension = TQFileInfo(destpath).extension(); if (!FileTemplate::exists(m_part, extension)) { KMessageBox::sorry(this, i18n("A file template for this extension does not exist.")); return; } success = FileTemplate::copy(m_part, extension, destpath); } else { - QFile f(destpath); + TQFile f(destpath); success = f.open(IO_WriteOnly); if (success) f.close(); @@ -113,7 +113,7 @@ void ScriptNewFileDialog::accept() kdDebug(9015) << "AddFile1: " << fileName << endl; m_part->addFile(fileName); - QDialog::accept(); + TQDialog::accept(); } #include "scriptnewfiledlg.moc" |