summaryrefslogtreecommitdiffstats
path: root/parts/filecreate
diff options
context:
space:
mode:
Diffstat (limited to 'parts/filecreate')
-rw-r--r--parts/filecreate/addglobaldlg.cpp42
-rw-r--r--parts/filecreate/addglobaldlg.h18
-rw-r--r--parts/filecreate/fcconfigwidget.cpp242
-rw-r--r--parts/filecreate/fcconfigwidget.h26
-rw-r--r--parts/filecreate/fctemplateedit.cpp8
-rw-r--r--parts/filecreate/fctemplateedit.h4
-rw-r--r--parts/filecreate/fctemplateeditbase.ui.h6
-rw-r--r--parts/filecreate/fctypeedit.cpp8
-rw-r--r--parts/filecreate/fctypeedit.h2
-rw-r--r--parts/filecreate/fctypeeditbase.ui.h6
-rw-r--r--parts/filecreate/filecreate_filedialog.cpp18
-rw-r--r--parts/filecreate/filecreate_filedialog.h12
-rw-r--r--parts/filecreate/filecreate_filetype.h44
-rw-r--r--parts/filecreate/filecreate_listitem.cpp20
-rw-r--r--parts/filecreate/filecreate_listitem.h10
-rw-r--r--parts/filecreate/filecreate_newfile.cpp48
-rw-r--r--parts/filecreate/filecreate_newfile.h20
-rw-r--r--parts/filecreate/filecreate_part.cpp142
-rw-r--r--parts/filecreate/filecreate_part.h36
-rw-r--r--parts/filecreate/filecreate_typechoosersig.h6
-rw-r--r--parts/filecreate/filecreate_widget2.cpp34
-rw-r--r--parts/filecreate/filecreate_widget2.h10
-rw-r--r--parts/filecreate/filecreate_widget3.cpp20
-rw-r--r--parts/filecreate/filecreate_widget3.h8
24 files changed, 395 insertions, 395 deletions
diff --git a/parts/filecreate/addglobaldlg.cpp b/parts/filecreate/addglobaldlg.cpp
index 0757d220..11a0f2a6 100644
--- a/parts/filecreate/addglobaldlg.cpp
+++ b/parts/filecreate/addglobaldlg.cpp
@@ -10,13 +10,13 @@
#include "addglobaldlg.h"
-#include <qvariant.h>
-#include <qheader.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqvariant.h>
+#include <tqheader.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
@@ -27,21 +27,21 @@
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-AddGlobalDlg::AddGlobalDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl )
+AddGlobalDlg::AddGlobalDlg( TQWidget* parent, const char* name, bool modal, WFlags fl )
+ : TQDialog( parent, name, modal, fl )
{
if ( !name )
setName( "AddGlobalDlg" );
setSizeGripEnabled( TRUE );
- AddGlobalDlgLayout = new QGridLayout( this, 1, 1, 11, 6, "AddGlobalDlgLayout");
+ AddGlobalDlgLayout = new TQGridLayout( this, 1, 1, 11, 6, "AddGlobalDlgLayout");
- Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
+ Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1");
buttonHelp = new KPushButton( this, "buttonHelp" );
buttonHelp->setAutoDefault( TRUE );
Layout1->addWidget( buttonHelp );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Layout1->addItem( spacer );
buttonOk = new KPushButton( this, "buttonOk" );
@@ -55,24 +55,24 @@ AddGlobalDlg::AddGlobalDlg( QWidget* parent, const char* name, bool modal, WFlag
AddGlobalDlgLayout->addLayout( Layout1, 1, 0 );
- fcglobal_view = new QListView( this, "fcglobal_view" );
+ fcglobal_view = new TQListView( this, "fcglobal_view" );
fcglobal_view->addColumn( i18n( "Type Extension" ) );
fcglobal_view->addColumn( i18n( "Type Name" ) );
fcglobal_view->addColumn( i18n( "Template Location" ) );
fcglobal_view->addColumn( i18n( "Icon" ) );
fcglobal_view->addColumn( i18n( "Description" ) );
- fcglobal_view->setResizePolicy( QListView::AutoOne );
+ fcglobal_view->setResizePolicy( TQListView::AutoOne );
fcglobal_view->setAllColumnsShowFocus( TRUE );
fcglobal_view->setRootIsDecorated( TRUE );
- fcglobal_view->setResizeMode( QListView::AllColumns );
+ fcglobal_view->setResizeMode( TQListView::AllColumns );
AddGlobalDlgLayout->addWidget( fcglobal_view, 0, 0 );
languageChange();
- resize( QSize(511, 282).expandedTo(minimumSizeHint()) );
+ resize( TQSize(511, 282).expandedTo(minimumSizeHint()) );
// signals and slots connections
- connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+ connect( buttonOk, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) );
+ connect( buttonCancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) );
}
/*
@@ -91,11 +91,11 @@ void AddGlobalDlg::languageChange()
{
setCaption( i18n( "Select Global File Types" ) );
buttonHelp->setGuiItem( KStdGuiItem::help() );
- buttonHelp->setAccel( QKeySequence( tr2i18n( "F1" ) ) );
+ buttonHelp->setAccel( TQKeySequence( tr2i18n( "F1" ) ) );
buttonOk->setGuiItem( KStdGuiItem::ok() );
- buttonOk->setAccel( QKeySequence( QString::null ) );
+ buttonOk->setAccel( TQKeySequence( TQString::null ) );
buttonCancel->setGuiItem( KStdGuiItem::cancel() );
- buttonCancel->setAccel( QKeySequence( QString::null ) );
+ buttonCancel->setAccel( TQKeySequence( TQString::null ) );
fcglobal_view->header()->setLabel( 0, i18n( "Type extension:" ) );
fcglobal_view->header()->setLabel( 1, i18n( "Type name:" ) );
fcglobal_view->header()->setLabel( 2, i18n( "Template location:" ) );
diff --git a/parts/filecreate/addglobaldlg.h b/parts/filecreate/addglobaldlg.h
index 0ec8e588..55660853 100644
--- a/parts/filecreate/addglobaldlg.h
+++ b/parts/filecreate/addglobaldlg.h
@@ -10,8 +10,8 @@
#ifndef ADDGLOBALDLG_H
#define ADDGLOBALDLG_H
-#include <qvariant.h>
-#include <qdialog.h>
+#include <tqvariant.h>
+#include <tqdialog.h>
class QVBoxLayout;
class QHBoxLayout;
@@ -25,17 +25,17 @@ class AddGlobalDlg : public QDialog
Q_OBJECT
public:
- AddGlobalDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ AddGlobalDlg( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~AddGlobalDlg();
- QPushButton* buttonHelp;
- QPushButton* buttonOk;
- QPushButton* buttonCancel;
- QListView* fcglobal_view;
+ TQPushButton* buttonHelp;
+ TQPushButton* buttonOk;
+ TQPushButton* buttonCancel;
+ TQListView* fcglobal_view;
protected:
- QGridLayout* AddGlobalDlgLayout;
- QHBoxLayout* Layout1;
+ TQGridLayout* AddGlobalDlgLayout;
+ TQHBoxLayout* Layout1;
protected slots:
virtual void languageChange();
diff --git a/parts/filecreate/fcconfigwidget.cpp b/parts/filecreate/fcconfigwidget.cpp
index 480d38e0..df4963fa 100644
--- a/parts/filecreate/fcconfigwidget.cpp
+++ b/parts/filecreate/fcconfigwidget.cpp
@@ -8,17 +8,17 @@
* (at your option) any later version. *
***************************************************************************/
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qtabwidget.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qcheckbox.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqtabwidget.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqcheckbox.h>
#include <klineedit.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kstandarddirs.h>
#include <kio/netaccess.h>
@@ -39,7 +39,7 @@
#include "kdevpartcontroller.h"
-FCConfigWidget::FCConfigWidget(FileCreatePart * part, bool global, QWidget *parent, const char *name):
+FCConfigWidget::FCConfigWidget(FileCreatePart * part, bool global, TQWidget *parent, const char *name):
FCConfigWidgetBase(parent, name), m_part(part), m_global(global)
{
fc_view->setSorting(-1, FALSE);
@@ -82,16 +82,16 @@ void FCConfigWidget::accept()
m_part->m_filetypes.clear();
m_part->slotProjectOpened();
- for (QValueList<KURL>::iterator it = urlsToEdit.begin(); it != urlsToEdit.end(); ++it )
+ for (TQValueList<KURL>::iterator it = urlsToEdit.begin(); it != urlsToEdit.end(); ++it )
{
m_part->partController()->editDocument(*it);
}
}
-void FCConfigWidget::loadGlobalConfig(QListView *view, bool checkmarks)
+void FCConfigWidget::loadGlobalConfig(TQListView *view, bool checkmarks)
{
- QString globalXMLFile = ::locate("data", "kdevfilecreate/template-info.xml");
- QDomDocument globalDom;
+ TQString globalXMLFile = ::locate("data", "kdevfilecreate/template-info.xml");
+ TQDomDocument globalDom;
if (!globalXMLFile.isNull() &&
DomUtil::openDOMFile(globalDom,globalXMLFile)) {
m_part->readTypes(globalDom, m_globalfiletypes, false);
@@ -102,55 +102,55 @@ void FCConfigWidget::loadGlobalConfig(QListView *view, bool checkmarks)
if (checkmarks)
{
- QDomElement useGlobalTypes =
+ TQDomElement useGlobalTypes =
DomUtil::elementByPath(*(m_part->projectDom()),"/kdevfilecreate/useglobaltypes");
- for(QDomNode node = useGlobalTypes.firstChild(); !node.isNull();node=node.nextSibling())
+ for(TQDomNode node = useGlobalTypes.firstChild(); !node.isNull();node=node.nextSibling())
{
if (node.isElement() && node.nodeName()=="type")
{
- QDomElement element = node.toElement();
- QString ext = element.attribute("ext");
- QString subtyperef = element.attribute("subtyperef");
+ TQDomElement element = node.toElement();
+ TQString ext = element.attribute("ext");
+ TQString subtyperef = element.attribute("subtyperef");
if (subtyperef.isNull())
{
- QListViewItem *it = view->findItem(ext, 0);
+ TQListViewItem *it = view->findItem(ext, 0);
if (it)
{
- ((QCheckListItem*)it)->setOn(true);
+ ((TQCheckListItem*)it)->setOn(true);
- QListViewItem *lastChild = it->firstChild();
+ TQListViewItem *lastChild = it->firstChild();
while ( lastChild )
{
- ((QCheckListItem*)lastChild)->setOn(true);
+ ((TQCheckListItem*)lastChild)->setOn(true);
lastChild = lastChild->nextSibling();
}
}
}
else
{
- QListViewItem *it = view->findItem(subtyperef, 0);
+ TQListViewItem *it = view->findItem(subtyperef, 0);
if (it)
- ((QCheckListItem*)it)->setOn(true);
+ ((TQCheckListItem*)it)->setOn(true);
}
}
}
}
}
-void FCConfigWidget::loadProjectConfig(QListView *view)
+void FCConfigWidget::loadProjectConfig(TQListView *view)
{
m_part->readTypes( *(m_part->projectDom()), m_projectfiletypes, false );
loadFileTypes(m_projectfiletypes, view, false);
}
-void FCConfigWidget::loadProjectTemplates(QListView *view)
+void FCConfigWidget::loadProjectTemplates(TQListView *view)
{
- QDir templDir( m_part->project()->projectDirectory() + "/templates/" );
- templDir.setFilter( QDir::Files );
+ TQDir templDir( m_part->project()->projectDirectory() + "/templates/" );
+ templDir.setFilter( TQDir::Files );
const QFileInfoList * list = templDir.entryInfoList();
if( list ){
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( (fi = it.current()) != 0 ) {
FileType * filetype;
filetype = new FileType;
@@ -168,19 +168,19 @@ void FCConfigWidget::loadProjectTemplates(QListView *view)
void FCConfigWidget::saveGlobalConfig()
{
- QDomDocument globalDom;
- QDomElement element = globalDom.createElement("kdevelop" );
+ TQDomDocument globalDom;
+ TQDomElement element = globalDom.createElement("kdevelop" );
globalDom.appendChild(element);
- QDomElement apPart = globalDom.createElement("kdevfilecreate");
+ TQDomElement apPart = globalDom.createElement("kdevfilecreate");
element.appendChild(apPart);
- QDomElement fileTypes = globalDom.createElement( "filetypes" );
+ TQDomElement fileTypes = globalDom.createElement( "filetypes" );
apPart.appendChild( fileTypes );
saveConfiguration(globalDom, fileTypes, true);
- QFile config( KGlobal::dirs()->saveLocation("data", "kdevfilecreate/", true) + "template-info.xml" );
+ TQFile config( KGlobal::dirs()->saveLocation("data", "kdevfilecreate/", true) + "template-info.xml" );
config.open(IO_WriteOnly | IO_Truncate);
- QTextStream stream(&config);
+ TQTextStream stream(&config);
stream << "<?xml version = '1.0'?>";
stream << globalDom.toString();
config.close();
@@ -188,9 +188,9 @@ void FCConfigWidget::saveGlobalConfig()
void FCConfigWidget::saveProjectConfig()
{
- QDomDocument dom = *m_part->projectDom( );
- QDomElement element = dom.documentElement( );
- QDomElement apPart = element.namedItem( "kdevfilecreate" ).toElement( );
+ TQDomDocument dom = *m_part->projectDom( );
+ TQDomElement element = dom.documentElement( );
+ TQDomElement apPart = element.namedItem( "kdevfilecreate" ).toElement( );
if( apPart.isNull( ) )
{
apPart = dom.createElement( "kdevfilecreate" );
@@ -200,7 +200,7 @@ void FCConfigWidget::saveProjectConfig()
// project template configuration
- QDomElement projectTypes = apPart.namedItem( "filetypes" ).toElement( );
+ TQDomElement projectTypes = apPart.namedItem( "filetypes" ).toElement( );
apPart.removeChild(projectTypes);
projectTypes = dom.createElement( "filetypes" );
apPart.appendChild( projectTypes );
@@ -210,32 +210,32 @@ void FCConfigWidget::saveProjectConfig()
// global template usage
- QDomElement globalTypes = apPart.namedItem( "useglobaltypes" ).toElement( );
+ TQDomElement globalTypes = apPart.namedItem( "useglobaltypes" ).toElement( );
apPart.removeChild(globalTypes);
globalTypes = dom.createElement( "useglobaltypes" );
apPart.appendChild( globalTypes );
- QListViewItemIterator it( fcglobal_view );
+ TQListViewItemIterator it( fcglobal_view );
for( ; it.current( ); ++it ){
if (!it.current()->parent())
{
- QCheckListItem *chit = dynamic_cast<QCheckListItem*>(it.current());
+ TQCheckListItem *chit = dynamic_cast<TQCheckListItem*>(it.current());
if ( !chit ) continue;
if (chit->isOn())
{
- QDomElement type = dom.createElement( "type" );
+ TQDomElement type = dom.createElement( "type" );
type.setAttribute( "ext", chit->text(0) );
globalTypes.appendChild( type );
}
else
{
- QListViewItem *lastChild = chit->firstChild();
+ TQListViewItem *lastChild = chit->firstChild();
while ( lastChild )
{
- QCheckListItem *chsit = dynamic_cast<QCheckListItem*>(lastChild);
+ TQCheckListItem *chsit = dynamic_cast<TQCheckListItem*>(lastChild);
if ( (chsit) && (chsit->isOn()))
{
- QDomElement type = dom.createElement( "type" );
+ TQDomElement type = dom.createElement( "type" );
type.setAttribute( "ext", chit->text(0) );
type.setAttribute( "subtyperef", chsit->text(0) );
globalTypes.appendChild( type );
@@ -251,15 +251,15 @@ void FCConfigWidget::saveProjectConfig()
// project template files
//check for new templates and those with location changed
- QListViewItemIterator it2(fctemplates_view);
+ TQListViewItemIterator it2(fctemplates_view);
while (it2.current())
{
if (!it2.current()->text(1).isEmpty())
{
- QString dest;
+ TQString dest;
dest = m_part->project()->projectDirectory() + "/templates/";
if (it2.current()->text(1) == "create")
- copyTemplate(QString::null, dest, it2.current()->text(0));
+ copyTemplate(TQString::null, dest, it2.current()->text(0));
else
copyTemplate(it2.current()->text(1), dest, it2.current()->text(0));
}
@@ -267,13 +267,13 @@ void FCConfigWidget::saveProjectConfig()
}
}
-void FCConfigWidget::saveConfiguration(QDomDocument &dom, QDomElement &element, bool global)
+void FCConfigWidget::saveConfiguration(TQDomDocument &dom, TQDomElement &element, bool global)
{
- QListViewItemIterator it( fc_view );
+ TQListViewItemIterator it( fc_view );
for( ; it.current( ); ++it ){
if (!it.current()->parent())
{
- QDomElement type = dom.createElement( "type" );
+ TQDomElement type = dom.createElement( "type" );
type.setAttribute( "ext", it.current()->text(0) );
type.setAttribute( "name", it.current()->text(1) );
if (it.current()->childCount() > 0)
@@ -282,47 +282,47 @@ void FCConfigWidget::saveConfiguration(QDomDocument &dom, QDomElement &element,
type.setAttribute( "create", "template");
type.setAttribute( "icon", it.current()->text(2) );
- QDomElement edescr = dom.createElement("descr");
+ TQDomElement edescr = dom.createElement("descr");
type.appendChild(edescr);
- QDomText descr = dom.createTextNode( it.current()->text(3) );
+ TQDomText descr = dom.createTextNode( it.current()->text(3) );
edescr.appendChild(descr);
if (!it.current()->text(4).isEmpty())
{
- QString dest;
+ TQString dest;
if (global)
dest = KGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true);
else
dest = m_part->project()->projectDirectory() + "/templates/";
if (it.current()->text(4) == "create")
- copyTemplate(QString::null, dest, it.current()->text(0));
+ copyTemplate(TQString::null, dest, it.current()->text(0));
else
copyTemplate(it.current()->text(4), dest, it.current()->text(0));
}
- QListViewItem *lastChild = it.current()->firstChild();
+ TQListViewItem *lastChild = it.current()->firstChild();
while ( lastChild )
{
- QDomElement subtype = dom.createElement( "subtype" );
+ TQDomElement subtype = dom.createElement( "subtype" );
subtype.setAttribute( "ref", lastChild->text(0) );
subtype.setAttribute( "name", lastChild->text(1) );
subtype.setAttribute( "icon", lastChild->text(2) );
- QDomElement edescr = dom.createElement("descr");
+ TQDomElement edescr = dom.createElement("descr");
subtype.appendChild(edescr);
- QDomText descr = dom.createTextNode( lastChild->text(3) );
+ TQDomText descr = dom.createTextNode( lastChild->text(3) );
edescr.appendChild(descr);
if (!lastChild->text(4).isEmpty())
{
- QString dest;
+ TQString dest;
if (global)
dest = KGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true);
else
dest = m_part->project()->projectDirectory() + "/templates/";
if (lastChild->text(4) == "create")
- copyTemplate(QString::null, dest, it.current()->text(0) + "-" + lastChild->text(0));
+ copyTemplate(TQString::null, dest, it.current()->text(0) + "-" + lastChild->text(0));
else
copyTemplate(lastChild->text(4), dest, it.current()->text(0) + "-" + lastChild->text(0));
}
@@ -336,15 +336,15 @@ void FCConfigWidget::saveConfiguration(QDomDocument &dom, QDomElement &element,
}
}
-void FCConfigWidget::copyTemplate(QString templateUrl, QString dest, QString destName)
+void FCConfigWidget::copyTemplate(TQString templateUrl, TQString dest, TQString destName)
{
if (templateUrl.isEmpty())
{
- QDir d(dest);
+ TQDir d(dest);
if (!d.exists())
d.mkdir(dest);
- QFile f(dest + destName);
+ TQFile f(dest + destName);
f.open(IO_WriteOnly);
f.close();
}
@@ -362,7 +362,7 @@ void FCConfigWidget::copyTemplate(QString templateUrl, QString dest, QString des
}
}
-void FCConfigWidget::loadFileTypes(QPtrList<FileCreate::FileType> list, QListView *view, bool checkmarks)
+void FCConfigWidget::loadFileTypes(TQPtrList<FileCreate::FileType> list, TQListView *view, bool checkmarks)
{
FileType *ft;
@@ -371,11 +371,11 @@ void FCConfigWidget::loadFileTypes(QPtrList<FileCreate::FileType> list, QListVie
{
if ( (ft = list.at(i)) )
{
- QListViewItem *it;
+ TQListViewItem *it;
if (!checkmarks)
- it = new QListViewItem(view);
+ it = new TQListViewItem(view);
else
- it = new QCheckListItem(view, "", QCheckListItem::CheckBox);
+ it = new TQCheckListItem(view, "", TQCheckListItem::CheckBox);
it->setText(0, ft->ext());
it->setText(1, ft->name());
@@ -388,11 +388,11 @@ void FCConfigWidget::loadFileTypes(QPtrList<FileCreate::FileType> list, QListVie
{
if ( (sft = ft->subtypes().at(j)) )
{
- QListViewItem *sit;
+ TQListViewItem *sit;
if (!checkmarks)
- sit = new QListViewItem(it);
+ sit = new TQListViewItem(it);
else
- sit = new QCheckListItem(it, "", QCheckListItem::CheckBox);
+ sit = new TQCheckListItem(it, "", TQCheckListItem::CheckBox);
sit->setText(0, sft->subtypeRef());
sit->setText(1, sft->name());
@@ -412,7 +412,7 @@ void FCConfigWidget::removetemplate_button_clicked( )
KURL removedTemplate;
removedTemplate.setPath(m_part->project()->projectDirectory() + "/templates/" + fctemplates_view->currentItem()->text(0));
KIO::NetAccess::del(removedTemplate);
- QListViewItem *it = fctemplates_view->currentItem();
+ TQListViewItem *it = fctemplates_view->currentItem();
if (it->itemBelow())
{
fc_view->setSelected(it->itemBelow(), true);
@@ -429,49 +429,49 @@ void FCConfigWidget::removetemplate_button_clicked( )
void FCConfigWidget::copyToProject_button_clicked()
{
- QListViewItem *it = fcglobal_view->currentItem();
+ TQListViewItem *it = fcglobal_view->currentItem();
if (it)
{
- QListViewItem *it_copy_parent = 0;
- QString destParent;
+ TQListViewItem *it_copy_parent = 0;
+ TQString destParent;
if (it->parent())
{
- it_copy_parent = new QListViewItem(fc_view, it->parent()->text(0),
+ it_copy_parent = new TQListViewItem(fc_view, it->parent()->text(0),
it->parent()->text(1),
it->parent()->text(2),
it->parent()->text(3),
locate("data", "kdevfilecreate/file-templates/"+ it->parent()->text(0)));
destParent += it->parent()->text(0) + "-";
- QCheckListItem *chk = dynamic_cast<QCheckListItem*>(it->parent());
+ TQCheckListItem *chk = dynamic_cast<TQCheckListItem*>(it->parent());
if (chk)
chk->setOn(false);
}
- QListViewItem *it_copy = 0;
+ TQListViewItem *it_copy = 0;
if (it_copy_parent)
- it_copy = new QListViewItem(it_copy_parent, it->text(0),
+ it_copy = new TQListViewItem(it_copy_parent, it->text(0),
it->text(1),
it->text(2),
it->text(3),
locate("data", "kdevfilecreate/file-templates/"+destParent + it->text(0)));
else
- it_copy = new QListViewItem(fc_view, it->text(0),
+ it_copy = new TQListViewItem(fc_view, it->text(0),
it->text(1),
it->text(2),
it->text(3),
locate("data", "kdevfilecreate/file-templates/" +destParent+ it->text(0)));
- QCheckListItem *chk = dynamic_cast<QCheckListItem*>(it);
+ TQCheckListItem *chk = dynamic_cast<TQCheckListItem*>(it);
if (chk)
chk->setOn(false);
fc_view->setSelected(it_copy, true);
fc_view->setCurrentItem(it_copy);
- QListViewItem * it_child = it->firstChild();
+ TQListViewItem * it_child = it->firstChild();
while( it_child ) {
- new QListViewItem(it_copy, it_child->text(0),
+ new TQListViewItem(it_copy, it_child->text(0),
it_child->text(1),
it_child->text(2),
it_child->text(3),
locate("data", "kdevfilecreate/file-templates/"+ it_copy->text(0) + "-" + it_child->text(0)));
- QCheckListItem *chk_child = dynamic_cast<QCheckListItem*>(it_child);
+ TQCheckListItem *chk_child = dynamic_cast<TQCheckListItem*>(it_child);
if (chk_child)
chk_child->setOn(false);
it_child = it_child->nextSibling();
@@ -482,13 +482,13 @@ void FCConfigWidget::copyToProject_button_clicked()
void FCConfigWidget::newtype_button_clicked()
{
FCTypeEdit *te = new FCTypeEdit();
- if (te->exec() == QDialog::Accepted )
+ if (te->exec() == TQDialog::Accepted )
{
- QListViewItem *it = new QListViewItem(fc_view, te->typeext_edit->text(),
+ TQListViewItem *it = new TQListViewItem(fc_view, te->typeext_edit->text(),
te->typename_edit->text(),
te->icon_url->icon(),
te->typedescr_edit->text(),
- te->template_url->url().isEmpty() ? QString("create") : te->template_url->url());
+ te->template_url->url().isEmpty() ? TQString("create") : te->template_url->url());
fc_view->setSelected(it, true);
fc_view->setCurrentItem(it);
}
@@ -500,14 +500,14 @@ void FCConfigWidget::newsubtype_button_clicked()
if (fc_view->currentItem() && (!fc_view->currentItem()->parent()))
{
FCTypeEdit *te = new FCTypeEdit(this);
- if (te->exec() == QDialog::Accepted )
+ if (te->exec() == TQDialog::Accepted )
{
- /*QListViewItem *it =*/(void) new QListViewItem(fc_view->currentItem(),
+ /*TQListViewItem *it =*/(void) new TQListViewItem(fc_view->currentItem(),
te->typeext_edit->text(),
te->typename_edit->text(),
te->icon_url->icon(),
te->typedescr_edit->text(),
- te->template_url->url().isEmpty() ? QString("create") : te->template_url->url());
+ te->template_url->url().isEmpty() ? TQString("create") : te->template_url->url());
fc_view->currentItem()->setOpen(true);
}
delete te;
@@ -518,7 +518,7 @@ void FCConfigWidget::remove_button_clicked()
{
if (fc_view->currentItem())
{
- QListViewItem *it = fc_view->currentItem();
+ TQListViewItem *it = fc_view->currentItem();
if (it->itemBelow())
{
fc_view->setSelected(it->itemBelow(), true);
@@ -536,12 +536,12 @@ void FCConfigWidget::remove_button_clicked()
void FCConfigWidget::moveup_button_clicked()
{
- QListViewItem *i = fc_view->currentItem();
+ TQListViewItem *i = fc_view->currentItem();
if ( !i )
return;
- QListViewItemIterator it( i );
- QListViewItem *parent = i->parent();
+ TQListViewItemIterator it( i );
+ TQListViewItem *parent = i->parent();
--it;
while ( it.current() ) {
if ( it.current()->parent() == parent )
@@ -551,7 +551,7 @@ void FCConfigWidget::moveup_button_clicked()
if ( !it.current() )
return;
- QListViewItem *other = it.current();
+ TQListViewItem *other = it.current();
other->moveItem( i );
}
@@ -559,12 +559,12 @@ void FCConfigWidget::moveup_button_clicked()
void FCConfigWidget::movedown_button_clicked()
{
- QListViewItem *i = fc_view->currentItem();
+ TQListViewItem *i = fc_view->currentItem();
if ( !i )
return;
- QListViewItemIterator it( i );
- QListViewItem *parent = i->parent();
+ TQListViewItemIterator it( i );
+ TQListViewItem *parent = i->parent();
it++;
while ( it.current() ) {
if ( it.current()->parent() == parent )
@@ -574,7 +574,7 @@ void FCConfigWidget::movedown_button_clicked()
if ( !it.current() )
return;
- QListViewItem *other = it.current();
+ TQListViewItem *other = it.current();
i->moveItem( other );
}
@@ -582,7 +582,7 @@ void FCConfigWidget::movedown_button_clicked()
void FCConfigWidget::edittype_button_clicked()
{
- QListViewItem *it = fc_view->currentItem();
+ TQListViewItem *it = fc_view->currentItem();
if ( it )
{
FCTypeEdit *te = new FCTypeEdit(this);
@@ -594,7 +594,7 @@ void FCConfigWidget::edittype_button_clicked()
if (it->text(4) != "create")
te->template_url->setURL(it->text(4));
- if (te->exec() == QDialog::Accepted )
+ if (te->exec() == TQDialog::Accepted )
{
it->setText(0, te->typeext_edit->text());
it->setText(1, te->typename_edit->text());
@@ -612,23 +612,23 @@ void FCConfigWidget::edittype_button_clicked()
void FCConfigWidget::newtemplate_button_clicked()
{
FCTemplateEdit *te = new FCTemplateEdit;
- if (te->exec() == QDialog::Accepted)
+ if (te->exec() == TQDialog::Accepted)
{
- /*QListViewItem *it =*/(void) new QListViewItem(fctemplates_view, te->templatename_edit->text(),
- te->template_url->url().isEmpty() ? QString("create") : te->template_url->url());
+ /*TQListViewItem *it =*/(void) new TQListViewItem(fctemplates_view, te->templatename_edit->text(),
+ te->template_url->url().isEmpty() ? TQString("create") : te->template_url->url());
}
}
void FCConfigWidget::edittemplate_button_clicked()
{
- QListViewItem *it;
+ TQListViewItem *it;
if ( (it = fctemplates_view->currentItem()) )
{
FCTemplateEdit *te = new FCTemplateEdit;
te->templatename_edit->setText(it->text(0));
te->templatename_edit->setEnabled(false);
- if (te->exec() == QDialog::Accepted)
+ if (te->exec() == TQDialog::Accepted)
{
if ((te->template_url->url() == "") && ((it->text(1) == "create")))
it->setText(1, "create");
@@ -642,14 +642,14 @@ void FCConfigWidget::edit_template_content_button_clicked( )
{
if (fctemplates_view->currentItem())
{
- QFileInfo fi(m_part->project()->projectDirectory() + "/templates/" + fctemplates_view->currentItem()->text(0));
+ TQFileInfo fi(m_part->project()->projectDirectory() + "/templates/" + fctemplates_view->currentItem()->text(0));
KURL content;
content.setPath(m_part->project()->projectDirectory() + "/templates/" + fctemplates_view->currentItem()->text(0));
if (fi.exists())
m_part->partController()->editDocument(content);
else
{
- KMessageBox::information(this, i18n("Requested template does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), QString::null, "Edit template content warning");
+ KMessageBox::information(this, i18n("Requested template does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), TQString::null, "Edit template content warning");
fctemplates_view->currentItem()->setPixmap(0, SmallIcon("edit"));
urlsToEdit.append(content);
}
@@ -660,13 +660,13 @@ void FCConfigWidget::edit_type_content_button_clicked( )
{
if (!fc_view->currentItem())
return;
- QListViewItem *it = fc_view->currentItem();
- QString type_name = it->text(0);
+ TQListViewItem *it = fc_view->currentItem();
+ TQString type_name = it->text(0);
if (it->parent())
type_name.prepend(it->parent()->text(0) + "-");
if (!m_global)
{
- QString typePath = m_part->project()->projectDirectory() + "/templates/" + type_name;
+ TQString typePath = m_part->project()->projectDirectory() + "/templates/" + type_name;
KURL content;
content.setPath(typePath);
if (it->text(4).isEmpty())
@@ -674,22 +674,22 @@ void FCConfigWidget::edit_type_content_button_clicked( )
else
{
if (it->text(4) == "create")
- KMessageBox::information(this, i18n("Template for the selected file type does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), QString::null, "Edit type template content warning");
+ KMessageBox::information(this, i18n("Template for the selected file type does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), TQString::null, "Edit type template content warning");
else
- KMessageBox::information(this, i18n("Template for the selected file type has been changed.\nIt will be opened immediately after accepting the configuration dialog."), QString::null, "Edit type template content warning");
+ KMessageBox::information(this, i18n("Template for the selected file type has been changed.\nIt will be opened immediately after accepting the configuration dialog."), TQString::null, "Edit type template content warning");
fc_view->currentItem()->setPixmap(0, SmallIcon("edit"));
urlsToEdit.append(content);
}
}
else
{
- QString dest = KGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true);
- QString typePath = dest + type_name;
+ TQString dest = KGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true);
+ TQString typePath = dest + type_name;
KURL content;
content.setPath(typePath);
if (it->text(4).isEmpty())
{
- QFileInfo fi(dest+type_name);
+ TQFileInfo fi(dest+type_name);
if (!fi.exists())
copyTemplate(locate("data", "kdevfilecreate/file-templates/" + type_name), dest, type_name);
m_part->partController()->editDocument(content);
@@ -697,9 +697,9 @@ void FCConfigWidget::edit_type_content_button_clicked( )
else
{
if (it->text(4) == "create")
- KMessageBox::information(this, i18n("Template for the selected file type does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), QString::null, "Edit global type template content warning");
+ KMessageBox::information(this, i18n("Template for the selected file type does not exist yet.\nIt will be opened immediately after accepting the configuration dialog."), TQString::null, "Edit global type template content warning");
else
- KMessageBox::information(this, i18n("Template for the selected file type has been changed.\nIt will be opened immediately after accepting the configuration dialog."), QString::null, "Edit global type template content warning");
+ KMessageBox::information(this, i18n("Template for the selected file type has been changed.\nIt will be opened immediately after accepting the configuration dialog."), TQString::null, "Edit global type template content warning");
fc_view->currentItem()->setPixmap(0, SmallIcon("edit"));
urlsToEdit.append(content);
}
diff --git a/parts/filecreate/fcconfigwidget.h b/parts/filecreate/fcconfigwidget.h
index 52acd29c..c3f5b2ab 100644
--- a/parts/filecreate/fcconfigwidget.h
+++ b/parts/filecreate/fcconfigwidget.h
@@ -11,8 +11,8 @@
#ifndef FCCONFIGWIDGET_H
#define FCCONFIGWIDGET_H
-#include <qwidget.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqvaluelist.h>
#include <kurl.h>
#include "fcconfigwidgetbase.h"
@@ -30,7 +30,7 @@ class FCConfigWidget : public FCConfigWidgetBase
{
Q_OBJECT
public:
- FCConfigWidget(FileCreatePart * part, bool global, QWidget *parent, const char *name);
+ FCConfigWidget(FileCreatePart * part, bool global, TQWidget *parent, const char *name);
~FCConfigWidget();
@@ -50,23 +50,23 @@ public slots:
void edit_type_content_button_clicked();
protected:
- void loadGlobalConfig(QListView *view, bool checkmarks = false);
- void loadProjectConfig(QListView *view);
- void loadProjectTemplates(QListView *view);
+ void loadGlobalConfig(TQListView *view, bool checkmarks = false);
+ void loadProjectConfig(TQListView *view);
+ void loadProjectTemplates(TQListView *view);
void saveGlobalConfig();
void saveProjectConfig();
- void loadFileTypes(QPtrList<FileCreate::FileType> list, QListView *view, bool checkmarks = false);
- void copyTemplate(QString templateUrl, QString dest, QString destName);
- void saveConfiguration(QDomDocument &dom, QDomElement &element, bool global);
+ void loadFileTypes(TQPtrList<FileCreate::FileType> list, TQListView *view, bool checkmarks = false);
+ void copyTemplate(TQString templateUrl, TQString dest, TQString destName);
+ void saveConfiguration(TQDomDocument &dom, TQDomElement &element, bool global);
private:
FileCreatePart * m_part;
- QPtrList<FileCreate::FileType> m_globalfiletypes;
- QPtrList<FileCreate::FileType> m_projectfiletypes;
- QPtrList<FileCreate::FileType> m_projectfiletemplates;
+ TQPtrList<FileCreate::FileType> m_globalfiletypes;
+ TQPtrList<FileCreate::FileType> m_projectfiletypes;
+ TQPtrList<FileCreate::FileType> m_projectfiletemplates;
bool m_global;
- QValueList<KURL> urlsToEdit;
+ TQValueList<KURL> urlsToEdit;
};
#endif
diff --git a/parts/filecreate/fctemplateedit.cpp b/parts/filecreate/fctemplateedit.cpp
index fc495fd5..b019ddb9 100644
--- a/parts/filecreate/fctemplateedit.cpp
+++ b/parts/filecreate/fctemplateedit.cpp
@@ -9,13 +9,13 @@
***************************************************************************/
#include <klineedit.h>
#include "fctemplateedit.h"
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
-FCTemplateEdit::FCTemplateEdit(QWidget *parent, const char *name):
+FCTemplateEdit::FCTemplateEdit(TQWidget *parent, const char *name):
FCTemplateEditBase(parent, name)
{
- connect( templatename_edit, SIGNAL(textChanged ( const QString & )),
- this, SLOT( slotTemplateNameChanged( )));
+ connect( templatename_edit, TQT_SIGNAL(textChanged ( const TQString & )),
+ this, TQT_SLOT( slotTemplateNameChanged( )));
slotTemplateNameChanged();
}
diff --git a/parts/filecreate/fctemplateedit.h b/parts/filecreate/fctemplateedit.h
index 0209c3b0..8ecf7a81 100644
--- a/parts/filecreate/fctemplateedit.h
+++ b/parts/filecreate/fctemplateedit.h
@@ -11,14 +11,14 @@
#ifndef FCTEMPLATEEDIT_H
#define FCTEMPLATEEDIT_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "fctemplateeditbase.h"
class FCTemplateEdit : public FCTemplateEditBase
{
Q_OBJECT
public:
- FCTemplateEdit(QWidget *parent=0, const char *name=0);
+ FCTemplateEdit(TQWidget *parent=0, const char *name=0);
~FCTemplateEdit();
diff --git a/parts/filecreate/fctemplateeditbase.ui.h b/parts/filecreate/fctemplateeditbase.ui.h
index 6f2b9223..f4fcfa05 100644
--- a/parts/filecreate/fctemplateeditbase.ui.h
+++ b/parts/filecreate/fctemplateeditbase.ui.h
@@ -17,10 +17,10 @@
** place of a destructor.
*****************************************************************************/
-#include <qvalidator.h>
-#include <qregexp.h>
+#include <tqvalidator.h>
+#include <tqregexp.h>
void FCTemplateEditBase::init()
{
- templatename_edit->setValidator(new QRegExpValidator(QRegExp("^\\S*$"), this));
+ templatename_edit->setValidator(new TQRegExpValidator(TQRegExp("^\\S*$"), this));
}
diff --git a/parts/filecreate/fctypeedit.cpp b/parts/filecreate/fctypeedit.cpp
index 310453ea..5ee4eb0d 100644
--- a/parts/filecreate/fctypeedit.cpp
+++ b/parts/filecreate/fctypeedit.cpp
@@ -9,15 +9,15 @@
***************************************************************************/
#include <klineedit.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "fctypeedit.h"
-FCTypeEdit::FCTypeEdit(QWidget *parent, char *name)
+FCTypeEdit::FCTypeEdit(TQWidget *parent, char *name)
: FCTypeEditBase(parent, name)
{
- connect( typeext_edit, SIGNAL( textChanged ( const QString & )),this, SLOT( slotTypeEditTextChanged()));
- connect( typename_edit, SIGNAL( textChanged ( const QString & )),this, SLOT( slotTypeEditTextChanged( )));
+ connect( typeext_edit, TQT_SIGNAL( textChanged ( const TQString & )),this, TQT_SLOT( slotTypeEditTextChanged()));
+ connect( typename_edit, TQT_SIGNAL( textChanged ( const TQString & )),this, TQT_SLOT( slotTypeEditTextChanged( )));
slotTypeEditTextChanged( );
}
diff --git a/parts/filecreate/fctypeedit.h b/parts/filecreate/fctypeedit.h
index 92c34e3f..f5a9bf7b 100644
--- a/parts/filecreate/fctypeedit.h
+++ b/parts/filecreate/fctypeedit.h
@@ -18,7 +18,7 @@ class FCTypeEdit : public FCTypeEditBase
{
Q_OBJECT
public:
- FCTypeEdit(QWidget *parent = 0, char *name = 0);
+ FCTypeEdit(TQWidget *parent = 0, char *name = 0);
~FCTypeEdit();
diff --git a/parts/filecreate/fctypeeditbase.ui.h b/parts/filecreate/fctypeeditbase.ui.h
index e65a2ba7..b9ec29b5 100644
--- a/parts/filecreate/fctypeeditbase.ui.h
+++ b/parts/filecreate/fctypeeditbase.ui.h
@@ -17,10 +17,10 @@
** place of a destructor.
*****************************************************************************/
-#include <qvalidator.h>
-#include <qregexp.h>
+#include <tqvalidator.h>
+#include <tqregexp.h>
void FCTypeEditBase::init()
{
- typeext_edit->setValidator(new QRegExpValidator(QRegExp("^\\S*$"), this));
+ typeext_edit->setValidator(new TQRegExpValidator(TQRegExp("^\\S*$"), this));
}
diff --git a/parts/filecreate/filecreate_filedialog.cpp b/parts/filecreate/filecreate_filedialog.cpp
index 81d711cf..ecc8df42 100644
--- a/parts/filecreate/filecreate_filedialog.cpp
+++ b/parts/filecreate/filecreate_filedialog.cpp
@@ -10,7 +10,7 @@
#include "filecreate_filedialog.h"
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kdeversion.h>
#include <kurlcombobox.h>
#include <kdebug.h>
@@ -20,9 +20,9 @@
namespace FileCreate {
- FileDialog::FileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char *name,
- bool modal, QWidget * extraWidget) :
+ FileDialog::FileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char *name,
+ bool modal, TQWidget * extraWidget) :
KFileDialog(startDir, filter, parent, name, modal, extraWidget) {
setOperationMode(Saving);
@@ -30,8 +30,8 @@ namespace FileCreate {
m_extraWidget = extraWidget;
m_typeChooser = dynamic_cast<TypeChooser*>(extraWidget);
- connect(this, SIGNAL(filterChanged(const QString &)), this, SLOT(slotActionFilterChanged(const QString &)) );
- connect(locationEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotActionTextChanged(const QString &)) );
+ connect(this, TQT_SIGNAL(filterChanged(const TQString &)), this, TQT_SLOT(slotActionFilterChanged(const TQString &)) );
+ connect(locationEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotActionTextChanged(const TQString &)) );
}
@@ -43,13 +43,13 @@ namespace FileCreate {
KFileDialog::initGUI();
}
- void FileDialog::slotActionFilterChanged(const QString & /*filter*/) {
+ void FileDialog::slotActionFilterChanged(const TQString & /*filter*/) {
}
- void FileDialog::slotActionTextChanged(const QString & text) {
+ void FileDialog::slotActionTextChanged(const TQString & text) {
kdDebug(9034) << "slotActionTextChanged - " << text << endl;
if (!m_typeChooser) return;
- QString ext = QFileInfo(text).extension();
+ TQString ext = TQFileInfo(text).extension();
kdDebug(9034) << "Extension is: " << ext << endl;
FileType * filetype = m_typeChooser->part()->getType(ext);
if (!filetype) return;
diff --git a/parts/filecreate/filecreate_filedialog.h b/parts/filecreate/filecreate_filedialog.h
index 04e40111..b1523648 100644
--- a/parts/filecreate/filecreate_filedialog.h
+++ b/parts/filecreate/filecreate_filedialog.h
@@ -23,20 +23,20 @@ namespace FileCreate {
Q_OBJECT
public:
- FileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char *name,
- bool modal, QWidget * extraWidget);
+ FileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char *name,
+ bool modal, TQWidget * extraWidget);
virtual ~FileDialog();
virtual void initGUI();
protected:
- QWidget * m_extraWidget;
+ TQWidget * m_extraWidget;
TypeChooser * m_typeChooser;
protected slots:
- void slotActionFilterChanged(const QString & filter);
- void slotActionTextChanged(const QString & text);
+ void slotActionFilterChanged(const TQString & filter);
+ void slotActionTextChanged(const TQString & text);
};
diff --git a/parts/filecreate/filecreate_filetype.h b/parts/filecreate/filecreate_filetype.h
index 9b8e039c..4b050708 100644
--- a/parts/filecreate/filecreate_filetype.h
+++ b/parts/filecreate/filecreate_filetype.h
@@ -11,8 +11,8 @@
#ifndef __FILECREATE_FILETYPE_H__
#define __FILECREATE_FILETYPE_H__
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
namespace FileCreate {
@@ -24,37 +24,37 @@ public:
m_subtypes.setAutoDelete(true);
}
- void setName(const QString & name) { m_name = name; }
- QString name() const { return m_name; }
- void setExt(const QString & ext) { m_ext = ext; }
- QString ext() const { return m_ext; }
- void setCreateMethod(const QString & createMethod) { m_createMethod = createMethod; }
- QString createMethod() const { return m_createMethod; }
- void setSubtypeRef(const QString & subtypeRef) { m_subtypeRef = subtypeRef; }
- QString subtypeRef() const { return m_subtypeRef; }
- void setIcon(const QString & iconName) { m_iconName = iconName; }
- QString icon() const { return m_iconName; }
- void setDescr(const QString & descr) { m_descr = descr; }
- QString descr() const { return m_descr; }
+ void setName(const TQString & name) { m_name = name; }
+ TQString name() const { return m_name; }
+ void setExt(const TQString & ext) { m_ext = ext; }
+ TQString ext() const { return m_ext; }
+ void setCreateMethod(const TQString & createMethod) { m_createMethod = createMethod; }
+ TQString createMethod() const { return m_createMethod; }
+ void setSubtypeRef(const TQString & subtypeRef) { m_subtypeRef = subtypeRef; }
+ TQString subtypeRef() const { return m_subtypeRef; }
+ void setIcon(const TQString & iconName) { m_iconName = iconName; }
+ TQString icon() const { return m_iconName; }
+ void setDescr(const TQString & descr) { m_descr = descr; }
+ TQString descr() const { return m_descr; }
void setEnabled(bool on) { m_enabled = on; }
bool enabled() const { return m_enabled; }
void setSubtypesEnabled(bool enabled = true);
void addSubtype(const FileType * subtype) { m_subtypes.append(subtype); }
- QPtrList<FileType> subtypes() const { return m_subtypes; }
+ TQPtrList<FileType> subtypes() const { return m_subtypes; }
private:
- QString m_name;
- QString m_ext;
- QString m_createMethod;
- QString m_subtypeRef;
- QString m_iconName;
- QString m_descr;
+ TQString m_name;
+ TQString m_ext;
+ TQString m_createMethod;
+ TQString m_subtypeRef;
+ TQString m_iconName;
+ TQString m_descr;
bool m_enabled;
- QPtrList<FileType> m_subtypes;
+ TQPtrList<FileType> m_subtypes;
};
diff --git a/parts/filecreate/filecreate_listitem.cpp b/parts/filecreate/filecreate_listitem.cpp
index 4b33514f..b6467505 100644
--- a/parts/filecreate/filecreate_listitem.cpp
+++ b/parts/filecreate/filecreate_listitem.cpp
@@ -1,7 +1,7 @@
/***************************************************************************
* Copyright (C) 2003 by Julian Rockey *
* linux@jrockey.com *
- * thanks: Roberto Raggi for QSimpleRichText stuff *
+ * thanks: Roberto Raggi for TQSimpleRichText stuff *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -15,12 +15,12 @@
#include <kglobal.h>
#include <kiconloader.h>
-#include <qsimplerichtext.h>
-#include <qpixmap.h>
+#include <tqsimplerichtext.h>
+#include <tqpixmap.h>
namespace FileCreate {
- ListItem::ListItem(QListView * listview, const FileType * filetype) :
+ ListItem::ListItem(TQListView * listview, const FileType * filetype) :
KListViewItem(listview), m_filetype(filetype),
m_filetypeRenderer(NULL)
{
@@ -43,7 +43,7 @@ namespace FileCreate {
void ListItem::setup()
{
if (m_filetypeRenderer) delete m_filetypeRenderer;
- m_filetypeRenderer = new QSimpleRichText( text(1), listView()->font() );
+ m_filetypeRenderer = new TQSimpleRichText( text(1), listView()->font() );
m_filetypeRenderer->setWidth(listView()->columnWidth(1));
setHeight(m_filetypeRenderer->height());
KListViewItem::setup();
@@ -61,15 +61,15 @@ namespace FileCreate {
}
}
- void ListItem::paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align )
+ void ListItem::paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align )
{
- QBrush brush( isSelected() ? cg.highlight() : backgroundColor() );
+ TQBrush brush( isSelected() ? cg.highlight() : backgroundColor() );
if( column == 1 ){
// m_filetypeRenderer->setWidth(width);
// setHeight(m_filetypeRenderer->height());
- m_filetypeRenderer->draw( p, 0, 0, QRect(0, 0, width, height()), cg, &brush );
+ m_filetypeRenderer->draw( p, 0, 0, TQRect(0, 0, width, height()), cg, &brush );
return;
}
@@ -79,11 +79,11 @@ namespace FileCreate {
void ListItem::init()
{
m_iconHeight = 0;
- setText(0, m_filetype->ext()!="" ? QString("." + m_filetype->ext()) : QString("") );
+ setText(0, m_filetype->ext()!="" ? TQString("." + m_filetype->ext()) : TQString("") );
setText(1, "<qt><b>"+m_filetype->name()+"</b>. " + m_filetype->descr() );
KIconLoader * loader = KGlobal::iconLoader();
- QPixmap iconPix = loader->loadIcon(m_filetype->icon(), KIcon::Desktop,
+ TQPixmap iconPix = loader->loadIcon(m_filetype->icon(), KIcon::Desktop,
KIcon::SizeMedium,
KIcon::DefaultState, NULL,
true);
diff --git a/parts/filecreate/filecreate_listitem.h b/parts/filecreate/filecreate_listitem.h
index 3b2702d3..41651850 100644
--- a/parts/filecreate/filecreate_listitem.h
+++ b/parts/filecreate/filecreate_listitem.h
@@ -1,7 +1,7 @@
/***************************************************************************
* Copyright (C) 2003 by Julian Rockey *
* linux@jrockey.com *
- * thanks: Roberto Raggi for QSimpleRichText stuff *
+ * thanks: Roberto Raggi for TQSimpleRichText stuff *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -13,7 +13,7 @@
#define __FILECREATE_LISTITEM_H__
#include <klistview.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "filecreate_filetype.h"
@@ -24,7 +24,7 @@ namespace FileCreate {
class ListItem : public KListViewItem {
public:
- ListItem(QListView *listview, const FileType *filetype);
+ ListItem(TQListView *listview, const FileType *filetype);
ListItem(ListItem *listitem, const FileType *filetype);
virtual ~ListItem();
@@ -32,14 +32,14 @@ public:
virtual void setup();
virtual void setHeight( int height );
- virtual void paintCell( QPainter* p, const QColorGroup& gc, int column, int width, int align );
+ virtual void paintCell( TQPainter* p, const TQColorGroup& gc, int column, int width, int align );
virtual void prepareResize();
private:
const FileType *m_filetype;
int m_iconHeight;
void init();
- QSimpleRichText *m_filetypeRenderer;
+ TQSimpleRichText *m_filetypeRenderer;
};
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") );
diff --git a/parts/filecreate/filecreate_newfile.h b/parts/filecreate/filecreate_newfile.h
index 5123c7d9..54a4462e 100644
--- a/parts/filecreate/filecreate_newfile.h
+++ b/parts/filecreate/filecreate_newfile.h
@@ -10,8 +10,8 @@
#ifndef FILECREATE_NEWFILE_H
#define FILECREATE_NEWFILE_H
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
#include <kurl.h>
#include <kdialogbase.h>
@@ -27,30 +27,30 @@ namespace FileCreate {
class NewFileChooser : public KDialogBase {
Q_OBJECT
public:
- NewFileChooser(QWidget *parent=0);
+ NewFileChooser(TQWidget *parent=0);
virtual ~NewFileChooser();
- void setFileTypes(QPtrList<FileType> typelist);
+ void setFileTypes(TQPtrList<FileType> typelist);
KURL url() const;
bool addToProject() const;
const FileType *selectedType() const;
void setCurrent(const FileType *filetype);
- void setDirectory(const QString & url);
- void setName(const QString & name);
+ void setDirectory(const TQString & url);
+ void setName(const TQString & name);
void setInProjectMode(bool m);
private slots:
- void slotFileNameChanged(const QString &);
+ void slotFileNameChanged(const TQString &);
protected:
void addType(const FileType * filetype);
void accept();
- QGridLayout *m_grid;
+ TQGridLayout *m_grid;
KURLRequester *m_urlreq;
KComboBox *m_filetypes;
- QCheckBox *m_addToProject;
+ TQCheckBox *m_addToProject;
KLineEdit *m_filename;
- QMap<int,const FileType*> m_typeInCombo;
+ TQMap<int,const FileType*> m_typeInCombo;
};
diff --git a/parts/filecreate/filecreate_part.cpp b/parts/filecreate/filecreate_part.cpp
index 3733753a..e07656b9 100644
--- a/parts/filecreate/filecreate_part.cpp
+++ b/parts/filecreate/filecreate_part.cpp
@@ -9,12 +9,12 @@
***************************************************************************/
#include "filecreate_part.h"
-#include <qwhatsthis.h>
-#include <qdom.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qvbox.h>
-#include <qtimer.h>
+#include <tqwhatsthis.h>
+#include <tqdom.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
#include <kdeversion.h>
#include <kiconloader.h>
@@ -61,30 +61,30 @@ K_EXPORT_COMPONENT_FACTORY( libkdevfilecreate, FileCreateFactory( data ) )
using namespace FileCreate;
-FileCreatePart::FileCreatePart(QObject *parent, const char *name, const QStringList & )
+FileCreatePart::FileCreatePart(TQObject *parent, const char *name, const TQStringList & )
// : KDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_selectedWidget(-1), m_useSideTab(true), m_subPopups(0)
: KDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_subPopups(0)
{
setInstance(FileCreateFactory::instance());
setXMLFile("kdevpart_filecreate.rc");
- connect( core(), SIGNAL(projectOpened()), this, SLOT(slotProjectOpened()) );
- connect( core(), SIGNAL(projectClosed()), this, SLOT(slotProjectClosed()) );
+ connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) );
+ connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotProjectClosed()) );
_configProxy = new ConfigWidgetProxy( core() );
_configProxy->createProjectConfigPage( i18n("File Templates"), PROJECTSETTINGSPAGE, info()->icon() );
_configProxy->createGlobalConfigPage( i18n("File Templates"), GLOBALSETTINGSPAGE, info()->icon() );
- connect( _configProxy, SIGNAL(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )),
- this, SLOT(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )) );
+ connect( _configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )),
+ this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )) );
- KToolBarPopupAction * newAction = new KToolBarPopupAction( i18n("&New"), "filenew", CTRL+Qt::Key_N, this, SLOT(slotNewFile()), actionCollection(), "file_new");
+ KToolBarPopupAction * newAction = new KToolBarPopupAction( i18n("&New"), "filenew", CTRL+Qt::Key_N, this, TQT_SLOT(slotNewFile()), actionCollection(), "file_new");
newAction->setWhatsThis( i18n("<b>New file</b><p>Creates a new file. Also adds it the project if the <b>Add to project</b> checkbox is turned on.") );
newAction->setToolTip( i18n("Create a new file") );
m_newPopupMenu = newAction->popupMenu();
- connect(m_newPopupMenu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowNewPopupMenu()));
+ connect(m_newPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotAboutToShowNewPopupMenu()));
- QTimer::singleShot( 0, this, SLOT(slotGlobalInitialize()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotGlobalInitialize()) );
}
@@ -96,7 +96,7 @@ FileCreatePart::~FileCreatePart()
delete m_subPopups;
}
-void FileCreatePart::insertConfigWidget( const KDialogBase * dlg, QWidget * page, unsigned int pagenumber )
+void FileCreatePart::insertConfigWidget( const KDialogBase * dlg, TQWidget * page, unsigned int pagenumber )
{
kdDebug() << k_funcinfo << endl;
@@ -105,14 +105,14 @@ void FileCreatePart::insertConfigWidget( const KDialogBase * dlg, QWidget * page
case PROJECTSETTINGSPAGE:
{
FCConfigWidget* w = new FCConfigWidget( this, false, page, "filecreate config widget" );
- connect( dlg, SIGNAL( okClicked( ) ), w, SLOT( accept( ) ) );
+ connect( dlg, TQT_SIGNAL( okClicked( ) ), w, TQT_SLOT( accept( ) ) );
}
break;
case GLOBALSETTINGSPAGE:
{
FCConfigWidget *w = new FCConfigWidget( this, true, page, "filecreate config widget" );
- connect(dlg, SIGNAL(okClicked()), w, SLOT(accept()));
+ connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()));
}
break;
}
@@ -132,26 +132,26 @@ void FileCreatePart::slotAboutToShowNewPopupMenu()
{
if (filetype->subtypes().count()==0)
{
- QPixmap iconPix = m_iconLoader->loadIcon(
+ TQPixmap iconPix = m_iconLoader->loadIcon(
filetype->icon(), KIcon::Desktop, KIcon::SizeSmall,
KIcon::DefaultState, NULL, true);
m_newPopupMenu->insertItem(iconPix, filetype->name(), this,
- SLOT(slotNewFilePopup(int)), 0, ++id );
+ TQT_SLOT(slotNewFilePopup(int)), 0, ++id );
m_newPopupMenu->setItemParameter( id, (long)filetype );
} else
{
KPopupMenu* subMenu = NULL;
- QPtrList<FileType> subtypes = filetype->subtypes();
+ TQPtrList<FileType> subtypes = filetype->subtypes();
for(FileType * subtype = subtypes.first(); subtype; subtype=subtypes.next())
{
if (subtype->enabled()){
if( !subMenu )
subMenu = new KPopupMenu(0,0);
- QPixmap iconPix = m_iconLoader->loadIcon(
+ TQPixmap iconPix = m_iconLoader->loadIcon(
subtype->icon(), KIcon::Desktop, KIcon::SizeSmall,
KIcon::DefaultState, NULL, true);
subMenu->insertItem(iconPix, subtype->name(), this,
- SLOT(slotNewFilePopup(int)), 0, ++id );
+ TQT_SLOT(slotNewFilePopup(int)), 0, ++id );
subMenu->setItemParameter( id, (long)subtype );
}
}
@@ -159,7 +159,7 @@ void FileCreatePart::slotAboutToShowNewPopupMenu()
{
if( !m_subPopups )
{
- m_subPopups = new QPtrList<KPopupMenu>;
+ m_subPopups = new TQPtrList<KPopupMenu>;
m_subPopups->setAutoDelete(true);
}
m_subPopups->append( subMenu );
@@ -187,10 +187,10 @@ void FileCreatePart::slotNewFile() {
}
void FileCreatePart::slotProjectOpened() {
- QTimer::singleShot( 0, this, SLOT(slotInitialize()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotInitialize()) );
}
-void FileCreatePart::addFileType(const QString & filename) {
+void FileCreatePart::addFileType(const TQString & filename) {
FileType * filetype = getType(filename);
if (!filetype) {
filetype = new FileType;
@@ -204,14 +204,14 @@ void FileCreatePart::addFileType(const QString & filename) {
void FileCreatePart::slotProjectClosed() {
m_filetypes.clear();
- QTimer::singleShot( 0, this, SLOT(slotGlobalInitialize()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(slotGlobalInitialize()) );
}
void FileCreatePart::slotFiletypeSelected(const FileType * filetype) {
KDevCreateFile::CreatedFile createdFile = createNewFile(filetype->ext(),
- QString::null,
- QString::null,
+ TQString::null,
+ TQString::null,
filetype->subtypeRef());
openCreatedFile(createdFile);
@@ -226,14 +226,14 @@ void FileCreatePart::openCreatedFile(const KDevCreateFile::CreatedFile & created
}
}
-int FileCreatePart::readTypes(const QDomDocument & dom, QPtrList<FileType> &m_filetypes, bool enable) {
+int FileCreatePart::readTypes(const TQDomDocument & dom, TQPtrList<FileType> &m_filetypes, bool enable) {
int numRead = 0;
- QDomElement fileTypes = DomUtil::elementByPath(dom,"/kdevfilecreate/filetypes");
+ TQDomElement fileTypes = DomUtil::elementByPath(dom,"/kdevfilecreate/filetypes");
if (!fileTypes.isNull()) {
- for(QDomNode node = fileTypes.firstChild();!node.isNull();node=node.nextSibling()) {
+ for(TQDomNode node = fileTypes.firstChild();!node.isNull();node=node.nextSibling()) {
if (node.isElement() && node.nodeName()=="type") {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
FileType * filetype = new FileType;
filetype->setName( element.attribute("name") );
filetype->setExt( element.attribute("ext") );
@@ -248,10 +248,10 @@ int FileCreatePart::readTypes(const QDomDocument & dom, QPtrList<FileType> &m_fi
kdDebug(9034) << "node: " << filetype->name().latin1() << endl;
if (node.hasChildNodes()) {
- for(QDomNode subnode = node.firstChild();!subnode.isNull();subnode=subnode.nextSibling()) {
+ for(TQDomNode subnode = node.firstChild();!subnode.isNull();subnode=subnode.nextSibling()) {
kdDebug(9034) << "subnode: " << subnode.nodeName().latin1() << endl;
if (subnode.isElement() && subnode.nodeName()=="subtype") {
- QDomElement subelement = subnode.toElement();
+ TQDomElement subelement = subnode.toElement();
FileType * subtype = new FileType;
subtype->setExt( filetype->ext() );
subtype->setCreateMethod( filetype->createMethod() );
@@ -270,23 +270,23 @@ int FileCreatePart::readTypes(const QDomDocument & dom, QPtrList<FileType> &m_fi
return numRead;
}
-FileType * FileCreatePart::getType(const QString & ex, const QString subtRef) {
+FileType * FileCreatePart::getType(const TQString & ex, const TQString subtRef) {
- QString subtypeRef = subtRef;
- QString ext = ex;
+ TQString subtypeRef = subtRef;
+ TQString ext = ex;
int dashPos = ext.find('-');
if (dashPos>-1 && subtRef.isNull()) {
ext = ex.left(dashPos);
subtypeRef = ex.mid(dashPos+1);
}
- QPtrList<FileType> filetypes = getFileTypes();
+ TQPtrList<FileType> filetypes = getFileTypes();
for(FileType * filetype = filetypes.first();
filetype;
filetype=filetypes.next()) {
if (filetype->ext()==ext) {
if (subtypeRef.isNull()) return filetype;
- QPtrList<FileType> subtypes = filetype->subtypes();
+ TQPtrList<FileType> subtypes = filetype->subtypes();
for(FileType * subtype = subtypes.first();
subtype;
subtype=subtypes.next()) {
@@ -297,23 +297,23 @@ FileType * FileCreatePart::getType(const QString & ex, const QString subtRef) {
return NULL;
}
-FileType * FileCreatePart::getEnabledType(const QString & ex, const QString subtRef) {
+FileType * FileCreatePart::getEnabledType(const TQString & ex, const TQString subtRef) {
- QString subtypeRef = subtRef;
- QString ext = ex;
+ TQString subtypeRef = subtRef;
+ TQString ext = ex;
int dashPos = ext.find('-');
if (dashPos>-1 && subtRef.isNull()) {
ext = ex.left(dashPos);
subtypeRef = ex.mid(dashPos+1);
}
- QPtrList<FileType> filetypes = getFileTypes();
+ TQPtrList<FileType> filetypes = getFileTypes();
for(FileType * filetype = filetypes.first();
filetype;
filetype=filetypes.next()) {
if (filetype->ext()==ext) {
if ( (subtypeRef.isNull()) && (filetype->enabled()) ) return filetype;
- QPtrList<FileType> subtypes = filetype->subtypes();
+ TQPtrList<FileType> subtypes = filetype->subtypes();
for(FileType * subtype = subtypes.first();
subtype;
subtype=subtypes.next()) {
@@ -326,7 +326,7 @@ FileType * FileCreatePart::getEnabledType(const QString & ex, const QString subt
// KDevFileCreate interface
-KDevCreateFile::CreatedFile FileCreatePart::createNewFile(QString ext, QString dir, QString name, QString subtype)
+KDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString dir, TQString name, TQString subtype)
{
KDevCreateFile::CreatedFile result;
@@ -358,10 +358,10 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(QString ext, QString d
if (!dir.isNull())
dialog.setDirectory(dir);
else if (!project())
- dialog.setDirectory(QDir::currentDirPath());
+ dialog.setDirectory(TQDir::currentDirPath());
else
{
- QString activeDir = project()->activeDirectory();
+ TQString activeDir = project()->activeDirectory();
dialog.setDirectory( project()->projectDirectory() +
( activeDir[0] == '/' ? "" : "/" )
+ activeDir );
@@ -369,7 +369,7 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(QString ext, QString d
if (!name.isNull()) dialog.setName(name);
if (filetype) dialog.setCurrent(filetype);
- dialog.setInitialSize(QSize(500, 200));
+ dialog.setInitialSize(TQSize(500, 200));
int dialogResult = dialog.exec();
if (dialogResult == KDialogBase::Rejected) {
@@ -393,11 +393,11 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(QString ext, QString d
subtype = selectedFileType->subtypeRef();
}
- QString fullPath = selectedURL.path();
+ TQString fullPath = selectedURL.path();
// add appropriate extension, if not already there
if ( !ext.isEmpty() && !fullPath.endsWith("." + ext)) fullPath+="." + ext;
- QString filename = URLUtil::filename(fullPath);
+ TQString filename = URLUtil::filename(fullPath);
kdDebug(9034) << "full path = " << fullPath << endl;
// add in subtype, if specified
@@ -410,7 +410,7 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(QString ext, QString d
created = FileTemplate::copy(this, ext, fullPath);
else {
// no template, create a blank file instead
- QFile f(fullPath);
+ TQFile f(fullPath);
created = f.open( IO_WriteOnly );
f.close();
}
@@ -423,8 +423,8 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(QString ext, QString d
if (dialog.addToProject())
{
// work out the path relative to the project directory
-// QString relToProj = URLUtil::relativePath(projectURL, selectedURL, URLUtil::SLASH_PREFIX );
- QString relToProj;
+// TQString relToProj = URLUtil::relativePath(projectURL, selectedURL, URLUtil::SLASH_PREFIX );
+ TQString relToProj;
if( project()->options() & KDevProject::UsesQMakeBuildSystem )
{
relToProj = URLUtil::relativePathToFile( project()->projectDirectory(), fullPath );
@@ -440,7 +440,7 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(QString ext, QString d
url.setPath(fullPath);
partController()->editDocument(url);
- QString fileName = URLUtil::filename(fullPath);
+ TQString fileName = URLUtil::filename(fullPath);
kdDebug(9034) << "file name = " << filename << endl;
result.filename = fileName;
@@ -451,7 +451,7 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(QString ext, QString d
}
void FileCreatePart::slotNoteFiletype(const FileType * filetype) {
- kdDebug(9034) << "Noting file type: " << (filetype ? filetype->ext() : QString::fromLatin1("Null") ) << endl;
+ kdDebug(9034) << "Noting file type: " << (filetype ? filetype->ext() : TQString::fromLatin1("Null") ) << endl;
m_filedialogFiletype = filetype;
}
@@ -463,15 +463,15 @@ void FileCreatePart::slotInitialize( )
slotGlobalInitialize();
// read in which global templates are to be used for this project
- QDomElement useGlobalTypes =
+ TQDomElement useGlobalTypes =
DomUtil::elementByPath(*projectDom(),"/kdevfilecreate/useglobaltypes");
- for(QDomNode node = useGlobalTypes.firstChild();
+ for(TQDomNode node = useGlobalTypes.firstChild();
!node.isNull();node=node.nextSibling()) {
if (node.isElement() && node.nodeName()=="type") {
- QDomElement element = node.toElement();
- QString ext = element.attribute("ext");
- QString subtyperef = element.attribute("subtyperef");
+ TQDomElement element = node.toElement();
+ TQString ext = element.attribute("ext");
+ TQString subtyperef = element.attribute("subtyperef");
// if an extension has been specified as enabled, ensure it
// and all its subtypes are enabled
if (subtyperef.isNull()) {
@@ -498,13 +498,13 @@ void FileCreatePart::slotInitialize( )
if ( project() && readTypes( *projectDom(), m_filetypes, true )==0 ) {
// default by scanning the templates directory if no template info
// found in project file
- QDir templDir( project()->projectDirectory() + "/templates/" );
+ TQDir templDir( project()->projectDirectory() + "/templates/" );
if (templDir.exists()) {
- templDir.setFilter( QDir::Files );
+ templDir.setFilter( TQDir::Files );
const QFileInfoList * list = templDir.entryInfoList();
if( list ){
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( (fi = it.current()) != 0 ) {
addFileType(fi->fileName());
++it;
@@ -520,16 +520,16 @@ void FileCreatePart::slotInitialize( )
}
}
-QString FileCreatePart::findGlobalXMLFile() const
+TQString FileCreatePart::findGlobalXMLFile() const
{
int version = 0;
- QString filename;
- QStringList filenames = KGlobal::instance()->dirs()->findAllResources("data", "kdevfilecreate/template-info.xml");
- for( QStringList::const_iterator it = filenames.begin(); it != filenames.end(); ++it )
+ TQString filename;
+ TQStringList filenames = KGlobal::instance()->dirs()->findAllResources("data", "kdevfilecreate/template-info.xml");
+ for( TQStringList::const_iterator it = filenames.begin(); it != filenames.end(); ++it )
{
- QDomDocument globalDom;
+ TQDomDocument globalDom;
DomUtil::openDOMFile(globalDom,*it);
- QDomElement e = globalDom.documentElement();
+ TQDomElement e = globalDom.documentElement();
if( !e.hasAttribute( "version" ) && e.attribute( "version" ).toInt() < version )
{
continue;
@@ -545,9 +545,9 @@ QString FileCreatePart::findGlobalXMLFile() const
void FileCreatePart::slotGlobalInitialize( )
{
// read in global template information
- QString globalXMLFile = findGlobalXMLFile();
+ TQString globalXMLFile = findGlobalXMLFile();
kdDebug(9034) << "Found global template info info " << globalXMLFile << endl;
- QDomDocument globalDom;
+ TQDomDocument globalDom;
if (!globalXMLFile.isNull() && DomUtil::openDOMFile(globalDom,globalXMLFile))
{
kdDebug(9034) << "Reading global template info..." << endl;
diff --git a/parts/filecreate/filecreate_part.h b/parts/filecreate/filecreate_part.h
index 3cbc9909..605f6fbf 100644
--- a/parts/filecreate/filecreate_part.h
+++ b/parts/filecreate/filecreate_part.h
@@ -14,10 +14,10 @@
#define __KDEVPART_FILECREATE_H__
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdevplugin.h>
#include <kdevcreatefile.h>
@@ -42,36 +42,36 @@ class FileCreatePart : public KDevCreateFile
friend class FCConfigWidget;
public:
- FileCreatePart(QObject *parent, const char *name, const QStringList &);
+ FileCreatePart(TQObject *parent, const char *name, const TQStringList &);
virtual ~FileCreatePart();
/**
* Returns the list of available file types.
*/
- QPtrList<FileType> getFileTypes() const { return m_filetypes; }
+ TQPtrList<FileType> getFileTypes() const { return m_filetypes; }
/**
* Call this method to create a new file, within or without the project. Supply as
- * much information as you know. Leave what you don't know as QString::null.
+ * much information as you know. Leave what you don't know as TQString::null.
* The user will be prompted as necessary for the missing information, and the
* file created, and added to the project as necessary.
*/
- virtual KDevCreateFile::CreatedFile createNewFile(QString ext = QString::null,
- QString dir = QString::null,
- QString name = QString::null,
- QString subtype = QString::null);
+ virtual KDevCreateFile::CreatedFile createNewFile(TQString ext = TQString::null,
+ TQString dir = TQString::null,
+ TQString name = TQString::null,
+ TQString subtype = TQString::null);
/**
* Finds the file type object for a given extension and optionally subtype.
* You can omit the subtype and specify the extension as ext-subtype if you wish.
*/
- FileType * getType(const QString & ext, const QString subtype = QString::null);
+ FileType * getType(const TQString & ext, const TQString subtype = TQString::null);
/**
* Finds the file type object for a given extension and optionally subtype.
* You can omit the subtype and specify the extension as ext-subtype if you wish.
* Returns only enabled type (i.e. used in the project).
*/
- FileType * getEnabledType(const QString & ext, const QString subtype = QString::null);
+ FileType * getEnabledType(const TQString & ext, const TQString subtype = TQString::null);
public slots:
@@ -99,7 +99,7 @@ public slots:
protected slots:
void slotNoteFiletype(const FileType * filetype);
void slotAboutToShowNewPopupMenu();
- void insertConfigWidget( const KDialogBase * dlg, QWidget * page, unsigned int );
+ void insertConfigWidget( const KDialogBase * dlg, TQWidget * page, unsigned int );
private:
/**
@@ -112,22 +112,22 @@ private:
* to the file type list. If enable is true, sets them all to
* enabled=true by default.
*/
- int readTypes(const QDomDocument & dom, QPtrList<FileType> &m_filetypes, bool enable);
+ int readTypes(const TQDomDocument & dom, TQPtrList<FileType> &m_filetypes, bool enable);
/**
* Add a file type
*/
- void addFileType(const QString & filename);
+ void addFileType(const TQString & filename);
/**
* Finds the global XML file that has the same version as KDevelop
*/
- QString findGlobalXMLFile() const;
+ TQString findGlobalXMLFile() const;
/**
* List of file types from which the user can choose
*/
- QPtrList<FileType> m_filetypes;
+ TQPtrList<FileType> m_filetypes;
/**
* The file type selected by the new file dialog, if appropriate.
@@ -137,7 +137,7 @@ private:
ConfigWidgetProxy * _configProxy;
KPopupMenu* m_newPopupMenu;
- QPtrList<KPopupMenu>* m_subPopups;
+ TQPtrList<KPopupMenu>* m_subPopups;
};
diff --git a/parts/filecreate/filecreate_typechoosersig.h b/parts/filecreate/filecreate_typechoosersig.h
index 7f16208a..233afe70 100644
--- a/parts/filecreate/filecreate_typechoosersig.h
+++ b/parts/filecreate/filecreate_typechoosersig.h
@@ -1,17 +1,17 @@
#ifndef __FILECREATE_TYPECHOOSERSIG_H__
#define __FILECREATE_TYPECHOOSERSIG_H__
-#include <qobject.h>
+#include <tqobject.h>
namespace FileCreate {
class FileType;
-class Signaller : public QObject {
+class Signaller : public TQObject {
Q_OBJECT
public:
- Signaller() : QObject() { }
+ Signaller() : TQObject() { }
virtual ~Signaller() { }
virtual void signal(const FileType * filetype ) {
diff --git a/parts/filecreate/filecreate_widget2.cpp b/parts/filecreate/filecreate_widget2.cpp
index c8e6d051..10816904 100644
--- a/parts/filecreate/filecreate_widget2.cpp
+++ b/parts/filecreate/filecreate_widget2.cpp
@@ -8,9 +8,9 @@
* (at your option) any later version. *
***************************************************************************/
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
#include <kparts/part.h>
#include <klibloader.h>
@@ -30,7 +30,7 @@
namespace FileCreate {
FriendlyWidget::FriendlyWidget(FileCreatePart *part)
- : QTable(0,4,0), TypeChooser(part), m_selected(NULL)
+ : TQTable(0,4,0), TypeChooser(part), m_selected(NULL)
{
setReadOnly(true);
@@ -45,7 +45,7 @@ namespace FileCreate {
m_iconLoader = KGlobal::iconLoader();
- QWhatsThis::add(this, i18n("Use this to create new files within your project."));
+ TQWhatsThis::add(this, i18n("Use this to create new files within your project."));
setDefaultColumnWidths();
@@ -58,7 +58,7 @@ namespace FileCreate {
void FriendlyWidget::setCurrent(const FileType * current) {
int changeToRow = -1;
- QMap<int,FileType*>::Iterator it;
+ TQMap<int,FileType*>::Iterator it;
kdDebug(9034) << "Checking " << current->descr() << " for matches in row..." << endl;
for ( it = typeForRow.begin(); it != typeForRow.end() && changeToRow==-1; ++it ) {
kdDebug(9034) << "Checking: " << it.data()->descr() << endl;
@@ -88,12 +88,12 @@ namespace FileCreate {
void FriendlyWidget::refresh() {
- disconnect( this, SIGNAL(currentChanged(int,int)), this, SLOT(slotCellSelected(int,int)) );
+ disconnect( this, TQT_SIGNAL(currentChanged(int,int)), this, TQT_SLOT(slotCellSelected(int,int)) );
empty();
int row = 0;
- QPtrList<FileType> filetypes = m_part->getFileTypes();
+ TQPtrList<FileType> filetypes = m_part->getFileTypes();
for(FileType * filetype = filetypes.first();
filetype;
filetype=filetypes.next()) {
@@ -103,7 +103,7 @@ namespace FileCreate {
if (filetype->subtypes().count()==0)
setRow(row++, filetype);
- QPtrList<FileType> subtypes = filetype->subtypes();
+ TQPtrList<FileType> subtypes = filetype->subtypes();
for(FileType * subtype = subtypes.first();
subtype;
subtype=subtypes.next()) {
@@ -117,7 +117,7 @@ namespace FileCreate {
resizeCells();
if (currentSelection()>-1) removeSelection(currentSelection());
- connect( this, SIGNAL(currentChanged(int,int)), this, SLOT(slotCellSelected(int,int)) );
+ connect( this, TQT_SIGNAL(currentChanged(int,int)), this, TQT_SLOT(slotCellSelected(int,int)) );
}
@@ -130,7 +130,7 @@ namespace FileCreate {
item(row,1)->setWordWrap(true);
item(row,3)->setWordWrap(true);
//setRowStretchable(row,true);
- QPixmap iconPix = m_iconLoader->loadIcon(filetype->icon(), KIcon::Desktop, KIcon::SizeMedium,
+ TQPixmap iconPix = m_iconLoader->loadIcon(filetype->icon(), KIcon::Desktop, KIcon::SizeMedium,
KIcon::DefaultState, NULL,
true);
if (!iconPix.isNull()) {
@@ -165,7 +165,7 @@ namespace FileCreate {
}
m_selected = typeForRow.contains(row) ? typeForRow[row] : NULL;
- QTimer::singleShot(0, this, SLOT(slotDoSelection()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDoSelection()) );
}
@@ -187,11 +187,11 @@ namespace FileCreate {
int maxHeight = 0;
for(int c=0;c<numCols();c++) {
- QTableItem* i = item( row, c );
+ TQTableItem* i = item( row, c );
if( !i )
continue;
- QSize size = i->sizeHint();
+ TQSize size = i->sizeHint();
maxHeight = size.height()>maxHeight ? size.height() : maxHeight;
}
setRowHeight(row,maxHeight+2); // bit of extra room
@@ -202,11 +202,11 @@ namespace FileCreate {
int maxWidth = 0;
for(int r=0;r<numRows();r++) {
- QTableItem* i = item( r, col );
+ TQTableItem* i = item( r, col );
if( !i )
continue;
- QSize size = item(r,col)->sizeHint();
+ TQSize size = item(r,col)->sizeHint();
maxWidth = size.width()>maxWidth ? size.width() : maxWidth;
}
setColumnWidth(col,maxWidth+2); // bit of extra room
@@ -215,7 +215,7 @@ namespace FileCreate {
#if QT_VERSION < 0x030100
void FriendlyWidget::selectRow(int row) {
if (numCols()>0 && row<numRows()) {
- QTableSelection sel;
+ TQTableSelection sel;
sel.init(row,0);
sel.expandTo(row,numCols());
addSelection(sel);
diff --git a/parts/filecreate/filecreate_widget2.h b/parts/filecreate/filecreate_widget2.h
index 8b3d14e8..0e909d41 100644
--- a/parts/filecreate/filecreate_widget2.h
+++ b/parts/filecreate/filecreate_widget2.h
@@ -12,9 +12,9 @@
#define __FILECREATE_WIDGET2_H__
#include <kdeversion.h>
-#include <qtable.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqtable.h>
+#include <tqstring.h>
+#include <tqmap.h>
//#include <klistview.h>
@@ -28,7 +28,7 @@ namespace FileCreate {
class FileType;
- class FriendlyWidget : public QTable, public TypeChooser
+ class FriendlyWidget : public TQTable, public TypeChooser
{
Q_OBJECT
@@ -86,7 +86,7 @@ namespace FileCreate {
/**
* A mapping of each row number to a file type.
*/
- QMap<int,FileType*> typeForRow;
+ TQMap<int,FileType*> typeForRow;
/**
* The currently selected file type, or null if none.
*/
diff --git a/parts/filecreate/filecreate_widget3.cpp b/parts/filecreate/filecreate_widget3.cpp
index f766cbcf..5d307bff 100644
--- a/parts/filecreate/filecreate_widget3.cpp
+++ b/parts/filecreate/filecreate_widget3.cpp
@@ -1,7 +1,7 @@
/***************************************************************************
* Copyright (C) 2003 by Julian Rockey *
* linux@jrockey.com *
- * thanks: Roberto Raggi for QSimpleRichText stuff *
+ * thanks: Roberto Raggi for TQSimpleRichText stuff *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -9,8 +9,8 @@
* (at your option) any later version. *
***************************************************************************/
-#include <qptrlist.h>
-#include <qwhatsthis.h>
+#include <tqptrlist.h>
+#include <tqwhatsthis.h>
#include <kparts/part.h>
#include <klibloader.h>
@@ -41,12 +41,12 @@ namespace FileCreate {
addColumn("");
addColumn("");
- QWhatsThis::add(this, i18n("<b>New file</b><p>This part makes the creation of new files easier. Select a type in the list to create a file. "
+ TQWhatsThis::add(this, i18n("<b>New file</b><p>This part makes the creation of new files easier. Select a type in the list to create a file. "
"The list of project file types can be configured in project settings dialog, <b>New File Wizard</b> tab. "
"Globally available file types are listed and can be configured in KDevelop settings dialog, <b>New File Wizard</b> tab."));
- connect( this, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotTypeSelected(QListViewItem*)) );
+ connect( this, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(slotTypeSelected(TQListViewItem*)) );
}
@@ -57,7 +57,7 @@ namespace FileCreate {
void ListWidget::setCurrent(const FileType * current) {
bool found = false;
- QListViewItem * lvi = firstChild();
+ TQListViewItem * lvi = firstChild();
while(lvi && !found) {
ListItem * li = dynamic_cast<ListItem*>(lvi);
if (li) {
@@ -76,7 +76,7 @@ namespace FileCreate {
}
- void ListWidget::resizeEvent(QResizeEvent *event) {
+ void ListWidget::resizeEvent(TQResizeEvent *event) {
ListItem *li = dynamic_cast<ListItem*>(firstChild());
while(li) {
li->prepareResize();
@@ -87,12 +87,12 @@ namespace FileCreate {
void ListWidget::refresh() {
clear();
- QPtrList<FileType> filetypes = m_part->getFileTypes();
+ TQPtrList<FileType> filetypes = m_part->getFileTypes();
for(FileType * filetype = filetypes.first();
filetype!=NULL;
filetype=filetypes.next()) {
if (filetype->enabled()) {
- QPtrList<FileType> subtypes = filetype->subtypes();
+ TQPtrList<FileType> subtypes = filetype->subtypes();
if (subtypes.count()==0)
new ListItem( this, filetype );
for(FileType * subtype = subtypes.first();
@@ -105,7 +105,7 @@ namespace FileCreate {
}
}
- void ListWidget::slotTypeSelected(QListViewItem * item) {
+ void ListWidget::slotTypeSelected(TQListViewItem * item) {
ListItem * fileitem = dynamic_cast<ListItem*>(item);
if (!fileitem) return;
diff --git a/parts/filecreate/filecreate_widget3.h b/parts/filecreate/filecreate_widget3.h
index 58fc5129..cc2c836e 100644
--- a/parts/filecreate/filecreate_widget3.h
+++ b/parts/filecreate/filecreate_widget3.h
@@ -12,8 +12,8 @@
#define __FILECREATE_WIDGET3_H__
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <klistview.h>
@@ -38,10 +38,10 @@ namespace FileCreate {
virtual void refresh();
virtual void setCurrent(const FileType * current);
- virtual void resizeEvent(QResizeEvent *event);
+ virtual void resizeEvent(TQResizeEvent *event);
public slots:
- void slotTypeSelected(QListViewItem * item);
+ void slotTypeSelected(TQListViewItem * item);
};