summaryrefslogtreecommitdiffstats
path: root/parts/doxygen/doxygenpart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/doxygen/doxygenpart.cpp')
-rw-r--r--parts/doxygen/doxygenpart.cpp128
1 files changed, 64 insertions, 64 deletions
diff --git a/parts/doxygen/doxygenpart.cpp b/parts/doxygen/doxygenpart.cpp
index 5582371b..833f4938 100644
--- a/parts/doxygen/doxygenpart.cpp
+++ b/parts/doxygen/doxygenpart.cpp
@@ -39,11 +39,11 @@
#include <kdialogbase.h>
#include <kdevplugininfo.h>
-#include <qvbox.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qpopupmenu.h>
-#include <qfileinfo.h>
+#include <tqvbox.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqpopupmenu.h>
+#include <tqfileinfo.h>
#define PROJECTOPTIONS 1
@@ -51,7 +51,7 @@ typedef KDevGenericFactory<DoxygenPart> DoxygenFactory;
static const KDevPluginInfo data("kdevdoxygen");
K_EXPORT_COMPONENT_FACTORY( libkdevdoxygen, DoxygenFactory( data ) )
-DoxygenPart::DoxygenPart(QObject *parent, const char *name, const QStringList &)
+DoxygenPart::DoxygenPart(TQObject *parent, const char *name, const TQStringList &)
: KDevPlugin(&data, parent, name ? name : "DoxygenPart"), m_activeEditor(0), m_cursor(0)
{
setInstance(DoxygenFactory::instance());
@@ -59,44 +59,44 @@ DoxygenPart::DoxygenPart(QObject *parent, const char *name, const QStringList &)
KAction *action;
action = new KAction( i18n("Build API Documentation"), 0,
- this, SLOT(slotDoxygen()),
+ this, TQT_SLOT(slotDoxygen()),
actionCollection(), "build_doxygen" );
action->setToolTip(i18n("Build API documentation"));
action->setWhatsThis(i18n("<b>Build API documentation</b><p>Runs doxygen on a project Doxyfile to generate API documentation. "
"If the search engine is enabled in Doxyfile, this also runs doxytag to create it."));
action = new KAction( i18n("Clean API Documentation"), 0,
- this, SLOT(slotDoxClean()),
+ this, TQT_SLOT(slotDoxClean()),
actionCollection(), "clean_doxygen" );
action->setToolTip(i18n("Clean API documentation"));
action->setWhatsThis(i18n("<b>Clean API documentation</b><p>Removes all generated by doxygen files."));
-// connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)), this, SLOT(projectConfigWidget(KDialogBase*)) );
+// connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(projectConfigWidget(KDialogBase*)) );
_configProxy = new ConfigWidgetProxy( core() );
_configProxy->createProjectConfigPage( i18n("Doxygen"), PROJECTOPTIONS, 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 )) );
- m_actionDocumentFunction = new KAction(i18n("Document Current Function"), 0, CTRL+SHIFT+Key_S, this, SLOT(slotDocumentFunction()), actionCollection(), "edit_document_function");
+ m_actionDocumentFunction = new KAction(i18n("Document Current Function"), 0, CTRL+SHIFT+Key_S, this, TQT_SLOT(slotDocumentFunction()), actionCollection(), "edit_document_function");
m_actionDocumentFunction->setToolTip( i18n("Create a documentation template above a function"));
m_actionDocumentFunction->setWhatsThis(i18n("<b>Document Current Function</b><p>Creates a documentation template according to a function's signature above a function definition/declaration."));
m_tmpDir.setAutoDelete(true);
- connect( partController(), SIGNAL(activePartChanged(KParts::Part*)), this, SLOT(slotActivePartChanged(KParts::Part* )));
- m_actionPreview = new KAction(i18n("Preview Doxygen Output"), 0, CTRL+ALT+Key_P, this, SLOT(slotRunPreview()), actionCollection(), "show_preview_doxygen_output");
+ connect( partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SLOT(slotActivePartChanged(KParts::Part* )));
+ m_actionPreview = new KAction(i18n("Preview Doxygen Output"), 0, CTRL+ALT+Key_P, this, TQT_SLOT(slotRunPreview()), actionCollection(), "show_preview_doxygen_output");
m_actionPreview->setToolTip( i18n("Show a preview of the Doxygen output of this file") );
m_actionPreview->setWhatsThis( i18n("<b>Preview Doxygen output</b><p>Runs Doxygen over the current file and shows the created index.html.") );
//read Doxygen configuration, if none exists yet, create it with some defaults
adjustDoxyfile();
- QString fileName = project()->projectDirectory() + "/Doxyfile";
+ TQString fileName = project()->projectDirectory() + "/Doxyfile";
- QFile file(fileName);
+ TQFile file(fileName);
if (file.open(IO_ReadOnly)) {
- QTextStream is(&file);
+ TQTextStream is(&file);
- Config::instance()->parse(QFile::encodeName(fileName));
+ Config::instance()->parse(TQFile::encodeName(fileName));
Config::instance()->convertStrToVal();
file.close();
@@ -109,14 +109,14 @@ DoxygenPart::~DoxygenPart()
delete _configProxy;
}
-void DoxygenPart::insertConfigWidget( const KDialogBase * dlg, QWidget * page, unsigned int pagenumber )
+void DoxygenPart::insertConfigWidget( const KDialogBase * dlg, TQWidget * page, unsigned int pagenumber )
{
if ( pagenumber == PROJECTOPTIONS )
{
adjustDoxyfile();
DoxygenConfigWidget *w = new DoxygenConfigWidget(project()->projectDirectory() + "/Doxyfile", page );
- connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) );
+ connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) );
}
}
@@ -125,8 +125,8 @@ void DoxygenPart::insertConfigWidget( const KDialogBase * dlg, QWidget * page, u
*/
void DoxygenPart::adjustDoxyfile()
{
- QString fileName = project()->projectDirectory() + "/Doxyfile";
- if (QFile::exists(fileName))
+ TQString fileName = project()->projectDirectory() + "/Doxyfile";
+ if (TQFile::exists(fileName))
return;
// Initialize configuration
@@ -156,7 +156,7 @@ void DoxygenPart::adjustDoxyfile()
if (input_files)
{
input_files->init();
- input_files->addValue(QFile::encodeName(project()->projectDirectory()));
+ input_files->addValue(TQFile::encodeName(project()->projectDirectory()));
}
// insert file patterns into "Input/FILE_PATTERNS"
@@ -195,17 +195,17 @@ void DoxygenPart::adjustDoxyfile()
ConfigString *gen_tag = dynamic_cast<ConfigString*>(Config::instance()->get("GENERATE_TAGFILE"));
if (gen_tag)
{
- gen_tag->setDefaultValue(QString(project()->projectName()+".tag").latin1());
+ gen_tag->setDefaultValue(TQString(project()->projectName()+".tag").latin1());
gen_tag->init();
}
// write doxy file
- QFile f2(fileName);
+ TQFile f2(fileName);
if (!f2.open(IO_WriteOnly))
KMessageBox::information(mainWindow()->main(), i18n("Cannot write Doxyfile."));
else
{
- QTextStream ts_file(&f2);
+ TQTextStream ts_file(&f2);
Config::instance()->writeTemplate(ts_file, true, true);
@@ -219,21 +219,21 @@ void DoxygenPart::slotDoxygen()
if ( !partController()->saveAllFiles() ) return;
bool searchDatabase = false;
- QString outputDirectory;
- QString htmlDirectory;
+ TQString outputDirectory;
+ TQString htmlDirectory;
adjustDoxyfile();
- QString fileName = project()->projectDirectory() + "/Doxyfile";
+ TQString fileName = project()->projectDirectory() + "/Doxyfile";
Config::instance()->init();
- QFile f(fileName);
+ TQFile f(fileName);
if (f.open(IO_ReadOnly))
{
- QTextStream is(&f);
+ TQTextStream is(&f);
- Config::instance()->parse(QFile::encodeName(fileName));
+ Config::instance()->parse(TQFile::encodeName(fileName));
Config::instance()->convertStrToVal();
f.close();
@@ -258,8 +258,8 @@ void DoxygenPart::slotDoxygen()
}
}
- QString dir = project()->projectDirectory();
- QString cmdline = "cd ";
+ TQString dir = project()->projectDirectory();
+ TQString cmdline = "cd ";
cmdline += KShellProcess::quote( dir );
cmdline += " && doxygen Doxyfile";
if (searchDatabase)
@@ -281,15 +281,15 @@ void DoxygenPart::slotDoxClean()
{
bool could_be_dirty = false;
- QString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
+ TQString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
if ( outputDirectory.isEmpty() )
outputDirectory = project()->projectDirectory();
if ( outputDirectory.right(1) != "/" )
outputDirectory += "/";
- QString cmdline = "cd " + KShellProcess::quote( outputDirectory );
+ TQString cmdline = "cd " + KShellProcess::quote( outputDirectory );
if ( Config_getBool("GENERATE_HTML") ) {
- QString htmlDirectory = Config_getString("HTML_OUTPUT");
+ TQString htmlDirectory = Config_getString("HTML_OUTPUT");
if ( htmlDirectory.isEmpty() )
htmlDirectory = "html";
if ( htmlDirectory.right(1) != "/" )
@@ -299,7 +299,7 @@ void DoxygenPart::slotDoxClean()
}
if ( Config_getBool("GENERATE_LATEX") ) {
- QString latexDirectory = Config_getString("LATEX_OUTPUT");
+ TQString latexDirectory = Config_getString("LATEX_OUTPUT");
if ( latexDirectory.isEmpty() )
latexDirectory = "latex";
if ( latexDirectory.right(1) != "/" )
@@ -309,7 +309,7 @@ void DoxygenPart::slotDoxClean()
}
if ( Config_getBool("GENERATE_RTF") ) {
- QString rtfDirectory = Config_getString("RTF_OUTPUT");
+ TQString rtfDirectory = Config_getString("RTF_OUTPUT");
if ( rtfDirectory.isEmpty() )
rtfDirectory = "rtf";
if ( rtfDirectory.right(1) != "/" )
@@ -319,7 +319,7 @@ void DoxygenPart::slotDoxClean()
}
if ( Config_getBool("GENERATE_MAN") ) {
- QString manDirectory = Config_getString("MAN_OUTPUT");
+ TQString manDirectory = Config_getString("MAN_OUTPUT");
if ( manDirectory.isEmpty() )
manDirectory = "man";
if ( manDirectory.right(1) != "/" )
@@ -329,7 +329,7 @@ void DoxygenPart::slotDoxClean()
}
if ( Config_getBool("GENERATE_XML") ) {
- QString xmlDirectory = Config_getString("XML_OUTPUT");
+ TQString xmlDirectory = Config_getString("XML_OUTPUT");
if ( xmlDirectory.isEmpty() )
xmlDirectory = "xml";
if ( xmlDirectory.right(1) != "/" )
@@ -384,16 +384,16 @@ void DoxygenPart::slotRunPreview( )
ConfigString* pStyle = dynamic_cast<ConfigString*>(config->get("HTML_STYLESHEET"));
//store config values to restore them later | override config values to get only the current file processed
- QCString dirVal;
+ TQCString dirVal;
if (poDir != 0) {
dirVal = *poDir->valueRef();
*poDir->valueRef() = m_tmpDir.name().ascii();
}
- QStrList inputVal;
+ TQStrList inputVal;
if (pInput != 0) {
inputVal = *pInput->valueRef();
- QStrList xl;
+ TQStrList xl;
xl.append(m_file.ascii());
*pInput->valueRef() = xl;
} else {
@@ -402,44 +402,44 @@ void DoxygenPart::slotRunPreview( )
"# directories like \"/usr/src/myproject\". Separate the files or directories\n"
"# with spaces.");
pInput = dynamic_cast<ConfigList*>(config->get("INPUT")); //pinput now has to be != 0
- QStrList xl;
+ TQStrList xl;
xl.append(m_file.ascii());
*pInput->valueRef() = xl;
}
- QCString header;
- QCString footer;
- QCString stylesheet;
+ TQCString header;
+ TQCString footer;
+ TQCString stylesheet;
//if header/footer/stylesheets are set, make sure they get found in the doxygen run
- QString projectDir = project()->projectDirectory();
+ TQString projectDir = project()->projectDirectory();
if (pHeader != 0 && !pHeader->valueRef()->isEmpty()){
header = *pHeader->valueRef();
- QFileInfo info (header);
+ TQFileInfo info (header);
if (info.isRelative())
- *pHeader->valueRef() = QString(projectDir + "/" + QString(header)).ascii();
+ *pHeader->valueRef() = TQString(projectDir + "/" + TQString(header)).ascii();
else
header = 0;
}
if (pFooter != 0 && !pFooter->valueRef()->isEmpty()){
footer = *pFooter->valueRef();
- QFileInfo info (footer);
+ TQFileInfo info (footer);
if (info.isRelative())
- *pFooter->valueRef() = QString(projectDir + "/" + QString(footer)).ascii();
+ *pFooter->valueRef() = TQString(projectDir + "/" + TQString(footer)).ascii();
else
footer = 0;
}
if (pStyle != 0 && !pStyle->valueRef()->isEmpty()){
stylesheet = *pStyle->valueRef();
- QFileInfo info (stylesheet);
+ TQFileInfo info (stylesheet);
if (info.isRelative())
- *pStyle->valueRef() = QString(projectDir +"/" + QString(stylesheet)).ascii();
+ *pStyle->valueRef() = TQString(projectDir +"/" + TQString(stylesheet)).ascii();
else
stylesheet = 0;
}
- QFile file(m_tmpDir.name() +"PreviewDoxyfile"); //file gets deleted automatically 'cause of tempdir
+ TQFile file(m_tmpDir.name() +"PreviewDoxyfile"); //file gets deleted automatically 'cause of tempdir
if (!file.open(IO_WriteOnly)){
//restore config values
if (pInput != 0)
@@ -452,13 +452,13 @@ void DoxygenPart::slotRunPreview( )
return;
}
- QTextStream ts_file(&file);
+ TQTextStream ts_file(&file);
config->writeTemplate(ts_file, false, false);
file.close();
if (inputVal.count() == 0) //pInput is always != 0
- *pInput->valueRef() = QStrList();
+ *pInput->valueRef() = TQStrList();
else
*pInput->valueRef() = inputVal;
@@ -474,7 +474,7 @@ void DoxygenPart::slotRunPreview( )
if (pStyle != 0 && !stylesheet.isNull())
*pStyle->valueRef() = stylesheet;
- connect(appFrontend, SIGNAL(processExited()), this, SLOT(slotPreviewProcessExited()));
+ connect(appFrontend, TQT_SIGNAL(processExited()), this, TQT_SLOT(slotPreviewProcessExited()));
appFrontend->startAppCommand("", "doxygen \"" + file.name() + "\"", false);
}
@@ -485,7 +485,7 @@ void DoxygenPart::slotActivePartChanged( KParts::Part * part )
if (doc != 0)
m_file = doc->url().path();
else
- m_file = QString::null;
+ m_file = TQString::null;
// <-
m_activeEditor = dynamic_cast<KTextEditor::EditInterface*>(part);
m_cursor = part ? dynamic_cast<KTextEditor::ViewCursorInterface*>(part->widget()) : 0;
@@ -532,16 +532,16 @@ void DoxygenPart::slotDocumentFunction(){
functionDef->getStartPosition(&line, &col);
else
return;
- QString funcLine = m_activeEditor->textLine(line);
+ TQString funcLine = m_activeEditor->textLine(line);
unsigned int pos = 0;
unsigned int length = funcLine.length();
while (pos < length && funcLine.at(pos).isSpace())
++pos;
//store chars used for indenting the line and put it in front of every created doc line
- QString indentChars = funcLine.left(pos);
- QString text = indentChars + "/**\n" + indentChars + " * \n";
+ TQString indentChars = funcLine.left(pos);
+ TQString text = indentChars + "/**\n" + indentChars + " * \n";
ArgumentList args;
- QString resultType;
+ TQString resultType;
if (function != 0) {
args = function->argumentList();
resultType = function->resultType();