scan: log: flip switches to r/o etc.
[abby.git] / src / util.h
blob4662ad35cf07dc3c3d951e24a49959ed975cce0e
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);
53 class NoCcliveException {
54 public:
55 NoCcliveException(const QString& errmsg);
56 NoCcliveException(const QString& path, const QString& errmsg);
57 NoCcliveException(const QString& path,
58 const int& exitCode, const QString& output);
59 public:
60 const QString& what() const;
61 private:
62 QString errmsg;
65 #endif