summaryrefslogtreecommitdiffstats
path: root/addon/doxywizard/doxywizard.h
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-07-04 18:58:02 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-07-04 18:58:02 (GMT)
commit285d9c6265b673238b1a97bb7da5ea48aff16beb (patch)
tree664f7eba133cf2b4d4e8add25229777806fc9b8c /addon/doxywizard/doxywizard.h
parentd3c3bbd02543280d12a763d82aa5b54ce516c57f (diff)
downloadDoxygen-285d9c6265b673238b1a97bb7da5ea48aff16beb.zip
Doxygen-285d9c6265b673238b1a97bb7da5ea48aff16beb.tar.gz
Doxygen-285d9c6265b673238b1a97bb7da5ea48aff16beb.tar.bz2
Release-1.3.7-20040704
Diffstat (limited to 'addon/doxywizard/doxywizard.h')
-rw-r--r--addon/doxywizard/doxywizard.h349
1 files changed, 265 insertions, 84 deletions
diff --git a/addon/doxywizard/doxywizard.h b/addon/doxywizard/doxywizard.h
index 7b40ec8..6964cfe 100644
--- a/addon/doxywizard/doxywizard.h
+++ b/addon/doxywizard/doxywizard.h
@@ -1,111 +1,292 @@
-/******************************************************************************
- *
- *
- *
- * Copyright (C) 1997-2004 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
+#ifndef DOXYWIZARD_H
+#define DOXYWIZARD_H
+#include <qvbox.h>
+#include <qtabdialog.h>
#include <qmainwindow.h>
-#include <qlist.h>
-#include <qdict.h>
-
-class IInput;
-class QToolBar;
-class QWidget;
-class QObject;
-class ConfigFile;
-class InputBool;
-class InputString;
-class InputStrList;
-class InputFile;
-class InputDir;
-class InputInt;
-
-class Wizard : public QMainWindow
+#include <qsettings.h>
+#include <qstringlist.h>
+
+class QLineEdit;
+class QCheckBox;
+class QPushButton;
+class QComboBox;
+class QButtonGroup;
+class QTextEdit;
+class QLabel;
+class QProcess;
+class QTimer;
+class QPopupMenu;
+
+enum OptLang { Lang_Cpp, Lang_C, Lang_Java };
+enum HtmlStyle { HS_Plain, HS_TreeView, HS_CHM };
+enum TexStyle { TS_PDFHyper, TS_PDF, TS_PS };
+enum DiagramMode { DM_None, DM_Builtin, DM_Dot };
+
+class Step1 : public QWidget
{
- Q_OBJECT
+ Q_OBJECT
public:
- Wizard(int argc,char **argv);
- ~Wizard(){};
- void loadFile(const char *s);
+ Step1(QWidget *parent);
+
+ QString getProjectName() const;
+ QString getProjectNumber() const;
+ QString getSourceDir() const;
+ bool scanRecursively() const;
+ QString getDestinationDir() const;
+
+ void setProjectName(const QString &name);
+ void setProjectNumber(const QString &num);
+ void setSourceDir(const QString &dir);
+ void setRecursiveScan(bool enable);
+ void setDestinationDir(const QString &dir);
private slots:
- void newFile();
- void loadFile();
- void saveFile();
- void saveAsFile();
- void quit();
- void changed();
- void about();
- void runDoxygen(); // Micha
+ void selectSourceDir();
+ void selectDestinationDir();
+
+ private:
+ QLineEdit *m_projName;
+ QLineEdit *m_projNumber;
+ QLineEdit *m_sourceDir;
+ QLineEdit *m_destDir;
+ QCheckBox *m_recursive;
+ QPushButton *m_srcSelectDir;
+ QPushButton *m_dstSelectDir;
+};
- signals:
+class Step2 : public QWidget
+{
+ public:
+ Step2(QWidget *parent);
+ bool crossReferencingEnabled() const;
+ void enableCrossReferencing();
+
+ bool extractAll() const;
+ bool crossReferencing() const;
+ OptLang optimizeFor() const;
+
+ void setExtractAll(bool enable);
+ void setCrossReferencing(bool enable);
+ void setOptimizeFor(OptLang lang);
private:
- void refreshCaption();
- QToolBar *fileTools;
- bool hasChanged;
- ConfigFile *cw;
+ QButtonGroup *m_extractMode;
+ QButtonGroup *m_optimizeLang;
+ QCheckBox *m_crossRef;
};
-class ConfigWidget
+class Step3 : public QWidget
{
+ Q_OBJECT
+
public:
- enum Kind { Int, String, StrList, Bool };
-
- ConfigWidget(QWidget *w,Kind k) : m_widget(w), m_kind(k) {}
-
- Kind kind() const { return m_kind; }
-
- InputString *getString() const
- { return m_kind==String ? (InputString *)m_widget : 0; }
-
- InputBool *getBool() const
- { return m_kind==Bool ? (InputBool *)m_widget : 0; }
-
- InputStrList *getStrList() const
- { return m_kind==StrList ? (InputStrList *)m_widget : 0; }
-
- InputInt *getInt() const
- { return m_kind==Int ? (InputInt *)m_widget : 0; }
+ Step3(QWidget *parent);
+
+ bool htmlEnabled() const;
+ bool latexEnabled() const;
+ bool manEnabled() const;
+ bool rtfEnabled() const;
+ bool xmlEnabled() const;
+ bool searchEnabled() const;
+ HtmlStyle htmlStyle() const;
+ TexStyle texStyle() const;
+
+ void setHtmlEnabled(bool);
+ void setLatexEnabled(bool);
+ void setManEnabled(bool);
+ void setRtfEnabled(bool);
+ void setXmlEnabled(bool);
+ void setSearchEnabled(bool);
+ void setHtmlStyle(HtmlStyle);
+ void setTexStyle(TexStyle);
+
+
+ private slots:
+ void latexStateChange(int state);
+ void htmlStateChange(int state);
+
+ private:
+ QButtonGroup *m_texOptions;
+ QVBox *m_texOptionBox;
+ QButtonGroup *m_htmlOptions;
+ QVBox *m_htmlOptionBox;
+ QCheckBox *m_htmlEnabled;
+ QCheckBox *m_latexEnabled;
+ QCheckBox *m_manEnabled;
+ QCheckBox *m_rtfEnabled;
+ QCheckBox *m_xmlEnabled;
+ QCheckBox *m_searchEnabled;
+};
+
+class Step4 : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ Step4(QWidget *parent);
+ void disableCallGraphs();
+ bool callGraphEnabled() const;
+
+ DiagramMode diagramMode() const;
+ bool classDiagram() const;
+ bool collaborationDiagram() const;
+ bool includeGraph() const;
+ bool includedByGraph() const;
+ bool inheritanceGraph() const;
+ bool callGraph() const;
+
+ void setDiagramMode(DiagramMode mode);
+ void setClassDiagram(bool enable);
+ void setCollaborationDiagram(bool enable);
+ void setIncludeGraph(bool enable);
+ void setIncludedByGraph(bool enable);
+ void setInheritanceGraph(bool enable);
+ void setCallGraph(bool enable);
+
+ private slots:
+ void diagramModeChanged(int);
private:
- QWidget *m_widget;
- Kind m_kind;
+ QButtonGroup *m_diagramMode;
+ QVBox *m_dotOptions;
+ QCheckBox *m_dotClass;
+ QCheckBox *m_dotCollaboration;
+ QCheckBox *m_dotInclude;
+ QCheckBox *m_dotIncludedBy;
+ QCheckBox *m_dotInheritance;
+ QCheckBox *m_dotCall;
};
-class ConfigFile : public QWidget
+class Wizard : public QTabDialog
{
- Q_OBJECT
+ Q_OBJECT
public:
- ConfigFile(QWidget *parent=0);
- ~ConfigFile();
- void init();
- void addDependency(QDict<QObject> *switches,
- const QCString &dep,const QCString &name);
-
- signals:
- void changed();
+ Wizard(QWidget *parent);
+ void disableCallGraphs();
+
+ // step1
+ QString getProjectName() const { return m_step1->getProjectName(); }
+ QString getProjectNumber() const { return m_step1->getProjectNumber(); }
+ QString getSourceDir() const { return m_step1->getSourceDir(); }
+ bool scanRecursively() const { return m_step1->scanRecursively(); }
+ QString getDestinationDir() const { return m_step1->getDestinationDir(); }
+
+ void setProjectName(const QString &name) { m_step1->setProjectName(name); }
+ void setProjectNumber(const QString &num) { m_step1->setProjectNumber(num); }
+ void setSourceDir(const QString &dir) { m_step1->setSourceDir(dir); }
+ void setRecursiveScan(bool enable) { m_step1->setRecursiveScan(enable); }
+ void setDestinationDir(const QString &dir) { m_step1->setDestinationDir(dir); }
+
+ // step2
+ bool extractAll() const { return m_step2->extractAll(); }
+ bool crossReferencing() const { return m_step2->crossReferencing(); }
+ OptLang optimizeFor() const { return m_step2->optimizeFor(); }
+
+ void setExtractAll(bool enable) { m_step2->setExtractAll(enable); }
+ void setCrossReferencing(bool enable) { m_step2->setCrossReferencing(enable); }
+ void setOptimizeFor(OptLang lang) { m_step2->setOptimizeFor(lang); }
- private slots:
- void toggle(const char *,bool);
+ // step3
+ bool htmlEnabled() const { return m_step3->htmlEnabled(); }
+ bool latexEnabled() const { return m_step3->latexEnabled(); }
+ bool manEnabled() const { return m_step3->manEnabled(); }
+ bool rtfEnabled() const { return m_step3->rtfEnabled(); }
+ bool xmlEnabled() const { return m_step3->xmlEnabled(); }
+ bool searchEnabled() const { return m_step3->searchEnabled(); }
+ HtmlStyle htmlStyle() const { return m_step3->htmlStyle(); }
+ TexStyle texStyle() const { return m_step3->texStyle(); }
+
+ void setHtmlEnabled(bool enable) { m_step3->setHtmlEnabled(enable); }
+ void setLatexEnabled(bool enable) { m_step3->setLatexEnabled(enable); }
+ void setManEnabled(bool enable) { m_step3->setManEnabled(enable); }
+ void setRtfEnabled(bool enable) { m_step3->setRtfEnabled(enable); }
+ void setXmlEnabled(bool enable) { m_step3->setXmlEnabled(enable); }
+ void setSearchEnabled(bool enable) { m_step3->setSearchEnabled(enable); }
+ void setHtmlStyle(HtmlStyle style) { m_step3->setHtmlStyle(style); }
+ void setTexStyle(TexStyle style) { m_step3->setTexStyle(style); }
+ // step4
+ DiagramMode diagramMode() const { return m_step4->diagramMode(); }
+ bool classDiagram() const { return m_step4->classDiagram(); }
+ bool collaborationDiagram() const { return m_step4->collaborationDiagram(); }
+ bool includeGraph() const { return m_step4->includeGraph(); }
+ bool includedByGraph() const { return m_step4->includedByGraph(); }
+ bool inheritanceGraph() const { return m_step4->inheritanceGraph(); }
+ bool callGraph() const { return m_step4->callGraph(); }
+
+ void setDiagramMode(DiagramMode mode) { m_step4->setDiagramMode(mode); }
+ void setClassDiagram(bool enable) { m_step4->setClassDiagram(enable); }
+ void setCollaborationDiagram(bool enable) { m_step4->setCollaborationDiagram(enable); }
+ void setIncludeGraph(bool enable) { m_step4->setIncludeGraph(enable); }
+ void setIncludedByGraph(bool enable) { m_step4->setIncludedByGraph(enable); }
+ void setInheritanceGraph(bool enable) { m_step4->setInheritanceGraph(enable); }
+ void setCallGraph(bool enable) { m_step4->setCallGraph(enable); }
+
+ public slots:
+ void changeCallGraphState(int state);
+ void changeCrossRefState(int state);
+
+ private:
+ Step1 *m_step1;
+ Step2 *m_step2;
+ Step3 *m_step3;
+ Step4 *m_step4;
+};
+
+class MainWidget : public QMainWindow
+{
+ Q_OBJECT
+ public:
+ MainWidget(QWidget *parent=0);
+ ~MainWidget();
+
+ private slots:
+ void launchWizard();
+ void launchExpert();
+ void loadConfigFile();
+ void selectWorkingDir();
+ void updateRunnable(const QString &newDirName);
+ void saveDefaults();
+ void saveConfigFile();
+ void runDoxygen();
+ void readStdout();
+ void runComplete();
+ void about();
+ void manual();
+ void resetConfig();
+ void openRecent(int);
+ void quit();
+ void saveLog();
+
private:
- QDict<IInput> *m_inputWidgets;
- QDict< QList<IInput> > *m_dependencies;
- QDict<QObject> *m_switches;
+ void setConfigSaved(bool);
+ void loadConfigFromFile(const QString &);
+ void addRecentFile(const QString &);
+
+ QPushButton *m_wizard;
+ QPushButton *m_expert;
+ QPushButton *m_load;
+ QPushButton *m_save;
+ QPushButton *m_defaults;
+ QLineEdit *m_workingDir;
+ QPushButton *m_selWorkingDir;
+ QPushButton *m_run;
+ QPushButton *m_saveLog;
+ QLabel *m_runStatus;
+ QProcess *m_runProcess;
+ QLabel *m_saveStatus;
+ QLabel *m_outputHeading;
+ QTextEdit *m_outputLog;
+ QTimer *m_timer;
+ QSettings m_settings;
+ QPopupMenu *m_recentMenu;
+ bool m_configSaved;
+ bool m_running;
+ QString m_configFileName;
+ QStringList m_recentFiles;
};
#endif