From 7ba78eb787b925c99bfd5838543bb98e0d4743c8 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Thu, 11 Jan 2018 13:39:59 +0100 Subject: added more source code documentation --- Doxyfile | 6 ++++-- images/tikzit128x128.png | Bin 0 -> 6525 bytes src/data/graph.h | 2 +- src/data/tikzdocument.h | 2 +- src/data/tikzlexer.l | 5 +++++ src/data/tikzparser.y | 6 ++++++ src/gui/mainwindow.h | 2 +- src/gui/nodeitem.h | 2 +- src/gui/propertypalette.h | 2 +- src/gui/tikzscene.h | 2 +- src/gui/tikzview.h | 2 +- src/gui/toolpalette.h | 2 +- src/gui/undocommands.h | 4 +++- src/main.cpp | 6 ++++++ src/tikzit.h | 29 +++++++++++++++++++++++++---- src/util.h | 2 +- 16 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 images/tikzit128x128.png diff --git a/Doxyfile b/Doxyfile index 039ed89..56cedb0 100644 --- a/Doxyfile +++ b/Doxyfile @@ -51,7 +51,7 @@ PROJECT_BRIEF = "A GUI diagram editor for TikZ" # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. -PROJECT_LOGO = images/tikzit48x48.png +PROJECT_LOGO = /Users/alek/git/tikzit/images/tikzit128x128.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is @@ -859,7 +859,9 @@ FILE_PATTERNS = *.c \ *.vhd \ *.vhdl \ *.ucf \ - *.qsf + *.qsf \ + *.l \ + *.y # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. diff --git a/images/tikzit128x128.png b/images/tikzit128x128.png new file mode 100644 index 0000000..2b09b4e Binary files /dev/null and b/images/tikzit128x128.png differ diff --git a/src/data/graph.h b/src/data/graph.h index 8856e5c..c25d51b 100644 --- a/src/data/graph.h +++ b/src/data/graph.h @@ -1,4 +1,4 @@ -/** +/*! * A graph defined by tikz code. */ diff --git a/src/data/tikzdocument.h b/src/data/tikzdocument.h index f574f5c..d3a18b1 100644 --- a/src/data/tikzdocument.h +++ b/src/data/tikzdocument.h @@ -1,4 +1,4 @@ -/** +/*! * This class contains a tikz Graph, source code, file info, and undo stack. It serves as the model * in the MVC triple (TikzDocument, TikzView, TikzScene). */ diff --git a/src/data/tikzlexer.l b/src/data/tikzlexer.l index 8dd23c6..800ef8e 100644 --- a/src/data/tikzlexer.l +++ b/src/data/tikzlexer.l @@ -1,4 +1,9 @@ %{ +/*! + * \file tikzlexer.l + * + * The lexer for tikz input. + */ /* * Copyright 2010 Chris Heunen * Copyright 2010-2013 Aleks Kissinger diff --git a/src/data/tikzparser.y b/src/data/tikzparser.y index 420b8a0..aa6ac76 100644 --- a/src/data/tikzparser.y +++ b/src/data/tikzparser.y @@ -1,4 +1,10 @@ %{ +/*! + * \file tikzparser.y + * + * The parser for tikz input. + */ + /* * Copyright 2010 Chris Heunen * Copyright 2010-2013 Aleks Kissinger diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index f27677a..8adf1bc 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -1,4 +1,4 @@ -/** +/*! * A top-level window, which contains a single TikzDocument. */ diff --git a/src/gui/nodeitem.h b/src/gui/nodeitem.h index 9a3edb0..eb3fbb3 100644 --- a/src/gui/nodeitem.h +++ b/src/gui/nodeitem.h @@ -1,4 +1,4 @@ -/** +/*! * A QGraphicsItem that handles drawing a single node. */ diff --git a/src/gui/propertypalette.h b/src/gui/propertypalette.h index 7910d70..80f2d88 100644 --- a/src/gui/propertypalette.h +++ b/src/gui/propertypalette.h @@ -1,4 +1,4 @@ -/** +/*! * Enables the user to edit properties of the graph, as well as the selected node/edge. */ diff --git a/src/gui/tikzscene.h b/src/gui/tikzscene.h index 6817792..936d42e 100644 --- a/src/gui/tikzscene.h +++ b/src/gui/tikzscene.h @@ -1,4 +1,4 @@ -/** +/*! * Manage the scene, which contains a single Graph, and respond to user input. This serves as * the controller for the MVC (TikzDocument, TikzView, TikzScene). */ diff --git a/src/gui/tikzview.h b/src/gui/tikzview.h index fc3cba4..f89729b 100644 --- a/src/gui/tikzview.h +++ b/src/gui/tikzview.h @@ -1,4 +1,4 @@ -/** +/*! * Display a Graph, and manage any user input that purely changes the view (e.g. Zoom). This * serves as the view in the MVC (TikzDocument, TikzView, TikzScene). */ diff --git a/src/gui/toolpalette.h b/src/gui/toolpalette.h index ba6aed5..c28b5a1 100644 --- a/src/gui/toolpalette.h +++ b/src/gui/toolpalette.h @@ -1,4 +1,4 @@ -/** +/*! * A small window that lets the user select the current editing tool. */ diff --git a/src/gui/undocommands.h b/src/gui/undocommands.h index ffff876..0a7dece 100644 --- a/src/gui/undocommands.h +++ b/src/gui/undocommands.h @@ -1,4 +1,6 @@ -/** +/*! + * \file undocommands.h + * * All changes to a TikzDocument are done via subclasses of QUndoCommand. When a controller * (e.g. TikzScene) gets input from the user to change the document, it will push one of * these commands onto the TikzDocument's undo stack, which automatically calls the redo() diff --git a/src/main.cpp b/src/main.cpp index b676211..6b14549 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,9 @@ +/** + * \file main.cpp + * + * The main entry point for the TikZiT executable. + */ + #include "tikzit.h" #include diff --git a/src/tikzit.h b/src/tikzit.h index deb683e..1846b15 100644 --- a/src/tikzit.h +++ b/src/tikzit.h @@ -1,7 +1,28 @@ -/** - * Tikzit is the top-level class which maintains the global application state. For convenience, - * it also inherits the main menu. - */ +/*! + * + * \mainpage TikZiT Documentation + * + * This is the source code documentation for TikZiT. The global entry point + * for the TikZiT executable is in main.cpp, whereas the class Tikzit maintains + * the global application state. + * + * The TikZ parser is implemented in flex/bison in the files tikzlexer.l and tikzparser.y. + * + * Most of the interesting code for handling user input is in the class TikzScene. Anything + * that makes a change to the tikz file should be implemented as a QUndoCommand. Currently, + * these are all in undocommands.h. + * + */ + +/*! + * + * \class Tikzit + * + * Tikzit is the top-level class which maintains the global application state. For convenience, + * it also holds an instance of the main menu for macOS (or Ubuntu unity) style GUIs which only + * have one, application-level menu. + * + */ #ifndef TIKZIT_H #define TIKZIT_H diff --git a/src/util.h b/src/util.h index 2952214..7622269 100644 --- a/src/util.h +++ b/src/util.h @@ -1,4 +1,4 @@ -/** +/*! * Various utility functions, mostly for mathematical calculation. */ -- cgit v1.2.3