summaryrefslogtreecommitdiffstats
path: root/addon/doxywizard
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-07-23 14:06:43 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-07-23 14:06:43 (GMT)
commitea8a1bc7ccbd7b64a31c293caa31240bde7397cf (patch)
tree8bdbe4421ef1ea29861efd26ccfc83849a184148 /addon/doxywizard
parent5346e18047c0e047db2f1b13dc2c767a73c5c305 (diff)
downloadDoxygen-ea8a1bc7ccbd7b64a31c293caa31240bde7397cf.zip
Doxygen-ea8a1bc7ccbd7b64a31c293caa31240bde7397cf.tar.gz
Doxygen-ea8a1bc7ccbd7b64a31c293caa31240bde7397cf.tar.bz2
Release-1.2.8-20010723
Diffstat (limited to 'addon/doxywizard')
-rw-r--r--addon/doxywizard/Makefile.in10
-rw-r--r--addon/doxywizard/Makefile.win_nmake.in37
-rw-r--r--addon/doxywizard/doxywizard.cpp29
-rw-r--r--addon/doxywizard/doxywizard.pro.in18
-rw-r--r--addon/doxywizard/doxywizard_templ.cpp363
-rw-r--r--addon/doxywizard/doxywizard_templ.h76
6 files changed, 61 insertions, 472 deletions
diff --git a/addon/doxywizard/Makefile.in b/addon/doxywizard/Makefile.in
index 1b56e9a..ca5e11d 100644
--- a/addon/doxywizard/Makefile.in
+++ b/addon/doxywizard/Makefile.in
@@ -10,15 +10,9 @@
# See the GNU General Public License for more details.
#
-all: config.l config.h Makefile.doxywizard
+all: Makefile.doxywizard
$(MAKE) -f Makefile.doxywizard $@
-config.l:
- $(CP) ../../src/config.l config.l
-
-config.h:
- $(CP) ../../src/config.h config.h
-
Makefile.doxywizard: doxywizard.pro
$(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
@@ -29,7 +23,7 @@ clean: Makefile.doxywizard
$(MAKE) -f Makefile.doxywizard clean
distclean: clean
- $(RM) Makefile.doxywizard config.l config.h config.cpp
+ $(RM) Makefile.doxywizard
install:
$(INSTTOOL) -d $(INSTALL)/bin
diff --git a/addon/doxywizard/Makefile.win_nmake.in b/addon/doxywizard/Makefile.win_nmake.in
new file mode 100644
index 0000000..a9f86a9
--- /dev/null
+++ b/addon/doxywizard/Makefile.win_nmake.in
@@ -0,0 +1,37 @@
+#
+#
+#
+# Copyright (C) 1997-2001 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.
+#
+
+all: config.h config.l unistd.h Makefile.doxywizard
+ $(MAKE) -f Makefile.doxywizard $@
+
+unistd.h:
+ $(CP) ..\..\src\unistd.h unistd.h
+
+config.h:
+ $(CP) ..\..\src\config.h config.h
+
+config.l:
+ $(CP) ..\..\src\config.l config.l
+
+Makefile.doxywizard: doxywizard.pro
+ $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
+
+tmake:
+ $(ENV) $(PERL) $(TMAKE) doxywizard.pro >Makefile.doxywizard
+
+clean: Makefile.doxywizard
+ $(MAKE) -f Makefile.doxywizard clean
+
+distclean: clean
+ $(RM) Makefile.doxywizard config.cpp
+
+FORCE:
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp
index 2495d87..3fcde0b 100644
--- a/addon/doxywizard/doxywizard.cpp
+++ b/addon/doxywizard/doxywizard.cpp
@@ -56,32 +56,23 @@ static bool loadConfig( QString loadFile )
);
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::instance()->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
- Config::instance()->parse(contents,loadFile);
+ if (Config::instance()->parse(loadFile))
+ {
+ QMessageBox::warning(0,
+ "Warning","Cannot open or read input "+loadFile+"!",
+ "abort"
+ );
+ return FALSE;
+ }
+
Config::instance()->convertStrToVal();
- f.close();
return TRUE;
}
@@ -322,7 +313,7 @@ void Wizard::about()
"<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>"
+ "<center>(c) 2000-2001</center></qt>"
);
}
diff --git a/addon/doxywizard/doxywizard.pro.in b/addon/doxywizard/doxywizard.pro.in
index 3e96901..5337781 100644
--- a/addon/doxywizard/doxywizard.pro.in
+++ b/addon/doxywizard/doxywizard.pro.in
@@ -12,7 +12,8 @@
# project file for the doxywizard project
# special template configuration file because we use flex
-TEMPLATE = doxywizard.t
+unix:TEMPLATE = app.t
+win32:TEMPLATE = doxywizard.t
# executable to generate
TARGET = ../../bin/doxywizard
@@ -28,8 +29,8 @@ HEADERS = doxywizard.h \
inputbool.h \
inputstrlist.h \
inputint.h \
- config.h \
pixmaps.h
+win32:HEADERS += config.h
# source flle for the project
SOURCES = doxywizard.cpp \
@@ -39,8 +40,8 @@ SOURCES = doxywizard.cpp \
inputbool.cpp \
inputstrlist.cpp \
inputint.cpp \
- config.cpp \
pixmaps.cpp
+win32:SOURCES += config.cpp
# where to put the objects
OBJECTS_DIR = obj
@@ -49,7 +50,12 @@ OBJECTS_DIR = obj
MOC_DIR = moc
# extra C++ compiler options
-TMAKE_CXXFLAGS += -DDOXYWIZARD
-win32:TMAKE_CXXFLAGS += -I. -DQT_DLL
-win32:TMAKE_LIBS = $(QTDIR)\lib\qtmain.lib $(QTDIR)\lib\qt-mt230nc.lib user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib
+INCLUDEPATH += ../../src
+win32:TMAKE_CXXFLAGS += -DQT_DLL
+win32:INCLUDEPATH += .
+
+# extra link options
+win32:TMAKE_LIBS = $(QTDIR)\lib\qtmain.lib $(QTDIR)\lib\qt-mt230nc.lib user32.lib gdi32.lib comdlg32.lib imm32.lib ole32.lib uuid.lib wsock32.lib
+win32:TMAKE_LIBS_QT =
+unix:LIBS = -L../../lib -ldoxycfg
diff --git a/addon/doxywizard/doxywizard_templ.cpp b/addon/doxywizard/doxywizard_templ.cpp
deleted file mode 100644
index cafec21..0000000
--- a/addon/doxywizard/doxywizard_templ.cpp
+++ /dev/null
@@ -1,363 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2001 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 <stdlib.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,loadFile);
- 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" );
-
- //Micha: QToolButton * =
- new QToolButton( QPixmap( rundoxygen_xpm ), "Save and Run doxygen", QString::null,
- this, SLOT(runDoxygen()), fileTools, "save and run doxygen" );
-
-
- 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( QIconSet(QPixmap(rundoxygen_xpm)),
- "&Run", this, SLOT(runDoxygen()), CTRL+Key_R );
- doxygen->setWhatsThis ( itemIndex, "Run doxygen with the current configuration file..." );
-
- // 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 );
-}
-
-//Micha
-void Wizard::runDoxygen()
-{
- saveFile();
- QString s = "doxygen " + configFileName;
- system((const char*)s);
- statusBar()->message("doxygen completed: "+ 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
deleted file mode 100644
index 92e35e1..0000000
--- a/addon/doxywizard/doxywizard_templ.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2001 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();
- void runDoxygen(); // Micha
-
- 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