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 /parts/filecreate/filecreate_newfile.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 'parts/filecreate/filecreate_newfile.cpp')
-rw-r--r-- | parts/filecreate/filecreate_newfile.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/parts/filecreate/filecreate_newfile.cpp b/parts/filecreate/filecreate_newfile.cpp index 2077556c..b4b84de1 100644 --- a/parts/filecreate/filecreate_newfile.cpp +++ b/parts/filecreate/filecreate_newfile.cpp @@ -12,13 +12,13 @@ #include "filecreate_newfile.moc" -#include <qvbox.h> -#include <qgrid.h> +#include <tqvbox.h> +#include <tqgrid.h> -#include <qhbox.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqhbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <klineedit.h> #include <kurlrequester.h> #include <kcombobox.h> @@ -29,31 +29,31 @@ namespace FileCreate { - NewFileChooser::NewFileChooser(QWidget * parent) : + NewFileChooser::NewFileChooser(TQWidget * parent) : KDialogBase(KDialogBase::Plain, i18n("New file dialog (title)", "New File"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, parent, "New file", true) { - QVBoxLayout* lay = new QVBoxLayout( plainPage(), 5, 5 ); + TQVBoxLayout* lay = new TQVBoxLayout( plainPage(), 5, 5 ); - lay->addWidget( new QLabel( i18n("<b>New File Creation</b>"), plainPage() ) ); + lay->addWidget( new TQLabel( i18n("<b>New File Creation</b>"), plainPage() ) ); - QGridLayout* grid = new QGridLayout(lay, 2, 2, 5 ); - QLabel * l = new QLabel(i18n("&Directory:"), plainPage() ); + TQGridLayout* grid = new TQGridLayout(lay, 2, 2, 5 ); + TQLabel * l = new TQLabel(i18n("&Directory:"), plainPage() ); grid->addWidget(l, 0, 0); m_urlreq = new KURLRequester( plainPage(), "url request" ); grid->addWidget(m_urlreq, 0, 1); l->setBuddy(m_urlreq); - l = new QLabel(i18n("&File name:"), plainPage() ); + l = new TQLabel(i18n("&File name:"), plainPage() ); grid->addWidget(l, 1, 0); m_filename = new KLineEdit( plainPage() ); grid->addWidget(m_filename, 1, 1); l->setBuddy(m_filename); // lay->addWidget( grid ); - QHBoxLayout* hbox = new QHBoxLayout( lay, 5 ); + TQHBoxLayout* hbox = new TQHBoxLayout( lay, 5 ); m_filetypes = new KComboBox( plainPage(), "combo" ); hbox->addWidget(m_filetypes); - m_addToProject = new QCheckBox( i18n("Add to project (on checkbox)", "&Add to project"), plainPage(), "addproject" ); + m_addToProject = new TQCheckBox( i18n("Add to project (on checkbox)", "&Add to project"), plainPage(), "addproject" ); hbox->addWidget(m_addToProject); lay->addStretch(20); @@ -62,19 +62,19 @@ namespace FileCreate { m_addToProject->setChecked( true ); m_urlreq->setMode((int) KFile::Directory); - connect( m_filename, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotFileNameChanged(const QString & ) ) ); + connect( m_filename, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotFileNameChanged(const TQString & ) ) ); slotFileNameChanged( m_filename->text() ); } NewFileChooser::~NewFileChooser() { } - void NewFileChooser::slotFileNameChanged(const QString & _text) + void NewFileChooser::slotFileNameChanged(const TQString & _text) { enableButtonOK( !_text.isEmpty() ); } - void NewFileChooser::setFileTypes(QPtrList<FileType> filetypes) { + void NewFileChooser::setFileTypes(TQPtrList<FileType> filetypes) { for(FileType * filetype = filetypes.first(); filetype; filetype=filetypes.next()) { @@ -84,7 +84,7 @@ namespace FileCreate { if (filetype->subtypes().count()==0) addType(filetype); - QPtrList<FileType> subtypes = filetype->subtypes(); + TQPtrList<FileType> subtypes = filetype->subtypes(); for(FileType * subtype = subtypes.first(); subtype; subtype=subtypes.next()) { @@ -118,12 +118,12 @@ namespace FileCreate { void NewFileChooser::addType(const FileType * filetype) { m_typeInCombo[m_filetypes->count()]=filetype; m_filetypes->insertItem( filetype->name() + - (filetype->ext()!="" ? QString(" (." + filetype->ext() + ")") : QString("") ) ); + (filetype->ext()!="" ? TQString(" (." + filetype->ext() + ")") : TQString("") ) ); } void NewFileChooser::setCurrent(const FileType *filetype) { int changeToRow = -1; - QMap<int,const FileType*>::Iterator it; + TQMap<int,const FileType*>::Iterator it; for ( it = m_typeInCombo.begin(); it != m_typeInCombo.end() && changeToRow==-1; ++it ) { if (it.data()==filetype) changeToRow=it.key(); @@ -131,11 +131,11 @@ namespace FileCreate { if (changeToRow>-1) m_filetypes->setCurrentItem(changeToRow); } - void NewFileChooser::setDirectory(const QString & url) { + void NewFileChooser::setDirectory(const TQString & url) { m_urlreq->setURL(url); } - void NewFileChooser::setName(const QString & name) { + void NewFileChooser::setName(const TQString & name) { m_filename->setText(name); } @@ -147,9 +147,9 @@ namespace FileCreate { void NewFileChooser::accept() { - QString fullPath = url().path(); + TQString fullPath = url().path(); if ( !selectedType()->ext().isEmpty() && !fullPath.endsWith("." + selectedType()->ext())) fullPath+="." + selectedType()->ext(); - QFileInfo file( fullPath ); + TQFileInfo file( fullPath ); if ( file.exists() ) { KMessageBox::sorry( this, i18n("A file with this name already exists"), i18n("File Exists") ); |