diff options
author | Nao Pross <naopross@thearcway.org> | 2017-12-19 22:47:05 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2017-12-19 22:47:05 +0100 |
commit | 631f37ee26c19d38408ee733ffda24ad283c7921 (patch) | |
tree | 0d12f7201337ac9c459aac48b5e4421f6a1f7db2 /include/debugtools.h | |
parent | Update gitignore for QtCreator (diff) | |
download | OrbitingYeti-631f37ee26c19d38408ee733ffda24ad283c7921.tar.gz OrbitingYeti-631f37ee26c19d38408ee733ffda24ad283c7921.zip |
Implement basic ui
Changes:
- Clean up code to use Qt coding style
- Add comments to some methods
- Add debugtools to have debug_msg() and debug_err() macros
- New Serializer class header to save / load data
- MetadataDialog: check validity of metadata
- MainWindow: initial code for `tool' buttons to edit the structogram
- MainWindow: open / save dialog
Diffstat (limited to 'include/debugtools.h')
-rw-r--r-- | include/debugtools.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/debugtools.h b/include/debugtools.h new file mode 100644 index 0000000..cd6940b --- /dev/null +++ b/include/debugtools.h @@ -0,0 +1,27 @@ +#ifndef DEBUGTOOLS_H +#define DEBUGTOOLS_H + +#ifdef QT_NO_DEBUG + +void debug_msg(...) {} +void debug_err(...) {} + +#else +#include <iostream> + +#define debug_msg(msg) \ +do { \ + std::cout << "DEBUG [" \ + << __FILE__ << " @ " << __LINE__ \ + << "]: " << msg << std::endl; \ +} while (0) + +#define debug_err(msg) \ +do { \ + std::cerr << "ERROR [" \ + << __FILE__ << " @ " << __LINE__ \ + << "]: " << msg << std::endl; \ +} while (0) + +#endif // QT_NO_DEBUG +#endif // DEBUGTOOLS_H |