summaryrefslogtreecommitdiffstats
path: root/parts/filecreate/filecreate_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/filecreate/filecreate_part.cpp')
-rw-r--r--parts/filecreate/filecreate_part.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/parts/filecreate/filecreate_part.cpp b/parts/filecreate/filecreate_part.cpp
index 19deeb66..11fcfa6c 100644
--- a/parts/filecreate/filecreate_part.cpp
+++ b/parts/filecreate/filecreate_part.cpp
@@ -19,7 +19,7 @@
#include <tdeversion.h>
#include <kiconloader.h>
#include <tdelocale.h>
-#include <kdevgenericfactory.h>
+#include <tdevgenericfactory.h>
#include <tdefiledialog.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -30,10 +30,10 @@
#include <tdepopupmenu.h>
#include <tdemessagebox.h>
-#include "kdevcore.h"
-#include "kdevmainwindow.h"
-#include "kdevproject.h"
-#include "kdevpartcontroller.h"
+#include "tdevcore.h"
+#include "tdevmainwindow.h"
+#include "tdevproject.h"
+#include "tdevpartcontroller.h"
#include "configwidgetproxy.h"
#include "filetemplate.h"
@@ -50,23 +50,23 @@
#define PROJECTSETTINGSPAGE 1
#define GLOBALSETTINGSPAGE 2
-#include "kdevplugininfo.h"
+#include "tdevplugininfo.h"
#include "config.h"
-static const KDevPluginInfo data("kdevfilecreate");
+static const TDevPluginInfo data("tdevfilecreate");
-typedef KDevGenericFactory<FileCreatePart> FileCreateFactory;
-K_EXPORT_COMPONENT_FACTORY( libkdevfilecreate, FileCreateFactory( data ) )
+typedef TDevGenericFactory<FileCreatePart> FileCreateFactory;
+K_EXPORT_COMPONENT_FACTORY( libtdevfilecreate, FileCreateFactory( data ) )
using namespace FileCreate;
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)
+// : TDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_selectedWidget(-1), m_useSideTab(true), m_subPopups(0)
+ : TDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_subPopups(0)
{
setInstance(FileCreateFactory::instance());
- setXMLFile("kdevpart_filecreate.rc");
+ setXMLFile("tdevpart_filecreate.rc");
connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) );
connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotProjectClosed()) );
@@ -179,10 +179,10 @@ void FileCreatePart::slotNewFilePopup( int pFileType )
}
void FileCreatePart::slotNewFile() {
- KDevCreateFile::CreatedFile createdFile = createNewFile();
- if (createdFile.status == KDevCreateFile::CreatedFile::STATUS_NOTCREATED)
+ TDevCreateFile::CreatedFile createdFile = createNewFile();
+ if (createdFile.status == TDevCreateFile::CreatedFile::STATUS_NOTCREATED)
KMessageBox::error(0, i18n("Cannot create file. Check whether the directory and filename are valid."));
- else if (createdFile.status != KDevCreateFile::CreatedFile::STATUS_CANCELED)
+ else if (createdFile.status != TDevCreateFile::CreatedFile::STATUS_CANCELED)
openCreatedFile(createdFile);
}
@@ -209,7 +209,7 @@ void FileCreatePart::slotProjectClosed() {
void FileCreatePart::slotFiletypeSelected(const FileType * filetype) {
- KDevCreateFile::CreatedFile createdFile = createNewFile(filetype->ext(),
+ TDevCreateFile::CreatedFile createdFile = createNewFile(filetype->ext(),
TQString(),
TQString(),
filetype->subtypeRef());
@@ -217,9 +217,9 @@ void FileCreatePart::slotFiletypeSelected(const FileType * filetype) {
openCreatedFile(createdFile);
}
-void FileCreatePart::openCreatedFile(const KDevCreateFile::CreatedFile & createdFile)
+void FileCreatePart::openCreatedFile(const TDevCreateFile::CreatedFile & createdFile)
{
- if ( createdFile.status == KDevCreateFile::CreatedFile::STATUS_OK )
+ if ( createdFile.status == TDevCreateFile::CreatedFile::STATUS_OK )
{
KURL uu( createdFile.dir + "/" + createdFile.filename );
partController()->editDocument ( uu );
@@ -228,7 +228,7 @@ void FileCreatePart::openCreatedFile(const KDevCreateFile::CreatedFile & created
int FileCreatePart::readTypes(const TQDomDocument & dom, TQPtrList<FileType> &m_filetypes, bool enable) {
int numRead = 0;
- TQDomElement fileTypes = DomUtil::elementByPath(dom,"/kdevfilecreate/filetypes");
+ TQDomElement fileTypes = DomUtil::elementByPath(dom,"/tdevfilecreate/filetypes");
if (!fileTypes.isNull()) {
for(TQDomNode node = fileTypes.firstChild();!node.isNull();node=node.nextSibling()) {
@@ -324,16 +324,16 @@ FileType * FileCreatePart::getEnabledType(const TQString & ex, const TQString su
return NULL;
}
-// KDevFileCreate interface
+// TDevFileCreate interface
-KDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString dir, TQString name, TQString subtype)
+TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString dir, TQString name, TQString subtype)
{
- KDevCreateFile::CreatedFile result;
+ TDevCreateFile::CreatedFile result;
KURL projectURL;
if ( !project() )
{
- //result.status = KDevCreateFile::CreatedFile::STATUS_NOTCREATED;
+ //result.status = TDevCreateFile::CreatedFile::STATUS_NOTCREATED;
//return result;
}
else
@@ -373,7 +373,7 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString
int dialogResult = dialog.exec();
if (dialogResult == KDialogBase::Rejected) {
- result.status = KDevCreateFile::CreatedFile::STATUS_CANCELED;
+ result.status = TDevCreateFile::CreatedFile::STATUS_CANCELED;
return result;
}
@@ -383,8 +383,8 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString
selectedURL = dialog.url();
const FileType *selectedFileType = dialog.selectedType();
- if (dialog.addToProject() && !projectURL.isParentOf(selectedURL) && !(project()->options() & KDevProject::UsesTQMakeBuildSystem) ) {
- result.status = KDevCreateFile::CreatedFile::STATUS_NOTWITHINPROJECT;
+ if (dialog.addToProject() && !projectURL.isParentOf(selectedURL) && !(project()->options() & TDevProject::UsesTQMakeBuildSystem) ) {
+ result.status = TDevCreateFile::CreatedFile::STATUS_NOTWITHINPROJECT;
return result;
}
@@ -416,7 +416,7 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString
}
if (!created)
{
- result.status = KDevCreateFile::CreatedFile::STATUS_NOTCREATED;
+ result.status = TDevCreateFile::CreatedFile::STATUS_NOTCREATED;
return result;
}
@@ -425,7 +425,7 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString
// work out the path relative to the project directory
// TQString relToProj = URLUtil::relativePath(projectURL, selectedURL, URLUtil::SLASH_PREFIX );
TQString relToProj;
- if( project()->options() & KDevProject::UsesTQMakeBuildSystem )
+ if( project()->options() & TDevProject::UsesTQMakeBuildSystem )
{
relToProj = URLUtil::relativePathToFile( project()->projectDirectory(), fullPath );
project()->addFile(relToProj);
@@ -445,7 +445,7 @@ KDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString
result.filename = fileName;
result.dir = URLUtil::directory(fullPath);
- result.status = KDevCreateFile::CreatedFile::STATUS_OK;
+ result.status = TDevCreateFile::CreatedFile::STATUS_OK;
return result;
}
@@ -464,7 +464,7 @@ void FileCreatePart::slotInitialize( )
// read in which global templates are to be used for this project
TQDomElement useGlobalTypes =
- DomUtil::elementByPath(*projectDom(),"/kdevfilecreate/useglobaltypes");
+ DomUtil::elementByPath(*projectDom(),"/tdevfilecreate/useglobaltypes");
for(TQDomNode node = useGlobalTypes.firstChild();
!node.isNull();node=node.nextSibling()) {
@@ -524,7 +524,7 @@ TQString FileCreatePart::findGlobalXMLFile() const
{
int version = 0;
TQString filename;
- TQStringList filenames = TDEGlobal::instance()->dirs()->findAllResources("data", "kdevfilecreate/template-info.xml");
+ TQStringList filenames = TDEGlobal::instance()->dirs()->findAllResources("data", "tdevfilecreate/template-info.xml");
for( TQStringList::const_iterator it = filenames.begin(); it != filenames.end(); ++it )
{
TQDomDocument globalDom;