diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-13 10:48:37 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-13 10:48:37 -0300 |
commit | 14e2207a58e79360bd48507b5e386ec944d8dd74 (patch) | |
tree | 2e903282fef303d610ebfb6b7913e9a0b5a84825 /ApiExtractor/reporthandler.h | |
parent | 744d018dd857543f93f3961cf9e7f70adcc7ce65 (diff) |
Move ApiExtractor into ApiExtractor directory to ease the merge into Shiboken.
Diffstat (limited to 'ApiExtractor/reporthandler.h')
-rw-r--r-- | ApiExtractor/reporthandler.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/ApiExtractor/reporthandler.h b/ApiExtractor/reporthandler.h new file mode 100644 index 000000000..f1fae50ed --- /dev/null +++ b/ApiExtractor/reporthandler.h @@ -0,0 +1,75 @@ +/* + * This file is part of the API Extractor project. + * + * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + * + * Contact: PySide team <contact@pyside.org> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef REPORTHANDLER_H +#define REPORTHANDLER_H + +class QString; +#include "apiextractormacros.h" + +class APIEXTRACTOR_API ReportHandler +{ +public: + enum DebugLevel { NoDebug, SparseDebug, MediumDebug, FullDebug }; + + static void setContext(const QString &context); + + static DebugLevel debugLevel(); + static void setDebugLevel(DebugLevel level); + + static int warningCount(); + + static int suppressedCount(); + + static void warning(const QString &str); + + template <typename T> + static void setProgressReference(T collection) + { + setProgressReference(collection.count()); + } + + static void setProgressReference(int max); + + static void progress(const QString &str, ...); + + static void debugSparse(const QString &str) + { + debug(SparseDebug, str); + } + static void debugMedium(const QString &str) + { + debug(MediumDebug, str); + } + static void debugFull(const QString &str) + { + debug(FullDebug, str); + } + static void debug(DebugLevel level, const QString &str); + + static bool isSilent(); + static void setSilent(bool silent); + static void flush(); +}; + +#endif // REPORTHANDLER_H |