update news, changelog.
[abby.git] / src / util.h
blob18a4e42b24a016ffa3f6038caaa690b70e5e0e23
1 /*
2 * abby Copyright (C) 2009 Toni Gundogdu.
3 * This file is part of abby.
5 * abby is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * abby is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef util_h
20 #define util_h
22 class QTreeWidget;
23 class QTextEdit;
25 class Util {
26 public:
27 static void detectCclive(
28 QString& path,
29 QString& version,
30 QString& libVersion,
31 QString& libName,
32 bool *isCcliveFlag
34 static void verifyCclivePath(
35 const QString& path,
36 QString& version,
37 QString& libVersion,
38 QString& libName,
39 bool *isCcliveFlag=NULL
41 static void checkAllItems(
42 const QTreeWidget *w,
43 const Qt::CheckState& st,
44 const int column=0
46 static void invertAllCheckableItems(
47 const QTreeWidget *w,
48 const int column=0
50 static void appendLog(const QTextEdit *w, const QString& s);
51 static int countItems(const QTreeWidget *w);
54 class NoCcliveException {
55 public:
56 NoCcliveException(const QString& errmsg);
57 NoCcliveException(const QString& path, const QString& errmsg);
58 NoCcliveException(const QString& path,
59 const int& exitCode, const QString& output);
60 public:
61 const QString& what() const;
62 private:
63 QString errmsg;
66 #endif