summaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
Diffstat (limited to 'addon')
-rw-r--r--addon/configgen/Makefile.in42
-rw-r--r--addon/configgen/config_templ.h37
-rw-r--r--addon/configgen/config_templ.l729
-rw-r--r--addon/configgen/configgen.cpp1530
-rw-r--r--addon/configgen/configgen.pro.in20
-rw-r--r--addon/configgen/qtbc.h43
-rw-r--r--addon/doxywizard/Makefile.in52
-rw-r--r--addon/doxywizard/doxywizard.pro.in52
-rw-r--r--addon/doxywizard/doxywizard.t45
-rw-r--r--addon/doxywizard/doxywizard_templ.cpp348
-rw-r--r--addon/doxywizard/doxywizard_templ.h75
-rw-r--r--addon/doxywizard/inputbool.cpp42
-rw-r--r--addon/doxywizard/inputbool.h42
-rw-r--r--addon/doxywizard/inputint.cpp67
-rw-r--r--addon/doxywizard/inputint.h51
-rw-r--r--addon/doxywizard/inputstring.cpp184
-rw-r--r--addon/doxywizard/inputstring.h66
-rw-r--r--addon/doxywizard/inputstrlist.cpp210
-rw-r--r--addon/doxywizard/inputstrlist.h69
-rw-r--r--addon/doxywizard/pagewidget.cpp86
-rw-r--r--addon/doxywizard/pagewidget.h63
-rw-r--r--addon/doxywizard/pixmaps.cpp204
-rw-r--r--addon/doxywizard/pixmaps.h26
-rw-r--r--addon/doxywizard/version.cpp1
-rw-r--r--addon/doxywizard/version.h6
25 files changed, 4090 insertions, 0 deletions
diff --git a/addon/configgen/Makefile.in b/addon/configgen/Makefile.in
new file mode 100644
index 0000000..aa8dd7a
--- /dev/null
+++ b/addon/configgen/Makefile.in
@@ -0,0 +1,42 @@
+#
+#
+#
+# Copyright (C) 1997-2000 by Dimitri van Heesch.
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation under the terms of the GNU General Public License is hereby
+# granted. No representations are made about the suitability of this software
+# for any purpose. It is provided "as is" without express or implied warranty.
+# See the GNU General Public License for more details.
+#
+
+CFGGEN_DIR = bin
+
+all: Makefile.configgen config.h config.l
+ $(MAKE) -f Makefile.configgen $@
+
+Makefile.configgen: configgen.pro
+ $(PERL) $(TMAKE) configgen.pro >Makefile.configgen
+
+config.h: $(CFGGEN_DIR)/configgen config_templ.h
+ $(CFGGEN_DIR)/configgen config_templ.h >config.h
+
+config.l: $(CFGGEN_DIR)/configgen config_templ.l
+ $(CFGGEN_DIR)/configgen config_templ.l >config.l
+
+$(CFGGEN_DIR)/configgen: Makefile.configgen configgen.cpp
+ $(MAKE) -f Makefile.configgen
+
+tmake:
+ $(PERL) $(TMAKE) configgen.pro >Makefile.configgen
+
+install:
+ $(CP) config.l config.h ../../src
+
+clean: Makefile.configgen
+ $(MAKE) -f Makefile.configgen clean
+
+distclean: clean
+ $(RM) config.cpp config.h config.l Makefile.configgen
+
+FORCE:
diff --git a/addon/configgen/config_templ.h b/addon/configgen/config_templ.h
new file mode 100644
index 0000000..f895bab
--- /dev/null
+++ b/addon/configgen/config_templ.h
@@ -0,0 +1,37 @@
+/******************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997-2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#ifndef DOXYWIZARD
+#include "qtbc.h"
+#endif
+#include <qstrlist.h>
+#include <qfile.h>
+
+extern void parseConfig(const QCString &config);
+extern void writeTemplateConfig(QFile *f,bool shortList);
+extern void checkConfig();
+extern void configStrToVal();
+extern void substituteEnvironmentVars();
+
+struct Config
+{
+ static void init();
+
+#CONFIG Header
+};
+
+#endif
diff --git a/addon/configgen/config_templ.l b/addon/configgen/config_templ.l
new file mode 100644
index 0000000..a86156c
--- /dev/null
+++ b/addon/configgen/config_templ.l
@@ -0,0 +1,729 @@
+/******************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997-2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+%{
+
+/*
+ * includes
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <iostream.h>
+#include <assert.h>
+#include <ctype.h>
+
+#include <qfileinfo.h>
+#include <qdir.h>
+#include <qtextstream.h>
+#include <qregexp.h>
+
+#include "config.h"
+#include "version.h"
+
+#ifdef DOXYWIZARD
+#include <stdarg.h>
+void err(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ va_end(args);
+}
+void warn(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ va_end(args);
+}
+#else
+#include "doxygen.h"
+#include "message.h"
+#include "pre.h"
+#include "version.h"
+#include "language.h"
+#endif
+
+#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_UNPUT
+
+/* -----------------------------------------------------------------
+ *
+ * exported variables
+ */
+
+#CONFIG Config
+
+/* -----------------------------------------------------------------
+ *
+ * static variables
+ */
+
+static const char * inputString;
+static int inputPosition;
+static int yyLineNr;
+static QCString tmpString;
+static QCString * s=0;
+static bool * b=0;
+static QStrList * l=0;
+static int lastState;
+static QCString elemStr;
+//static QCString tabSizeString;
+//static QCString colsInAlphaIndexString;
+#CONFIG Static
+
+/* -----------------------------------------------------------------
+ */
+#undef YY_INPUT
+#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
+
+static int yyread(char *buf,int max_size)
+{
+ int c=0;
+ while( c < max_size && inputString[inputPosition] )
+ {
+ *buf = inputString[inputPosition++] ;
+ c++; buf++;
+ }
+ return c;
+}
+
+%}
+
+%option noyywrap
+
+%x Start
+%x SkipComment
+%x GetString
+%x GetBool
+%x GetStrList
+%x GetQuotedString
+%x GetEnvVar
+
+%%
+
+<*>\0x0d
+<Start,GetString,GetStrList,GetBool>"#" { BEGIN(SkipComment); }
+#CONFIG Rules
+<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); }
+<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
+<GetStrList>\n {
+ yyLineNr++;
+ if (!elemStr.isEmpty())
+ {
+ //printf("elemStr1=`%s'\n",elemStr.data());
+ l->append(elemStr);
+ }
+ BEGIN(Start);
+ }
+<GetStrList>[ \t]+ {
+ if (!elemStr.isEmpty())
+ {
+ //printf("elemStr2=`%s'\n",elemStr.data());
+ l->append(elemStr);
+ }
+ elemStr.resize(0);
+ }
+<GetString>[^ \"\t\r\n]+ { (*s)+=yytext; }
+<GetString,GetStrList>"\"" { lastState=YY_START;
+ BEGIN(GetQuotedString);
+ tmpString.resize(0);
+ }
+ /*
+<GetString,GetStrList,GetQuotedString>"\$\(" {
+ //printf(">> Enter env\n");
+ lastEnvState=YY_START;
+ BEGIN(GetEnvVar);
+ }
+<GetEnvVar>[a-z_A-Z0-9]+")" {
+ yytext[yyleng-1]='\0';
+ const char *env=getenv(yytext);
+ int i;
+ int l=strlen(env);
+ //printf("env name=`%s' text=`%s'\n",yytext,env);
+ for (i=l-1;i>=0;i--) unput(env[i]);
+ BEGIN(lastEnvState);
+ }
+ */
+<GetQuotedString>"\""|"\n" {
+ //printf("Quoted String = `%s'\n",tmpString.data());
+ if (lastState==GetString)
+ (*s)+=tmpString;
+ else
+ elemStr+=tmpString;
+ if (*yytext=='\n')
+ {
+ err("Warning: Missing end quote (\") on line %d\n",yyLineNr);
+ yyLineNr++;
+ }
+ BEGIN(lastState);
+ }
+<GetQuotedString>"\\\"" {
+ tmpString+='"';
+ }
+<GetQuotedString>. { tmpString+=*yytext; }
+<GetBool>[a-zA-Z]+ {
+ QCString bs=yytext;
+ bs=bs.upper();
+ if (bs=="YES")
+ *b=TRUE;
+ else if (bs=="NO")
+ *b=FALSE;
+ else
+ {
+ *b=FALSE;
+ warn("Warning: Invalid value `%s' for "
+ "boolean tag in line %d; use YES or NO\n",
+ bs.data(),yyLineNr);
+ }
+ }
+<GetStrList>[^ \#\"\t\r\n]+ {
+ elemStr+=yytext;
+ }
+<SkipComment>\n { yyLineNr++; BEGIN(Start); }
+<SkipComment>\\[ \r\t]*\n { yyLineNr++; BEGIN(Start); }
+<*>\\[ \r\t]*\n { yyLineNr++; }
+<*>.
+<*>\n { yyLineNr++ ; }
+
+%%
+
+/*@ ----------------------------------------------------------------------------
+ */
+
+
+void dumpConfig()
+{
+#CONFIG Dump
+}
+
+void Config::init()
+{
+#CONFIG Init
+}
+
+static void writeBoolValue(QTextStream &t,bool v)
+{
+ if (v) t << "YES"; else t << "NO";
+}
+
+static void writeIntValue(QTextStream &t,int i)
+{
+ t << i;
+}
+
+static void writeStringValue(QTextStream &t,QCString &s)
+{
+ const char *p=s.data();
+ char c;
+ bool hasBlanks=FALSE;
+ if (p)
+ {
+ while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t');
+ if (hasBlanks)
+ t << "\"" << s << "\"";
+ else
+ t << s;
+ }
+}
+
+static void writeStringList(QTextStream &t,QStrList &l)
+{
+ const char *p = l.first();
+ bool first=TRUE;
+ while (p)
+ {
+ char c;
+ const char *s=p;
+ bool hasBlanks=FALSE;
+ while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t');
+ if (!first) t << " ";
+ first=FALSE;
+ if (hasBlanks) t << "\"" << s << "\""; else t << s;
+ p = l.next();
+ if (p) t << " \\" << endl;
+ }
+}
+
+void writeTemplateConfig(QFile *f,bool sl)
+{
+ QTextStream t(f);
+#ifdef DOXYWIZARD
+ t << "# Doxygen configuration generated by Doxywizard version " << versionString << endl;
+#else
+ t << "# Doxyfile " << versionString << endl << endl;
+#endif
+ if (!sl)
+ {
+ t << "# This file describes the settings to be used by doxygen for a project\n";
+ t << "#\n";
+ t << "# All text after a hash (#) is considered a comment and will be ignored\n";
+ t << "# The format is:\n";
+ t << "# TAG = value [value, ...]\n";
+ t << "# Values that contain spaces should be placed between quotes (\" \")\n";
+ }
+#CONFIG Template
+}
+
+void configStrToVal()
+{
+ if (tabSizeString.isEmpty())
+ {
+ Config::tabSize=8;
+ }
+ else
+ {
+ bool ok;
+ int ts = tabSizeString.toInt(&ok);
+ if (!ok || ts<1 || ts>16)
+ {
+ warn("Warning: argument of TAB_SIZE is not a valid number, using tab size of 8 spaces!\n");
+ ts=8;
+ }
+ Config::tabSize = ts;
+ }
+
+ if (colsInAlphaIndexString.isEmpty())
+ {
+ Config::colsInAlphaIndex=5;
+ }
+ else
+ {
+ bool ok;
+ int cols = colsInAlphaIndexString.toInt(&ok);
+ if (!ok || cols<1 || cols>20)
+ {
+ warn("Warning: argument of COLS_IN_ALPHA_INDEX is not a valid number in the range [1..20]!\n"
+ "Using the default of 5 columns!\n");
+ cols = 5;
+ }
+ Config::colsInAlphaIndex=cols;
+ }
+}
+
+static void substEnvVarsInString(QCString &s)
+{
+ QRegExp re("\\$([a-z_A-Z0-9]+)");
+ int p=0;
+ int i,l;
+ //printf("substEnvVarInString(%s) start\n",s.data());
+ while ((i=re.match(s,p,&l))!=-1)
+ {
+ //printf("Found environment var s.mid(%d,%d)=`%s'\n",i+2,l-3,s.mid(i+2,l-3).data());
+ QCString env=getenv(s.mid(i+2,l-3));
+ substEnvVarsInString(env); // recursively expand variables if needed.
+ s = s.left(i)+env+s.right(s.length()-i-l);
+ p=i+l;
+ }
+ //printf("substEnvVarInString(%s) end\n",s.data());
+}
+
+static void substEnvVarsInStrList(QStrList &sl)
+{
+ char *s = sl.first();
+ while (s)
+ {
+ QCString result(s);
+ substEnvVarsInString(result);
+
+ int l=result.length();
+ int i,p=0;
+ // skip spaces
+ // search for a "word"
+ for (i=0;i<l;i++)
+ {
+ char c;
+ // skip until start of new word
+ for (;i<l && ((c=result.at(i))==' ' || c=='\t');i++)
+ p=i; // p marks the start index of the word
+ // skip until end of a word
+ for (;i<l && ((c=result.at(i))!=' ' && c!='\t' && c!='"');i++);
+ if (i<l) // not at the end of the string
+ {
+ if (c=='"') // word within quotes
+ {
+ p=i+1;
+ for (i++;i<l;i++)
+ {
+ c=result.at(i);
+ if (c=='"') // end quote
+ {
+ // replace the string in the list and go to the next item.
+ sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
+ sl.next(); // current item is now the old item
+ p=i+1;
+ break;
+ }
+ else if (c=='\\') // skip escaped stuff
+ {
+ i++;
+ }
+ }
+ }
+ else if (c==' ' || c=='\t') // separator
+ {
+ // replace the string in the list and go to the next item.
+ sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
+ sl.next(); // current item is now the old item
+ p=i+1;
+ }
+ }
+ }
+ if (p!=l) // add the leftover as a string
+ {
+ // replace the string in the list and go to the next item.
+ sl.insert(sl.at(),result.right(l-p)); // insert new item before current item.
+ sl.next(); // current item is now the old item
+ }
+
+ // remove the old unexpanded string from the list
+ i=sl.at();
+ sl.remove(); // current item index changes if the last element is removed.
+ if (sl.at()==i) // not last item
+ s = sl.current();
+ else // just removed last item
+ s = 0;
+ }
+}
+
+
+void substituteEnvironmentVars()
+{
+#CONFIG Substenv
+}
+
+void checkConfig()
+{
+ //if (!projectName.isEmpty())
+ //{
+ // projectName[0]=toupper(projectName[0]);
+ //}
+
+
+ // set default man page extension if non is given by the user
+ if (Config::manExtension.isEmpty())
+ {
+ Config::manExtension=".3";
+ }
+
+ Config::paperType = Config::paperType.lower().stripWhiteSpace();
+ if (Config::paperType.isEmpty())
+ {
+ Config::paperType = "a4wide";
+ }
+ if (Config::paperType!="a4" && Config::paperType!="a4wide" && Config::paperType!="letter" &&
+ Config::paperType!="legal" && Config::paperType!="executive")
+ {
+ err("Error: Unknown page type specified");
+ }
+
+ Config::outputLanguage=Config::outputLanguage.stripWhiteSpace();
+ if (Config::outputLanguage.isEmpty())
+ {
+ Config::outputLanguage = "English";
+#ifndef DOXYWIZARD
+ setTranslator("English");
+#endif
+ }
+ else
+ {
+#ifndef DOXYWIZARD
+ if (!setTranslator(Config::outputLanguage))
+ {
+ err("Error: Output language %s not supported! Using English instead.\n",
+ Config::outputLanguage.data());
+ }
+#endif
+ }
+
+ // Test to see if output directory is valid
+ if (Config::outputDir.isEmpty())
+ Config::outputDir=QDir::currentDirPath();
+ else
+ {
+ QDir dir(Config::outputDir);
+ if (!dir.exists())
+ {
+ dir.setPath(QDir::currentDirPath());
+ if (!dir.mkdir(Config::outputDir))
+ {
+ err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not "
+ "exist and cannot be created\n",Config::outputDir.data());
+ exit(1);
+ }
+ else if (!Config::quietFlag)
+ {
+ err("Notice: Output directory `%s' does not exist. "
+ "I have created it for you.\n", Config::outputDir.data());
+ }
+ dir.cd(Config::outputDir);
+ }
+ Config::outputDir=dir.absPath();
+ }
+
+ if (Config::htmlOutputDir.isEmpty() && Config::generateHtml)
+ {
+ Config::htmlOutputDir=Config::outputDir+"/html";
+ }
+ else if (Config::htmlOutputDir && Config::htmlOutputDir[0]!='/')
+ {
+ Config::htmlOutputDir.prepend(Config::outputDir+'/');
+ }
+ QDir htmlDir(Config::htmlOutputDir);
+ if (Config::generateHtml && !htmlDir.exists() &&
+ !htmlDir.mkdir(Config::htmlOutputDir))
+ {
+ err("Could not create output directory %s\n",Config::htmlOutputDir.data());
+ exit(1);
+ }
+
+ if (Config::latexOutputDir.isEmpty() && Config::generateLatex)
+ {
+ Config::latexOutputDir=Config::outputDir+"/latex";
+ }
+ else if (Config::latexOutputDir && Config::latexOutputDir[0]!='/')
+ {
+ Config::latexOutputDir.prepend(Config::outputDir+'/');
+ }
+ QDir latexDir(Config::latexOutputDir);
+ if (Config::generateLatex && !latexDir.exists() &&
+ !latexDir.mkdir(Config::latexOutputDir))
+ {
+ err("Could not create output directory %s\n",Config::latexOutputDir.data());
+ exit(1);
+ }
+
+ if (Config::rtfOutputDir.isEmpty() && Config::generateRTF)
+ {
+ Config::rtfOutputDir=Config::outputDir+"/rtf";
+ }
+ else if (Config::rtfOutputDir && Config::rtfOutputDir[0]!='/')
+ {
+ Config::rtfOutputDir.prepend(Config::outputDir+'/');
+ }
+ QDir rtfDir(Config::rtfOutputDir);
+ if (Config::generateRTF && !rtfDir.exists() &&
+ !rtfDir.mkdir(Config::rtfOutputDir))
+ {
+ err("Could not create output directory %s\n",Config::rtfOutputDir.data());
+ exit(1);
+ }
+
+ if (Config::manOutputDir.isEmpty() && Config::generateMan)
+ {
+ Config::manOutputDir=Config::outputDir+"/man";
+ }
+ else if (Config::manOutputDir && Config::manOutputDir[0]!='/')
+ {
+ Config::manOutputDir.prepend(Config::outputDir+'/');
+ }
+ QDir manDir(Config::manOutputDir);
+ if (Config::generateMan && !manDir.exists() &&
+ !manDir.mkdir(Config::manOutputDir))
+ {
+ err("Could not create output directory %s\n",Config::manOutputDir.data());
+ exit(1);
+ }
+
+ // Test to see if HTML header is valid
+ if (!Config::headerFile.isEmpty())
+ {
+ QFileInfo fi(Config::headerFile);
+ if (!fi.exists())
+ {
+ err("Error: tag HTML_HEADER: header file `%s' "
+ "does not exist\n",Config::headerFile.data());
+ exit(1);
+ }
+ }
+ // Test to see if HTML footer is valid
+ if (!Config::footerFile.isEmpty())
+ {
+ QFileInfo fi(Config::footerFile);
+ if (!fi.exists())
+ {
+ err("Error: tag HTML_FOOTER: footer file `%s' "
+ "does not exist\n",Config::footerFile.data());
+ exit(1);
+ }
+ }
+ // Test to see if LaTeX header is valid
+ if (!Config::latexHeaderFile.isEmpty())
+ {
+ QFileInfo fi(Config::latexHeaderFile);
+ if (!fi.exists())
+ {
+ err("Error: tag LATEX_HEADER: header file `%s' "
+ "does not exist\n",Config::latexHeaderFile.data());
+ exit(1);
+ }
+ }
+ // check include path
+ char *s=Config::includePath.first();
+ while (s)
+ {
+ QFileInfo fi(s);
+ if (!fi.exists()) err("Warning: tag INCLUDE_PATH: include path `%s' "
+ "does not exist\n",s);
+#ifndef DOXYWIZARD
+ addSearchDir(fi.absFilePath());
+#endif
+ s=Config::includePath.next();
+ }
+ // check input
+ if (Config::inputSources.count()==0)
+ {
+ err("Error: tag INPUT: no input files specified after the INPUT tag.\n");
+ exit(1);
+ }
+ else
+ {
+ s=Config::inputSources.first();
+ while (s)
+ {
+ QFileInfo fi(s);
+ if (!fi.exists())
+ {
+ err("Error: tag INPUT: input source `%s' does not exist\n",s);
+ exit(1);
+ }
+ s=Config::inputSources.next();
+ }
+ }
+
+ // add default pattern if needed
+ if (Config::filePatternList.count()==0)
+ {
+ Config::filePatternList.append("*");
+ }
+
+ // add default pattern if needed
+ if (Config::examplePatternList.count()==0)
+ {
+ Config::examplePatternList.append("*");
+ }
+
+ // add default pattern if needed
+ //if (Config::imagePatternList.count()==0)
+ //{
+ // Config::imagePatternList.append("*");
+ //}
+
+ // more checks needed if and only if the search engine is enabled.
+ if (Config::searchEngineFlag)
+ {
+ // check cgi name
+ if (Config::cgiName.isEmpty())
+ {
+ err("Error: tag CGI_NAME: no cgi script name after the CGI_NAME tag.\n");
+ exit(1);
+ }
+ // check cgi URL
+ if (Config::cgiURL.isEmpty())
+ {
+ err("Error: tag CGI_URL: no URL to cgi directory specified.\n");
+ exit(1);
+ }
+ else if (Config::cgiURL.left(7)!="http://")
+ {
+ err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
+ "start with http://).\n");
+ exit(1);
+ }
+ // check documentation URL
+ if (Config::docURL.isEmpty())
+ {
+ Config::docURL = Config::outputDir.copy().prepend("file://").append("html");
+ }
+ else if (Config::docURL.left(7)!="http://" && Config::docURL.left(7)!="file://")
+ {
+ err("Error: tag DOC_URL: URL to documentation is invalid or "
+ "not absolute.\n");
+ exit(1);
+ }
+ // check absolute documentation path
+ if (Config::docAbsPath.isEmpty())
+ {
+ Config::docAbsPath = Config::outputDir+"/html";
+ }
+ else if (Config::docAbsPath[0]!='/' && Config::docAbsPath[1]!=':')
+ {
+ err("Error: tag DOC_ABSPATH: path is not absolute!\n");
+ exit(1);
+ }
+ // check path to doxysearch
+ if (Config::binAbsPath.isEmpty())
+ {
+ err("Error: tag BIN_ABSPATH: no absolute path to doxysearch "
+ "specified.\n");
+ exit(1);
+ }
+ else if (Config::binAbsPath[0]!='/' && Config::binAbsPath[1]!=':')
+ {
+ err("Error: tag BIN_ABSPATH: path is not absolute!\n");
+ exit(1);
+ }
+
+ // check perl path
+ bool found=FALSE;
+ if (Config::perlPath.isEmpty())
+ {
+ QFileInfo fi;
+ fi.setFile("/usr/bin/perl");
+ if (fi.exists())
+ {
+ Config::perlPath="/usr/bin/perl";
+ found=TRUE;
+ }
+ else
+ {
+ fi.setFile("/usr/local/bin/perl");
+ if (fi.exists())
+ {
+ Config::perlPath="/usr/local/bin/perl";
+ found=TRUE;
+ }
+ }
+ }
+ if (!found)
+ {
+ QFileInfo fi(Config::perlPath);
+ if (!fi.exists())
+ {
+ warn("Warning: tag PERL_PATH: perl interpreter not found at default or"
+ "user specified (%s) location\n",
+ Config::perlPath.data());
+ }
+ }
+ }
+
+#if defined(_WIN32)
+ if (Config::haveDotFlag) _putenv("DOTFONTPATH=.");
+#endif
+
+}
+
+void parseConfig(const QCString &s)
+{
+ inputString = s;
+ inputPosition = 0;
+ yyLineNr = 1;
+ configYYrestart( configYYin );
+ BEGIN( Start );
+ configYYlex();
+}
+
+//extern "C" { // some bogus code to keep the compiler happy
+// int configYYwrap() { return 1 ; }
+//}
diff --git a/addon/configgen/configgen.cpp b/addon/configgen/configgen.cpp
new file mode 100644
index 0000000..553db76
--- /dev/null
+++ b/addon/configgen/configgen.cpp
@@ -0,0 +1,1530 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Joerg Baumann & Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * All output generated with Doxygen is not covered by this license.
+ *
+ */
+
+// includes
+
+#include "qtbc.h"
+#include <qtextstream.h>
+#include <qfile.h>
+#include <qlist.h>
+#include <qdict.h>
+#include <qstringlist.h>
+
+#include <stdio.h>
+
+static QString spaces=" ";
+
+void init(); // defined below
+
+// Iterate over all options calling the spezified method
+#define FORALL(x) \
+{\
+ ConfigOption *co=ConfigOption::optionList.first();\
+ while (co)\
+ {\
+ co->x;\
+ co=ConfigOption::optionList.next();\
+ }\
+}
+
+/*! convert a normal string \a s into a string that can be embedded in C code.
+ * The \a prefix string will be placed before each string line and the
+ * \a postfix string will be placed after each string.
+ */
+static void stringToC(QTextStream &t,QCString &s,
+ const char *prefix,const char *postfix)
+{
+ int i=0,l=s.length();
+ bool eol=TRUE;
+ for (i=0;i<l;i++)
+ {
+ char c;
+ switch ((c=s[i]))
+ {
+ case '\n':
+ t << postfix << endl;
+ eol=TRUE;
+ break;
+ case '\\':
+ case '"':
+ if (eol) t << prefix;
+ t << "\\" << (char)c;
+ eol=FALSE;
+ break;
+ default:
+ if (eol) t << prefix;
+ eol=FALSE;
+ t << (char)c;
+ break;
+ }
+ }
+ if (!eol) t << postfix << endl;
+}
+
+class ConfigBool;
+
+/*! baseclass for options */
+class ConfigOption
+{
+ public:
+ static QList<ConfigOption> optionList;
+ static QDict<ConfigOption> optionDict;
+ QCString getVarName() const { return varName; }
+
+ virtual ~ConfigOption() {}
+
+ virtual void printHeader(QTextStream &t)
+ {
+ t << " static " << type << " " << varName
+ << "; // " << shortDesc << endl;
+ }
+ virtual void printStatic(QTextStream &) {}
+ virtual void printConfig(QTextStream &t)
+ {
+ t << type << " Config::" << varName;
+ if (!defaultValue.isEmpty()) t << " = \"" << defaultValue << "\"";
+ t << ";" << endl;
+ }
+ virtual void printRules(QTextStream &)
+ {
+ }
+ virtual void printDump(QTextStream &)
+ {
+ }
+ virtual void printCheck(QTextStream &t)
+ {
+ // FIXME
+ if (!check.isEmpty()) t << check << endl;
+ }
+ virtual void printInit(QTextStream &t)
+ {
+ t << " Config::" << varName << " = "
+ << defaultValue << ";" << endl;
+ }
+ virtual void printTemplate(QTextStream &t)
+ {
+ t << " if (!sl)" << endl;
+ t << " {" << endl;
+ t << " t << \"\\n\";" << endl;
+ stringToC(t,longDesc," t << \"# ","\\n\";");
+ t << " t << \"\\n\";" << endl;
+ t << " }" << endl;
+ t << " t << \"" << cfgName << " = \";" << endl;
+ t << " " << writeFunc << "(t,Config::" << varName << ");" << endl;
+ t << " t << \"\\n\";" << endl;
+ }
+ virtual void printSubstEnv(QTextStream &) {}
+ virtual void printWidgets(QTextStream &,int) = 0;
+ virtual void addDependency(ConfigOption *)
+ {
+ fprintf(stderr,"Error: dependency add for non boolean option!\n");
+ }
+ void setDependsOn(ConfigBool *b) { depends=b; }
+
+ protected:
+ ConfigOption(const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_,const char * type_,
+ const char * type2_,const char * writeFunc_
+ ):
+ varName(var), cfgName(cfg), defaultValue(value), shortDesc(short_),
+ longDesc(long_), type(type_), type2(type2_), writeFunc(writeFunc_)
+ {
+ if (optionDict.find(var)!=0)
+ {
+ fprintf(stderr,"Error: configuration variable found more than once!\n");
+ }
+ else
+ {
+ optionList.append(this);
+ optionDict.insert(var,this);
+ }
+ depends=0;
+ }
+
+ void tclQuote(QTextStream &t,const char *s)
+ {
+ t << "{";
+ for (const char *p=s;*p!=0;p++)
+ {
+ if (strchr("{}",*p)) t << '\\';
+ t << (*p);
+ }
+ t << "} ";
+ }
+
+ QCString varName; // name as in Config::name
+ QCString cfgName; // name as in cfgfile
+ QCString defaultValue; // default value
+ QCString shortDesc; // short description
+ QCString longDesc; // long description
+ QCString type,type2; //
+ QCString writeFunc; //
+ QCString check; //
+ ConfigBool *depends;
+};
+
+QList<ConfigOption> ConfigOption::optionList;
+QDict<ConfigOption> ConfigOption::optionDict;
+
+void addDependency(const char *src,const char *dst)
+{
+ ConfigOption *sopt = ConfigOption::optionDict.find(src);
+ ConfigOption *dopt = ConfigOption::optionDict.find(dst);
+ if (!sopt)
+ {
+ fprintf(stderr,"Error: option %s not defined!\n",src);
+ }
+ if (!dopt)
+ {
+ fprintf(stderr,"Error: option %s not defined!\n",dst);
+ }
+ dopt->addDependency(sopt);
+ sopt->setDependsOn((ConfigBool *)dopt);
+}
+
+
+class ConfigInfo : public ConfigOption
+{
+ public:
+ ConfigInfo(const char *var,const char * short_)
+ : ConfigOption(var,"","",short_,"","","","") {}
+ static void add(const char *var,const char * short_);
+ void printHeader(QTextStream &) {}
+ void printConfig(QTextStream &) {}
+ void printRules(QTextStream &) {}
+ virtual void printTemplate(QTextStream &t)
+ {
+ t << " if (!sl)" << endl;
+ t << " {" << endl;
+ t << " t << \"\\n\";" << endl;
+ t << " }" << endl;
+ t << " t << \"#---------------------------------------------------------------------------\\n\";" << endl;
+ t << " t << \"# " << shortDesc << "\\n\";" << endl;
+ t << " t << \"#---------------------------------------------------------------------------\\n\";" << endl;
+ }
+ virtual void printInit(QTextStream &) {}
+ virtual void printDump(QTextStream &t)
+ {
+ t << " printf(\"# " << shortDesc << "\\n\");" << endl;
+ }
+ virtual void printWidgets(QTextStream &t,int pass)
+ {
+ switch(pass)
+ {
+ case 0:
+ t << " PageWidget *" << varName << " = new PageWidget( tab, \""
+ << varName << "\" );" << endl;
+ break;
+ case 1:
+ t << " " << varName << "->addStretch(1);" << endl;
+ break;
+ default:
+ break;
+ }
+ }
+ QCString getVarName() { return varName; }
+};
+
+class ConfigList : public ConfigOption
+{
+ public:
+ enum WidgetType { String, File, Dir, FileAndDir };
+ ConfigList(ConfigInfo *parent,const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_, WidgetType w)
+ : ConfigOption(var,cfg,value,short_,long_,"QStrList","List","writeStringList"),
+ m_parent(parent),
+ m_widgetType(w)
+ {
+ }
+ static void add(const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_,WidgetType w=String);
+ virtual void printRules(QTextStream &t)
+ {
+ t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
+ t << spaces.left(22-cfgName.length());
+ t << "{ BEGIN(GetStrList); l=&Config::" << varName;
+ t << "; l->clear(); elemStr=\"\"; }" << endl;
+ }
+ virtual void printInit(QTextStream &t)
+ {
+ t << " Config::" << varName;
+ if (!defaultValue.isEmpty())
+ {
+ t << " = \"" << defaultValue << "\"";
+ }
+ else
+ {
+ t << ".clear()";
+ }
+ t << ";" << endl;
+ }
+ virtual void printDump(QTextStream &t)
+ {
+ t << " {" << endl;
+ t << " char *is=Config::" << varName << ".first();" << endl;
+ t << " while (is)" << endl;
+ t << " {" << endl;
+ t << " printf(\"" << varName << "=`%s'\\n\",is);" << endl;
+ t << " is=Config::" << varName << ".next();" << endl;
+ t << " }" << endl;
+ t << " }" << endl;
+ }
+ virtual void printSubstEnv(QTextStream &t)
+ {
+ t << " substEnvVarsInStrList( Config::" << varName << " );" << endl;
+ }
+ virtual void printWidgets(QTextStream &t,int pass)
+ {
+ switch (pass)
+ {
+ case 0:
+ {
+ t << " " << varName << " = new InputStrList( \"" << cfgName
+ << "\", " << m_parent->getVarName() << ", Config::" << varName;
+ if (m_widgetType!=String)
+ {
+ t << ",";
+ switch(m_widgetType)
+ {
+ case File: t << "InputStrList::ListFile"; break;
+ case Dir: t << "InputStrList::ListDir"; break;
+ case FileAndDir: t << "InputStrList::ListFileDir"; break;
+ default: break;
+ }
+ }
+ t << " );" << endl;
+ t << " QWhatsThis::add(" << varName << ", " << endl;
+ stringToC(t,longDesc," \"","\"");
+ t << " );" << endl;
+ t << " connect(" << varName
+ << ",SIGNAL(changed()),this,SIGNAL(changed()));" << endl;
+ }
+ break;
+ case 2:
+ {
+ t << " InputStrList *" << varName << ";" << endl;
+ }
+ break;
+ case 5:
+ {
+ t << " " << varName << "->init();" << endl;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ private:
+ ConfigInfo *m_parent;
+ WidgetType m_widgetType;
+};
+
+class ConfigString : public ConfigOption
+{
+ public:
+ enum WidgetType { String, File, Dir };
+ ConfigString(ConfigInfo *parent, const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_, WidgetType w
+ )
+ : ConfigOption(var,cfg,value,short_,long_,
+ "QCString","String","writeStringValue"
+ ),
+ m_parent(parent),
+ m_widgetType(w)
+ {
+ }
+
+ static void add(const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_,WidgetType w=String);
+ static void addFixedValue(const char *var, const char *value);
+
+ virtual void printRules(QTextStream &t)
+ {
+ t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
+ t << spaces.left(22-cfgName.length());
+ t << "{ BEGIN(GetString); s=&Config::" << varName;
+ t << "; s->resize(0); }" << endl;
+ }
+ virtual void printInit(QTextStream &t)
+ {
+ t << " Config::" << varName;
+ if (!defaultValue.isEmpty()) t << " = \"" << defaultValue << "\"";
+ else t << ".resize(0)";
+ t << ";" << endl;
+ }
+ virtual void printDump(QTextStream &t)
+ {
+ t << " printf(\"" << varName << "=`%s'\\n\",Config::" << varName << ".data());" << endl;
+ }
+ virtual void printSubstEnv(QTextStream &t)
+ {
+ t << " substEnvVarsInString( Config::" << varName << " );" << endl;
+ }
+ virtual void printWidgets(QTextStream &t,int pass)
+ {
+ switch (pass)
+ {
+ case 0:
+ {
+ t << " " << varName << " = new InputString( \"" << cfgName
+ << "\", " << m_parent->getVarName() << ", Config::" << varName;
+ if (m_widgetType!=String || m_values.count()>0)
+ {
+ t << ",";
+ switch (m_widgetType)
+ {
+ case File:
+ t << "InputString::StringFile";
+ break;
+ case Dir:
+ t << "InputString::StringDir";
+ break;
+ default:
+ t << "InputString::StringFixed";
+ break;
+ }
+ }
+
+ t << " );" << endl;
+ t << " QWhatsThis::add(" << varName << ", " << endl;
+ stringToC(t,longDesc," \"","\"");
+ t << " );" << endl;
+ t << " connect(" << varName
+ << ",SIGNAL(changed()),this,SIGNAL(changed()));" << endl;
+ if (m_values.count()>0)
+ {
+ for ( QStringList::Iterator it = m_values.begin(); it != m_values.end(); ++it )
+ {
+ t << " " << varName << "->addValue(\"" << (*it) << "\");" << endl;
+ }
+ }
+ }
+ break;
+ case 2:
+ {
+ t << " InputString *" << varName << ";" << endl;
+ }
+ break;
+ case 5:
+ {
+ t << " " << varName << "->init();" << endl;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ void addValue(const char *val)
+ {
+ m_values.append(val);
+ }
+ private:
+ ConfigInfo *m_parent;
+ WidgetType m_widgetType;
+ QStringList m_values;
+};
+
+class ConfigInt : public ConfigOption
+{
+ public:
+ ConfigInt(ConfigInfo *parent,const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_,int minVal,int maxVal)
+ : ConfigOption(var,cfg,value,short_,long_,"int ","Int","writeIntValue"),
+ m_parent(parent), m_minVal(minVal), m_maxVal(maxVal)
+ {
+ }
+ static void add(const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_,int minVal,int maxVal);
+ virtual void printConfig(QTextStream &t)
+ {
+ t << type << " Config::" << varName;
+ if (!defaultValue.isEmpty()) t << " = " << defaultValue;
+ t << ";" << endl;
+ }
+ virtual void printRules(QTextStream &t)
+ {
+ t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
+ t << spaces.left(22-cfgName.length());
+ t << "{ BEGIN(GetString); s=&" << varName;
+ t << "String; s->resize(0); }" << endl;
+ }
+ virtual void printStatic(QTextStream &t)
+ {
+ t << "static QCString " << varName << "String;" << endl;
+ }
+ virtual void printDump(QTextStream &t)
+ {
+ t << " printf(\"" << varName << "=`%d'\\n\",Config::" << varName << ");" << endl;
+ }
+ virtual void printWidgets(QTextStream &t,int pass)
+ {
+ switch (pass)
+ {
+ case 0:
+ {
+ t << " " << varName << " = new InputInt( \"" << cfgName
+ << "\", " << m_parent->getVarName() << ", Config::"
+ << varName << "," << m_minVal << "," << m_maxVal << " );" << endl;
+ t << " QWhatsThis::add(" << varName << ", " << endl;
+ stringToC(t,longDesc," \"","\"");
+ t << " );" << endl;
+ t << " connect(" << varName
+ << ",SIGNAL(changed()),this,SIGNAL(changed()));" << endl;
+ }
+ break;
+ case 2:
+ {
+ t << " InputInt *" << varName << ";" << endl;
+ }
+ break;
+ case 5:
+ {
+ t << " " << varName << "->init();" << endl;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ private:
+ ConfigInfo *m_parent;
+ int m_minVal;
+ int m_maxVal;
+};
+
+class ConfigBool : public ConfigOption
+{
+ public:
+ ConfigBool(ConfigInfo *parent,const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_)
+ : ConfigOption(var,cfg,value,short_,long_,"bool ","Bool","writeBoolValue"),
+ m_parent(parent) {}
+ static void add(const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_);
+ virtual void printConfig(QTextStream &t)
+ {
+ t << type << " Config::" << varName;
+ if (!defaultValue.isEmpty()) t << " = " << defaultValue;
+ t << ";" << endl;
+ }
+ virtual void printRules(QTextStream &t)
+ {
+ t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
+ t << spaces.left(22-cfgName.length());
+ t << "{ BEGIN(GetBool); b=&Config::" << varName;
+ t << "; }" << endl;
+ }
+ virtual void printDump(QTextStream &t)
+ {
+ t << " printf(\"" << varName << "=`%d'\\n\",Config::" << varName << ");" << endl;
+ }
+ virtual void printWidgets(QTextStream &t,int pass)
+ {
+ switch (pass)
+ {
+ case 0:
+ {
+ t << " " << varName << " = new InputBool( \"" << cfgName
+ << "\", " << m_parent->getVarName() << ", Config::" << varName << " );" << endl;
+ t << " QWhatsThis::add(" << varName << ", " << endl;
+ stringToC(t,longDesc," \"","\"");
+ t << " );" << endl;
+ t << " connect(" << varName
+ << ",SIGNAL(changed()),this,SIGNAL(changed()));" << endl;
+ if (dependencies.count()>0)
+ {
+ t << " connect(" << varName << ",SIGNAL(toggled(bool)),SLOT("
+ << varName << "Toggle(bool)));" << endl;
+ }
+ }
+ break;
+ case 1:
+ {
+ if (dependencies.count()>0)
+ {
+ t << " " << varName << "Toggle(Config::" << varName << ");" << endl;
+ }
+ }
+ break;
+ case 2:
+ {
+ t << " InputBool *" << varName << ";" << endl;
+ }
+ break;
+ case 3:
+ {
+ if (dependencies.count()>0)
+ {
+ t << " void " << varName << "Toggle(bool);" << endl;
+ }
+ }
+ break;
+ case 4:
+ {
+ if (dependencies.count()>0)
+ {
+ t << "void ConfigFile::" << varName << "Toggle(bool state)" << endl;
+ t << "{" << endl;
+ ConfigOption *o=dependencies.first();
+ while (o)
+ {
+ t << " " << o->getVarName() << "->setEnabled(state);" << endl;
+ o=dependencies.next();
+ }
+ t << "}" << endl << endl;
+ }
+ }
+ break;
+ case 5:
+ {
+ t << " " << varName << "->init();" << endl;
+ }
+ default:
+ break;
+ }
+ }
+ virtual void addDependency(ConfigOption *o)
+ {
+ dependencies.append(o);
+ }
+ private:
+ ConfigInfo *m_parent;
+ QList<ConfigOption> dependencies;
+};
+
+static ConfigInfo *g_lastConfigInfo;
+
+void ConfigList::add(const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_,WidgetType w)
+{
+ ConfigOption* o=new ConfigList(g_lastConfigInfo,var,cfg,value,short_,long_,w);
+ ASSERT(o!=0);
+ ASSERT(g_lastConfigInfo!=0);
+ //optionList.append(o);
+}
+
+void ConfigString::add(const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_,WidgetType w)
+{
+ ConfigOption* o=new ConfigString(g_lastConfigInfo,var,cfg,value,short_,long_,w);
+ ASSERT(o!=0);
+ ASSERT(g_lastConfigInfo!=0);
+ //optionList.append(o);
+}
+
+void ConfigInt::add(const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_,int minVal, int maxVal)
+{
+ ConfigOption* o=new ConfigInt(g_lastConfigInfo,var,cfg,value,
+ short_,long_,minVal,maxVal);
+ ASSERT(o!=0);
+ ASSERT(g_lastConfigInfo!=0);
+ //optionList.append(o);
+}
+
+void ConfigBool::add(const char * var,const char * cfg,const char * value,
+ const char * short_,const char * long_)
+{
+ ConfigOption* o=new ConfigBool(g_lastConfigInfo,var,cfg,value,short_,long_);
+ ASSERT(o!=0);
+ ASSERT(g_lastConfigInfo!=0);
+ //optionList.append(o);
+}
+
+void ConfigInfo::add(const char * var,const char * short_)
+{
+ g_lastConfigInfo =new ConfigInfo(var,short_);
+ ASSERT(g_lastConfigInfo!=0);
+ //optionList.append(g_lastConfigInfo);
+}
+
+void ConfigString::addFixedValue(const char *var, const char *value)
+{
+ ConfigString *cs = (ConfigString *)optionDict[var];
+ if (cs==0)
+ {
+ fprintf(stderr,"ConfigString::addFixedValue: unknown variable %s\n",var);
+ }
+ else
+ {
+ cs->addValue(value);
+ }
+}
+
+
+int main(int argc,char * argv[])
+{
+ // check arguments
+ if (argc!=2)
+ {
+ fprintf(stderr,"usage: %s config-template\n",argv[0]);
+ exit(1);
+ }
+
+ init(); // create options
+ QFile ctfile(argv[1]);
+
+ // open template file
+ if (!ctfile.open(IO_ReadOnly))
+ {
+ fprintf(stderr,"Error: couldn´t open file %s\n",argv[1]);
+ exit(1);
+ }
+ const int maxLineLen=10000;
+ char buf[maxLineLen];
+
+
+ QFile f;
+ f.open(IO_WriteOnly,stdout);
+ QTextStream t(&f);
+
+ // process template file
+ while (!ctfile.atEnd())
+ {
+ ctfile.readLine(buf,maxLineLen-1);
+ if (QCString("#CONFIG Config\n" )==buf) FORALL(printConfig(t))
+ else if (QCString("#CONFIG Static\n" )==buf) FORALL(printStatic(t))
+ else if (QCString("#CONFIG Rules\n" )==buf) FORALL(printRules(t))
+ else if (QCString("#CONFIG Dump\n" )==buf) FORALL(printDump(t))
+ else if (QCString("#CONFIG Init\n" )==buf) FORALL(printInit(t))
+ else if (QCString("#CONFIG Template\n")==buf) FORALL(printTemplate(t))
+ else if (QCString("#CONFIG Check\n" )==buf) FORALL(printCheck(t))
+ else if (QCString("#CONFIG Header\n" )==buf) FORALL(printHeader(t))
+ else if (QCString("#CONFIG Substenv\n")==buf) FORALL(printSubstEnv(t))
+ else if (QCString("#CONFIG Widgets0\n" )==buf) FORALL(printWidgets(t,0))
+ else if (QCString("#CONFIG Widgets1\n" )==buf) FORALL(printWidgets(t,1))
+ else if (QCString("#CONFIG WidgetVars\n" )==buf) FORALL(printWidgets(t,2))
+ else if (QCString("#CONFIG WidgetSlots\n" )==buf) FORALL(printWidgets(t,3))
+ else if (QCString("#CONFIG WidgetSlotImpl\n" )==buf) FORALL(printWidgets(t,4))
+ else if (QCString("#CONFIG WidgetInit\n" )==buf) FORALL(printWidgets(t,5))
+ else t << buf;
+ }
+ ctfile.close();
+ return 0;
+}
+
+void init()
+{
+ // option definitions
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add("General","General configuration options");
+ //-----------------------------------------------------------------------------------------------
+
+ ConfigString::add("projectName",
+ "PROJECT_NAME",
+ "",
+ "the name of the project",
+ "The PROJECT_NAME tag is a single word (or a sequence of words surrounded \n"
+ "by quotes) that should identify the project. "
+ );
+ ConfigString::add("projectNumber",
+ "PROJECT_NUMBER",
+ "",
+ "the number of the project",
+ "The PROJECT_NUMBER tag can be used to enter a project or revision number. \n"
+ "This could be handy for archiving the generated documentation or \n"
+ "if some version control system is used.\n"
+ );
+ ConfigString::add("outputDir",
+ "OUTPUT_DIRECTORY",
+ "",
+ "the global output directory",
+ "The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) \n"
+ "base path where the generated documentation will be put. \n"
+ "If a relative path is entered, it will be relative to the location \n"
+ "where doxygen was started. If left blank the current directory will be used.\n",
+ ConfigString::Dir
+ );
+ ConfigString::add("outputLanguage",
+ "OUTPUT_LANGUAGE",
+ "English",
+ "the output language",
+ "The OUTPUT_LANGUAGE tag is used to specify the language in which all \n"
+ "documentation generated by doxygen is written. Doxygen will use this \n"
+ "information to generate all constant output in the proper language. \n"
+ "The default language is English, other supported languages are: \n"
+ "Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, \n"
+ "Spanish and Russian\n"
+ );
+ ConfigString::addFixedValue("outputLanguage","English");
+ ConfigString::addFixedValue("outputLanguage","Dutch");
+ ConfigString::addFixedValue("outputLanguage","French");
+ ConfigString::addFixedValue("outputLanguage","Italian");
+ ConfigString::addFixedValue("outputLanguage","Czech");
+ ConfigString::addFixedValue("outputLanguage","Swedish");
+ ConfigString::addFixedValue("outputLanguage","German");
+ ConfigString::addFixedValue("outputLanguage","Russian");
+ ConfigString::addFixedValue("outputLanguage","Japanese");
+ ConfigString::addFixedValue("outputLanguage","Finnish");
+ ConfigString::addFixedValue("outputLanguage","Spanish");
+ ConfigBool::add( "quietFlag",
+ "QUIET",
+ "FALSE",
+ "generate progress messages flag",
+ "The QUIET tag can be used to turn on/off the messages that are generated \n"
+ "by doxygen. Possible values are YES and NO. If left blank NO is used. \n"
+ );
+ ConfigBool::add( "warningFlag",
+ "WARNINGS",
+ "TRUE",
+ "generate warnings flag",
+ "The WARNINGS tag can be used to turn on/off the warning messages that are \n"
+ "generated by doxygen. Possible values are YES and NO. If left blank \n"
+ "NO is used. \n"
+ );
+ ConfigBool::add( "noIndexFlag",
+ "DISABLE_INDEX",
+ "FALSE",
+ "generate condensed index flag",
+ "The DISABLE_INDEX tag can be used to turn on/off the condensed index at \n"
+ "top of each HTML page. The value NO (the default) enables the index and \n"
+ "the value YES disables it. \n"
+ );
+ ConfigBool::add( "extractAllFlag",
+ "EXTRACT_ALL",
+ "FALSE",
+ "gererate docs for all classes flag",
+ "If the EXTRACT_ALL tag is set to YES all classes and functions will be \n"
+ "included in the documentation, even if no documentation was available. \n"
+ );
+ ConfigBool::add( "extractPrivateFlag",
+ "EXTRACT_PRIVATE",
+ "FALSE",
+ "generate docs for private members flag",
+ "If the EXTRACT_PRIVATE tag is set to YES all private members of a class \n"
+ "will be included in the documentation. \n"
+ );
+ ConfigBool::add( "hideMemberFlag",
+ "HIDE_UNDOC_MEMBERS",
+ "FALSE",
+ "hide undocumented members.",
+ "If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \n"
+ "undocumented members inside documented classes or files. \n"
+ );
+ ConfigBool::add( "hideClassFlag",
+ "HIDE_UNDOC_CLASSES",
+ "FALSE",
+ "hide undocumented members.",
+ "If the HIDE_UNDOC_CLASSESS tag is set to YES, Doxygen will hide all \n"
+ "undocumented classes. \n"
+ );
+ ConfigBool::add( "briefMemDescFlag",
+ "BRIEF_MEMBER_DESC",
+ "TRUE",
+ "enable `inline' brief member descr.",
+ "If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will \n"
+ "include brief member descriptions after the members that are listed in \n"
+ "the file and class documentation (similar to JavaDoc). \n"
+ "Set to NO to disable this. \n"
+ );
+ ConfigBool::add( "repeatBriefFlag",
+ "REPEAT_BRIEF",
+ "TRUE",
+ "repeat brief descriptions.",
+ "If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend \n"
+ "the brief description of a member or function before the detailed description. \n"
+ "Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the \n"
+ "brief descriptions will be completely suppressed. \n"
+ );
+ ConfigBool::add( "alwaysDetailsFlag",
+ "ALWAYS_DETAILED_SEC",
+ "FALSE",
+ "show details description even if there is only a brief description?",
+ "If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then \n"
+ "Doxygen will generate a detailed section even if there is only a brief \n"
+ "description. \n"
+ );
+ ConfigBool::add( "fullPathNameFlag",
+ "FULL_PATH_NAMES",
+ "FALSE",
+ "using full path name in output",
+ "If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \n"
+ "path before files name in the file list and in the header files. If set \n"
+ "to NO the shortest path that makes the file name unique will be used. \n"
+ );
+ ConfigList::add( "stripFromPath",
+ "STRIP_FROM_PATH",
+ "",
+ "list of candidates to strip from the file path",
+ "If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \n"
+ "can be used to strip a user defined part of the path. Stripping is \n"
+ "only done if one of the specified strings matches the left-hand part of \n"
+ "the path. \n"
+ );
+ addDependency("stripFromPath","fullPathNameFlag");
+ ConfigBool::add( "internalDocsFlag",
+ "INTERNAL_DOCS",
+ "FALSE",
+ "determines what happens to internal docs.",
+ "The INTERNAL_DOCS tag determines if documentation \n"
+ "that is typed after a \\internal command is included. If the tag is set \n"
+ "to NO (the default) then the documentation will be excluded. \n"
+ "Set it to YES to include the internal documentation. \n"
+ );
+ ConfigBool::add( "classDiagramFlag",
+ "CLASS_DIAGRAMS",
+ "TRUE",
+ "enable the generation of class diagrams.",
+ "If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will \n"
+ "generate a class diagram (in Html and LaTeX) for classes with base or \n"
+ "super classes. Setting the tag to NO turns the diagrams off. \n"
+ );
+ ConfigBool::add( "sourceBrowseFlag",
+ "SOURCE_BROWSER",
+ "FALSE",
+ "include source code in documentation.",
+ "If the SOURCE_BROWSER tag is set to YES then a list of source files will \n"
+ "be generated. Documented entities will be cross-referenced with these sources. \n"
+ );
+ ConfigBool::add( "inlineSourceFlag",
+ "INLINE_SOURCES",
+ "FALSE",
+ "inline the definition bodies in the docs?",
+ "Setting the INLINE_SOURCES tag to YES will include the body \n"
+ "of functions and classes directly in the documentation. \n"
+ );
+ ConfigBool::add( "stripCommentsFlag",
+ "STRIP_CODE_COMMENTS",
+ "TRUE",
+ "strip special comments from code fragments?",
+ "Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct \n"
+ "doxygen to hide any special comment blocks from generated source code \n"
+ "fragments. Normal C and C++ comments will always remain visible. \n"
+ );
+ ConfigBool::add( "caseSensitiveNames",
+ "CASE_SENSE_NAMES",
+ "FALSE",
+ "determines if output can be mixed case.",
+ "If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen \n"
+ "will only generate file names in lower case letters. If set to \n"
+ "YES upper case letters are also allowed. This is useful if you have \n"
+ "classes or files whose names only differ in case and if your file system \n"
+ "supports case sensitive file names. \n"
+ );
+ ConfigBool::add( "verbatimHeaderFlag",
+ "VERBATIM_HEADERS",
+ "TRUE",
+ "enable/disable generation of verb headers.",
+ "If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen \n"
+ "will generate a verbatim copy of the header file for each class for \n"
+ "which an include is specified. Set to NO to disable this. \n"
+ );
+ ConfigBool::add( "showIncFileFlag",
+ "SHOW_INCLUDE_FILES",
+ "TRUE",
+ "show include file in file documentation?",
+ "If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen \n"
+ "will put list of the files that are included by a file in the documentation \n"
+ "of that file. \n"
+ );
+ ConfigBool::add( "autoBriefFlag",
+ "JAVADOC_AUTOBRIEF",
+ "TRUE",
+ "javadoc comments behaves as Qt comments.",
+ "If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen \n"
+ "will interpret the first line (until the first dot) of a JavaDoc-style \n"
+ "comment as the brief description. If set to NO, the Javadoc-style will \n"
+ "behave just like the Qt-style comments. \n"
+ );
+ ConfigBool::add( "inheritDocsFlag",
+ "INHERIT_DOCS",
+ "TRUE",
+ "inheritance of documentation enabled?",
+ "If the INHERIT_DOCS tag is set to YES (the default) then an undocumented \n"
+ "member inherits the documentation from any documented member that it \n"
+ "reimplements. \n"
+ );
+ ConfigBool::add( "inlineInfoFlag",
+ "INLINE_INFO",
+ "TRUE",
+ "show info about inline members?",
+ "If the INLINE_INFO tag is set to YES (the default) then a tag [inline] \n"
+ "is inserted in the documentation for inline members. \n"
+ );
+ ConfigBool::add( "sortMembersFlag",
+ "SORT_MEMBER_DOCS",
+ "TRUE",
+ "sort members alphabetically?",
+ "If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen \n"
+ "will sort the (detailed) documentation of file and class members \n"
+ "alphabetically by member name. If set to NO the members will appear in \n"
+ "declaration order. \n"
+ );
+ ConfigInt::add( "tabSize",
+ "TAB_SIZE",
+ "8",
+ "number of spaces in a tab",
+ "The TAB_SIZE tag can be used to set the number of spaces in a tab. \n"
+ "Doxygen uses this value to replace tabs by spaces in code fragments. \n",
+ 1,16
+ );
+ ConfigList::add( "sectionFilterList",
+ "ENABLED_SECTIONS",
+ "",
+ "list of section filters that are enabled",
+ "The ENABLE_SECTIONS tag can be used to enable conditional \n"
+ "documentation sections, marked by \\if sectionname ... \\endif. \n"
+ );
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add( "Input","configuration options related to the input files");
+ //-----------------------------------------------------------------------------------------------
+ ConfigList::add( "inputSources",
+ "INPUT",
+ "",
+ "list of input files",
+ "The INPUT tag can be used to specify the files and/or directories that contain \n"
+ "documented source files. You may enter file names like \"myfile.cpp\" or \n"
+ "directories like \"/usr/src/myproject\". Separate the files or directories \n"
+ "with spaces. \n",
+ ConfigList::FileAndDir
+ );
+ ConfigList::add( "filePatternList",
+ "FILE_PATTERNS",
+ "",
+ "list of file patterns",
+ "If the value of the INPUT tag contains directories, you can use the \n"
+ "FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n"
+ "and *.h) to filter out the source-files in the directories. If left \n"
+ "blank all files are included. \n"
+ );
+ ConfigBool::add( "recursiveFlag",
+ "RECURSIVE",
+ "FALSE",
+ "scan directories recursively",
+ "The RECURSIVE tag can be used to turn specify whether or not subdirectories \n"
+ "should be searched for input files as well. Possible values are YES and NO. \n"
+ "If left blank NO is used. \n"
+ );
+ ConfigList::add( "excludeSources",
+ "EXCLUDE",
+ "",
+ "list of files to exclude from the input",
+ "The EXCLUDE tag can be used to specify files and/or directories that should \n"
+ "excluded from the INPUT source files. This way you can easily exclude a \n"
+ "subdirectory from a directory tree whose root is specified with the INPUT tag. \n",
+ ConfigList::FileAndDir
+ );
+ ConfigList::add( "excludePatternList",
+ "EXCLUDE_PATTERNS",
+ "",
+ "list of patterns to exclude from input",
+ "If the value of the INPUT tag contains directories, you can use the \n"
+ "EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude \n"
+ "certain files from those directories. \n"
+ );
+ ConfigList::add( "examplePath",
+ "EXAMPLE_PATH",
+ "",
+ "list of example paths",
+ "The EXAMPLE_PATH tag can be used to specify one or more files or \n"
+ "directories that contain example code fragments that are included (see \n"
+ "the \\include command). \n",
+ ConfigList::Dir
+ );
+ ConfigList::add( "examplePatternList",
+ "EXAMPLE_PATTERNS",
+ "",
+ "list of example patterns",
+ "If the value of the EXAMPLE_PATH tag contains directories, you can use the \n"
+ "EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n"
+ "and *.h) to filter out the source-files in the directories. If left \n"
+ "blank all files are included. \n"
+ );
+ ConfigList::add( "imagePath",
+ "IMAGE_PATH",
+ "",
+ "list of image paths",
+ "The IMAGE_PATH tag can be used to specify one or more files or \n"
+ "directories that contain image that are included in the documentation (see \n"
+ "the \\image command). \n",
+ ConfigList::Dir
+ );
+ ConfigString::add("inputFilter",
+ "INPUT_FILTER",
+ "",
+ "a filter command that is applied to input files",
+ "The INPUT_FILTER tag can be used to specify a program that doxygen should \n"
+ "invoke to filter for each input file. Doxygen will invoke the filter program \n"
+ "by executing (via popen()) the command <filter> <input-file>, where <filter> \n"
+ "is the value of the INPUT_FILTER tag, and <input-file> is the name of an \n"
+ "input file. Doxygen will then use the output that the filter program writes \n"
+ "to standard output. \n",
+ ConfigString::File
+ );
+
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add( "Index","configuration options related to the alphabetical class index");
+ //-----------------------------------------------------------------------------------------------
+
+ ConfigBool::add( "alphaIndexFlag",
+ "ALPHABETICAL_INDEX",
+ "FALSE",
+ "should an alphabetical index be generated?",
+ "If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index \n"
+ "of all compounds will be generated. Enable this if the project \n"
+ "contains a lot of classes, structs, unions or interfaces. \n"
+ );
+ ConfigInt::add( "colsInAlphaIndex",
+ "COLS_IN_ALPHA_INDEX",
+ "5",
+ "number of columns in the alphabetical index",
+ "If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then \n"
+ "the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns \n"
+ "in which this list will be split (can be a number in the range [1..20]) \n",
+ 1,20
+ );
+ ConfigList::add( "ignorePrefixList",
+ "IGNORE_PREFIX",
+ "",
+ "list of prefixes to ignore for the alphabetical index",
+ "In case all classes in a project start with a common prefix, all \n"
+ "classes will be put under the same header in the alphabetical index. \n"
+ "The IGNORE_PREFIX tag can be used to specify one or more prefixes that \n"
+ "should be ignored while generating the index headers. \n"
+ );
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add( "HTML","configuration options related to the HTML output");
+ //-----------------------------------------------------------------------------------------------
+ ConfigBool::add( "generateHtml",
+ "GENERATE_HTML",
+ "TRUE",
+ "generate HTML output",
+ "If the GENERATE_HTML tag is set to YES (the default) Doxygen will \n"
+ "generate HTML output. \n"
+ );
+ ConfigString::add("htmlOutputDir",
+ "HTML_OUTPUT",
+ "html",
+ "the directory to put the HTML files",
+ "The HTML_OUTPUT tag is used to specify where the HTML docs will be put. \n"
+ "If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
+ "put in front of it. If left blank `html' will be used as the default path. \n",
+ ConfigString::Dir
+ );
+ addDependency("htmlOutputDir","generateHtml");
+ ConfigString::add("headerFile",
+ "HTML_HEADER",
+ "",
+ "the name of the personal HTML header",
+ "The HTML_HEADER tag can be used to specify a personal HTML header for \n"
+ "each generated HTML page. If it is left blank doxygen will generate a \n"
+ "standard header.\n",
+ ConfigString::File
+ );
+ addDependency("headerFile","generateHtml");
+ ConfigString::add("footerFile",
+ "HTML_FOOTER",
+ "",
+ "the name of the personal HTML footer",
+ "The HTML_FOOTER tag can be used to specify a personal HTML footer for \n"
+ "each generated HTML page. If it is left blank doxygen will generate a \n"
+ "standard footer.\n",
+ ConfigString::File
+ );
+ addDependency("footerFile","generateHtml");
+ ConfigString::add("htmlStyleSheet",
+ "HTML_STYLESHEET",
+ "",
+ "user defined cascading style sheet",
+ "The HTML_STYLESHEET tag can be used to specify a user defined cascading \n"
+ "style sheet that is used by each HTML page. It can be used to \n"
+ "fine-tune the look of the HTML output. If the tag is left blank doxygen \n"
+ "will generate a default style sheet \n",
+ ConfigString::File
+ );
+ addDependency("htmlStyleSheet","generateHtml");
+ ConfigBool::add( "htmlAlignMemberFlag",
+ "HTML_ALIGN_MEMBERS",
+ "TRUE",
+ "align members in HTML using tables.",
+ "If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, \n"
+ "files or namespaces will be aligned in HTML using tables. If set to \n"
+ "NO a bullet list will be used. \n"
+ );
+ addDependency("htmlAlignMemberFlag","generateHtml");
+ ConfigBool::add( "htmlHelpFlag",
+ "GENERATE_HTMLHELP",
+ "FALSE",
+ "should html help files be generated?",
+ "If the GENERATE_HTMLHELP tag is set to YES, additional index files \n"
+ "will be generated that can be used as input for tools like the \n"
+ "Microsoft HTML help workshop to generate a compressed HTML help file (.chm) \n"
+ "of the generated HTML documentation. \n"
+ );
+ addDependency("htmlHelpFlag","generateHtml");
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add( "LaTeX","configuration options related to the LaTeX output");
+ //-----------------------------------------------------------------------------------------------
+ ConfigBool::add( "generateLatex",
+ "GENERATE_LATEX",
+ "TRUE",
+ "generate Latex output",
+ "If the GENERATE_LATEX tag is set to YES (the default) Doxygen will \n"
+ "generate Latex output. \n"
+ );
+ ConfigString::add("latexOutputDir",
+ "LATEX_OUTPUT",
+ "latex",
+ "the directory to put the Latex files",
+ "The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. \n"
+ "If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
+ "put in front of it. If left blank `latex' will be used as the default path. \n",
+ ConfigString::Dir
+ );
+ addDependency("latexOutputDir","generateLatex");
+ ConfigBool::add( "compactLatexFlag",
+ "COMPACT_LATEX",
+ "FALSE",
+ "generate compact LaTeX documentation.",
+ "If the COMPACT_LATEX tag is set to YES Doxygen generates more compact \n"
+ "LaTeX documents. This may be useful for small projects and may help to \n"
+ "save some trees in general. \n"
+ );
+ addDependency("compactLatexFlag","generateLatex");
+ ConfigString::add("paperType",
+ "PAPER_TYPE",
+ "a4wide",
+ "the page type to generate docs for",
+ "The PAPER_TYPE tag can be used to set the paper type that is used \n"
+ "by the printer. Possible values are: a4, a4wide, letter, legal and \n"
+ "executive. If left blank a4wide will be used. \n"
+ );
+ ConfigString::addFixedValue("paperType","a4");
+ ConfigString::addFixedValue("paperType","a4wide");
+ ConfigString::addFixedValue("paperType","letter");
+ ConfigString::addFixedValue("paperType","legal");
+ ConfigString::addFixedValue("paperType","executive");
+ addDependency("paperType","generateLatex");
+ ConfigList::add( "extraPackageList",
+ "EXTRA_PACKAGES",
+ "",
+ "list of extra LaTeX packages.",
+ "The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX \n"
+ "packages that should be included in the LaTeX output. \n"
+ );
+ addDependency("extraPackageList","generateLatex");
+ ConfigString::add("latexHeaderFile",
+ "LATEX_HEADER",
+ "",
+ "the name of the personal LaTeX header",
+ "The LATEX_HEADER tag can be used to specify a personal LaTeX header for \n"
+ "the generated latex document. The header should contain everything until \n"
+ "the first chapter. If it is left blank doxygen will generate a \n"
+ "standard header. Notice: only use this tag if you know what you are doing! \n",
+ ConfigString::File
+ );
+ addDependency("latexHeaderFile","generateLatex");
+ ConfigBool::add( "pdfHyperFlag",
+ "PDF_HYPERLINKS",
+ "FALSE",
+ "generate latex prepared creating hyperlinked pdfs.",
+ "If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated \n"
+ "is prepared for conversion to pdf (using ps2pdf). The pdf file will \n"
+ "contain links (just like the HTML output) instead of page references \n"
+ "This makes the output suitable for online browsing using a pdf viewer. \n"
+ );
+ addDependency("pdfHyperFlag","generateLatex");
+ ConfigBool::add( "latexBatchModeFlag",
+ "LATEX_BATCHMODE",
+ "FALSE",
+ "continue after latex errors?",
+ "If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\\\batchmode. \n"
+ "command to the generated LaTeX files. This will instruct LaTeX to keep \n"
+ "running if errors occur, instead of asking the user for help. \n"
+ "This option is also used when generating formulas in HTML. \n"
+ );
+ addDependency("latexBatchModeFlag","generateLatex");
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add( "RTF","configuration options related to the RTF output");
+ //-----------------------------------------------------------------------------------------------
+ ConfigBool::add( "generateRTF",
+ "GENERATE_RTF",
+ "FALSE",
+ "generate RTF flag",
+ "If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output \n"
+ "For now this is experimental and is disabled by default. The RTF output \n"
+ "is optimised for Word 97 and may not look too pretty with other readers \n"
+ "or editors.\n"
+ );
+ ConfigString::add("rtfOutputDir",
+ "RTF_OUTPUT",
+ "rtf",
+ "the directory to put the RTF files",
+ "The RTF_OUTPUT tag is used to specify where the RTF docs will be put. \n"
+ "If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
+ "put in front of it. If left blank `rtf' will be used as the default path. \n",
+ ConfigString::Dir
+ );
+ addDependency("rtfOutputDir","generateRTF");
+ ConfigBool::add( "compactRTFFlag",
+ "COMPACT_RTF",
+ "FALSE",
+ "generate more compact RTF",
+ "If the COMPACT_RTF tag is set to YES Doxygen generates more compact \n"
+ "RTF documents. This may be useful for small projects and may help to \n"
+ "save some trees in general. \n"
+ );
+ addDependency("compactRTFFlag","generateRTF");
+ ConfigBool::add( "rtfHyperFlag",
+ "RTF_HYPERLINKS",
+ "FALSE",
+ "generate hyper links in RTF",
+ "If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated \n"
+ "will contain hyperlink fields. The RTF file will \n"
+ "contain links (just like the HTML output) instead of page references. \n"
+ "This makes the output suitable for online browsing using a WORD or other. \n"
+ "programs which support those fields. \n"
+ "Note: wordpad (write) and others do not support links. \n"
+ );
+ addDependency("rtfHyperFlag","generateRTF");
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add( "Man","configuration options related to the man page output");
+ //-----------------------------------------------------------------------------------------------
+ ConfigBool::add( "generateMan",
+ "GENERATE_MAN",
+ "TRUE",
+ "generate Man pages",
+ "If the GENERATE_MAN tag is set to YES (the default) Doxygen will \n"
+ "generate man pages \n"
+ );
+ ConfigString::add("manOutputDir",
+ "MAN_OUTPUT",
+ "man",
+ "the directory to put the man pages",
+ "The MAN_OUTPUT tag is used to specify where the man pages will be put. \n"
+ "If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
+ "put in front of it. If left blank `man' will be used as the default path. \n",
+ ConfigString::Dir
+ );
+ addDependency("manOutputDir","generateMan");
+ ConfigString::add("manExtension",
+ "MAN_EXTENSION",
+ ".3",
+ "extension the man page files",
+ "The MAN_EXTENSION tag determines the extension that is added to \n"
+ "the generated man pages (default is the subroutine's section .3) \n"
+ );
+ addDependency("manExtension","generateMan");
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add( "Preprocessor","Configuration options related to the preprocessor ");
+ //-----------------------------------------------------------------------------------------------
+ ConfigBool::add( "preprocessingFlag",
+ "ENABLE_PREPROCESSING",
+ "TRUE",
+ "enable preprocessing",
+ "If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will \n"
+ "evaluate all C-preprocessor directives found in the sources and include \n"
+ "files. \n"
+ );
+ ConfigBool::add( "macroExpansionFlag",
+ "MACRO_EXPANSION",
+ "FALSE",
+ "expand macros in the source.",
+ "If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro \n"
+ "names in the source code. If set to NO (the default) only conditional \n"
+ "compilation will be performed. \n"
+ );
+ addDependency("macroExpansionFlag","preprocessingFlag");
+ ConfigBool::add( "searchIncludeFlag",
+ "SEARCH_INCLUDES",
+ "TRUE",
+ "search for included files",
+ "If the SEARCH_INCLUDES tag is set to YES (the default) the includes files \n"
+ "in the INCLUDE_PATH (see below) will be search if a #include is found. \n"
+ );
+ addDependency("searchIncludeFlag","preprocessingFlag");
+ ConfigList::add( "includePath",
+ "INCLUDE_PATH",
+ "",
+ "list of include paths",
+ "The INCLUDE_PATH tag can be used to specify one or more directories that \n"
+ "contain include files that are not input files but should be processed by \n"
+ "the preprocessor. \n",
+ ConfigList::Dir
+ );
+ addDependency("includePath","preprocessingFlag");
+ ConfigList::add( "predefined",
+ "PREDEFINED",
+ "",
+ "list of predefined macro names.",
+ "The PREDEFINED tag can be used to specify one or more macro names that \n"
+ "are defined before the preprocessor is started (similar to the -D option of \n"
+ "gcc). The argument of the tag is a list of macros of the form: name \n"
+ "or name=definition (no spaces). If the definition and the = are \n"
+ "omitted =1 is assumed. \n"
+ );
+ addDependency("predefined","preprocessingFlag");
+ ConfigBool::add( "onlyPredefinedFlag",
+ "EXPAND_ONLY_PREDEF",
+ "FALSE",
+ "expand only predefined macros",
+ "If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES \n"
+ "then the macro expansion is limited to the macros specified with the \n"
+ "PREDEFINED tag. \n"
+ );
+ addDependency("onlyPredefinedFlag","preprocessingFlag");
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add( "External","Configuration::addtions related to external references ");
+ //-----------------------------------------------------------------------------------------------
+ ConfigList::add( "tagFileList",
+ "TAGFILES",
+ "",
+ "list of tag files",
+ "The TAGFILES tag can be used to specify one or more tagfiles. \n",
+ ConfigList::File
+ );
+ ConfigString::add("genTagFile",
+ "GENERATE_TAGFILE",
+ "",
+ "the tag file to generate",
+ "When a file name is specified after GENERATE_TAGFILE, doxygen will create \n"
+ "a tag file that is based on the input files it reads. \n",
+ ConfigString::File
+ );
+ ConfigBool::add( "allExtFlag",
+ "ALLEXTERNALS",
+ "FALSE",
+ "include all external classes flag",
+ "If the ALLEXTERNALS tag is set to YES all external classes will be listed \n"
+ "in the class index. If set to NO only the inherited external classes \n"
+ "will be listed. \n"
+ );
+ ConfigString::add("perlPath",
+ "PERL_PATH",
+ "/usr/bin/perl",
+ "the absolute path to perl",
+ "The PERL_PATH should be the absolute path and name of the perl script \n"
+ "interpreter (i.e. the result of `which perl'). \n",
+ ConfigString::Dir
+ );
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add( "Dot","Configuration options related to the dot tool ");
+ //-----------------------------------------------------------------------------------------------
+ ConfigBool::add( "haveDotFlag",
+ "HAVE_DOT",
+ "FALSE",
+ "indicates wether or not dot is present",
+ "If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is \n"
+ "available from the path. This tool is part of Graphviz, a graph visualization \n"
+ "toolkit from AT&T and Lucent Bell Labs. The other options in this section \n"
+ "have no effect if this option is set to NO (the default) \n"
+ );
+ ConfigBool::add( "collGraphFlag",
+ "COLLABORATION_GRAPH",
+ "TRUE",
+ "collaboration graph",
+ "If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen \n"
+ "will generate a graph for each documented class showing the direct and \n"
+ "indirect implementation dependencies (inheritance, containment, and \n"
+ "class references variables) of the class with other documented classes. \n"
+ );
+ addDependency("collGraphFlag","haveDotFlag");
+ ConfigBool::add( "includeGraphFlag",
+ "INCLUDE_GRAPH",
+ "TRUE",
+ "include graph",
+ "If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to \n"
+ "YES then doxygen will generate a graph for each documented file showing \n"
+ "the direct and indirect include dependencies of the file with other \n"
+ "documented files. \n"
+ );
+ addDependency("includeGraphFlag","haveDotFlag");
+ ConfigBool::add( "gfxHierarchyFlag",
+ "GRAPHICAL_HIERARCHY",
+ "TRUE",
+ "flag to enable graphical hierarchy",
+ "If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen \n"
+ "will graphical hierarchy of all classes instead of a textual one. \n"
+ );
+ addDependency("gfxHierarchyFlag","haveDotFlag");
+
+ //-----------------------------------------------------------------------------------------------
+ ConfigInfo::add( "Search","Configuration::addtions related to the search engine ");
+ //-----------------------------------------------------------------------------------------------
+ ConfigBool::add( "searchEngineFlag",
+ "SEARCHENGINE",
+ "FALSE",
+ "generate search engine flag",
+ "The SEARCHENGINE tag specifies whether or not a search engine should be \n"
+ "used. If set to NO the values of all tags below this one will be ignored. \n"
+ );
+ ConfigString::add("cgiName",
+ "CGI_NAME",
+ "search.cgi",
+ "the name of the CGI binary",
+ "The CGI_NAME tag should be the name of the CGI script that \n"
+ "starts the search engine (doxysearch) with the correct parameters. \n"
+ "A script with this name will be generated by doxygen. \n"
+ );
+ addDependency("cgiName","searchEngineFlag");
+ ConfigString::add("cgiURL",
+ "CGI_URL",
+ "",
+ "the absolute URL to the CGI binary",
+ "The CGI_URL tag should be the absolute URL to the directory where the \n"
+ "cgi binaries are located. See the documentation of your http daemon for \n"
+ "details. \n"
+ );
+ addDependency("cgiURL","searchEngineFlag");
+ ConfigString::add("docURL",
+ "DOC_URL",
+ "",
+ "the absolute URL to the documentation",
+ "The DOC_URL tag should be the absolute URL to the directory where the \n"
+ "documentation is located. If left blank the absolute path to the \n"
+ "documentation, with file:// prepended to it, will be used. \n"
+ );
+ addDependency("docURL","searchEngineFlag");
+ ConfigString::add("docAbsPath",
+ "DOC_ABSPATH",
+ "",
+ "the absolute path to the documentation",
+ "The DOC_ABSPATH tag should be the absolute path to the directory where the \n"
+ "documentation is located. If left blank the directory on the local machine \n"
+ "will be used. \n",
+ ConfigString::Dir
+ );
+ addDependency("docAbsPath","searchEngineFlag");
+ ConfigString::add("binAbsPath",
+ "BIN_ABSPATH",
+ "/usr/local/bin/",
+ "the absolute path to the doxysearch",
+ "The BIN_ABSPATH tag must point to the directory where the doxysearch binary \n"
+ "is installed. \n",
+ ConfigString::Dir
+ );
+ addDependency("binAbsPath","searchEngineFlag");
+ ConfigList::add( "extDocPathList",
+ "EXT_DOC_PATHS",
+ "",
+ "list of external doc. directories.",
+ "The EXT_DOC_PATHS tag can be used to specify one or more paths to \n"
+ "documentation generated for other projects. This allows doxysearch to search \n"
+ "the documentation for these projects as well. \n",
+ ConfigList::Dir
+ );
+ addDependency("extDocPathList","searchEngineFlag");
+
+ // The IMAGE_PATTERNS tag is now officially obsolete.
+ //-----------------------------------------------------------------------------------------------
+ //ConfigInfo::add("not used");
+ //-----------------------------------------------------------------------------------------------
+ //ConfigList::add("imagePatternList",
+ // "IMAGE_PATTERNS",
+ // "",
+ // "list of image paths",
+ // "don´t know\n");
+}
diff --git a/addon/configgen/configgen.pro.in b/addon/configgen/configgen.pro.in
new file mode 100644
index 0000000..26b9c51
--- /dev/null
+++ b/addon/configgen/configgen.pro.in
@@ -0,0 +1,20 @@
+#
+#
+#
+# Copyright (C) 1997-2000 by Dimitri van Heesch.
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation under the terms of the GNU General Public License is hereby
+# granted. No representations are made about the suitability of this software
+# for any purpose. It is provided "as is" without express or implied warranty.
+# See the GNU General Public License for more details.
+#
+# TMake project file for configgen
+
+TEMPLATE = app.t
+CONFIG = console qt warn_on $extraopts
+HEADERS =
+SOURCES = configgen.cpp
+win32:INCLUDEPATH += .
+TARGET = bin/configgen
+OBJECTS_DIR = obj
diff --git a/addon/configgen/qtbc.h b/addon/configgen/qtbc.h
new file mode 100644
index 0000000..d03672f
--- /dev/null
+++ b/addon/configgen/qtbc.h
@@ -0,0 +1,43 @@
+/******************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 1997-2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef QTBC_H
+#define QTBC_H
+
+/*! This file contains some hacks to make Doxygen work with
+ * Qt version 2.00 and Qt version 1.xx
+ */
+
+#include <qglobal.h>
+
+#if QT_VERSION >= 200
+
+#define GCI QCollection::Item
+
+#include <qcstring.h>
+#include <qstring.h>
+inline QCString convertToQCString(const QString &s) { return s.local8Bit(); }
+
+#else /* QT_VERSION < 200 */
+
+#include <qstring.h>
+#define QCString QString
+inline QCString convertToQCString(const QCString &s) { return s; }
+
+#endif
+
+#endif
diff --git a/addon/doxywizard/Makefile.in b/addon/doxywizard/Makefile.in
new file mode 100644
index 0000000..4e8779b
--- /dev/null
+++ b/addon/doxywizard/Makefile.in
@@ -0,0 +1,52 @@
+#
+#
+#
+# Copyright (C) 1997-2000 by Dimitri van Heesch.
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation under the terms of the GNU General Public License is hereby
+# granted. No representations are made about the suitability of this software
+# for any purpose. It is provided "as is" without express or implied warranty.
+# See the GNU General Public License for more details.
+#
+
+CFGGENBIN_DIR = ../configgen/bin
+CFGGENSRC_DIR = ../configgen
+
+all: $(CFGGENBIN_DIR)/configgen config.h config.l doxywizard.cpp doxywizard.h \
+ Makefile.doxywizard
+ $(MAKE) -f Makefile.doxywizard $@
+
+Makefile.doxywizard: doxywizard.pro doxywizard.t
+ $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
+
+config.l: $(CFGGENBIN_DIR)/configgen $(CFGGENSRC_DIR)/config_templ.l
+ $(CFGGENBIN_DIR)/configgen $(CFGGENSRC_DIR)/config_templ.l >config.l
+
+config.h: $(CFGGENBIN_DIR)/configgen $(CFGGENSRC_DIR)/config_templ.h
+ $(CFGGENBIN_DIR)/configgen $(CFGGENSRC_DIR)/config_templ.h >config.h
+
+doxywizard.cpp: $(CFGGENBIN_DIR)/configgen doxywizard_templ.cpp
+ $(CFGGENBIN_DIR)/configgen doxywizard_templ.cpp >doxywizard.cpp
+
+doxywizard.h: $(CFGGENBIN_DIR)/configgen doxywizard_templ.h
+ $(CFGGENBIN_DIR)/configgen doxywizard_templ.h >doxywizard.h
+
+$(CFGGENBIN_DIR)/configgen: $(CFGGENSRC_DIR)/configgen.cpp
+ $(MAKE) -C $(CFGGENSRC_DIR)
+
+tmake:
+ $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
+
+clean: Makefile.doxywizard
+ $(MAKE) -f Makefile.doxywizard clean
+
+distclean: clean
+ $(RM) doxywizard.cpp doxywizard.h \
+ config.l config.h config.cpp Makefile.doxywizard
+
+install:
+ $(INSTTOOL) -d $(INSTALL)/bin
+ $(INSTTOOL) -m 755 ../../bin/doxywizard $(INSTALL)/bin
+
+FORCE:
diff --git a/addon/doxywizard/doxywizard.pro.in b/addon/doxywizard/doxywizard.pro.in
new file mode 100644
index 0000000..36b9639
--- /dev/null
+++ b/addon/doxywizard/doxywizard.pro.in
@@ -0,0 +1,52 @@
+#
+#
+#
+# Copyright (C) 1997-2000 by Dimitri van Heesch.
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation under the terms of the GNU General Public License is hereby
+# granted. No representations are made about the suitability of this software
+# for any purpose. It is provided "as is" without express or implied warranty.
+# See the GNU General Public License for more details.
+#
+# project file for the doxywizard project
+
+# special template configuration file because we use flex
+TEMPLATE = doxywizard.t
+
+# executable to generate
+TARGET = ../../bin/doxywizard
+
+# configure options
+CONFIG = qt warn_on $extraopts
+
+# header file for the project
+HEADERS = doxywizard.h \
+ config.h \
+ version.h \
+ pagewidget.h \
+ inputstring.h \
+ inputbool.h \
+ inputstrlist.h \
+ inputint.h \
+ pixmaps.h
+
+# source flle for the project
+SOURCES = doxywizard.cpp \
+ config.cpp \
+ version.cpp \
+ pagewidget.cpp \
+ inputstring.cpp \
+ inputbool.cpp \
+ inputstrlist.cpp \
+ inputint.cpp \
+ pixmaps.cpp
+
+# where to put the objects
+OBJECTS_DIR = obj
+
+# where to put the intermediate moc stuff
+MOC_DIR = moc
+
+# extra C++ compiler options
+TMAKE_CXXFLAGS = -DDOXYWIZARD
diff --git a/addon/doxywizard/doxywizard.t b/addon/doxywizard/doxywizard.t
new file mode 100644
index 0000000..bebb1be
--- /dev/null
+++ b/addon/doxywizard/doxywizard.t
@@ -0,0 +1,45 @@
+#
+#
+#
+# Copyright (C) 2000 by Dimitri van Heesch.
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation under the terms of the GNU General Public License is hereby
+# granted. No representations are made about the suitability of this software
+# for any purpose. It is provided "as is" without express or implied warranty.
+# See the GNU General Public License for more details.
+#!
+#! wizard.t: This is a custom template for building doxywizard
+#!
+#$ IncludeTemplate("app.t");
+
+LEX = flex
+YACC = bison
+
+#${
+sub GenerateDep {
+ my($obj,$src,$dep) = @_;
+ my(@objv,$srcv,$i,$s,$o,$d,$c);
+ @objv = split(/\s+/,$obj);
+ @srcv = split(/\s+/,$src);
+ for $i ( 0..$#objv ) {
+ $s = $srcv[$i];
+ $o = $objv[$i];
+ next if $s eq "";
+ $text .= $o . ": " . $s;
+ $text .= " ${linebreak}\n\t\t" . $dep if $dep ne "";
+ if ( $moc_output{$s} ne "" ) {
+ $text .= " ${linebreak}\n\t\t" . $moc_output{$s};
+ }
+ $d = &make_depend($s);
+ $text .= " ${linebreak}\n\t\t" . $d if $d ne "";
+ $text .= "\n";
+ }
+ chop $text;
+}
+#$}
+
+####################
+
+#$ GenerateDep("config.cpp","config.l");
+ $(LEX) -PconfigYY -t config.l >config.cpp
diff --git a/addon/doxywizard/doxywizard_templ.cpp b/addon/doxywizard/doxywizard_templ.cpp
new file mode 100644
index 0000000..4ec430d
--- /dev/null
+++ b/addon/doxywizard/doxywizard_templ.cpp
@@ -0,0 +1,348 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#include <stdio.h>
+#include <qmainwindow.h>
+#include <qpopupmenu.h>
+#include <qfileinfo.h>
+#include <qmenubar.h>
+#include <qstatusbar.h>
+#include <qfiledialog.h>
+#include <qmessagebox.h>
+#include <qapplication.h>
+#include <qwhatsthis.h>
+#include <qlayout.h>
+#include <qtabwidget.h>
+#include <qtoolbar.h>
+#include <qtoolbutton.h>
+
+#include "doxywizard.h"
+#include "pagewidget.h"
+#include "inputbool.h"
+#include "inputstring.h"
+#include "inputstrlist.h"
+#include "inputint.h"
+#include "config.h"
+#include "version.h"
+#include "pixmaps.h"
+
+QString configFileName;
+
+const int messageTimeout = 4000; //!< status bar message timeout in millisec.
+
+//-------------------------------------------------------------------------
+
+static bool loadConfig( QString loadFile )
+{
+ QFileInfo fi( loadFile );
+ if ( !fi.exists() )
+ {
+ QMessageBox::warning(0,
+ "Warning","Input file "+loadFile+
+ " does not exist! Starting new file.",
+ "ok"
+ );
+ return FALSE;
+ }
+ QFile f( loadFile );
+ if ( !f.open(IO_ReadOnly) )
+ {
+ QMessageBox::warning(0,
+ "Warning","Cannot open input "+loadFile+
+ " for reading!.",
+ "abort"
+ );
+ exit(1);
+ }
+
+ // set config values to their defaults
+ Config::init();
+
+ // read file into a string buffer
+ int fsize = fi.size();
+ QCString contents(fsize+1); // add room for \0 terminator
+ f.readBlock(contents.data(),fsize);
+ contents[fsize]='\0';
+
+ // parse the config file
+ // this will initialize the various Config data members
+ parseConfig(contents);
+ configStrToVal();
+
+ f.close();
+ return TRUE;
+}
+
+static bool saveConfig( QString saveFile )
+{
+ QFile f( saveFile );
+ if ( !f.open(IO_WriteOnly) )
+ {
+ QMessageBox::warning(0,
+ "Warning","Cannot open file "+saveFile+
+ " for writing. Nothing saved!.",
+ "ok"
+ );
+ return FALSE; // failure
+ }
+
+ writeTemplateConfig(&f,TRUE); // write brief config file
+
+ return TRUE; // success
+}
+
+//--------------------------------------------------------------------------
+
+Wizard::Wizard(int argc,char **argv) :
+ QMainWindow( 0, (QCString)"DoxyWizard v"+versionString )
+{
+ // File popupmenu
+
+ hasChanged=FALSE;
+
+ fileTools = new QToolBar( this, "file operations" );
+ fileTools->setLabel( "File Operations" );
+
+ new QToolButton( QPixmap( file_xpm ), "New File", QString::null,
+ this, SLOT(newFile()), fileTools, "new file" );
+
+ //QToolButton * fileOpen =
+ new QToolButton( QPixmap( fileopen_xpm ), "Open File", QString::null,
+ this, SLOT(loadFile()), fileTools, "open file" );
+
+ //QToolButton * fileSave =
+ new QToolButton( QPixmap( filesave_xpm ), "Save File", QString::null,
+ this, SLOT(saveFile()), fileTools, "save file" );
+
+
+ QWhatsThis::whatsThisButton( fileTools );
+
+ QPopupMenu* file = new QPopupMenu;
+ file->insertItem( QIconSet(QPixmap(file_xpm)),
+ "&New", this, SLOT(newFile()), CTRL+Key_N );
+ file->insertItem( QIconSet(QPixmap(fileopen_xpm)),
+ "&Load", this, SLOT(loadFile()), CTRL+Key_O );
+ file->insertSeparator();
+ file->insertItem( QIconSet(QPixmap(filesave_xpm)),
+ "&Save", this, SLOT(saveFile()), CTRL+Key_S );
+ file->insertItem( "&Save as ...", this, SLOT(saveAsFile()) );
+ file->insertSeparator();
+ file->insertItem( "&Quit", this, SLOT(quit()), CTRL+Key_Q );
+
+ // Doxygen popupmenu
+ //QPopupMenu* doxygen = new QPopupMenu;
+ //int itemIndex = doxygen->insertItem( "&Run" );
+ //doxygen->setWhatsThis ( itemIndex, "Run doxygen with the current configuration file..." );
+ //doxygen->setItemEnabled( itemIndex, FALSE );
+
+ // Help popupmenu
+ QPopupMenu* help = new QPopupMenu;
+ help->insertItem( "&About", this, SLOT(about()), Key_F1 );
+ help->insertItem( "What's &This", this , SLOT(whatsThis()), SHIFT+Key_F1);
+
+ // menubar definition
+ menuBar()->insertItem( "&File", file );
+ //menuBar()->insertItem( "&Doxygen", doxygen );
+ menuBar()->insertSeparator();
+ menuBar()->insertItem( "&Help", help );
+
+ statusBar()->message("Welcome to DoxyWizard",messageTimeout);
+
+ cw = new ConfigFile( this );
+ connect(cw,SIGNAL(changed()),this,SLOT(changed()));
+ setCentralWidget( cw );
+ cw->show();
+
+ if (argc==2)
+ {
+ loadFile(argv[1]);
+ }
+ else
+ {
+ newFile();
+ }
+ refreshCaption();
+
+ resize( 640, 480 );
+
+}
+
+void Wizard::newFile()
+{
+ if (hasChanged)
+ {
+ switch( QMessageBox::warning( this, "DoxyWizard", "Start a new file and lose changes?\n",
+ "Yes", "No", 0, 0, 1 ))
+ {
+ case 0:
+ break;
+ default: // command aborted by the user
+ return;
+ }
+ }
+ Config::init();
+ configFileName="Doxyfile";
+ cw->init();
+}
+
+void Wizard::loadFile(const char *fileName)
+{
+ if (fileName==0)
+ {
+ configFileName = QFileDialog::getOpenFileName();
+ }
+ else
+ {
+ configFileName = fileName;
+ }
+
+ if ( !configFileName.isNull() )
+ {
+ //initData( configFileName );
+ loadConfig(configFileName);
+ cw->init();
+
+ statusBar()->message(configFileName, messageTimeout);
+ }
+}
+
+void Wizard::loadFile()
+{
+ if (hasChanged)
+ {
+ switch( QMessageBox::warning(
+ this, "DoxyWizard", "Load a new file and lose changes?\n",
+ "Yes", "No", 0, 0, 1 ))
+ {
+ case 0:
+ break;
+ default: // command aborted by the user
+ return;
+ }
+ }
+ loadFile(0);
+}
+
+void Wizard::saveFile()
+{
+ //printf("configFileName=`%s'\n",configFileName.data());
+ if (configFileName.isEmpty())
+ {
+ saveAsFile();
+ return;
+ }
+ else
+ {
+ saveConfig(configFileName);
+ statusBar()->message(configFileName + " saved", messageTimeout);
+ }
+ hasChanged = FALSE;
+ refreshCaption();
+}
+
+void Wizard::saveAsFile()
+{
+ configFileName = QFileDialog::getSaveFileName();
+ if (configFileName.isNull())
+ {
+ statusBar()->message("Save aborted", messageTimeout );
+ return; // operation cancelled by the user
+ }
+
+ saveConfig(configFileName);
+ statusBar()->message("Saved as "+ configFileName, messageTimeout );
+ hasChanged = FALSE;
+ refreshCaption();
+}
+
+void Wizard::quit()
+{
+ if (hasChanged)
+ {
+ switch( QMessageBox::warning( this, "DoxyWizard", "Quit and lose changes?\n",
+ "Yes", "No", 0, 0, 1 ))
+ {
+ case 0:
+ qApp->quit();
+ break;
+ case 1:
+ break;
+ }
+ }
+ else
+ {
+ qApp->quit();
+ }
+}
+
+void Wizard::changed()
+{
+ hasChanged = TRUE;
+ refreshCaption();
+}
+
+void Wizard::refreshCaption()
+{
+ QString s;
+ if (hasChanged) s=" *";
+ setCaption("Doxywizard - ["+configFileName+s+"]");
+}
+
+void Wizard::about()
+{
+ QMessageBox::about(this, "DoxyWizard",
+ "<qt><center>A tool to create and edit configuration files "
+ "that can be read by doxygen.</center><p>"
+ "<center>Written by Dimitri van Heesch</center><p>"
+ "<center>(c) 2000</center></qt>"
+ );
+}
+
+//----------------------------------------------------------------------
+
+ConfigFile::ConfigFile( QWidget *parent ) : QWidget( parent )
+{
+ QVBoxLayout *layout = new QVBoxLayout( this );
+
+ // QTabWidget definition
+ QTabWidget *tab = new QTabWidget( this );
+ layout->addWidget( tab );
+
+#CONFIG Widgets0
+#CONFIG Widgets1
+
+}
+
+ConfigFile::~ConfigFile()
+{
+}
+
+#CONFIG WidgetSlotImpl
+
+void ConfigFile::init()
+{
+#CONFIG WidgetInit
+}
+
+//----------------------------------------------------------------------
+
+int main(int argc,char **argv)
+{
+ QApplication::setColorSpec( QApplication::NormalColor );
+ QApplication app(argc,argv);
+ Wizard wizard(argc,argv);
+ app.setMainWidget( &wizard );
+ wizard.show();
+ return app.exec();
+}
diff --git a/addon/doxywizard/doxywizard_templ.h b/addon/doxywizard/doxywizard_templ.h
new file mode 100644
index 0000000..e0c228e
--- /dev/null
+++ b/addon/doxywizard/doxywizard_templ.h
@@ -0,0 +1,75 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#ifndef _DOXWIZARD_H
+#define _DOXWIZARD_H
+
+#include <qmainwindow.h>
+
+class QToolBar;
+class ConfigFile;
+class InputBool;
+class InputString;
+class InputStrList;
+class InputFile;
+class InputDir;
+class InputInt;
+
+class Wizard : public QMainWindow
+{
+ Q_OBJECT
+
+ public:
+ Wizard(int argc,char **argv);
+ ~Wizard(){};
+ void loadFile(const char *s);
+
+ private slots:
+ void newFile();
+ void loadFile();
+ void saveFile();
+ void saveAsFile();
+ void quit();
+ void changed();
+ void about();
+
+ signals:
+
+ private:
+ void refreshCaption();
+ QToolBar *fileTools;
+ bool hasChanged;
+ ConfigFile *cw;
+};
+
+class ConfigFile : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ ConfigFile(QWidget *parent=0);
+ ~ConfigFile();
+ void init();
+
+ signals:
+ void changed();
+
+ private slots:
+#CONFIG WidgetSlots
+
+ private:
+#CONFIG WidgetVars
+};
+
+#endif
diff --git a/addon/doxywizard/inputbool.cpp b/addon/doxywizard/inputbool.cpp
new file mode 100644
index 0000000..b0db14b
--- /dev/null
+++ b/addon/doxywizard/inputbool.cpp
@@ -0,0 +1,42 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#include "inputbool.h"
+#include "pagewidget.h"
+#include <qwindowsstyle.h>
+
+InputBool::InputBool( const QString & text, PageWidget * parent, bool &flag )
+ : QCheckBox( text, parent->getLayout() ), state(flag)
+{
+ QWindowsStyle *winStyle = new QWindowsStyle();
+ setChecked( flag );
+ setStyle( winStyle );
+ setMinimumSize( sizeHint() );
+
+ connect( this, SIGNAL(toggled(bool)), SLOT(setState(bool)) );
+
+ parent->addWidget(this);
+}
+
+void InputBool::init()
+{
+ setChecked(state);
+}
+
+void InputBool::setState( bool s )
+{
+ if (state!=s) emit changed();
+ state=s;
+}
+
diff --git a/addon/doxywizard/inputbool.h b/addon/doxywizard/inputbool.h
new file mode 100644
index 0000000..9102be7
--- /dev/null
+++ b/addon/doxywizard/inputbool.h
@@ -0,0 +1,42 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#ifndef _INPUTBOOL_H
+#define _INPUTBOOL_H
+
+#include <qcheckbox.h>
+
+class PageWidget;
+
+class InputBool : public QCheckBox
+{
+ Q_OBJECT
+
+ public:
+ InputBool( const QString &text, PageWidget *parent, bool &flag );
+ ~InputBool(){};
+ void init();
+
+ signals:
+ void changed();
+
+ private slots:
+ void setState(bool);
+
+ private:
+ bool &state;
+
+};
+
+#endif
diff --git a/addon/doxywizard/inputint.cpp b/addon/doxywizard/inputint.cpp
new file mode 100644
index 0000000..54d7d02
--- /dev/null
+++ b/addon/doxywizard/inputint.cpp
@@ -0,0 +1,67 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#include "inputint.h"
+#include "pagewidget.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qwindowsstyle.h>
+#include <qspinbox.h>
+
+InputInt::InputInt( const QString & label, PageWidget *parent, int &val, int minVal,int maxVal )
+ : QWidget( parent->getLayout() ), m_val(val), m_minVal(minVal), m_maxVal(maxVal)
+{
+ QHBoxLayout *layout = new QHBoxLayout( this, 5 );
+
+ lab = new QLabel( label, this );
+ lab->setMinimumSize( lab->sizeHint() );
+
+ sp = new QSpinBox( minVal,maxVal,1,this );
+ sp->setMinimumSize( sp->sizeHint() );
+
+ init();
+
+ layout->addWidget( lab );
+ layout->addWidget( sp );
+ layout->addStretch(1);
+ layout->activate();
+ setMinimumSize( sizeHint() );
+
+ connect(sp, SIGNAL(valueChanged(int)),
+ this, SLOT(valueChanged(int)) );
+
+ parent->addWidget(this);
+}
+
+void InputInt::valueChanged(int val)
+{
+ if (val!=m_val) emit changed();
+ m_val = val;
+}
+
+void InputInt::setEnabled(bool state)
+{
+ lab->setEnabled(state);
+ sp->setEnabled(state);
+}
+
+void InputInt::init()
+{
+ m_val = QMAX(m_minVal,m_val);
+ m_val = QMIN(m_maxVal,m_val);
+ sp->setValue(m_val);
+}
diff --git a/addon/doxywizard/inputint.h b/addon/doxywizard/inputint.h
new file mode 100644
index 0000000..ad6d2de
--- /dev/null
+++ b/addon/doxywizard/inputint.h
@@ -0,0 +1,51 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#ifndef _INPUTINT_H
+#define _INPUTINT_H
+
+#include <qwidget.h>
+#include <qstring.h>
+
+class QLabel;
+class QSpinBox;
+class PageWidget;
+
+class InputInt : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ InputInt( const QString &text, PageWidget *parent, int &val,
+ int minVal, int maxVal );
+ ~InputInt(){};
+ void setEnabled(bool);
+ void init();
+
+ private:
+ QLabel *lab;
+ QSpinBox *sp;
+ int &m_val;
+ int m_minVal;
+ int m_maxVal;
+
+ signals:
+ void changed();
+
+ private slots:
+ void valueChanged(int val);
+
+};
+
+#endif
diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp
new file mode 100644
index 0000000..2895a18
--- /dev/null
+++ b/addon/doxywizard/inputstring.cpp
@@ -0,0 +1,184 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#include "inputstring.h"
+#include "pagewidget.h"
+#include "pixmaps.h"
+
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qwindowsstyle.h>
+#include <qcstring.h>
+#include <qpushbutton.h>
+#include <qfiledialog.h>
+#include <qcombobox.h>
+#include <qtooltip.h>
+
+
+InputString::InputString( const QString & label,
+ PageWidget *parent, QCString &s, StringMode m )
+ : QWidget( parent->getLayout() ), str(s), sm(m), m_values(0), m_index(0)
+{
+ if (m==StringFixed)
+ {
+ QHBoxLayout *layout = new QHBoxLayout( this, 5);
+ lab = new QLabel( label, this );
+ lab->setMinimumSize( lab->sizeHint() );
+ layout->addWidget( lab );
+ com = new QComboBox( this );
+ layout->addWidget( com );
+ layout->addStretch( 1 );
+ le=0;
+ br=0;
+ layout->activate();
+ setMinimumSize( sizeHint() );
+ }
+ else
+ {
+ QGridLayout *layout = new QGridLayout( this, 1, m==StringFree ? 1 : 3, 5 );
+ lab = new QLabel( label, this );
+ lab->setMinimumSize( lab->sizeHint() );
+ layout->addWidget( lab,0,0 );
+ le = new QLineEdit( this );
+ le->setMinimumSize( le->sizeHint() );
+ le->setText( s );
+ layout->addWidget( le,0,1 );
+ if (m==StringFile || m==StringDir)
+ {
+ QPixmap pixmap = QPixmap(m==StringFile ?
+ file_xpm :
+ folder_xpm );
+ br = new QPushButton( this );
+ br->setPixmap(pixmap);
+ br->setMinimumSize( br->sizeHint() );
+ if (m==StringFile)
+ QToolTip::add(br,"Browse to a file");
+ else
+ QToolTip::add(br,"Browse to a folder");
+ layout->addWidget( br,0,2 );
+ }
+ else
+ {
+ br=0;
+ }
+ com=0;
+ layout->activate();
+ setMinimumSize( sizeHint() );
+ }
+
+ if (le) connect( le, SIGNAL(textChanged(const QString&)),
+ this, SLOT(textChanged(const QString&)) );
+ if (br) connect( br, SIGNAL(clicked()), this, SLOT(browse()) );
+ if (com) connect( com, SIGNAL(activated(const QString &)),
+ this, SLOT(textChanged(const QString &)) );
+
+ parent->addWidget(this);
+}
+
+InputString::~InputString()
+{
+ if (m_values) delete m_values;
+}
+
+
+void InputString::textChanged(const QString &s)
+{
+ if (str!=(const char *)s)
+ {
+ str = s;
+ emit changed();
+ }
+}
+
+void InputString::setEnabled(bool state)
+{
+ lab->setEnabled(state);
+ if (le) le->setEnabled(state);
+ if (br) br->setEnabled(state);
+ if (com) com->setEnabled(state);
+}
+
+void InputString::browse()
+{
+ if (sm==StringFile)
+ {
+ QString fileName = QFileDialog::getOpenFileName();
+
+ if (!fileName.isNull())
+ {
+ le->setText( fileName );
+ if (str!=(const char *)le->text())
+ {
+ str = le->text();
+ emit changed();
+ }
+ }
+ }
+ else // sm==StringDir
+ {
+ QString dirName = QFileDialog::getExistingDirectory();
+
+ if (!dirName.isNull())
+ {
+ le->setText( dirName );
+ if (str!=(const char *)le->text())
+ {
+ str = le->text();
+ emit changed();
+ }
+ }
+ }
+}
+
+void InputString::clear()
+{
+ le->setText("");
+ if (!str.isEmpty())
+ {
+ emit changed();
+ str = "";
+ }
+}
+
+void InputString::addValue(const char *s)
+{
+ if (sm==StringFixed)
+ {
+ if (m_values==0) m_values = new QDict<int>;
+ m_values->setAutoDelete(TRUE);
+ m_values->insert(s,new int(m_index++));
+ com->insertItem(s);
+ }
+}
+
+void InputString::init()
+{
+ if (sm==StringFixed)
+ {
+ int *itemIndex = m_values->find(str);
+ if (itemIndex)
+ {
+ com->setCurrentItem(*itemIndex);
+ }
+ else
+ {
+ com->setCurrentItem(0);
+ }
+ }
+ else
+ {
+ le->setText(str);
+ }
+}
diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h
new file mode 100644
index 0000000..5928b80
--- /dev/null
+++ b/addon/doxywizard/inputstring.h
@@ -0,0 +1,66 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#ifndef _INPUTSTRING_H
+#define _INPUTSTRING_H
+
+#include <qwidget.h>
+#include <qstring.h>
+#include <qdict.h>
+
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QComboBox;
+class PageWidget;
+
+class InputString : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ enum StringMode { StringFree=0,
+ StringFile=1,
+ StringDir=2,
+ StringFixed=3
+ };
+
+ InputString( const QString &text, PageWidget *parent, QCString &s,
+ StringMode m=StringFree );
+ ~InputString();
+ void setEnabled(bool);
+ void addValue(const char *s);
+ void init();
+
+ private:
+ QLabel *lab;
+ QLineEdit *le;
+ QPushButton *br;
+ QComboBox *com;
+ QCString &str;
+ StringMode sm;
+ QDict<int> *m_values;
+ int m_index;
+
+ signals:
+ void changed();
+
+ private slots:
+ void textChanged(const QString&);
+ void browse();
+ void clear();
+
+};
+
+#endif
diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp
new file mode 100644
index 0000000..60bc4bf
--- /dev/null
+++ b/addon/doxywizard/inputstrlist.cpp
@@ -0,0 +1,210 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#include "inputstrlist.h"
+#include "pagewidget.h"
+#include "pixmaps.h"
+
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qlistbox.h>
+#include <qstrlist.h>
+#include <qstringlist.h>
+#include <qfiledialog.h>
+#include <qtooltip.h>
+
+InputStrList::InputStrList( const QString & label,
+ PageWidget *parent, QStrList &sl, ListMode lm)
+ : QWidget(parent->getLayout()), strList(sl)
+{
+ QGridLayout *layout = new QGridLayout( this, 2, 2, 5 );
+ lab = new QLabel( label, this );
+ lab->setMinimumSize( lab->sizeHint() );
+ layout->addWidget( lab,0,0 );
+
+ QWidget *dw = new QWidget(this); /* dummy widget used for layouting */
+ QHBoxLayout *boxlayout = new QHBoxLayout( dw, 0, 5 );
+ le = new QLineEdit( dw );
+ le->setMinimumSize( le->sizeHint() );
+ boxlayout->addWidget( le, 1 );
+
+ add = new QPushButton( dw );
+ add->setPixmap( QPixmap( add_xpm ));
+ add->setMinimumSize( add->sizeHint() );
+ QToolTip::add(add,"Add item");
+ boxlayout->addWidget( add );
+
+ del = new QPushButton( dw );
+ del->setPixmap( QPixmap( del_xpm ));
+ del->setMinimumSize( del->sizeHint() );
+ QToolTip::add(del,"Delete selected item");
+ boxlayout->addWidget( del );
+
+ upd = new QPushButton( dw );
+ upd->setPixmap( QPixmap( update_xpm ));
+ upd->setMinimumSize( upd->sizeHint() );
+ QToolTip::add(upd,"Update selected item");
+ boxlayout->addWidget( upd );
+
+ lb = new QListBox( this );
+ lb->setMinimumSize(400,100);
+ init();
+ lb->setVScrollBarMode(QScrollView::Auto);
+ lb->setHScrollBarMode(QScrollView::Auto);
+
+ brFile=0;
+ brDir=0;
+ if (lm!=ListString)
+ {
+ if (lm&ListFile)
+ {
+ brFile = new QPushButton(dw);
+ brFile->setPixmap( QPixmap(file_xpm) );
+ brFile->setMinimumSize(brFile->sizeHint());
+ QToolTip::add(brFile,"Browse to a file");
+ boxlayout->addWidget( brFile );
+ }
+ if (lm&ListDir)
+ {
+ brDir = new QPushButton(dw);
+ brDir->setPixmap( QPixmap(folder_xpm) );
+ brDir->setMinimumSize(brDir->sizeHint());
+ QToolTip::add(brDir,"Browse to a folder");
+ boxlayout->addWidget( brDir );
+ }
+ }
+ layout->addWidget( dw, 0,1 );
+ layout->addWidget( lb,1,1 );
+ layout->activate();
+ setMinimumSize( sizeHint() );
+
+ connect(le, SIGNAL(returnPressed()),
+ this, SLOT(addString()) );
+ connect(add, SIGNAL(clicked()),
+ this, SLOT(addString()) );
+ connect(del, SIGNAL(clicked()),
+ this, SLOT(delString()) );
+ connect(upd, SIGNAL(clicked()),
+ this, SLOT(updateString()) );
+ if (brFile)
+ {
+ connect(brFile, SIGNAL(clicked()),
+ this, SLOT(browseFiles()));
+ }
+ if (brDir)
+ {
+ connect(brDir, SIGNAL(clicked()),
+ this, SLOT(browseDir()));
+ }
+ connect(lb, SIGNAL(selected(const QString &)),
+ this, SLOT(selectText(const QString &)));
+
+ parent->addWidget(this);
+
+ strList=sl;
+}
+
+void InputStrList::addString()
+{
+ if (!le->text().isEmpty())
+ {
+ lb->insertItem(le->text());
+ strList.append(le->text());
+ emit changed();
+ le->clear();
+ }
+}
+
+void InputStrList::delString()
+{
+ if (lb->currentItem()!=-1)
+ {
+ int itemIndex = lb->currentItem();
+ lb->removeItem(itemIndex);
+ strList.remove(itemIndex);
+ emit changed();
+ }
+}
+
+void InputStrList::updateString()
+{
+ if (lb->currentItem()!=-1 && !le->text().isEmpty())
+ {
+ lb->changeItem(le->text(),lb->currentItem());
+ strList.insert(lb->currentItem(),le->text());
+ strList.remove(lb->currentItem()+1);
+ emit changed();
+ }
+}
+
+void InputStrList::selectText(const QString &s)
+{
+ le->setText(s);
+}
+
+void InputStrList::setEnabled(bool state)
+{
+ lab->setEnabled(state);
+ le->setEnabled(state);
+ add->setEnabled(state);
+ del->setEnabled(state);
+ upd->setEnabled(state);
+ lb->setEnabled(state);
+ if (brFile) brFile->setEnabled(state);
+ if (brDir) brDir->setEnabled(state);
+}
+
+void InputStrList::browseFiles()
+{
+ QStringList fileNames = QFileDialog::getOpenFileNames();
+
+ if (!fileNames.isEmpty())
+ {
+ QStringList::Iterator it;
+ for ( it= fileNames.begin(); it != fileNames.end(); ++it )
+ {
+ lb->insertItem(*it);
+ strList.append(*it);
+ emit changed();
+ }
+ le->setText(*fileNames.begin());
+ }
+}
+
+void InputStrList::browseDir()
+{
+ QString dirName = QFileDialog::getExistingDirectory();
+
+ if (!dirName.isNull())
+ {
+ lb->insertItem(dirName);
+ strList.append(dirName);
+ emit changed();
+ le->setText(dirName);
+ }
+}
+
+void InputStrList::init()
+{
+ le->clear();
+ lb->clear();
+ char *s = strList.first();
+ while (s)
+ {
+ lb->insertItem(s);
+ s = strList.next();
+ }
+}
diff --git a/addon/doxywizard/inputstrlist.h b/addon/doxywizard/inputstrlist.h
new file mode 100644
index 0000000..496aeed
--- /dev/null
+++ b/addon/doxywizard/inputstrlist.h
@@ -0,0 +1,69 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#ifndef _INPUTSTRLIST_H
+#define _INPUTSTRLIST_H
+
+#include <qwidget.h>
+#include <qstring.h>
+
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QListBox;
+class PageWidget;
+class QStrList;
+
+class InputStrList : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ enum ListMode { ListString=0,
+ ListFile=1,
+ ListDir=2,
+ ListFileDir=ListFile|ListDir
+ };
+
+ InputStrList( const QString &text, PageWidget *parent,
+ QStrList &sl, ListMode v=ListString );
+ ~InputStrList() {};
+ void setEnabled(bool);
+ void init();
+
+ private:
+ QLabel *lab;
+ QLineEdit *le;
+ QPushButton *add;
+ QPushButton *del;
+ QPushButton *upd;
+ QPushButton *brFile;
+ QPushButton *brDir;
+ QListBox *lb;
+ QStrList &strList;
+
+ signals:
+ void changed();
+
+ private slots:
+ void addString();
+ void delString();
+ void updateString();
+ void selectText(const QString &s);
+ void browseFiles();
+ void browseDir();
+
+};
+
+#endif
diff --git a/addon/doxywizard/pagewidget.cpp b/addon/doxywizard/pagewidget.cpp
new file mode 100644
index 0000000..48ab092
--- /dev/null
+++ b/addon/doxywizard/pagewidget.cpp
@@ -0,0 +1,86 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#include <stdio.h>
+
+#include <qtabwidget.h>
+#include <qlayout.h>
+#include "pagewidget.h"
+
+FrameLayout::FrameLayout(QWidget *parent,const char *name,WFlags f)
+ : QFrame(parent,name,f)
+{
+ lay = new QVBoxLayout(this,5,3,name);
+}
+
+FrameLayout::~FrameLayout()
+{
+}
+
+void FrameLayout::addStretch(int stretch)
+{
+ lay->addStretch(stretch);
+}
+
+void FrameLayout::addWidget(QWidget *w)
+{
+ lay->addWidget(w);
+}
+
+PageWidget::PageWidget( QTabWidget *parent, const char *name )
+ : QScrollView ( parent,name )
+{
+ // the Qt docs say that one has to insert the viewport() as a parent
+ // here but this does not work! Insert 0 does give the proper result!
+ lay = new FrameLayout(this);
+ addChild(lay);
+ setVScrollBarMode(QScrollView::Auto);
+ setHScrollBarMode(QScrollView::AlwaysOff);
+ m_parent=parent;
+ m_parent->addTab( this, name );
+}
+
+void PageWidget::addStretch(int stretch=0)
+{
+ lay->addStretch(stretch);
+ //printf("Viewport SizeHint %d,%d\n",viewport()->sizeHint().width(),viewport()->sizeHint().height());
+}
+
+void PageWidget::addWidget(QWidget *w)
+{
+ //printf("Adding widget height=%d\n",w->sizeHint().height());
+ lay->addWidget(w);
+}
+
+QWidget *PageWidget::getLayout() const
+{
+ return lay;
+}
+
+void PageWidget::resizeEvent(QResizeEvent *e)
+{
+ QScrollView::resizeEvent(e);
+ //printf("PageWidget::resizeEvent!\n");
+ lay->resize(viewport()->width(),QMAX(lay->height(),viewport()->height()));
+}
+
+void PageWidget::paintEvent(QPaintEvent *e)
+{
+ QScrollView::paintEvent(e);
+ //printf("PageWidget::paintEvent()\n");
+ lay->resize(viewport()->width(),QMAX(lay->height(),viewport()->height()));
+}
+
+
+
diff --git a/addon/doxywizard/pagewidget.h b/addon/doxywizard/pagewidget.h
new file mode 100644
index 0000000..1f188ad
--- /dev/null
+++ b/addon/doxywizard/pagewidget.h
@@ -0,0 +1,63 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#ifndef _PAGEWIDGET_H
+#define _PAGEWIDGET_H
+
+#include <qscrollview.h>
+
+class QTabWidget;
+class QVBoxLayout;
+
+class FrameLayout : public QFrame
+{
+ Q_OBJECT
+
+ public:
+ FrameLayout(QWidget *parent=0, const char *name=0, WFlags g=0);
+ ~FrameLayout();
+ void addStretch(int s=0);
+ void addWidget(QWidget *w);
+
+ private:
+ QVBoxLayout *lay;
+};
+
+class PageWidget : public QScrollView
+{
+ Q_OBJECT
+
+ public:
+ PageWidget( QTabWidget *parent, const char *name );
+ ~PageWidget() {};
+ //void frameChanged()
+ //{
+ // if (!layout()) return;
+ // layout()->setMargin(frameWidth());
+ //}
+ void addStretch(int stretch=0);
+ void addWidget(QWidget *w);
+ QWidget *getLayout() const;
+
+ protected:
+ void resizeEvent(QResizeEvent *e);
+ void paintEvent(QPaintEvent *e);
+
+ private:
+ FrameLayout *lay;
+ QTabWidget *m_parent;
+
+};
+
+#endif
diff --git a/addon/doxywizard/pixmaps.cpp b/addon/doxywizard/pixmaps.cpp
new file mode 100644
index 0000000..e3631c5
--- /dev/null
+++ b/addon/doxywizard/pixmaps.cpp
@@ -0,0 +1,204 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#include "pixmaps.h"
+
+static const char * const folder_xpm_data[] =
+{
+ "16 16 6 1",
+ ". c None",
+ "b c #ffff00",
+ "d c #000000",
+ "* c #999999",
+ "a c #cccccc",
+ "c c #ffffff",
+ "................",
+ "................",
+ "..*****.........",
+ ".*ababa*........",
+ "*abababa******..",
+ "*cccccccccccc*d.",
+ "*cbababababab*d.",
+ "*cabababababa*d.",
+ "*cbababababab*d.",
+ "*cabababababa*d.",
+ "*cbababababab*d.",
+ "*cabababababa*d.",
+ "*cbababababab*d.",
+ "**************d.",
+ ".dddddddddddddd.",
+ "................"
+};
+const char **folder_xpm = (const char **)folder_xpm_data;
+
+static const char* const file_xpm_data[] =
+{
+ "16 16 5 1",
+ ". c #7f7f7f",
+ "# c None",
+ "c c #000000",
+ "b c #bfbfbf",
+ "a c #ffffff",
+ "################",
+ "#..........#####",
+ "#.aaaaaaaab.####",
+ "#.aaaaaaaaba.###",
+ "#.aaaaaaaacccc##",
+ "#.aaaaaaaaaabc##",
+ "#.aaaaaaaaaabc##",
+ "#.aaaaaaaaaabc##",
+ "#.aaaaaaaaaabc##",
+ "#.aaaaaaaaaabc##",
+ "#.aaaaaaaaaabc##",
+ "#.aaaaaaaaaabc##",
+ "#.aaaaaaaaaabc##",
+ "#.bbbbbbbbbbbc##",
+ "#ccccccccccccc##",
+ "################"
+};
+const char **file_xpm = (const char **)file_xpm_data;
+
+static const char * const add_xpm_data[] =
+{
+ "16 16 5 1",
+ ". c None",
+ "* c #0328f9",
+ "# c #354396",
+ "a c #353740",
+ "c c #999999",
+ "................",
+ "......###.......",
+ "......#*ac......",
+ "......#*ac......",
+ "......#*ac......",
+ "......#*ac......",
+ ".######*a#####..",
+ ".#***********ac.",
+ ".#aaaaa*aaaaaac.",
+ "..cccc#*acccccc.",
+ "......#*ac......",
+ "......#*ac......",
+ "......#*ac......",
+ "......#aac......",
+ ".......ccc......",
+ "................"
+};
+const char **add_xpm = (const char **)add_xpm_data;
+
+static const char * const del_xpm_data[] =
+{
+ "16 16 5 1",
+ ". c None",
+ "* c #0328f9",
+ "# c #354396",
+ "a c #353740",
+ "c c #999999",
+ "................",
+ "................",
+ "................",
+ "................",
+ "................",
+ "................",
+ ".#############..",
+ ".#***********ac.",
+ ".aaaaaaaaaaaaac.",
+ "..ccccccccccccc.",
+ "................",
+ "................",
+ "................",
+ "................",
+ "................",
+ "................"
+};
+const char **del_xpm = (const char **)del_xpm_data;
+
+static char *update_xpm_data[] =
+{
+ "16 16 5 1",
+ /* colors */
+ ". c #0328f9",
+ "# c #354396",
+ "a c #353740",
+ "b c None",
+ "c c #999999",
+ /* pixels */
+ "bbbbbbbbbbbbbbbb",
+ "bbbbbbbb#####acb",
+ "bbbbbbbb#....abb",
+ "bbc##cbb#...acbb",
+ "bb#..abb#....abb",
+ "bc#..abb#.a..acb",
+ "b#..acbbaac#..ab",
+ "b#..abbbcbb#..ab",
+ "b#..abbbbbb#..ab",
+ "b#..acbbbbc#..ab",
+ "bc#..#cbbc#..acb",
+ "bb#...####...acb",
+ "bbca........acbb",
+ "bbbbaa....aaccbb",
+ "bbbbbcaaaaccbbbb",
+ "bbbbbbbbbbbbbbbb"
+};
+const char **update_xpm = (const char **)update_xpm_data;
+
+
+static const char *fileopen_xpm_data[] =
+{
+ "16 13 5 1",
+ ". c #040404",
+ "# c #808304",
+ "a c None",
+ "b c #f3f704",
+ "c c #f3f7f3",
+ "aaaaaaaaa...aaaa",
+ "aaaaaaaa.aaa.a.a",
+ "aaaaaaaaaaaaa..a",
+ "a...aaaaaaaa...a",
+ ".bcb.......aaaaa",
+ ".cbcbcbcbc.aaaaa",
+ ".bcbcbcbcb.aaaaa",
+ ".cbcb...........",
+ ".bcb.#########.a",
+ ".cb.#########.aa",
+ ".b.#########.aaa",
+ "..#########.aaaa",
+ "...........aaaaa"
+};
+const char **fileopen_xpm = (const char **)fileopen_xpm_data;
+
+/* XPM */
+static const char *filesave_xpm_data[] =
+{
+ "14 14 4 1",
+ ". c #040404",
+ "# c #808304",
+ "a c #bfc2bf",
+ "b c None",
+ "..............",
+ ".#.aaaaaaaa.a.",
+ ".#.aaaaaaaa...",
+ ".#.aaaaaaaa.#.",
+ ".#.aaaaaaaa.#.",
+ ".#.aaaaaaaa.#.",
+ ".#.aaaaaaaa.#.",
+ ".##........##.",
+ ".############.",
+ ".##.........#.",
+ ".##......aa.#.",
+ ".##......aa.#.",
+ ".##......aa.#.",
+ "b............."
+};
+const char **filesave_xpm = (const char **)filesave_xpm_data;
+
diff --git a/addon/doxywizard/pixmaps.h b/addon/doxywizard/pixmaps.h
new file mode 100644
index 0000000..6c0bb97
--- /dev/null
+++ b/addon/doxywizard/pixmaps.h
@@ -0,0 +1,26 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 2000 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ */
+
+#ifndef _PIXMAPS_H
+#define _PIXMAPS_H
+
+extern const char** folder_xpm;
+extern const char** file_xpm;
+extern const char** add_xpm;
+extern const char** del_xpm;
+extern const char** update_xpm;
+extern const char** fileopen_xpm;
+extern const char** filesave_xpm;
+
+#endif
diff --git a/addon/doxywizard/version.cpp b/addon/doxywizard/version.cpp
new file mode 100644
index 0000000..5a00b3e
--- /dev/null
+++ b/addon/doxywizard/version.cpp
@@ -0,0 +1 @@
+char versionString[]="0.1";
diff --git a/addon/doxywizard/version.h b/addon/doxywizard/version.h
new file mode 100644
index 0000000..d7d5f13
--- /dev/null
+++ b/addon/doxywizard/version.h
@@ -0,0 +1,6 @@
+#ifndef VERSION_H
+#define VERSION_H
+
+extern char versionString[];
+
+#endif