Commit a790b4ae authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.1.2-20000423

parent 37905e0a
DOXYGEN Version 1.1.2-20000417 DOXYGEN Version 1.1.2-20000423
CONTENTS CONTENTS
-------- --------
...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX: ...@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have: 1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.2-20000417.src.tar.gz # uncompress the archive gunzip doxygen-1.1.2-20000423.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.2-20000417.src.tar # unpack it tar xf doxygen-1.1.2-20000423.src.tar # unpack it
2. Run the configure script: 2. Run the configure script:
...@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at ...@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (17 April 2000) Dimitri van Heesch (23 April 2000)
all: src/version.cpp all: src/version.cpp configgen doxywizard
cd src ; $(MAKE) cd src ; $(MAKE)
clean: FORCE clean: FORCE
cd examples ; $(MAKE) clean cd examples ; $(MAKE) clean
cd doc ; $(MAKE) clean cd doc ; $(MAKE) clean
cd src ; $(MAKE) clean cd src ; $(MAKE) clean
cd addon/configgen ; $(MAKE) clean
cd addon/doxywizard ; $(MAKE) clean
-rm -f bin/doxy* -rm -f bin/doxy*
-rm -f objects/*.o -rm -f objects/*.o
...@@ -13,18 +15,25 @@ distclean: clean ...@@ -13,18 +15,25 @@ distclean: clean
cd examples ; $(MAKE) clean cd examples ; $(MAKE) clean
cd doc ; $(MAKE) clean cd doc ; $(MAKE) clean
cd src ; $(MAKE) distclean cd src ; $(MAKE) distclean
cd addon/configgen ; $(MAKE) distclean
cd addon/doxywizard ; $(MAKE) distclean
-rm -f bin/doxy* -rm -f bin/doxy*
-rm -f html -rm -f html
-rm -f objects/*.o -rm -f objects/*.o
-rm -f src/Makefile.doxygen \ -rm -f src/Makefile.doxygen src/Makefile.doxytag src/Makefile.doxysearch
src/Makefile.doxytag \
src/Makefile.doxysearch
-rm -f Makefile src/Makefile examples/Makefile doc/Makefile -rm -f Makefile src/Makefile examples/Makefile doc/Makefile
-rm -f .makeconfig .tmakeconfig -rm -f .makeconfig .tmakeconfig
-rm -f src/doxygen.pro src/doxytag.pro src/doxysearch.pro -rm -f src/doxygen.pro src/doxytag.pro src/doxysearch.pro
-rm -f src/version.cpp -rm -f src/version.cpp
-rm -r addon/configgen/Makefile addon/doxywizard/Makefile
-rm -f addon/configgen/Makefile.configgen
-rm -f addon/doxywizard/Makefile.doxywizard
-rm -f addon/configgen/configgen.pro addon/doxywizard/doxywizard.pro
-rm -f addon/configgen/obj/*.o
-rm -f addon/doxywizard/obj/*.o
-rm -f addon/doxywizard/moc/moc_*
install: install: doxywizard_install
$(INSTTOOL) -d $(INSTALL)/bin $(INSTTOOL) -d $(INSTALL)/bin
$(INSTTOOL) -d $(INSTALL)/doc/doxygen $(INSTTOOL) -d $(INSTALL)/doc/doxygen
$(INSTTOOL) -d $(INSTALL)/doc/doxygen $(INSTTOOL) -d $(INSTALL)/doc/doxygen
...@@ -52,7 +61,7 @@ pdf: docs ...@@ -52,7 +61,7 @@ pdf: docs
cd latex ; $(MAKE) cd latex ; $(MAKE)
archive: clean archive: clean
tar zcvf dx`date +%y%m%d`.tgz tmake doc wintools examples bin objects \ tar zcvf dx`date +%y%m%d`.tgz addon tmake doc wintools examples bin objects \
src configure configure.bin Makefile.in Makefile.win.in INSTALL \ src configure configure.bin Makefile.in Makefile.win.in INSTALL \
make.bat LANGUAGE.HOWTO LICENSE PLATFORMS VERSION packages make.bat LANGUAGE.HOWTO LICENSE PLATFORMS VERSION packages
...@@ -60,3 +69,4 @@ src/version.cpp: Makefile ...@@ -60,3 +69,4 @@ src/version.cpp: Makefile
echo "char versionString[]=\"$(VERSION)\";" > src/version.cpp echo "char versionString[]=\"$(VERSION)\";" > src/version.cpp
FORCE: FORCE:
DOXYGEN Version 1.1.2-20000417 DOXYGEN Version 1.1.2-20000423
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (17 April 2000) Dimitri van Heesch (23 April 2000)
1.1.2-20000417 1.1.2-20000423
#
#
#
# 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:
/******************************************************************************
*
* $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
This diff is collapsed.
This diff is collapsed.
#
#
#
# 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
/******************************************************************************
*
* $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
#
#
#
# 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:
#
#
#
# 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
#
#
#
# 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
/******************************************************************************
*
*
*
* 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();
}
/******************************************************************************
*
*
*
* 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
/******************************************************************************
*
*
*
* 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;
}
/******************************************************************************
*
*
*
* 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
/******************************************************************************
*
*
*
* 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);
}
/******************************************************************************
*
*
*
* 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
/******************************************************************************
*
*
*
* 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);
}
}
/******************************************************************************
*
*
*
* 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
/******************************************************************************
*
*
*
* 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();
}
}
/******************************************************************************
*
*
*
* 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
/******************************************************************************
*
*
*
* 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()));
}
/******************************************************************************
*
*
*
* 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
/******************************************************************************
*
*
*
* 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;
/******************************************************************************
*
*
*
* 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
char versionString[]="0.1";
#ifndef VERSION_H
#define VERSION_H
extern char versionString[];
#endif
...@@ -26,6 +26,8 @@ f_plf_auto=NO ...@@ -26,6 +26,8 @@ f_plf_auto=NO
f_prefix=/usr f_prefix=/usr
f_insttool=install f_insttool=install
f_english=NO f_english=NO
f_configgen=NO
f_wizard=NO
while test -n "$1"; do while test -n "$1"; do
case $1 in case $1 in
...@@ -62,6 +64,12 @@ while test -n "$1"; do ...@@ -62,6 +64,12 @@ while test -n "$1"; do
--install) --install)
shift; f_insttool=$1 shift; f_insttool=$1
;; ;;
--with-configgen)
f_configgen=YES
;;
--with-doxywizard)
f_wizard=YES
;;
-h | -help | --help) -h | -help | --help)
f_help=y f_help=y
;; ;;
...@@ -78,7 +86,8 @@ if test "$f_help" = y; then ...@@ -78,7 +86,8 @@ if test "$f_help" = y; then
cat <<EOF cat <<EOF
Usage: $0 [--help] [--shared] [--static] [--release] [--debug] Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--make name] [--dot name] [--platform target] [--perl name] [--make name] [--dot name] [--platform target]
[--prefix dir] [--install name] [--english-only] [--prefix dir] [--install name] [--english-only]
[--with-configgen] [--with-doxywizard]
Options: Options:
...@@ -111,6 +120,13 @@ Options: ...@@ -111,6 +120,13 @@ Options:
--english-only Include support for English only. --english-only Include support for English only.
--with-configgen Build the configuration generator. This is only
useful for doxygen developers that want to add
new configuration options.
--with-doxywizard Build the GUI frontend for doxygen. This
requires Qt 2.x.x
EOF EOF
test "$f_error" = y && exit 1 test "$f_error" = y && exit 1
exit 0; exit 0;
...@@ -316,6 +332,7 @@ TMAKE = $PWD/tmake/bin/tmake ...@@ -316,6 +332,7 @@ TMAKE = $PWD/tmake/bin/tmake
MAKE = $f_make MAKE = $f_make
PERL = $f_perl PERL = $f_perl
RM = rm -f RM = rm -f
CP = cp
VERSION = `cat VERSION` VERSION = `cat VERSION`
INSTALL = $f_prefix INSTALL = $f_prefix
INSTTOOL = $f_insttool INSTTOOL = $f_insttool
...@@ -343,8 +360,9 @@ TMAKE_CXXFLAGS = -DENGLISH_ONLY ...@@ -343,8 +360,9 @@ TMAKE_CXXFLAGS = -DENGLISH_ONLY
EOF EOF
fi fi
for i in Makefile.in src/Makefile.in examples/Makefile.in \ f_inmakefiles="Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/configgen/Makefile.in addon/doxywizard/Makefile.in"
doc/Makefile.in ; do
for i in $f_inmakefiles ; do
SRC=$i SRC=$i
DST=`echo $i|sed 's%\(.*\).in$%\1%'` DST=`echo $i|sed 's%\(.*\).in$%\1%'`
TIME=`date` TIME=`date`
...@@ -355,11 +373,26 @@ for i in Makefile.in src/Makefile.in examples/Makefile.in \ ...@@ -355,11 +373,26 @@ for i in Makefile.in src/Makefile.in examples/Makefile.in \
EOF EOF
cat .makeconfig $SRC >> $DST cat .makeconfig $SRC >> $DST
if test $i = Makefile.in; then
echo "configgen:" >> $DST
if test $f_configgen = YES; then
echo " $(MAKE) -C addon/configgen" >> $DST
fi
echo "doxywizard:" >> $DST
if test $f_wizard = YES; then
echo " \$(MAKE) -C addon/doxywizard" >> $DST
fi
echo "doxywizard_install:" >> $DST
if test $f_wizard = YES; then
echo " \$(MAKE) -C addon/doxywizard install" >> $DST
fi
fi
echo " Created $DST from $SRC..." echo " Created $DST from $SRC..."
done done
for i in src/doxygen.pro.in src/doxytag.pro.in \ f_inprofiles="src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.pro.in addon/configgen/configgen.pro.in addon/doxywizard/doxywizard.pro.in"
src/doxysearch.pro.in ; do
for i in $f_inprofiles ; do
SRC=$i SRC=$i
DST=`echo $i|sed 's%\(.*\).in$%\1%'` DST=`echo $i|sed 's%\(.*\).in$%\1%'`
TIME=`date` TIME=`date`
......
...@@ -62,6 +62,7 @@ documentation: ...@@ -62,6 +62,7 @@ documentation:
<li> \refitem cmde \e <li> \refitem cmde \e
<li> \refitem cmdendcode \endcode <li> \refitem cmdendcode \endcode
<li> \refitem cmdendhtmlonly \endhtmlonly <li> \refitem cmdendhtmlonly \endhtmlonly
<li> \refitem cmdendif \endif
<li> \refitem cmdendlatexonly \endlatexonly <li> \refitem cmdendlatexonly \endlatexonly
<li> \refitem cmdendlink \endlink <li> \refitem cmdendlink \endlink
<li> \refitem cmdendverbatim \endverbatim <li> \refitem cmdendverbatim \endverbatim
...@@ -74,6 +75,7 @@ documentation: ...@@ -74,6 +75,7 @@ documentation:
<li> \refitem cmdfile \file <li> \refitem cmdfile \file
<li> \refitem cmdfn \fn <li> \refitem cmdfn \fn
<li> \refitem cmdhtmlonly \htmlonly <li> \refitem cmdhtmlonly \htmlonly
<li> \refitem cmdif \if
<li> \refitem cmdimage \image <li> \refitem cmdimage \image
<li> \refitem cmdinclude \include <li> \refitem cmdinclude \include
<li> \refitem cmdingroup \ingroup <li> \refitem cmdingroup \ingroup
...@@ -241,10 +243,12 @@ Doxygen. Unrecognized commands are treated as normal text. ...@@ -241,10 +243,12 @@ Doxygen. Unrecognized commands are treated as normal text.
in a list. The source code is scanned for documented members and classes. in a list. The source code is scanned for documented members and classes.
If any are found, the names are cross-referenced with the documentation. If any are found, the names are cross-referenced with the documentation.
Source files or directories can be specified using the Source files or directories can be specified using the
\c EXAMPLE_PATH tag of Doxygen's configuration file. \ref cfg_example_path "EXAMPLE_PATH"
tag of Doxygen's configuration file.
If \<file-name\> itself is not unique for the set of example files specified If \<file-name\> itself is not unique for the set of example files specified
by the \c EXAMPLE_PATH tag, you can include part of the absolute path by the
\ref cfg_example_path "EXAMPLE_PATH" tag, you can include part of the absolute path
to disambiguate it. to disambiguate it.
If more that one source file is needed for the example, If more that one source file is needed for the example,
...@@ -553,6 +557,16 @@ Doxygen. Unrecognized commands are treated as normal text. ...@@ -553,6 +557,16 @@ Doxygen. Unrecognized commands are treated as normal text.
a deprecated entity. Can be used to describe alternatives, a deprecated entity. Can be used to describe alternatives,
expected life span, etc. expected life span, etc.
<hr>
\subsection cmdendif \endif
\addindex \endif
Ends a conditional section that was started with \c \if.
For each \c \if one and only one matching \c \endif must follow.
\sa \ref cmdif "\\if"
<hr> <hr>
\subsection cmdexception \exception <exception-object> { exception description } \subsection cmdexception \exception <exception-object> { exception description }
...@@ -571,6 +585,37 @@ Doxygen. Unrecognized commands are treated as normal text. ...@@ -571,6 +585,37 @@ Doxygen. Unrecognized commands are treated as normal text.
\par Note: \par Note:
the tag \\exceptions is a synonym for this tag. the tag \\exceptions is a synonym for this tag.
<hr>
\subsection cmdif \if <section-label>
\addindex \if
Starts a conditional documentation section. The section ends
with a matching \c \endif command. A conditional section is
disable by default. To enable it you must put the
section-label after the \ref cfg_enabled_sections "ENABLED_SECTIONS"
tag in the configuration
file. Conditional blocks can be nested. A nested section is
only enabled if all enclosing sections are enabled as well.
\par Example:
\verbatim
/*! Uncoditionally shown documentation.
* \if Cond1
* Only included if Cond1 is set.
* \endif
* \if Cond2
* Only included if Cond2 is set.
* \if Cond3
* Only included if Cond2 and Cond3 are set.
* \endif
* More text.
* \endif
* Unconditional text.
*/
\endverbatim
\sa section \ref cmdendif "\\endif".
<hr> <hr>
\subsection cmdinvariant \invariant { description of invariant } \subsection cmdinvariant \invariant { description of invariant }
...@@ -832,8 +877,9 @@ Doxygen. Unrecognized commands are treated as normal text. ...@@ -832,8 +877,9 @@ Doxygen. Unrecognized commands are treated as normal text.
verbatim including it in the documentation (as the \\include command does). verbatim including it in the documentation (as the \\include command does).
This is useful if you want to divide the source file into smaller pieces and This is useful if you want to divide the source file into smaller pieces and
add documentation between the pieces. add documentation between the pieces.
Source files or directories can be specified using the \c EXAMPLE_PATH tag Source files or directories can be specified using the
of Doxygen's configuration file. \ref cfg_example_path "EXAMPLE_PATH"
tag of Doxygen's configuration file.
The class and member declarations and definitions inside the code fragment The class and member declarations and definitions inside the code fragment
are `remembered' during the parsing of the comment block that contained are `remembered' during the parsing of the comment block that contained
...@@ -863,22 +909,26 @@ Doxygen. Unrecognized commands are treated as normal text. ...@@ -863,22 +909,26 @@ Doxygen. Unrecognized commands are treated as normal text.
This command can be used to include a source file as a block of code. This command can be used to include a source file as a block of code.
The command takes the name of an include file as an argument. The command takes the name of an include file as an argument.
Source files or directories can be specified using the Source files or directories can be specified using the
\c EXAMPLE_PATH tag of Doxygen's configuration file. \ref cfg_example_path "EXAMPLE_PATH"
tag of Doxygen's configuration file.
If \<file-name\> itself is not unique for the set of example files specified If \<file-name\> itself is not unique for the set of example files specified
by the \c EXAMPLE_PATH tag, you can include part of the absolute path by the
to disambiguate it. \ref cfg_example_path "EXAMPLE_PATH" tag, you can include part
of the absolute path to disambiguate it.
Using the \\include command is equivalent to inserting the file into Using the \\include command is equivalent to inserting the file into
the documentation block and surrounding it the documentation block and surrounding it
with \\code and \\endcode commands. with \ref cmdcode "\\code" and \ref cmdendcode "\\endcode" commands.
The main purpose of the \\include command is to avoid code The main purpose of the \\include command is to avoid code
duplication in case of example blocks that consist of multiple duplication in case of example blocks that consist of multiple
source and header files. source and header files.
For a line by line description of a source files use the For a line by line description of a source files use the
\\dontinclude command in combination with the \\line, \\skip, \\skipline, \ref cmddontinclude "\\dontinclude" command in combination with
the \ref cmdline "\\line", \ref cmdskip "\\skip",
\ref cmdskipline "\\skipline",
and \\until commands. and \\until commands.
\sa section \ref cmdexample "\\example" and \ref cmddontinclude "\\dontinclude". \sa section \ref cmdexample "\\example" and \ref cmddontinclude "\\dontinclude".
......
...@@ -68,6 +68,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -68,6 +68,7 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_doc_abspath DOC_ABSPATH <li> \refitem cfg_doc_abspath DOC_ABSPATH
<li> \refitem cfg_doc_url DOC_URL <li> \refitem cfg_doc_url DOC_URL
<li> \refitem cfg_enable_preprocessing ENABLE_PREPROCESSING <li> \refitem cfg_enable_preprocessing ENABLE_PREPROCESSING
<li> \refitem cfg_enabled_sections ENABLED_SECTIONS
<li> \refitem cfg_example_path EXAMPLE_PATH <li> \refitem cfg_example_path EXAMPLE_PATH
<li> \refitem cfg_example_patterns EXAMPLE_PATTERNS <li> \refitem cfg_example_patterns EXAMPLE_PATTERNS
<li> \refitem cfg_exclude EXCLUDE <li> \refitem cfg_exclude EXCLUDE
...@@ -370,6 +371,13 @@ description. ...@@ -370,6 +371,13 @@ description.
the \c TAB_SIZE tag can be used to set the number of spaces in a tab. the \c TAB_SIZE tag can be used to set the number of spaces in a tab.
Doxygen uses this value to replace tabs by spaces in code fragments. Doxygen uses this value to replace tabs by spaces in code fragments.
\anchor cfg_enabled_sections
<dt>\c ENABLED_SECTIONS <dd>
\addindex ENABLED_SECTIONS
The \c ENABLE_SECTIONS tag can be used to enable conditional
documentation sections, marked by \ref cmdif "\\if" \<section-label\> ...
\ref cmdendif "\\endif" blocks.
</dl> </dl>
\subsection config_input Input related options \subsection config_input Input related options
......
Name: doxygen Name: doxygen
Version: 1.1.2-20000417 Version: 1.1.2-20000423
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 1 Release: 1
Source0: doxygen-%{version}.src.tar.gz Source0: doxygen-%{version}.src.tar.gz
......
...@@ -1623,8 +1623,8 @@ void ClassDef::determineImplUsageRelation() ...@@ -1623,8 +1623,8 @@ void ClassDef::determineImplUsageRelation()
bool found=FALSE; bool found=FALSE;
while ((i=re.match(type,p,&l))!=-1 && !found) // for each class name in the type while ((i=re.match(type,p,&l))!=-1 && !found) // for each class name in the type
{ {
ClassDef *cd=getClass(name()+"::"+type.mid(i,l)); ClassDef *cd=getResolvedClass(name()+"::"+type.mid(i,l));
if (cd==0) cd=getClass(type.mid(i,l)); // TODO: also try inbetween scopes! if (cd==0) cd=getResolvedClass(type.mid(i,l)); // TODO: also try inbetween scopes!
if (cd /*&& cd->isLinkable()*/) // class exists and is linkable if (cd /*&& cd->isLinkable()*/) // class exists and is linkable
{ {
found=TRUE; found=TRUE;
......
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
#ifndef CLASSLIST_H #ifndef CLASSLIST_H
#define CLASSLIST_H #define CLASSLIST_H
#include <qlist.h>
#include <qdict.h>
#include "classdef.h" #include "classdef.h"
class ClassList : public QList<ClassDef> class ClassList : public QList<ClassDef>
...@@ -35,4 +38,11 @@ class ClassListIterator : public QListIterator<ClassDef> ...@@ -35,4 +38,11 @@ class ClassListIterator : public QListIterator<ClassDef>
ClassListIterator(const ClassList &list); ClassListIterator(const ClassList &list);
}; };
class ClassDict : public QDict<ClassDef>
{
public:
ClassDict(int size) : QDict<ClassDef>(size) {}
~ClassDict() {}
};
#endif #endif
This diff is collapsed.
This diff is collapsed.
...@@ -166,6 +166,18 @@ class DotNodeList : public QList<DotNode> ...@@ -166,6 +166,18 @@ class DotNodeList : public QList<DotNode>
//-------------------------------------------------------------------- //--------------------------------------------------------------------
/*! helper function that deletes all nodes in a connected graph, given
* one of the graph's nodes
*/
static void deleteNodes(DotNode *node)
{
static DotNodeList deletedNodes;
deletedNodes.setAutoDelete(TRUE);
node->deleteNode(deletedNodes); // collect nodes to be deleted.
deletedNodes.clear(); // actually remove the nodes.
}
DotNode::DotNode(int n,const char *lab,const char *url,int distance,bool isRoot) DotNode::DotNode(int n,const char *lab,const char *url,int distance,bool isRoot)
: m_number(n), m_label(lab), m_url(url), m_isRoot(isRoot) : m_number(n), m_label(lab), m_url(url), m_isRoot(isRoot)
{ {
...@@ -237,39 +249,32 @@ void DotNode::removeParent(DotNode *n) ...@@ -237,39 +249,32 @@ void DotNode::removeParent(DotNode *n)
if (m_parents) m_parents->remove(n); if (m_parents) m_parents->remove(n);
} }
void DotNode::deleteNode() void DotNode::deleteNode(DotNodeList &deletedList)
{ {
if (m_deleted) return; // avoid recursive loops in case the graph has cycles if (m_deleted) return; // avoid recursive loops in case the graph has cycles
m_deleted=TRUE; m_deleted=TRUE;
if (m_parents!=0) if (m_parents!=0) // delete all parent nodes of this node
{ {
QListIterator<DotNode> dnlip(*m_parents); QListIterator<DotNode> dnlip(*m_parents);
DotNode *pn; DotNode *pn;
for (dnlip.toFirst();(pn=dnlip.current());++dnlip) for (dnlip.toFirst();(pn=dnlip.current());++dnlip)
{ {
pn->removeChild(this); //pn->removeChild(this);
if (!pn->m_deleted) pn->deleteNode(deletedList);
{
pn->deleteNode();
}
// do not access pn after this!
} }
} }
if (m_children!=0) if (m_children!=0) // delete all child nodes of this node
{ {
QListIterator<DotNode> dnlic(*m_children); QListIterator<DotNode> dnlic(*m_children);
DotNode *cn; DotNode *cn;
for (dnlic.toFirst();(cn=dnlic.current());++dnlic) for (dnlic.toFirst();(cn=dnlic.current());++dnlic)
{ {
cn->removeParent(this); //cn->removeParent(this);
if (!cn->m_deleted) cn->deleteNode(deletedList);
{
cn->deleteNode();
}
// do not access cn after this!
} }
} }
delete this; // add this node to the list of deleted nodes.
deletedList.append(this);
} }
void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren) void DotNode::writeBox(QTextStream &t,bool hasNonReachableChildren)
...@@ -684,7 +689,7 @@ DotGfxHierarchyTable::~DotGfxHierarchyTable() ...@@ -684,7 +689,7 @@ DotGfxHierarchyTable::~DotGfxHierarchyTable()
{ {
DotNode *oldNode=n; DotNode *oldNode=n;
n=m_rootNodes->next(); n=m_rootNodes->next();
oldNode->deleteNode(); deleteNodes(oldNode);
} }
delete m_rootNodes; delete m_rootNodes;
delete m_usedNodes; delete m_usedNodes;
...@@ -792,7 +797,7 @@ bool DotGfxUsageGraph::isTrivial() const ...@@ -792,7 +797,7 @@ bool DotGfxUsageGraph::isTrivial() const
DotGfxUsageGraph::~DotGfxUsageGraph() DotGfxUsageGraph::~DotGfxUsageGraph()
{ {
m_startNode->deleteNode(); deleteNodes(m_startNode);
delete m_usedNodes; delete m_usedNodes;
} }
...@@ -1011,7 +1016,7 @@ DotInclDepGraph::DotInclDepGraph(FileDef *fd) ...@@ -1011,7 +1016,7 @@ DotInclDepGraph::DotInclDepGraph(FileDef *fd)
DotInclDepGraph::~DotInclDepGraph() DotInclDepGraph::~DotInclDepGraph()
{ {
m_startNode->deleteNode(); deleteNodes(m_startNode);
delete m_usedNodes; delete m_usedNodes;
} }
......
...@@ -56,7 +56,7 @@ class DotNode ...@@ -56,7 +56,7 @@ class DotNode
); );
void setDistance(int distance); void setDistance(int distance);
void addParent(DotNode *n); void addParent(DotNode *n);
void deleteNode(); void deleteNode(DotNodeList &deletedList);
void removeChild(DotNode *n); void removeChild(DotNode *n);
void removeParent(DotNode *n); void removeParent(DotNode *n);
int number() const { return m_number; } int number() const { return m_number; }
......
...@@ -1265,12 +1265,7 @@ void buildMemberList(Entry *root) ...@@ -1265,12 +1265,7 @@ void buildMemberList(Entry *root)
md->setDefLine(root->startLine); md->setDefLine(root->startLine);
md->setDocumentation(root->doc); md->setDocumentation(root->doc);
md->setBriefDescription(root->brief); md->setBriefDescription(root->brief);
//md->setBody(root->body);
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
//if (root->mGrpId!=-1)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
//}
md->setInline(root->inLine); md->setInline(root->inLine);
bool ambig; bool ambig;
md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig)); md->setBodyDef(findFileDef(&inputNameDict,root->fileName,ambig));
...@@ -1597,9 +1592,15 @@ void findFriends() ...@@ -1597,9 +1592,15 @@ void findFriends()
else if (!mmd->briefDescription().isEmpty() && !fmd->briefDescription().isEmpty()) else if (!mmd->briefDescription().isEmpty() && !fmd->briefDescription().isEmpty())
fmd->setBriefDescription(mmd->briefDescription()); fmd->setBriefDescription(mmd->briefDescription());
if (mmd->getStartBodyLine()==-1 && fmd->getStartBodyLine()!=-1) if (mmd->getStartBodyLine()==-1 && fmd->getStartBodyLine()!=-1)
{
mmd->setBodySegment(fmd->getStartBodyLine(),fmd->getEndBodyLine()); mmd->setBodySegment(fmd->getStartBodyLine(),fmd->getEndBodyLine());
mmd->setBodyDef(fmd->getBodyDef());
}
else if (mmd->getStartBodyLine()!=-1 && fmd->getStartBodyLine()==-1) else if (mmd->getStartBodyLine()!=-1 && fmd->getStartBodyLine()==-1)
{
fmd->setBodySegment(mmd->getStartBodyLine(),mmd->getEndBodyLine()); fmd->setBodySegment(mmd->getStartBodyLine(),mmd->getEndBodyLine());
fmd->setBodyDef(mmd->getBodyDef());
}
} }
} }
} }
...@@ -1724,7 +1725,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, ...@@ -1724,7 +1725,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
{ {
baseClassName.prepend(scopeName.left(scopeOffset)+"::"); baseClassName.prepend(scopeName.left(scopeOffset)+"::");
} }
ClassDef *baseClass=getClass(baseClassName); ClassDef *baseClass=getResolvedClass(baseClassName);
if (baseClassName!=root->name) // check for base class with the same name, if (baseClassName!=root->name) // check for base class with the same name,
// look in the outer scope for a match // look in the outer scope for a match
{ {
...@@ -1744,7 +1745,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, ...@@ -1744,7 +1745,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
// but for now, we only look for the unspecializated base class. // but for now, we only look for the unspecializated base class.
templSpec=baseClassName.right(baseClassName.length()-i); templSpec=baseClassName.right(baseClassName.length()-i);
baseClassName=baseClassName.left(i); baseClassName=baseClassName.left(i);
baseClass=getClass(baseClassName); baseClass=getResolvedClass(baseClassName);
//printf("baseClass=%p baseClass=%s templSpec=%s\n", //printf("baseClass=%p baseClass=%s templSpec=%s\n",
// baseClass,baseClassName.data(),templSpec.data()); // baseClass,baseClassName.data(),templSpec.data());
} }
...@@ -1766,7 +1767,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, ...@@ -1766,7 +1767,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
for (nli.toFirst() ; (nd=nli.current()) && !found ; ++nli) for (nli.toFirst() ; (nd=nli.current()) && !found ; ++nli)
{ {
QCString fName = nd->name()+"::"+baseClassName; QCString fName = nd->name()+"::"+baseClassName;
found = (baseClass=getClass(fName))!=0 && baseClass!=cd && found = (baseClass=getResolvedClass(fName))!=0 && baseClass!=cd &&
root->name!=fName; root->name!=fName;
} }
} }
...@@ -1775,7 +1776,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, ...@@ -1775,7 +1776,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
{ {
NamespaceList *nl = nd->getUsedNamespaces(); NamespaceList *nl = nd->getUsedNamespaces();
QCString fName = nd->name()+"::"+baseClassName; QCString fName = nd->name()+"::"+baseClassName;
found = (baseClass=getClass(fName))!=0 && root->name!=fName; found = (baseClass=getResolvedClass(fName))!=0 && root->name!=fName;
if (nl) // try to prepend any of the using namespace scopes. if (nl) // try to prepend any of the using namespace scopes.
{ {
NamespaceListIterator nli(*nl); NamespaceListIterator nli(*nl);
...@@ -1783,7 +1784,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd, ...@@ -1783,7 +1784,7 @@ static bool findBaseClassRelation(Entry *root,ClassDef *cd,
for (nli.toFirst() ; (nd=nli.current()) && !found ; ++nli) for (nli.toFirst() ; (nd=nli.current()) && !found ; ++nli)
{ {
fName = nd->name()+"::"+baseClassName; fName = nd->name()+"::"+baseClassName;
found = (baseClass=getClass(fName))!=0 && baseClass!=cd && found = (baseClass=getResolvedClass(fName))!=0 && baseClass!=cd &&
root->name!=fName; root->name!=fName;
} }
} }
...@@ -4935,7 +4936,7 @@ int main(int argc,char **argv) ...@@ -4935,7 +4936,7 @@ int main(int argc,char **argv)
s=Config::imagePath.first(); s=Config::imagePath.first();
while (s) while (s)
{ {
readFileOrDirectory(s,0,&imageNameDict,0,&Config::imagePatternList, readFileOrDirectory(s,0,&imageNameDict,0,0,
0,0,0); 0,0,0);
s=Config::imagePath.next(); s=Config::imagePath.next();
} }
......
...@@ -79,7 +79,6 @@ class BufStr : public QCString ...@@ -79,7 +79,6 @@ class BufStr : public QCString
typedef QList<QCString> StringList; typedef QList<QCString> StringList;
typedef QDict<MemberDef> MemberDict; typedef QDict<MemberDef> MemberDict;
typedef QDict<ClassDef> ClassDict;
typedef QDict<FileDef> FileDict; typedef QDict<FileDef> FileDict;
typedef QDict<QCString> StringDict; typedef QDict<QCString> StringDict;
typedef QDict<PageInfo> PageDict; typedef QDict<PageInfo> PageDict;
......
# #
# #
# #
# Copyright (C) 1997-1999 by Dimitri van Heesch. # Copyright (C) 1997-2000 by Dimitri van Heesch.
# #
# Permission to use, copy, modify, and distribute this software and its # Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby # documentation under the terms of the GNU General Public License is hereby
......
...@@ -624,7 +624,7 @@ void HtmlGenerator::insertMemberAlign() ...@@ -624,7 +624,7 @@ void HtmlGenerator::insertMemberAlign()
DBG_HTML(t << "<!-- insertMemberAlign -->" << endl) DBG_HTML(t << "<!-- insertMemberAlign -->" << endl)
if (Config::htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
t << "&nbsp;</td><td valign=top>"; t << "&nbsp;</td><td valign=bottom>";
} }
} }
...@@ -652,7 +652,7 @@ void HtmlGenerator::endMemberDescription() ...@@ -652,7 +652,7 @@ void HtmlGenerator::endMemberDescription()
} }
else else
{ {
t << "</em></font></dl>"; t << "<br><br></em></font></dl>";
} }
} }
......
...@@ -167,6 +167,11 @@ void writeClassHierarchy(OutputList &ol) ...@@ -167,6 +167,11 @@ void writeClassHierarchy(OutputList &ol)
for (;cli.current(); ++cli) for (;cli.current(); ++cli)
{ {
ClassDef *cd=cli.current(); ClassDef *cd=cli.current();
//printf("class %s hasVisibleRoot=%d isVisibleInHierarchy=%d\n",
// cd->name().data(),
// hasVisibleRoot(cd->baseClasses()),
// cd->isVisibleInHierarchy()
// );
if (!hasVisibleRoot(cd->baseClasses())) if (!hasVisibleRoot(cd->baseClasses()))
{ {
if (cd->isVisibleInHierarchy()) if (cd->isVisibleInHierarchy())
...@@ -197,11 +202,11 @@ void writeClassHierarchy(OutputList &ol) ...@@ -197,11 +202,11 @@ void writeClassHierarchy(OutputList &ol)
ol.writeIndexItem(0,0,cd->name()); ol.writeIndexItem(0,0,cd->name());
//if (hasHtmlHelp) htmlHelp->addContentsItem(cd->name(),"nodoc"); //if (hasHtmlHelp) htmlHelp->addContentsItem(cd->name(),"nodoc");
} }
} if (!cd->visited && cd->superClasses()->count()>0)
if (!cd->visited && cd->superClasses()->count()>0) {
{ writeClassTree(ol,cd->superClasses(),cd->visited);
writeClassTree(ol,cd->superClasses(),cd->visited); cd->visited=TRUE;
cd->visited=TRUE; }
} }
} }
} }
......
...@@ -634,12 +634,12 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -634,12 +634,12 @@ void MemberDef::writeDeclaration(OutputList &ol,
else else
{ {
type = type.left(i) + " { ... } " + type.right(type.length()-i-l); type = type.left(i) + " { ... } " + type.right(type.length()-i-l);
linkifyText(ol,cname,name(),type); linkifyText(ol,cname,name(),type,TRUE);
} }
} }
else else
{ {
linkifyText(ol,cname,name(),type); linkifyText(ol,cname,name(),type,TRUE);
} }
bool htmlOn = ol.isEnabled(OutputGenerator::Html); bool htmlOn = ol.isEnabled(OutputGenerator::Html);
if (htmlOn && Config::htmlAlignMemberFlag && !type.isEmpty()) if (htmlOn && Config::htmlAlignMemberFlag && !type.isEmpty())
...@@ -995,14 +995,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -995,14 +995,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
parseText(ol,theTranslator->trInitialValue()); parseText(ol,theTranslator->trInitialValue());
ol.endBold(); ol.endBold();
ol.startCodeFragment(); ol.startCodeFragment();
if (isDefine()) parseCode(ol,scopeName,init,FALSE,0);
{
parseCode(ol,scopeName,init,FALSE,0);
}
else
{
parseCode(ol,scopeName,init.simplifyWhiteSpace(),FALSE,0);
}
ol.endCodeFragment(); ol.endCodeFragment();
} }
......
...@@ -31,6 +31,7 @@ NamespaceDef::NamespaceDef(const char *name,const char *ref) : Definition(name) ...@@ -31,6 +31,7 @@ NamespaceDef::NamespaceDef(const char *name,const char *ref) : Definition(name)
{ {
fileName="namespace_"+nameToFile(name); fileName="namespace_"+nameToFile(name);
classList = new ClassList; classList = new ClassList;
classDict = new ClassDict(1009);
//memList = new MemberList; //memList = new MemberList;
usingList = 0; usingList = 0;
setReference(ref); setReference(ref);
...@@ -42,6 +43,7 @@ NamespaceDef::NamespaceDef(const char *name,const char *ref) : Definition(name) ...@@ -42,6 +43,7 @@ NamespaceDef::NamespaceDef(const char *name,const char *ref) : Definition(name)
NamespaceDef::~NamespaceDef() NamespaceDef::~NamespaceDef()
{ {
delete classList; delete classList;
delete classDict;
delete usingList; delete usingList;
delete memberGroupList; delete memberGroupList;
delete memberGroupDict; delete memberGroupDict;
...@@ -54,7 +56,11 @@ void NamespaceDef::insertUsedFile(const char *f) ...@@ -54,7 +56,11 @@ void NamespaceDef::insertUsedFile(const char *f)
void NamespaceDef::insertClass(ClassDef *cd) void NamespaceDef::insertClass(ClassDef *cd)
{ {
classList->append(cd); if (classDict->find(cd->name())==0)
{
classList->append(cd);
classDict->insert(cd->name(),cd);
}
} }
void NamespaceDef::addMemberToGroup(MemberDef *md,int groupId) void NamespaceDef::addMemberToGroup(MemberDef *md,int groupId)
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
class ClassDef; class ClassDef;
class OutputList; class OutputList;
class ClassList; class ClassList;
class ClassDict;
class MemberDef; class MemberDef;
class NamespaceList; class NamespaceList;
class MemberGroupDict; class MemberGroupDict;
...@@ -77,6 +78,7 @@ class NamespaceDef : public Definition ...@@ -77,6 +78,7 @@ class NamespaceDef : public Definition
QCString fileName; QCString fileName;
QStrList files; QStrList files;
ClassList *classList; ClassList *classList;
ClassDict *classDict;
NamespaceList *usingList; NamespaceList *usingList;
MemberList allMemberList; MemberList allMemberList;
......
...@@ -836,6 +836,13 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type) ...@@ -836,6 +836,13 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
return result; return result;
} }
QCString extractName(const QCString &s)
{
uint i=0;
while (i<s.length() && isId(s.at(i))) i++;
return s.left(i);
}
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
//static void addToBody(const char *text); //static void addToBody(const char *text);
...@@ -2823,6 +2830,16 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -2823,6 +2830,16 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
current->type=current->type.simplifyWhiteSpace(); current->type=current->type.simplifyWhiteSpace();
current->args=current->args.simplifyWhiteSpace(); current->args=current->args.simplifyWhiteSpace();
current->name=current->name.stripWhiteSpace(); current->name=current->name.stripWhiteSpace();
if (!current->name.isEmpty() && current->type.left(8)=="typedef ")
{
// add typedef to dictionary
QCString dest = extractName(current->type.right(current->type.length()-8));
if (!dest.isEmpty())
{
//printf(">>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data());
typedefDict.insert(current->name, new QCString(dest));
}
}
current->section = Entry::VARIABLE_SEC ; current->section = Entry::VARIABLE_SEC ;
current->fileName = yyFileName; current->fileName = yyFileName;
current->startLine = yyLineNr; current->startLine = yyLineNr;
...@@ -3707,12 +3724,11 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"") ...@@ -3707,12 +3724,11 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
{ {
if (isTypedef) if (isTypedef)
{ {
// typedefDict.insert(yytext,new QCString(current->name)); QCString dest = extractName(current->name);
// current->type.prepend("typedef "); typedefDict.insert(yytext,new QCString(current->name));
// current->extends //current->extends->append(
current->extends->append( // new BaseInfo(yytext,Public,Normal)
new BaseInfo(yytext,Public,Normal) // );
);
} }
current->type += ' ' ; current->type += ' ' ;
current->type += current->name ; current->type += current->name ;
......
This diff is collapsed.
This diff is collapsed.
...@@ -40,7 +40,7 @@ extern void setAnchors(char id,MemberList *ml,int groupId=-1); ...@@ -40,7 +40,7 @@ extern void setAnchors(char id,MemberList *ml,int groupId=-1);
extern QCString fileToString(const char *name); extern QCString fileToString(const char *name);
extern QCString dateToString(bool); extern QCString dateToString(bool);
extern void linkifyText(OutputList &ol,const char *clName,const char *name, extern void linkifyText(OutputList &ol,const char *clName,const char *name,
const char *text); const char *text,bool autoBreak=FALSE);
extern bool getDefs(const QCString &scopeName,const QCString &memberName, extern bool getDefs(const QCString &scopeName,const QCString &memberName,
const char *, MemberDef *&md, const char *, MemberDef *&md,
ClassDef *&cd,FileDef *&fd, ClassDef *&cd,FileDef *&fd,
...@@ -60,6 +60,7 @@ extern QCString convertSlashes(const QCString &s,bool dots=FALSE); ...@@ -60,6 +60,7 @@ extern QCString convertSlashes(const QCString &s,bool dots=FALSE);
extern QCString substitute(const char *s,const char *src,const char *dst); extern QCString substitute(const char *s,const char *src,const char *dst);
extern QCString resolveDefines(const char *n); extern QCString resolveDefines(const char *n);
extern ClassDef *getClass(const char *key); extern ClassDef *getClass(const char *key);
extern ClassDef *getResolvedClass(const char *key);
extern FileDef *findFileDef(const FileNameDict *fnDict,const char *n, extern FileDef *findFileDef(const FileNameDict *fnDict,const char *n,
bool &ambig); bool &ambig);
extern void showFileDefMatches(const FileNameDict *fnDict,const char *n); extern void showFileDefMatches(const FileNameDict *fnDict,const char *n);
......
...@@ -43,7 +43,7 @@ TMAKE_LFLAGS_DEBUG = ...@@ -43,7 +43,7 @@ TMAKE_LFLAGS_DEBUG =
TMAKE_LFLAGS_SHLIB = -G -h $(TARGET1) TMAKE_LFLAGS_SHLIB = -G -h $(TARGET1)
TMAKE_LFLAGS_SONAME = TMAKE_LFLAGS_SONAME =
TMAKE_LIBS = -lC TMAKE_LIBS =
TMAKE_LIBS_X11 = -lXext -lX11 -lm TMAKE_LIBS_X11 = -lXext -lX11 -lm
TMAKE_LIBS_QT = -lqt TMAKE_LIBS_QT = -lqt
TMAKE_LIBS_QT_OPENGL = -lqgl TMAKE_LIBS_QT_OPENGL = -lqgl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment